This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target m68k-elf, -m5200, -O2 generates incorrect code for ColdFire
- From: Peter Jakubek <pjak at lasergraph-dsp dot de>
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>, gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Jul 2002 15:15:30 +0200
- Subject: Re: target m68k-elf, -m5200, -O2 generates incorrect code for ColdFire
- References: <5.1.1.2.2.20020709104945.04053ec0@mail.lauterbach.com>
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