From: sewardj Date: Tue, 25 Jan 2000 19:33:32 +0000 (+0000) Subject: [project @ 2000-01-25 19:33:32 by sewardj] X-Git-Tag: Approximately_9120_patches~5198 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7ed63dba53dce1e7537c83e50f5d74a66014a357;p=ghc-hetmet.git [project @ 2000-01-25 19:33:32 by sewardj] Handle float args correctly for x86 ccalls. --- diff --git a/ghc/compiler/nativeGen/MachCode.lhs b/ghc/compiler/nativeGen/MachCode.lhs index 222cf09..599c132 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