gcc 3.4.2 cpu32 patch
Chris Johns
cjohns at cybertec.com.au
Thu Nov 18 05:19:06 UTC 2004
Peter Barada wrote:
>
> ColdFire code gerneration doesn't key off of either MASK_68020 or
> MASK_BITFIELD so this change shouldn't change and ColdFire code generation.
>
> However, TARGET_CPU_CPP_BUILTINS, does define __m68k__ and m68000 for
> ColdFire which I think *should* be disabled since the m68k supports
> instructions/addressing modes that are illegal for ColdFire.
>
Ouch.
> Unfortunately I have no idea how much code is out there that uses
> these generic 68k preprocessor defines to select code that runs on
> *both* generic 68k cores as well as ColdFire cores.
Sure.
> As a result I'd say that we leave well enough alone :(
I agree we should keep the defines as they were. So taking a look at gcc
3.3.1 we get:
$ m68k-rtems-gcc -mcpu32 -dM -E - </dev/null | grep 68020
$ m68k-rtems-gcc -m5200 -dM -E - </dev/null | grep 68020
$ m68k-rtems-gcc -m68000 -dM -E - </dev/null | grep 68020
$
while with 3.4.3:
$ m68k-rtems-gcc -mcpu32 -dM -E - </dev/null | grep 68020
#define __mc68020__ 1
#define __mc68020 1
#define mc68020 1
$ m68k-rtems-gcc -m5200 -dM -E - </dev/null | grep 68020
$ m68k-rtems-gcc -m68000 -dM -E - </dev/null | grep 68020
$ m68k-rtems-gcc -m68302 -dM -E - </dev/null | grep 68020
$ m68k-rtems-gcc -m68332 -dM -E - </dev/null | grep 68020
#define __mc68020__ 1
#define __mc68020 1
#define mc68020 1
$
This looks like the defines are not the same and so RTEMS appears
broken. I am suspect other code will break as a result.
--
Chris Johns
More information about the users
mailing list