From: simonmar Date: Fri, 19 Jul 2002 11:46:31 +0000 (+0000) Subject: [project @ 2002-07-19 11:46:31 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1829 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=541d1d89b31e8efd2e80754a396e935342c4911e;p=ghc-hetmet.git [project @ 2002-07-19 11:46:31 by simonmar] Sparc NCG fix from Sven Panne: 8-byte align the stack ptr when doing a ccall. --- diff --git a/ghc/compiler/nativeGen/MachCode.lhs b/ghc/compiler/nativeGen/MachCode.lhs index 013a8eb..b4075a9 100644 --- a/ghc/compiler/nativeGen/MachCode.lhs +++ b/ghc/compiler/nativeGen/MachCode.lhs @@ -2869,8 +2869,8 @@ genCCall fn cconv kind args let argcode = concatOL argcodes (move_sp_down, move_sp_up) - = let nn = length vregs - n_argRegs - + 1 -- (for the road) + = let diff = length vregs - n_argRegs + nn = if odd diff then diff + 1 else diff -- keep 8-byte alignment in if nn <= 0 then (nilOL, nilOL) else (unitOL (moveSp (-1*nn)), unitOL (moveSp (1*nn)))