| ghc-6.10.4: The GHC API | Contents | Index
MachRegs
Contents
Immediate values Addressing modes The `Reg` type Global registers Machine-dependent register-related stuff
Synopsis
data Imm
= ImmInt Int
| ImmInteger Integer
| ImmCLbl CLabel
| ImmLit Doc
| ImmIndex CLabel Int
| ImmFloat Rational
| ImmDouble Rational
| ImmConstantSum Imm Imm
| ImmConstantDiff Imm Imm
strImmLit
litToImm :: CmmLit -> Imm
data AddrMode
= AddrBaseIndex EABase EAIndex Displacement
| ImmAddr Imm Int
addrOffset :: AddrMode -> Int -> Maybe AddrMode
type RegNo = Int
data Reg
= RealReg !RegNo
| VirtualRegI !Unique
| VirtualRegHi !Unique
| VirtualRegF !Unique
| VirtualRegD !Unique
isRealReg :: Reg -> Bool
isVirtualReg :: Reg -> Bool
renameVirtualReg :: Unique -> Reg -> Reg
data RegClass
= RcInteger
| RcFloat
| RcDouble
regClass
trivColorable :: RegClass -> UniqSet Reg -> UniqSet Reg -> Bool
getHiVRegFromLo
mkVReg :: Unique -> MachRep -> Reg
get_GlobalReg_reg_or_addr :: GlobalReg -> Either Reg CmmExpr
allocatableRegs :: [RegNo]
argRegs :: RegNo -> [Reg]
allArgRegs :: [Reg]
callClobberedRegs :: [Reg]
allocatableRegsInClass :: RegClass -> Int
freeReg :: RegNo -> FastBool
spRel :: Int -> AddrMode
data EABase
= EABaseNone
| EABaseReg Reg
| EABaseRip
data EAIndex
= EAIndexNone
| EAIndex Reg Int
ripRel
rax :: Reg
rbx :: Reg
rcx :: Reg
rdx :: Reg
rsi :: Reg
rdi :: Reg
rbp :: Reg
rsp :: Reg
eax
ebx
ecx
edx
esi
edi
ebp
esp
r8 :: Reg
r9 :: Reg
r10 :: Reg
r11 :: Reg
r12 :: Reg
r13 :: Reg
r14 :: Reg
r15 :: Reg
xmm0 :: Reg
xmm1 :: Reg
xmm2 :: Reg
xmm3 :: Reg
xmm4 :: Reg
xmm5 :: Reg
xmm6 :: Reg
xmm7 :: Reg
xmm8 :: Reg
xmm9 :: Reg
xmm10 :: Reg
xmm11 :: Reg
xmm12 :: Reg
xmm13 :: Reg
xmm14 :: Reg
xmm15 :: Reg
xmm
addrModeRegs :: AddrMode -> [Reg]
allFPArgRegs :: [Reg]
Immediate values
data Imm
Constructors
ImmInt Int |
ImmInteger Integer |
ImmCLbl CLabel |
ImmLit Doc |
ImmIndex CLabel Int |
ImmFloat Rational |
ImmDouble Rational |
ImmConstantSum Imm Imm |
ImmConstantDiff Imm Imm |
strImmLit
litToImm :: CmmLit -> Imm
Addressing modes
data AddrMode
Constructors
AddrBaseIndex EABase EAIndex Displacement |
ImmAddr Imm Int |
addrOffset :: AddrMode -> Int -> Maybe AddrMode
The `Reg` type
type RegNo = Int
data Reg
Constructors
RealReg !RegNo |
VirtualRegI !Unique |
VirtualRegHi !Unique |
VirtualRegF !Unique |
VirtualRegD !Unique |
Instances
Eq Reg
Ord Reg
Show Reg
Outputable Reg
Uniquable Reg
isRealReg :: Reg -> Bool
isVirtualReg :: Reg -> Bool
renameVirtualReg :: Unique -> Reg -> Reg
data RegClass
Constructors
RcInteger |
RcFloat |
RcDouble |
Instances
Eq RegClass
Outputable RegClass
Uniquable RegClass
regClass
trivColorable :: RegClass -> UniqSet Reg -> UniqSet Reg -> Bool
getHiVRegFromLo
mkVReg :: Unique -> MachRep -> Reg
Global registers
get_GlobalReg_reg_or_addr :: GlobalReg -> Either Reg CmmExpr
Machine-dependent register-related stuff
allocatableRegs :: [RegNo]
argRegs :: RegNo -> [Reg]
allArgRegs :: [Reg]
callClobberedRegs :: [Reg]
allocatableRegsInClass :: RegClass -> Int
The number of regs in each class. We go via top level CAFs to ensure that we're not recomputing the length of these lists each time the fn is called.
freeReg :: RegNo -> FastBool
spRel :: Int -> AddrMode
data EABase
Constructors
EABaseNone |
EABaseReg Reg |
EABaseRip |
data EAIndex
Constructors
EAIndexNone |
EAIndex Reg Int |
ripRel
rax :: Reg
rbx :: Reg
rcx :: Reg
rdx :: Reg
rsi :: Reg
rdi :: Reg
rbp :: Reg
rsp :: Reg
eax
ebx
ecx
edx
esi
edi
ebp
esp
r8 :: Reg
r9 :: Reg
r10 :: Reg
r11 :: Reg
r12 :: Reg
r13 :: Reg
r14 :: Reg
r15 :: Reg
xmm0 :: Reg
xmm1 :: Reg
xmm2 :: Reg
xmm3 :: Reg
xmm4 :: Reg
xmm5 :: Reg
xmm6 :: Reg
xmm7 :: Reg
xmm8 :: Reg
xmm9 :: Reg
xmm10 :: Reg
xmm11 :: Reg
xmm12 :: Reg
xmm13 :: Reg
xmm14 :: Reg
xmm15 :: Reg
xmm
addrModeRegs :: AddrMode -> [Reg]
allFPArgRegs :: [Reg]
Produced by Haddock version 2.4.2