This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/49257] -mfpmath=sse generates x87 instructions on 32 bits OS


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]