When building gcc for e500v2: --target=powerpc-unknown-linux-gnuspe --enable-e500_double
The build stops with an ICE: /tmp/edmar/build_jobs/Xe500v2/obj_gccsys/./gcc/xgcc -B/tmp/edmar/build_jobs/Xe500v2/obj_gccsys/./gcc/ -B/tmp/edmar/build_jobs/installs_final/gnu-gcc-4.5-binutils-2.19-eglibc-2.9-Xe500v2-powerpc-unknown-linux-gnuspe/i686-pc-linux2.4/powerpc-unknown-linux-gnuspe/bin/ -B/tmp/edmar/build_jobs/installs_final/gnu-gcc-4.5-binutils-2.19-eglibc-2.9-Xe500v2-powerpc-unknown-linux-gnuspe/i686-pc-linux2.4/powerpc-unknown-linux-gnuspe/lib/ -isystem /tmp/edmar/build_jobs/installs_final/gnu-gcc-4.5-binutils-2.19-eglibc-2.9-Xe500v2-powerpc-unknown-linux-gnuspe/i686-pc-linux2.4/powerpc-unknown-linux-gnuspe/include -isystem /tmp/edmar/build_jobs/installs_final/gnu-gcc-4.5-binutils-2.19-eglibc-2.9-Xe500v2-powerpc-unknown-linux-gnuspe/i686-pc-linux2.4/powerpc-unknown-linux-gnuspe/sys-include-g -O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -mlong-double-128 -I. -I. -I../.././gcc -I../../../src_gcc/libgcc -I../../../src_gcc/libgcc/. -I../../../src_gcc/libgcc/../gcc -I../../../src_gcc/libgcc/../include -DHAVE_CC_TLS -o _powixf2.o -MT _powixf2.o -MD -MP -MF _powixf2.dep -DL_powixf2 -c ../../../src_gcc/libgcc/../gcc/libgcc2.c \ -fvisibility=hidden -DHIDE_EXPORTS ../../../src_gcc/libgcc/../gcc/libgcc2.c: In function '__powidf2': ../../../src_gcc/libgcc/../gcc/libgcc2.c:1739:1: internal compiler error: in rs6000_split_multireg_move, at config/rs6000/rs6000.c:16712 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [_powidf2.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/tmp/edmar/build_jobs/Xe500v2/obj_gccsys/powerpc-unknown-linux-gnuspe/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/tmp/edmar/build_jobs/Xe500v2/obj_gccsys' make: *** [all] Error 2 I traced the problem back to revision 157530, which splits dp float point moves into 2 32 bit gpr. But on e500v2, the gpr are 64 bit wide, and dp floats are mapped to one single gpr. The problem does not exists in e500v1 which also has 64 bit gpr because this cpu does not have dp hardware and soft float ABI dictates dpfp values should be kept in 2 gpr. This problem also exists in the 4.5 branch. The following change fix the ICE for both gcc-4.5 and gcc-4.6. It was regression tested on 32 bits powerpc as well as on e500v2. --- gcc-20100425/gcc/config/rs6000/rs6000.md-orig 2010-04-26 09:58:41.000000000 -0500 +++ gcc-20100425/gcc/config/rs6000/rs6000.md 2010-04-26 10:01:55.000000000 -0500 @@ -218,7 +218,8 @@ (TD "TARGET_DFP")]) ; These modes do not fit in integer registers in 32-bit mode. -(define_mode_iterator DIFD [DI DF DD]) +; but on e500v2, the gpr are 64 bit registers +(define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD]) ; Various instructions that come in SI and DI forms. ; A generic w/d attribute, for things like cmpw/cmpd. -- Summary: ICE when building for Freescale e500v2 Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: edmar at freescale dot com GCC host triplet: powerpc-unknown-linux-gnuspe GCC target triplet: powerpc-unknown-linux-gnuspe http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44419