ghc-9.12: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.CmmToAsm.Monad

Synopsis

Documentation

data NcgImpl statics instr jumpDest Source #

A Native Code Generator implementation is parametrised over * The type of static data (typically related to CmmStatics) * The type of instructions * The type of jump destinations

Constructors

NcgImpl 

Fields

data NatM_State Source #

Constructors

NatM_State 

Fields

data NatM a Source #

Instances

Instances details
CmmMakeDynamicReferenceM NatM Source # 
Instance details

Defined in GHC.CmmToAsm.PIC

Methods

addImport :: CLabel -> NatM () Source #

MonadGetUnique NatM Source # 
Instance details

Defined in GHC.CmmToAsm.Monad

HasModule NatM Source # 
Instance details

Defined in GHC.CmmToAsm.Monad

Applicative NatM Source # 
Instance details

Defined in GHC.CmmToAsm.Monad

Methods

pure :: a -> NatM a #

(<*>) :: NatM (a -> b) -> NatM a -> NatM b #

liftA2 :: (a -> b -> c) -> NatM a -> NatM b -> NatM c #

(*>) :: NatM a -> NatM b -> NatM b #

(<*) :: NatM a -> NatM b -> NatM a #

Functor NatM Source # 
Instance details

Defined in GHC.CmmToAsm.Monad

Methods

fmap :: (a -> b) -> NatM a -> NatM b #

(<$) :: a -> NatM b -> NatM a #

Monad NatM Source # 
Instance details

Defined in GHC.CmmToAsm.Monad

Methods

(>>=) :: NatM a -> (a -> NatM b) -> NatM b #

(>>) :: NatM a -> NatM b -> NatM b #

return :: a -> NatM a #

addNodeBetweenNat :: BlockId -> BlockId -> BlockId -> NatM () Source #

Record that we added a block between from and old.

addImmediateSuccessorNat :: BlockId -> BlockId -> NatM () Source #

Place succ after block and change any edges block -> X to succ -> X

getConfig :: NatM NCGConfig Source #

Get native code generator configuration

getPlatform :: NatM Platform Source #

Get target platform from native code generator configuration

getCfgWeights :: NatM Weights Source #

Get CFG edge weights

64-bit registers on 32-bit architectures

data Reg64 Source #

Two 32-bit regs used as a single virtual 64-bit register

Constructors

Reg64 

Fields

data RegCode64 code Source #

Two 32-bit regs used as a single virtual 64-bit register and the code to set them appropriately

Constructors

RegCode64 

Fields

  • code

    Code to initialize the registers

  • !Reg

    Higher part

  • !Reg

    Lower part

getNewReg64 :: NatM Reg64 Source #

Return a virtual 64-bit register

localReg64 :: HasDebugCallStack => LocalReg -> Reg64 Source #

Convert a 64-bit LocalReg into two virtual 32-bit regs.

Used to handle 64-bit "registers" on 32-bit architectures