An architecture independent description of a register. This needs to stay architecture independent because it is used by NCGMonad and the register allocators, which are shared by all architectures.
- type RegNo = Int
- data Reg
- regPair :: RegNo -> RegNo -> Reg
- regSingle :: RegNo -> Reg
- isRealReg :: Reg -> Bool
- takeRealReg :: Reg -> Maybe RealReg
- isVirtualReg :: Reg -> Bool
- takeVirtualReg :: Reg -> Maybe VirtualReg
- data VirtualReg
- renameVirtualReg :: Unique -> VirtualReg -> VirtualReg
- classOfVirtualReg :: VirtualReg -> RegClass
- getHiVirtualRegFromLo :: VirtualReg -> VirtualReg
- getHiVRegFromLo :: Reg -> Reg
- data RealReg
- regNosOfRealReg :: RealReg -> [RegNo]
- realRegsAlias :: RealReg -> RealReg -> Bool
- liftPatchFnToRegReg :: (VirtualReg -> RealReg) -> Reg -> Reg
A register, either virtual or real
RealRegs are machine regs which are available for allocation, in the usual way. We know what class they are, because that's part of the processor's architecture.
RealRegPairs are pairs of real registers that are allocated together to hold a larger value, such as with Double regs on SPARC.