CgStackery

ghc-7.6.3: The GHC API

Safe Haskell | None

CgStackery

Synopsis

- spRel :: VirtualSpOffset -> VirtualSpOffset -> WordOff
- getVirtSp :: FCode VirtualSpOffset
- getRealSp :: FCode VirtualSpOffset
- setRealSp :: VirtualSpOffset -> Code
- setRealAndVirtualSp :: VirtualSpOffset -> Code
- getSpRelOffset :: VirtualSpOffset -> FCode CmmExpr
- allocPrimStack :: CgRep -> FCode VirtualSpOffset
- allocStackTop :: WordOff -> FCode ()
- deAllocStackTop :: WordOff -> FCode ()
- adjustStackHW :: VirtualSpOffset -> Code
- getFinalStackHW :: (VirtualSpOffset -> Code) -> Code
- setStackFrame :: VirtualSpOffset -> Code
- getStackFrame :: FCode VirtualSpOffset
- mkVirtStkOffsets :: VirtualSpOffset -> [(CgRep, a)] -> (VirtualSpOffset, [(a, VirtualSpOffset)])
- mkStkAmodes :: VirtualSpOffset -> [(CgRep, CmmExpr)] -> FCode (VirtualSpOffset, CmmStmts)
- freeStackSlots :: [VirtualSpOffset] -> Code
- pushUpdateFrame :: CmmExpr -> Code -> Code
- pushBHUpdateFrame :: CmmExpr -> Code -> Code
- emitPushUpdateFrame :: CmmExpr -> CmmExpr -> Code

# Documentation

spRel :: VirtualSpOffset -> VirtualSpOffset -> WordOff

getVirtSp :: FCode VirtualSpOffset

getRealSp :: FCode VirtualSpOffset

setRealSp :: VirtualSpOffset -> Code

setRealAndVirtualSp :: VirtualSpOffset -> Code

getSpRelOffset :: VirtualSpOffset -> FCode CmmExpr

allocPrimStack :: CgRep -> FCode VirtualSpOffset

allocStackTop :: WordOff -> FCode ()

deAllocStackTop :: WordOff -> FCode ()

adjustStackHW :: VirtualSpOffset -> Code

getFinalStackHW :: (VirtualSpOffset -> Code) -> Code

setStackFrame :: VirtualSpOffset -> Code

getStackFrame :: FCode VirtualSpOffset

mkVirtStkOffsets :: VirtualSpOffset -> [(CgRep, a)] -> (VirtualSpOffset, [(a, VirtualSpOffset)])

mkStkAmodes :: VirtualSpOffset -> [(CgRep, CmmExpr)] -> FCode (VirtualSpOffset, CmmStmts)

`mkStkAmodes` is a higher-level version of `mkVirtStkOffsets`. It starts from the tail-call locations. It returns a single list of addressing modes for the stack locations, and therefore is in the monad. It doesn't adjust the high water mark.

freeStackSlots :: [VirtualSpOffset] -> Code

pushUpdateFrame :: CmmExpr -> Code -> Code

pushBHUpdateFrame :: CmmExpr -> Code -> Code

emitPushUpdateFrame :: CmmExpr -> CmmExpr -> Code