[Bug target/58092] BEQ (Branch on equal) jumps to wrong address (executes conditional code!)
zajec5 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 7 09:58:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58092
--- Comment #7 from Rafał Miłecki <zajec5 at gmail dot com> ---
I compiled two versions of gcc on my own:
1) gcc-4.6.4.tar.bz2
2) gcc-linaro-4.6-2012.12.tar.bz2
For both of them I've used binutils-2.22.tar.bz2
test.o compiled with gcc-4.6.4.tar.bz2
00000000 <test>:
0: 24020002 li v0,2
4: aca20000 sw v0,0(a1)
8: 24020004 li v0,4
c: 14820002 bne a0,v0,18 <test+0x18>
10: 24020008 li v0,8
14: aca20040 sw v0,64(a1)
18: 03e00008 jr ra
1c: 00000000 nop
test.o compiled with gcc-linaro-4.6-2012.12.tar.bz2
00000000 <test>:
0: 24020002 li v0,2
4: 24030004 li v1,4
8: aca20000 sw v0,0(a1)
c: 10830002 beq a0,v1,18 <test+0x18>
10: 24020008 li v0,8
14: 8ca20040 lw v0,64(a1)
18: aca20040 sw v0,64(a1)
1c: 03e00008 jr ra
20: 00000000 nop
So it seems to be Linaro fault. I'll report that problem to them.
More information about the Gcc-bugs
mailing list