Safe Haskell | None |
---|---|
Language | GHC2021 |
Functions to implement the FR
(as in "free regs") type class.
For LLVM GHC calling convention (used registers), see https://github.com/llvm/llvm-project/blob/6ab900f8746e7d8e24afafb5886a40801f6799f4/llvm/lib/Target/RISCV/RISCVISelLowering.cpp#L13638-L13685
Synopsis
- allocateReg :: HasCallStack => RealReg -> FreeRegs -> FreeRegs
- getFreeRegs :: RegClass -> FreeRegs -> [RealReg]
- initFreeRegs :: Platform -> FreeRegs
- releaseReg :: HasCallStack => RealReg -> FreeRegs -> FreeRegs
- data FreeRegs = FreeRegs !Word32 !Word32
Documentation
allocateReg :: HasCallStack => RealReg -> FreeRegs -> FreeRegs Source #
Set corresponding register bit to 0
getFreeRegs :: RegClass -> FreeRegs -> [RealReg] Source #
Get all free RealReg
s (i.e. those where the corresponding bit is 1)
initFreeRegs :: Platform -> FreeRegs Source #
Set bits of all allocatable registers to 1
releaseReg :: HasCallStack => RealReg -> FreeRegs -> FreeRegs Source #
Set corresponding register bit to 1