From: simonmar Date: Thu, 14 Mar 2002 17:05:13 +0000 (+0000) Subject: [project @ 2002-03-14 17:05:13 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2261 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ab73ca6160d9083e3c10f674d08ed5a63eac7bdf;p=ghc-hetmet.git [project @ 2002-03-14 17:05:13 by simonmar] Back out previous fix, it was wrong. --- diff --git a/ghc/compiler/nativeGen/MachCode.lhs b/ghc/compiler/nativeGen/MachCode.lhs index 3c89799..1806565 100644 --- a/ghc/compiler/nativeGen/MachCode.lhs +++ b/ghc/compiler/nativeGen/MachCode.lhs @@ -2752,10 +2752,6 @@ genCCall fn cconv ret_rep args | cconv == StdCallConv = '@':show tot_arg_size | otherwise = "" - -- floats are always promoted to doubles when passed to a ccall - promote_size F = DF - promote_size sz = sz - arg_size DF = 8 arg_size F = 4 arg_size _ = 4 @@ -2779,17 +2775,14 @@ genCCall fn cconv ret_rep args | otherwise = get_op arg `thenNat` \ (code, reg, sz) -> getDeltaNat `thenNat` \ delta -> - let - real_sz = promote_size sz - size = arg_size real_sz - in + arg_size sz `bind` \ size -> setDeltaNat (delta-size) `thenNat` \ _ -> - if (case real_sz of DF -> True; _ -> False) + if (case sz of DF -> True; F -> True; _ -> False) then returnNat (size, code `appOL` toOL [SUB L (OpImm (ImmInt size)) (OpReg esp), DELTA (delta-size), - GST DF reg (AddrBaseIndex (Just esp) + GST sz reg (AddrBaseIndex (Just esp) Nothing (ImmInt 0))] )