float.c from the libffi test suite fails to build on ppc-linux: /mnt/slice1/gcc-trunk/gcc/libffi/testsuite/libffi.call/float.c: In function 'floating': :1441796: error: impossible constraint in 'asm' compiler exited with status 1 [andreas@pm9600 objdir]$ ./gcc/xgcc -v Using built-in specs. Target: powerpc-unknown-linux-gnu Configured with: /mnt/slice1/gcc-trunk/gcc/configure --prefix=/mnt/slice1/gcc-trunk/testbin --enable-languages=c,c++,java --disable-multilib --enable-java-awt=gtk,xlib --enable-gtk-cairo --disable-checking --disable-static Thread model: posix gcc version 4.1.0 20050326 (experimental) I'll attach the .i and .s file
Created attachment 8459 [details] preprocessed source.
Created attachment 8460 [details] preprocessed asm
Small testcase: int f(double a, double b) { int a1 = a; int b1 = b; return a1+b1; } You can reproduce this on powerpc-darwin with -mcpu=601
This was caused by: 2005-03-25 Geoffrey Keating <geoffk@apple.com> * config/rs6000/rs6000.md (UNSPEC constants): Add UNSPEC_STFIWX. (fix_truncdfsi2): Allow registers or memory as destination. When TARGET_PPC_GFXOPT, generate simplified pattern. (fix_truncdfsi2_internal): Use define_insn_and_split. (fix_truncdfsi2_internal_gfxopt): New. (fctiwz): Don't confuse register allocation by giving it no choices. (stfiwx): New. * config/rs6000/rs6000.h (EXTRA_CONSTRAINT): Add 'Z'. (EXTRA_MEMORY_CONSTRAINT): Likewise. * config/rs6000/rs6000.c (indexed_or_indirect_operand): New. * config/rs6000/rs6000-protos.h (indexed_or_indirect_operand): New. There are a large number of regressions on powerpc-linux and powerpc-aix because of this change. 20000127-1.c is one of the regressions.
Subject: Bug 20650 CVSROOT: /cvs/gcc Module name: gcc Changes by: geoffk@gcc.gnu.org 2005-04-02 09:58:36 Modified files: gcc : ChangeLog gcc/testsuite : ChangeLog gcc/config/rs6000: rs6000.md Added files: gcc/testsuite/gcc.dg: rs6000-fpint.c Log message: PR 20650 * config/rs6000/rs6000.md (fix_truncdfsi2): Make destination a register. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8082&r2=2.8083 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5266&r2=1.5267 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.358&r2=1.359 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/rs6000-fpint.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
Should be fixed now.
Verified on ppc-linux. Failing tc fixed, thanks.