ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Platform.Regs

Synopsis

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

# Documentation

callerSaves :: Platform -> GlobalReg -> Bool Source #

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

activeStgRegs :: Platform -> [GlobalReg] Source #

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 possibly mapped to real registers.

haveRegBase :: Platform -> Bool Source #

globalRegMaybe :: Platform -> GlobalReg -> Maybe RealReg Source #

freeReg :: Platform -> RegNo -> Bool Source #