diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-11-13 11:43:09 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-11-13 11:43:09 +0000 |
commit | 4270d7e7485b124dd153399dfe3f571253dc0d1d (patch) | |
tree | ed539eab1f3019ad7910bc51af426f1b46468683 /compiler/cmm/CmmCallConv.hs | |
parent | 1c160e588706f4ff6b4e391602e38f0a2044ec13 (diff) | |
download | haskell-4270d7e7485b124dd153399dfe3f571253dc0d1d.tar.gz |
Fix the Slow calling convention (#7192)
The Slow calling convention passes the closure in R1, but we were
ignoring this and hoping it would work, which it often did. However,
this bug seems to have been the cause of #7192, because the
graph-colouring allocator is more sensitive to having correct liveness
information on jumps.
Diffstat (limited to 'compiler/cmm/CmmCallConv.hs')
-rw-r--r-- | compiler/cmm/CmmCallConv.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/cmm/CmmCallConv.hs b/compiler/cmm/CmmCallConv.hs index 7fc89e2f54..7007872c0e 100644 --- a/compiler/cmm/CmmCallConv.hs +++ b/compiler/cmm/CmmCallConv.hs @@ -56,7 +56,7 @@ assignArgumentsPos dflags off conv arg_ty reps = (stk_off, assignments) (_, NativeReturn) -> getRegsWithNode dflags -- GC calling convention *must* put values in registers (_, GC) -> allRegs dflags - (_, Slow) -> noRegs + (_, Slow) -> nodeOnly -- The calling conventions first assign arguments to registers, -- then switch to the stack when we first run out of registers -- (even if there are still available registers for args of a @@ -172,8 +172,8 @@ allRegs dflags = (allVanillaRegs dflags, allLongRegs dflags, allSseRegs dflags) -noRegs :: AvailRegs -noRegs = ([], [], [], [], []) +nodeOnly :: AvailRegs +nodeOnly = ([VanillaReg 1], [], [], [], []) globalArgRegs :: DynFlags -> [GlobalReg] globalArgRegs dflags = map ($ VGcPtr) (allVanillaRegs dflags) ++ |