diff options
Diffstat (limited to 'compiler/GHC/Cmm/CallConv.hs')
-rw-r--r-- | compiler/GHC/Cmm/CallConv.hs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler/GHC/Cmm/CallConv.hs b/compiler/GHC/Cmm/CallConv.hs index f4b46a03f2..f376e598bf 100644 --- a/compiler/GHC/Cmm/CallConv.hs +++ b/compiler/GHC/Cmm/CallConv.hs @@ -2,10 +2,12 @@ module GHC.Cmm.CallConv ( ParamLocation(..), assignArgumentsPos, assignStack, - realArgRegsCover + realArgRegsCover, + tupleRegsCover ) where import GHC.Prelude +import Data.List (nub) import GHC.Cmm.Expr import GHC.Runtime.Heap.Layout @@ -219,3 +221,13 @@ realArgRegsCover platform realDoubleRegs platform ++ realLongRegs platform -- we don't save XMM registers if they are not used for parameter passing + +-- Like realArgRegsCover but always includes the node. This covers the real +-- and virtual registers used for unboxed tuples. +-- +-- Note: if anything changes in how registers for unboxed tuples overlap, +-- make sure to also update GHC.StgToByteCode.layoutTuple. + +tupleRegsCover :: Platform -> [GlobalReg] +tupleRegsCover platform = + nub (VanillaReg 1 VGcPtr : realArgRegsCover platform) |