public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mkl at pengutronix dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libffi/40242] New: unsupported asm instructions in libffi/src/arm/sysv.S Date: Mon, 25 May 2009 13:51:00 -0000 [thread overview] Message-ID: <bug-40242-13069@http.gcc.gnu.org/bugzilla/> (raw) Hello, during cross compilation of gcc, the libffi build for the target breaks with this error message: libtool: compile: /home/frogger/pengutronix/toolchain/libffi/build/./gcc/xgcc -B/home/frogger/pengutronix/toolchain/libffi/build/./gcc/ -B/usr/local/arm-1136jfs-linux-gnueabi/bin/ -B/usr/local/arm-1136jfs-linux-gnueabi/lib/ -isystem /usr/local/arm-1136jfs-linux-gnueabi/include -isystem /usr/local/arm-1136jfs-linux-gnueabi/sys-include -I. -I../../../gcc-4.4.0/libffi/include -Iinclude -I../../../gcc-4.4.0/libffi/src -g -O2 -c ../../../gcc-4.4.0/libffi/src/arm/sysv.S -fPIC -DPIC -o src/arm/.libs/sysv.o ../../../gcc-4.4.0/libffi/src/arm/sysv.S: Assembler messages: ../../../gcc-4.4.0/libffi/src/arm/sysv.S:202: Error: selected processor does not support `stfeqs f0,[r2]' ../../../gcc-4.4.0/libffi/src/arm/sysv.S:207: Error: selected processor does not support `stfeqd f0,[r2]' ../../../gcc-4.4.0/libffi/src/arm/sysv.S:282: Error: selected processor does not support `ldfs f0,[sp]' ../../../gcc-4.4.0/libffi/src/arm/sysv.S:285: Error: selected processor does not support `ldfd f0,[sp]' ../../../gcc-4.4.0/libffi/src/arm/sysv.S:288: Error: selected processor does not support `ldfd f0,[sp]' the offending code is: #ifndef __SOFTFP__ beq LSYM(Lepilogue) @ return FLOAT cmp r3, #FFI_TYPE_FLOAT stfeqs f0, [r2] beq LSYM(Lepilogue) @ return DOUBLE or LONGDOUBLE cmp r3, #FFI_TYPE_DOUBLE stfeqd f0, [r2] #endif gcc is configured this way: ../gcc-4.4.0/configure --enable-languages=c,c++,java --target=arm-1136jfs-linux-gnueabi --with-mpfr=/home/frogger/pengutronix/toolchain/OSELAS.Toolchain-trunk/platform-arm-v4t-linux-gnueabi-gcc-4.4.0-glibc-2.9-binutils-2.19.1-kernel-2.6.29-sanitized/sysroot-host --with-gmp=/home/frogger/pengutronix/toolchain/OSELAS.Toolchain-trunk/platform-arm-v4t-linux-gnueabi-gcc-4.4.0-glibc-2.9-binutils-2.19.1-kernel-2.6.29-sanitized/sysroot-host --with-float=softfp --with-fpu=vfp --with-cpu=arm1136jf-s --with-sysroot=/opt/OSELAS.Toolchain-1.99.3/arm-1136jfs-linux-gnueabi/gcc-4.3.2-glibc-2.8-binutils-2.19-kernel-2.6.27-sanitized/sysroot-arm-1136jfs-linux-gnueabi I.e. as an arm-eabi target, --with-fpu=vfp and --with-float=softfp. Which means floats are passed in integer registers, but in function the compiler generates floating point instructions, the preprocessor doesn't define a "__SOFTFP__" symbol. If configuring the compiler with "--with-float=soft" it will pass floats in integer registers and it will generate softfloat emulation code. In this case the preprocessor defines "__SOFTFP__". In both variants the function calling convention is the same, but in one case we have the __SOFTFP__ symbol in the other not. libffi changes it's behaviour depending on this symbol, which is IMHO not correct. I've tested some combinations, this is the summary of (echo | arm-v4t-linux-gnueabi-cpp -dM -mfloat-abi=XXX -mfpu=YYY| egrep -i 'vfp|fp|soft|hard|float'): -mfloat-abi=soft -mfpu=vfp __SOFTFP__ __VFP_FP__ -mfloat-abi=softfp -mfpu=vfp __VFP_FP__ -mfloat-abi=hard -mfpu=vfp __VFP_FP__ (sorry, unimplemented) -mfloat-abi=soft -mfpu=fpa __SOFTFP__ -mfloat-abi=softfp -mfpu=fpa -mfloat-abi=hard -mfpu=fpa I'm not sure which of these combinations makes sense, or are actually used, the 3rd one seems not to be implemented, though. We at pengutronix use usually 1. and 2. In some weird projects 4. and 6. but not with the current gcc. This table shows that it's not possible to distinguish between the "hard" and "softfp" case, a diff off the preprocessor's output shows no difference in the symbols tough. On the upside the vfp-hard case seems not to be implemented. So the question is which is the correct symbol for libffi? cheers, Marc -- Summary: unsupported asm instructions in libffi/src/arm/sysv.S Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libffi AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mkl at pengutronix dot de GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: arm-1136jfs-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40242
next reply other threads:[~2009-05-25 13:51 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-05-25 13:51 mkl at pengutronix dot de [this message] 2009-05-27 9:50 ` [Bug libffi/40242] " ramana at gcc dot gnu dot org 2009-05-29 2:53 ` pinskia at gcc dot gnu dot org 2009-05-29 8:22 ` mkl at pengutronix dot de 2009-06-12 13:13 ` ramana at gcc dot gnu dot org 2009-06-22 10:09 ` ramana at gcc dot gnu dot org 2009-08-03 8:32 ` ramana at gcc dot gnu dot org 2009-08-03 8:33 ` ramana at gcc dot gnu dot org 2009-09-23 12:41 ` ramana at gcc dot gnu dot org 2009-09-23 14:51 ` doko at gcc dot gnu dot org 2009-09-23 15:08 ` doko at gcc dot gnu dot org 2009-09-23 15:12 ` doko at gcc dot gnu dot org 2009-11-24 21:12 ` dwitte at mozilla dot com 2009-12-10 15:18 ` ramana at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-40242-13069@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).