Fix #3182: 64 bit FP value returned by C calls was getting trashed
[ghc-hetmet.git] / compiler / nativeGen / X86 / CodeGen.hs
index 43495a4..4cfeacc 100644 (file)
@@ -1779,7 +1779,7 @@ genCCall target dest_regs args = do
        assign_code [CmmHinted dest _hint] = 
          case typeWidth rep of
                W32 | isFloatType rep -> unitOL (MOV (floatSize W32) (OpReg xmm0) (OpReg r_dest))
-               W64 | isFloatType rep -> unitOL (MOV (floatSize W32) (OpReg xmm0) (OpReg r_dest))
+               W64 | isFloatType rep -> unitOL (MOV (floatSize W64) (OpReg xmm0) (OpReg r_dest))
                _ -> unitOL (MOV (cmmTypeSize rep) (OpReg rax) (OpReg r_dest))
          where 
                rep = localRegType dest
@@ -2038,8 +2038,8 @@ condFltReg cond x y = do
 #elif x86_64_TARGET_ARCH
 condFltReg cond x y = do
   CondCode _ cond cond_code <- condFltCode cond x y
-  tmp1 <- getNewRegNat wordSize
-  tmp2 <- getNewRegNat wordSize
+  tmp1 <- getNewRegNat archWordSize
+  tmp2 <- getNewRegNat archWordSize
   let 
        -- We have to worry about unordered operands (eg. comparisons
        -- against NaN).  If the operands are unordered, the comparison