Bug in Coldfire target
Jeffrey A Law
law@cygnus.com
Sat Oct 31 01:21:00 GMT 1998
In message <Pine.LNX.3.96.980913134349.1866A-100000@odalix.TeCNeT.DE>you writ
> egcs-1.1b seems to have a bug in the code generation for
> the Coldfire target (m68k with -m5200). The compiler
> generates wrong code for the following program:
>
> >>>>>>
>
> void foo(int);
>
> void bar(unsigned short i)
> {
> foo(i - 300000);
> }
I believe this has been fixed for the upcoming egcs-1.1.1 release. Here's
the code I get. Note the pea -300000(%a0) is gone...
bar:
link.w %a6,#0
clr.l %d0
move.w 10(%a6),%d0
add.l #-300000,%d0
move.l %d0,-(%sp)
jsr foo
unlk %a6
rts
jeff
More information about the Gcc-bugs
mailing list