This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 3.4.0 m68k-elf generates illegal code for ColdFire


>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]