From: Ben.Lippmeier@anu.edu.au Date: Fri, 24 Apr 2009 06:50:53 +0000 (+0000) Subject: Fix #3182: 64 bit FP value returned by C calls was getting trashed X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=c1cecc0b8c71fc84d4d1d9f1832b5fb172fe433e Fix #3182: 64 bit FP value returned by C calls was getting trashed movss instruction was being used to move the result into the destination register instead of movsd --- diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index 135ac36..4cfeacc 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -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