On 02/03/14 16:05, Duncan Moore wrote:>
> On 02/03/2014 12:39, Lee Noar wrote:
>> Perhaps if you email me your a/out binary I can try it here and see if
>> I get the same result and I can compare it against mine.
>
> The zip file has 4 binaries - one for each of no optimisation, -O1, -O2
> and -O3.
>
>> would the ELF help?
>>
>> The ELF? I'm not sure what you're referring to there.
>
> I meant the a/out binary, of filetype ELF!
Doh! Of course, seems obvious now :-)
Well, I see the problem in your binary now and it's a bit odd.
This is what my main looks like:
00000484 : FF000008 : ; func: main
00000488 : E1A0C00D : MOV R12,R13
0000048C : E92DD810 : STMDB R13!,{R4,R11,R12,R14,PC}
00000490 : E24CB004 : SUB R11,R12,#4
00000494 : E15D000A : CMP R13,R10
00000498 : BBFFFFEB : BLLT &0000044C
0000049C : E3A04000 : MOV R4,#0
000004A0 : E1A01004 : MOV R1,R4
000004A4 : E59F0014 : LDR R0,&000004C0
000004A8 : E2844001 : ADD R4,R4,#1
000004AC : EBFFFFEC : BL &00000464
000004B0 : E3540006 : CMP R4,#6
000004B4 : 1AFFFFF9 : BNE &000004A0
000004B8 : E3A00000 : MOV R0,#0
000004BC : E91BA810 : LDMDB R11,{R4,R11,R13,PC}
000004C0 : 000087C0 : ANDEQ R8,R0,R0,ASR #15
000004C4 : E59F3010 : LDR R3,&000004DC
000004C8 : E583000C : STR R0,[R3,#12]
000004CC : E583101C : STR R1,[R3,#28]
000004D0 : E5832020 : STR R2,[R3,#32]
000004D4 : E1A00003 : MOV R0,R3
000004D8 : EAFFFFDE : B &00000458
000004DC : 000088A8 : ANDEQ R8,R0,R8,LSR #17
and this is what yours looks like:
00000484 : FF000008 : ; func: main
00000488 : E1A0C00D : MOV R12,R13
0000048C : E92DD810 : STMDB R13!,{R4,R11,R12,R14,PC}
00000490 : E15D000A : CMP R13,R10
00000494 : BBFFFFF2 : BLLT &00000464
00000498 : E3A04000 : MOV R4,#0
0000049C : E1A01004 : MOV R1,R4
000004A0 : E59F0008 : LDR R0,&000004B0
000004A4 : EBFFFFE8 : BL &0000044C
000004A8 : E2844001 : ADD R4,R4,#1
000004AC : EAFFFFFA : B &0000049C
000004B0 : 000087B0 : Undefined instruction
000004B4 : E59F3010 : LDR R3,&000004CC
000004B8 : E583000C : STR R0,[R3,#12]
000004BC : E583101C : STR R1,[R3,#28]
000004C0 : E5832020 : STR R2,[R3,#32]
000004C4 : E1A00003 : MOV R0,R3
000004C8 : EAFFFFDC : B &00000440
000004CC : 00008898 : Undefined instruction
The loop control instructions are missing as well as the function
epilogue; the compiler knew it was creating an infinite loop.
I assume you built the compiler yourself on the 8th January? So
you have a cross compiler? Could try with the cross compiler to
see if that gives the same result please.
I'm beginning to think that someone committed a change upstream
that broke the compiler and you were unlucky enough to check it
out. I'm on upstream revision 206333 and you are on 206442,
so if that's the case it happened between the two - they may
even have fixed already.
Perhaps you could try upgrading your GCC source tree and
rebuilding.
Thanks,
Lee.
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK
No comments:
Post a Comment