| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
GHC.CmmToAsm.Reg.Linear.RV64
Description
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 #
Set corresponding register bit to 0
getFreeRegs :: RegClass -> FreeRegs -> [RealReg] #
Get all free RealRegs (i.e. those where the corresponding bit is 1)
initFreeRegs :: Platform -> FreeRegs #
Set bits of all allocatable registers to 1
releaseReg :: HasCallStack => RealReg -> FreeRegs -> FreeRegs #
Set corresponding register bit to 1
Bitmaps to indicate which registers are free (currently unused)
The bit index represents the RegNo, in case of floating point registers
with an offset of 32. The register is free when the bit is set.
Constructors
| FreeRegs | |
Instances
| FR FreeRegs # | |
Defined in GHC.CmmToAsm.Reg.Linear.FreeRegs | |
| Outputable FreeRegs # | |
Defined in GHC.CmmToAsm.Reg.Linear.RV64 | |
| Show FreeRegs # | |