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: "rth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 7 Jun 2011 23:13:00 +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
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #24453|0 |1
is obsolete| |
--- Comment #14 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-07 23:12:17 UTC ---
Created attachment 24465
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24465
Hand coded assembly for DI->SF conversion
Instead of inlining all of this, or using a "real" libcall which
would force all of the %xmm, %st, and %mm registers to the stack.
(define_insn "*floatdisf_sse_32"
[(set (match_operand:SF 0 "register_operand" "=Yz")
(float:SF (match_operand:DI 1 "register_operand" "A")))
(clobber (match_scratch:SI 2 "=a")
(clobber (match_scratch:SI 3 "=d")
(clobber (match_scratch:SI 4 "=c")]
"!TARGET_64BIT && SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH"
"call __floatdisf_sse"
[(set_attr "length" "5")
(set_attr "type" "call")])
Note that the assembly is very carefuly to avoid clobbering
anything but eax, edx, ecx, and could probably even avoid that
if necessary.
Thoughts?