From ff124db4ad2ea145a13c711d4da9e293fa82f58d Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 26 Jan 2009 15:02:09 +0000 Subject: [PATCH] Fix #2961: we lost some of the generated code for stack args in genCCall A real bug in the x86_64 native code gen: nice! This bug would have been caught by -Wall, and I would have gone though and Walled this file but I know Ben is hacking on this file quite heavily and I don't want to create undue conflicts. Ben: it would be nice to enable -Wall here when you have time. --- compiler/nativeGen/MachCodeGen.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/nativeGen/MachCodeGen.hs b/compiler/nativeGen/MachCodeGen.hs index d9b2028..1cfc7a3 100644 --- a/compiler/nativeGen/MachCodeGen.hs +++ b/compiler/nativeGen/MachCodeGen.hs @@ -3567,8 +3567,9 @@ genCCall target dest_regs args = do (arg_op, arg_code) <- getOperand arg delta <- getDeltaNat setDeltaNat (delta-arg_size) - let code' = code `appOL` toOL [PUSH II64 arg_op, - DELTA (delta-arg_size)] + let code' = code `appOL` arg_code `appOL` toOL [ + PUSH II64 arg_op, + DELTA (delta-arg_size)] push_args rest code' where arg_rep = cmmExprType arg -- 1.7.10.4