Using gcc version 4.3.0 20080125 (experimental) (GCC) to crosscompile the
attached file for m68k-elf, I get the following line of asm:
move.l (%a2,%a0.l*4),76(%sp)
which is invalid for the target cpu I have specified. (-mcpu=5249)
This is my compiler command line:
/rockbox/apps/codecs/Tremor$ /usr/bin/ccache m68k-elf-gcc
-I/home/nils/rockbox/apps -I.. -I. -I/home/nils/rockbox/firmware/include
-I/home/nils/rockbox/firmware/export -I/home/nils/rockbox/firmware/common
-I/home/nils/rockbox/firmware/drivers -I/home/nils/rockbox/gcctest
-I/home/nils/rockbox/apps/recorder -I/home/nils/rockbox/apps/gui -W -Wall
-Wundef -Os -nostdlib -ffreestanding -Wstrict-prototypes -mcpu=5249 -malign-int
-mstrict-align -fomit-frame-pointer
-I/home/nils/rockbox/firmware/target/coldfire/iriver/h300
-I/home/nils/rockbox/firmware/target/coldfire/iriver
-I/home/nils/rockbox/firmware/target/coldfire -O2 -DIRIVER_H300 -DMEM=32
-save-temps block.c -o /home/nils/rockbox/gcctest/apps/codecs/Tremor/block.o
I used the following switches to configure gcc:
--target=m68k-elf --prefix=/usr/local/m68k-elf --enable-languages=c
--disable-libssp --with-arch=cf
on my amd64 linux system
--
Summary: [m68k-elf] Gcc ouputs invalid asm when compiling with -
O2 or higher
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nizze86 at hotmail dot com
GCC host triplet: Linux amd 64
GCC target triplet: m68k-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35018