Commit 45252b35 authored by Simon Marlow's avatar Simon Marlow
Browse files

further fix for floating point primitives

parent 3d8ae1e7
...@@ -3078,19 +3078,10 @@ outOfLineFloatOp mop res args vols ...@@ -3078,19 +3078,10 @@ outOfLineFloatOp mop res args vols
let let
tmp = CmmLocal (LocalReg uq F64) tmp = CmmLocal (LocalReg uq F64)
-- in -- in
code1 <- stmtToInstrs (CmmCall target [(tmp,FloatHint)] code1 <- stmtToInstrs (CmmCall target [(tmp,FloatHint)] args vols)
(map promote args) vols) code2 <- stmtToInstrs (CmmAssign res (CmmReg tmp))
code2 <- stmtToInstrs (CmmAssign res (demote (CmmReg tmp)))
return (code1 `appOL` code2) return (code1 `appOL` code2)
where where
#if i386_TARGET_ARCH
promote (x,hint) = (CmmMachOp (MO_S_Conv F32 F64) [x], hint)
demote x = CmmMachOp (MO_S_Conv F64 F32) [x]
#else
promote (x,hint) = (x,hint)
demote x = x
#endif
lbl = mkForeignLabel fn Nothing True lbl = mkForeignLabel fn Nothing True
fn = case mop of fn = case mop of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment