This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in Coldfire target
- To: egcs-bugs at cygnus dot com
- Subject: Bug in Coldfire target
- From: Michael Bruck <mbruck at odalix dot TeCNeT dot DE>
- Date: Sun, 13 Sep 1998 13:45:49 +0200 (CEST)
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);
}
<<<<<<
After adding "%{m5200:-m5200}" to the *asm line in the specs file you get
the following error when running the program above through gcc.
/usr/local/bin/m68k-rft-linux-gnu-gcc -m5200 -g -O6 -Wall -c t.c -o t.o
/tmp/cc2c1xuF.s: Assembler messages:
/tmp/cc2c1xuF.s:41: Error: displacement too large for this architecture; needs 68020 or higher -- statement `pea -300000(%a0)' ignored
make: *** [t.o] Error 1
The assembler source generated by the compiler (stabs removed):
>>>>>>
.globl bar
bar:
link.w %a6,#0 ; function entry
clr.l %d0 ; calculation and call to foo
move.w 10(%a6),%d0
move.l %d0,%a0
pea -300000(%a0)
jbsr foo
unlk %a6 ; function exit
rts
.ident "GCC: (GNU) egcs-2.91.57 19980901 (egcs-1.1 release)"
<<<<<<
Micha