This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49257] -mfpmath=sse generates x87 instructions on 32 bits OS
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 1 Jun 2011 17:57:46 +0000
- Subject: [Bug target/49257] -mfpmath=sse generates x87 instructions on 32 bits OS
- Auto-submitted: auto-generated
- References: <bug-49257-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49257
--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2011-06-01 17:57:44 UTC ---
The problem is in floatunsdidf2 expander that is currently disabled on x86_32
due to TARGET_KEEPS_VECTOR_ALIGNED_STACK. Without this expander, gcc generates
unsigned DImode->XFmode conversion using floatdixf pattern with XFmode x87
registers.
Since latest x86_32 ABI linux ABI mandates 16 byte alignment, we can perhaps:
Index: config/i386/linux.h
===================================================================
--- config/i386/linux.h (revision 174535)
+++ config/i386/linux.h (working copy)
@@ -24,3 +24,6 @@
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h"
+
+#undef TARGET_KEEPS_VECTOR_ALIGNED_STACK
+#define TARGET_KEEPS_VECTOR_ALIGNED_STACK 1