ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

PPC.Instr

Synopsis

- archWordSize :: Size
- data RI
  - = RIReg Reg
  - | RIImm Imm
- data Instr
  - = COMMENT FastString
  - | LDATA Section CmmStatics
  - | NEWBLOCK BlockId
  - | DELTA Int
  - | LD Size Reg AddrMode
  - | LDFAR Size Reg AddrMode
  - | LA Size Reg AddrMode
  - | ST Size Reg AddrMode
  - | STFAR Size Reg AddrMode
  - | STU Size Reg AddrMode
  - | LIS Reg Imm
  - | LI Reg Imm
  - | MR Reg Reg
  - | CMP Size Reg RI
  - | CMPL Size Reg RI
  - | BCC Cond BlockId
  - | BCCFAR Cond BlockId
  - | JMP CLabel
  - | MTCTR Reg
  - | BCTR [Maybe BlockId] (Maybe CLabel)
  - | BL CLabel [Reg]
  - | BCTRL [Reg]
  - | ADD Reg Reg RI
  - | ADDC Reg Reg Reg
  - | ADDE Reg Reg Reg
  - | ADDI Reg Reg Imm
  - | ADDIS Reg Reg Imm
  - | SUBF Reg Reg Reg
  - | SUBFC Reg Reg Reg
  - | SUBFE Reg Reg Reg
  - | MULLW Reg Reg RI
  - | DIVW Reg Reg Reg
  - | DIVWU Reg Reg Reg
  - | MULLW_MayOflo Reg Reg Reg
  - | AND Reg Reg RI
  - | OR Reg Reg RI
  - | XOR Reg Reg RI
  - | XORIS Reg Reg Imm
  - | EXTS Size Reg Reg
  - | NEG Reg Reg
  - | NOT Reg Reg
  - | SLW Reg Reg RI
  - | SRW Reg Reg RI
  - | SRAW Reg Reg RI
  - | RLWINM Reg Reg Int Int Int
  - | FADD Size Reg Reg Reg
  - | FSUB Size Reg Reg Reg
  - | FMUL Size Reg Reg Reg
  - | FDIV Size Reg Reg Reg
  - | FNEG Reg Reg
  - | FCMP Reg Reg
  - | FCTIWZ Reg Reg
  - | FRSP Reg Reg
  - | CRNOR Int Int Int
  - | MFCR Reg
  - | MFLR Reg
  - | FETCHPC Reg
  - | LWSYNC
  - | UPDATE_SP Size Imm
- maxSpillSlots :: DynFlags -> Int
- allocMoreStack :: Platform -> Int -> NatCmmDecl statics Instr -> UniqSM (NatCmmDecl statics Instr)
- makeFarBranches :: BlockEnv CmmStatics -> [NatBasicBlock Instr] -> [NatBasicBlock Instr]

# Documentation

archWordSize :: Size

data RI

Constructors

RIReg Reg |
RIImm Imm |

data Instr

Constructors

COMMENT FastString |
LDATA Section CmmStatics |
NEWBLOCK BlockId |
DELTA Int |
LD Size Reg AddrMode |
LDFAR Size Reg AddrMode |
LA Size Reg AddrMode |
ST Size Reg AddrMode |
STFAR Size Reg AddrMode |
STU Size Reg AddrMode |
LIS Reg Imm |
LI Reg Imm |
MR Reg Reg |
CMP Size Reg RI |
CMPL Size Reg RI |
BCC Cond BlockId |
BCCFAR Cond BlockId |
JMP CLabel |
MTCTR Reg |
BCTR [Maybe BlockId] (Maybe CLabel) |
BL CLabel [Reg] |
BCTRL [Reg] |
ADD Reg Reg RI |
ADDC Reg Reg Reg |
ADDE Reg Reg Reg |
ADDI Reg Reg Imm |
ADDIS Reg Reg Imm |
SUBF Reg Reg Reg |
SUBFC Reg Reg Reg |
SUBFE Reg Reg Reg |
MULLW Reg Reg RI |
DIVW Reg Reg Reg |
DIVWU Reg Reg Reg |
MULLW_MayOflo Reg Reg Reg |
AND Reg Reg RI |
OR Reg Reg RI |
XOR Reg Reg RI |
XORIS Reg Reg Imm |
EXTS Size Reg Reg |
NEG Reg Reg |
NOT Reg Reg |
SLW Reg Reg RI |
SRW Reg Reg RI |
SRAW Reg Reg RI |
RLWINM Reg Reg Int Int Int |
FADD Size Reg Reg Reg |
FSUB Size Reg Reg Reg |
FMUL Size Reg Reg Reg |
FDIV Size Reg Reg Reg |
FNEG Reg Reg |
FCMP Reg Reg |
FCTIWZ Reg Reg |
FRSP Reg Reg |
CRNOR Int Int Int |
MFCR Reg |
MFLR Reg |
FETCHPC Reg |
LWSYNC |
UPDATE_SP Size Imm |

Instances

Instruction Instr | Instruction instance for powerpc

maxSpillSlots :: DynFlags -> Int

The number of spill slots available without allocating more.

allocMoreStack :: Platform -> Int -> NatCmmDecl statics Instr -> UniqSM (NatCmmDecl statics Instr)

makeFarBranches :: BlockEnv CmmStatics -> [NatBasicBlock Instr] -> [NatBasicBlock Instr]