This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.4.0 m68k-elf generates illegal code for ColdFire
- From: Peter Barada <peter at the-baradas dot com>
- To: peter at lasergraph-dsp dot de
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 25 May 2004 21:02:11 -0400 (EDT)
- Subject: Re: gcc 3.4.0 m68k-elf generates illegal code for ColdFire
- References: <E1BSmDZ-0001TE-00@mrelay01.kundenservices.net>
>The problematic code is the handling of c7:
>
> moveq #1,%d0 |,
> add.l %d0,-2(%a6) |, c7
> move.w -2(%a6),%a0 | c7, c7
> cmp.l %a0,%d2 | c7,
>
>c7 (a 16 bit variable) is allocated at -2(%a6) on the stackframe.
>To increment it a 32 bit add.l ist used. This is wrong.
>The M5307 (ColdFire) does not support add.w. Probably everything
>was fine if the address had been corrected to -4(%a6).
>(It looks like 32 bits are reserved for c7)
>
>Any suggestions how this can be fixed?
This has been seen before:
http://gcc.gnu.org/ml/gcc/2002-10/msg01441.html
and reported as:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8309
There it was analyzed and postponed for gcc-3.3.1, but has been
seen by others(I'm at a loss to recollect who right now).
I'd really like this to be reopened since it has caused havoc before.
--
Peter Barada
peter@the-baradas.com