X86.Instr

ghc-8.4.4: The GHC API

Safe Haskell | None
Language | Haskell2010

X86.Instr

# Documentation

data Instr #

Constructors

COMMENT FastString |
LOCATION Int Int Int String |
LDATA Section (Alignment, CmmStatics) |
NEWBLOCK BlockId |
UNWIND CLabel UnwindTable |
DELTA Int |
MOV Format Operand Operand |
CMOV Cond Format Operand Reg |
MOVZxL Format Operand Operand |
MOVSxL Format Operand Operand |
LEA Format Operand Operand |
ADD Format Operand Operand |
ADC Format Operand Operand |
SUB Format Operand Operand |
SBB Format Operand Operand |
MUL Format Operand Operand |
MUL2 Format Operand |
IMUL Format Operand Operand |
IMUL2 Format Operand |
DIV Format Operand |
IDIV Format Operand |
ADD_CC Format Operand Operand |
SUB_CC Format Operand Operand |
AND Format Operand Operand |
OR Format Operand Operand |
XOR Format Operand Operand |
NOT Format Operand |
NEGI Format Operand |
BSWAP Format Reg |
SHL Format Operand Operand |
SAR Format Operand Operand |
SHR Format Operand Operand |
BT Format Imm Operand |
NOP |
GMOV Reg Reg |
GLD Format AddrMode Reg |
GST Format Reg AddrMode |
GLDZ Reg |
GLD1 Reg |
GFTOI Reg Reg |
GDTOI Reg Reg |
GITOF Reg Reg |
GITOD Reg Reg |
GDTOF Reg Reg |
GADD Format Reg Reg Reg |
GDIV Format Reg Reg Reg |
GSUB Format Reg Reg Reg |
GMUL Format Reg Reg Reg |
GCMP Cond Reg Reg |
GABS Format Reg Reg |
GNEG Format Reg Reg |
GSQRT Format Reg Reg |
GSIN Format CLabel CLabel Reg Reg |
GCOS Format CLabel CLabel Reg Reg |
GTAN Format CLabel CLabel Reg Reg |
GFREE |
CVTSS2SD Reg Reg |
CVTSD2SS Reg Reg |
CVTTSS2SIQ Format Operand Reg |
CVTTSD2SIQ Format Operand Reg |
CVTSI2SS Format Operand Reg |
CVTSI2SD Format Operand Reg |
FDIV Format Operand Operand |
SQRT Format Operand Reg |
TEST Format Operand Operand |
CMP Format Operand Operand |
SETCC Cond Operand |
PUSH Format Operand |
POP Format Operand |
JMP Operand [Reg] |
JXX Cond BlockId |
JXX_GBL Cond Imm |
JMP_TBL Operand [Maybe BlockId] Section CLabel |
CALL (Either Imm Reg) [Reg] |
CLTD Format |
FETCHGOT Reg |
FETCHPC Reg |
POPCNT Format Operand Reg |
BSF Format Operand Reg |
BSR Format Operand Reg |
PDEP Format Operand Operand Reg |
PEXT Format Operand Operand Reg |
PREFETCH PrefetchVariant Format Operand |
LOCK Instr |
XADD Format Operand Operand |
CMPXCHG Format Operand Operand |
MFENCE |

Instances

Outputable Instr # |
Instance details Defined in X86.Ppr Methods ppr :: Instr -> SDoc # pprPrec :: Rational -> Instr -> SDoc #
Instruction Instr # | Instruction instance for x86 instruction set.
Instance details Defined in X86.Instr Methods regUsageOfInstr :: Platform -> Instr -> RegUsage # patchRegsOfInstr :: Instr -> (Reg -> Reg) -> Instr # isJumpishInstr :: Instr -> Bool # jumpDestsOfInstr :: Instr -> [BlockId] # patchJumpInstr :: Instr -> (BlockId -> BlockId) -> Instr # mkSpillInstr :: DynFlags -> Reg -> Int -> Int -> Instr # mkLoadInstr :: DynFlags -> Reg -> Int -> Int -> Instr # takeDeltaInstr :: Instr -> Maybe Int # isMetaInstr :: Instr -> Bool # mkRegRegMoveInstr :: Platform -> Reg -> Reg -> Instr # takeRegRegMoveInstr :: Instr -> Maybe (Reg, Reg) # mkJumpInstr :: BlockId -> [Instr] # mkStackAllocInstr :: Platform -> Int -> Instr # mkStackDeallocInstr :: Platform -> Int -> Instr #

data Operand #

Constructors

OpReg Reg |
OpImm Imm |
OpAddr AddrMode |

data PrefetchVariant #

Constructors

NTA |
Lvl0 |
Lvl1 |
Lvl2 |

data JumpDest #

getJumpDestBlockId :: JumpDest -> Maybe BlockId #

canShortcut :: Instr -> Maybe JumpDest #

shortcutStatics :: (BlockId -> Maybe JumpDest) -> (Alignment, CmmStatics) -> (Alignment, CmmStatics) #

shortcutJump :: (BlockId -> Maybe JumpDest) -> Instr -> Instr #

i386_insert_ffrees :: [GenBasicBlock Instr] -> [GenBasicBlock Instr] #

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

maxSpillSlots :: DynFlags -> Int #

archWordFormat :: Bool -> Format #