Egcs 1.1 produces incorrect ColdFire code

Toon Moene toon@moene.indiv.nluug.nl
Tue Sep 15 12:01:00 GMT 1998


>  Hey all, I've configured Egcs 1.1b with Binutils 2.9.1
>  for m68k-coff.  Here is a simple program that illustrates
>  the incorrect code:
>
>  [ simple snip ]
>
>  When compiling with Egcs 1.1b, I obtain the following:
>
>  /usr2/styx/comp/m68k/egcs-1.1b/binutils-2.9.1/bin/m68k-coff-gcc
>  -m5200 -S -I../../src/include -I../../src/dbug/v2 -I.
>  -fno-builtin -ansi -Wall -D MCF5206_EVS src/dbug/t.c -o
>  obj/gnu/board/t.s
>  ...
>  obj/gnu/board/t.s: Assembler messages:
>  obj/gnu/board/t.s:13: Error: displacement too large for
>  this architecture; needs 68020 or higher -- statement
>  `move.b %d0,43690(%a0)' ignored

Unfortunately, I don't have egcs-1.1 lying around anymore, but it  
might be instructive to look into .../gcc/config/m68k/m68k.h and  
search for the "TARGET_SWITCHES"; the following is the current entry  
for the m5200 (note the turning off of MASK_68020):

    { "5200", - (MASK_68060|MASK_68040|MASK_68040_ONLY|MASK_68020       \
                |MASK_BITFIELD|MASK_68881)},                            \
    { "5200", (MASK_5200)},                                             \

This bit (TARGET_68020) is used further down in the m68k.h file to  
allow large offsets to address registers, so for the m5200 this bit  
should *not* be set, as above.

HTH,
Toon.



More information about the Gcc-bugs mailing list