This is the mail archive of the gcc-bugs@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: target m68k-elf, -m5200, -O2 generates incorrect code for ColdFire


Franz Sirl wrote:

OK, a few hints :-).

I compiled your code with -save-temps -dap -fverbose-asm added and got this in the .s:

moveq.l #1,%d7 | 267 *m68k.md:993/1
add.l %d7,-2(%a6) | i1 | 186 *addsi3_5200/1
move.w -2(%a6),%a0 | i1, i1 | 37 extendhisi2/2
move.l %a0,%a3 | i1, i1 | 234 *m68k.md:993/1

Checking out m68k.md shows that addsi3_5200 calls output_addsi3 in m68k.c. I'm not sure if the bug is there or maybe in reload, cause if you look at the debug RTL dumps you'll notice that the addsi3_5200 first shows up in the .greg dump. Maybe the HImode add shouldn't be converted to a SImode add?

Franz.

Thanks for the hint!

It really seems the HImode add is converted incorrectly to SImode add.
But my understanding of gcc/RTL is not sufficient to locate the problem.
Will have to dig deeper into it...

Peter Jakubek
LaserAnimation Sollinger GmbH
pjak@lasergraph-dsp.de



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