ghc-6.12.3: The GHC APISource codeContentsIndex
Reg
Description
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.
Synopsis
type RegNo = Int
data Reg
= RegVirtual !VirtualReg
| RegReal !RealReg
regPair :: RegNo -> RegNo -> Reg
regSingle :: RegNo -> Reg
isRealReg :: Reg -> Bool
takeRealReg :: Reg -> Maybe RealReg
isVirtualReg :: Reg -> Bool
takeVirtualReg :: Reg -> Maybe VirtualReg
data VirtualReg
= VirtualRegI !Unique
| VirtualRegHi !Unique
| VirtualRegF !Unique
| VirtualRegD !Unique
renameVirtualReg :: Unique -> VirtualReg -> VirtualReg
classOfVirtualReg :: VirtualReg -> RegClass
getHiVirtualRegFromLo :: VirtualReg -> VirtualReg
getHiVRegFromLo :: Reg -> Reg
data RealReg
= RealRegSingle !RegNo
| RealRegPair !RegNo !RegNo
regNosOfRealReg :: RealReg -> [RegNo]
realRegsAlias :: RealReg -> RealReg -> Bool
liftPatchFnToRegReg :: (VirtualReg -> RealReg) -> Reg -> Reg
Documentation
type RegNo = IntSource
An identifier for a primitive real machine register.
data Reg Source
A register, either virtual or real
Constructors
RegVirtual !VirtualReg
RegReal !RealReg
show/hide Instances
regPair :: RegNo -> RegNo -> RegSource
regSingle :: RegNo -> RegSource
isRealReg :: Reg -> BoolSource
takeRealReg :: Reg -> Maybe RealRegSource
isVirtualReg :: Reg -> BoolSource
takeVirtualReg :: Reg -> Maybe VirtualRegSource
data VirtualReg Source
Constructors
VirtualRegI !Unique
VirtualRegHi !Unique
VirtualRegF !Unique
VirtualRegD !Unique
show/hide Instances
renameVirtualReg :: Unique -> VirtualReg -> VirtualRegSource
classOfVirtualReg :: VirtualReg -> RegClassSource
getHiVirtualRegFromLo :: VirtualReg -> VirtualRegSource
getHiVRegFromLo :: Reg -> RegSource
data RealReg Source

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.

Constructors
RealRegSingle !RegNo
RealRegPair !RegNo !RegNo
show/hide Instances
regNosOfRealReg :: RealReg -> [RegNo]Source
realRegsAlias :: RealReg -> RealReg -> BoolSource
liftPatchFnToRegReg :: (VirtualReg -> RealReg) -> Reg -> RegSource
The patch function supplied by the allocator maps VirtualReg to RealReg regs, but sometimes we want to apply it to plain old Reg.
Produced by Haddock version 2.6.1