GHC.CmmToAsm.PPC.Regs

ghc-9.0.0.20201227: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.CmmToAsm.PPC.Regs

Synopsis

- virtualRegSqueeze :: RegClass -> VirtualReg -> Int
- realRegSqueeze :: RegClass -> RealReg -> Int
- mkVirtualReg :: Unique -> Format -> VirtualReg
- regDotColor :: RealReg -> SDoc
- data Imm
  - = ImmInt Int
  - | ImmInteger Integer
  - | ImmCLbl CLabel
  - | ImmLit SDoc
  - | ImmIndex CLabel Int
  - | ImmFloat Rational
  - | ImmDouble Rational
  - | ImmConstantSum Imm Imm
  - | ImmConstantDiff Imm Imm
  - | LO Imm
  - | HI Imm
  - | HA Imm
  - | HIGHERA Imm
  - | HIGHESTA Imm
- strImmLit :: String -> Imm
- litToImm :: CmmLit -> Imm
- data AddrMode
  - = AddrRegReg Reg Reg
  - | AddrRegImm Reg Imm
- addrOffset :: AddrMode -> Int -> Maybe AddrMode
- spRel :: Platform -> Int -> AddrMode
- argRegs :: RegNo -> [Reg]
- allArgRegs :: [Reg]
- callClobberedRegs :: Platform -> [Reg]
- allMachRegNos :: [RegNo]
- classOfRealReg :: RealReg -> RegClass
- showReg :: RegNo -> String
- toRegNo :: Reg -> RegNo
- allFPArgRegs :: Platform -> [Reg]
- fits16Bits :: Integral a => a -> Bool
- makeImmediate :: Integral a => Width -> Bool -> a -> Maybe Imm
- fReg :: Int -> RegNo
- r0 :: Reg
- sp :: Reg
- toc :: Reg
- r3 :: Reg
- r4 :: Reg
- r11 :: Reg
- r12 :: Reg
- r30 :: Reg
- tmpReg :: Platform -> Reg
- f1 :: Reg
- allocatableRegs :: Platform -> [RealReg]

# Documentation

virtualRegSqueeze :: RegClass -> VirtualReg -> Int Source #

regSqueeze_class reg Calculate the maximum number of register colors that could be denied to a node of this class due to having this reg as a neighbour.

realRegSqueeze :: RegClass -> RealReg -> Int Source #

mkVirtualReg :: Unique -> Format -> VirtualReg Source #

regDotColor :: RealReg -> SDoc Source #

data Imm Source #

Constructors

ImmInt Int |
ImmInteger Integer |
ImmCLbl CLabel |
ImmLit SDoc |
ImmIndex CLabel Int |
ImmFloat Rational |
ImmDouble Rational |
ImmConstantSum Imm Imm |
ImmConstantDiff Imm Imm |
LO Imm |
HI Imm |
HA Imm |
HIGHERA Imm |
HIGHESTA Imm |

strImmLit :: String -> Imm Source #

litToImm :: CmmLit -> Imm Source #

data AddrMode Source #

Constructors

AddrRegReg Reg Reg |
AddrRegImm Reg Imm |

addrOffset :: AddrMode -> Int -> Maybe AddrMode Source #

spRel :: Platform -> Int -> AddrMode Source #

argRegs :: RegNo -> [Reg] Source #

allArgRegs :: [Reg] Source #

callClobberedRegs :: Platform -> [Reg] Source #

allMachRegNos :: [RegNo] Source #

classOfRealReg :: RealReg -> RegClass Source #

showReg :: RegNo -> String Source #

toRegNo :: Reg -> RegNo Source #

allFPArgRegs :: Platform -> [Reg] Source #

fits16Bits :: Integral a => a -> Bool Source #

makeImmediate :: Integral a => Width -> Bool -> a -> Maybe Imm Source #

fReg :: Int -> RegNo Source #

r0 :: Reg Source #

sp :: Reg Source #

toc :: Reg Source #

r3 :: Reg Source #

r4 :: Reg Source #

r11 :: Reg Source #

r12 :: Reg Source #

r30 :: Reg Source #

tmpReg :: Platform -> Reg Source #

f1 :: Reg Source #

allocatableRegs :: Platform -> [RealReg] Source #