summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-06-13 14:24:31 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-06-13 14:24:31 +0000
commit72475c8247406b64b8d5d9441c0b37b17d703a54 (patch)
treea252834c2c11221599f5fc6cb77a4061ba5b4f3b
parent61af839f961ea85dc80bed03313ee318fc02fa00 (diff)
downloadhaskell-72475c8247406b64b8d5d9441c0b37b17d703a54.tar.gz
FIX #1424: x86_64 NCG generated wrong code for foreign call with >8 double args
I guess we have a missing test... I'll add one
-rw-r--r--compiler/nativeGen/MachCodeGen.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/nativeGen/MachCodeGen.hs b/compiler/nativeGen/MachCodeGen.hs
index 0bab29cfea..d371214cf5 100644
--- a/compiler/nativeGen/MachCodeGen.hs
+++ b/compiler/nativeGen/MachCodeGen.hs
@@ -3361,9 +3361,9 @@ genCCall target dest_regs args vols = do
(arg_reg, arg_code) <- getSomeReg arg
delta <- getDeltaNat
setDeltaNat (delta-arg_size)
- let code' = code `appOL` toOL [
- MOV arg_rep (OpReg arg_reg) (OpAddr (spRel 0)),
+ let code' = code `appOL` arg_code `appOL` toOL [
SUB wordRep (OpImm (ImmInt arg_size)) (OpReg rsp) ,
+ MOV arg_rep (OpReg arg_reg) (OpAddr (spRel 0)),
DELTA (delta-arg_size)]
push_args rest code'