GHC.StgToCmm.CgUtils

ghc-8.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.StgToCmm.CgUtils

Synopsis

- fixStgRegisters :: DynFlags -> RawCmmDecl -> RawCmmDecl
- baseRegOffset :: DynFlags -> GlobalReg -> Int
- get_Regtable_addr_from_offset :: DynFlags -> Int -> CmmExpr
- regTableOffset :: DynFlags -> Int -> CmmExpr
- get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr

# Documentation

fixStgRegisters :: DynFlags -> RawCmmDecl -> RawCmmDecl #

Fixup global registers so that they assign to locations within the RegTable if they aren't pinned for the current target.

baseRegOffset :: DynFlags -> GlobalReg -> Int #

get_Regtable_addr_from_offset :: DynFlags -> Int -> CmmExpr #

regTableOffset :: DynFlags -> Int -> CmmExpr #

get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr #

We map STG registers onto appropriate CmmExprs. Either they map to real machine registers or stored as offsets from BaseReg. Given a GlobalReg, get_GlobalReg_addr always produces the register table address for it.