From 7ed63dba53dce1e7537c83e50f5d74a66014a357 Mon Sep 17 00:00:00 2001 From: sewardj <unknown> Date: Tue, 25 Jan 2000 19:33:32 +0000 Subject: [PATCH] [project @ 2000-01-25 19:33:32 by sewardj] Handle float args correctly for x86 ccalls. --- ghc/compiler/nativeGen/MachCode.lhs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ghc/compiler/nativeGen/MachCode.lhs b/ghc/compiler/nativeGen/MachCode.lhs index 222cf09bc25a..599c132ba2c3 100644 --- a/ghc/compiler/nativeGen/MachCode.lhs +++ b/ghc/compiler/nativeGen/MachCode.lhs @@ -2307,15 +2307,14 @@ genCCall fn cconv kind args get_call_arg arg old_sz = get_op arg `thenUs` \ (code, reg, sz) -> let new_sz = old_sz + arg_size sz - in - case sz of - DF -> returnUs (new_sz, + in if (case sz of DF -> True; F -> True; _ -> False) + then returnUs (new_sz, code . - mkSeqInstr (GST DF reg + mkSeqInstr (GST sz reg (AddrBaseIndex (Just esp) Nothing (ImmInt (- new_sz)))) ) - _ -> returnUs (new_sz, + else returnUs (new_sz, code . mkSeqInstr (MOV sz (OpReg reg) (OpAddr -- GitLab