ghc-7.8.4: The GHC API

Safe Haskell | None
Language | Haskell98

CodeGen.Platform

Synopsis

- callerSaves :: Platform -> GlobalReg -> Bool
- activeStgRegs :: Platform -> [GlobalReg]
- haveRegBase :: Platform -> Bool
- globalRegMaybe :: Platform -> GlobalReg -> Maybe RealReg
- freeReg :: Platform -> RegNo -> FastBool

# Documentation

callerSaves :: Platform -> GlobalReg -> Bool

Returns `True` if this global register is stored in a caller-saves machine register.

activeStgRegs :: Platform -> [GlobalReg]

Here is where the STG register map is defined for each target arch. The order matters (for the llvm backend anyway)! We must make sure to maintain the order here with the order used in the LLVM calling conventions. Note that also, this isn't all registers, just the ones that are currently possbily mapped to real registers.

haveRegBase :: Platform -> Bool

globalRegMaybe :: Platform -> GlobalReg -> Maybe RealReg

freeReg :: Platform -> RegNo -> FastBool