StgCmmLayout

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

StgCmmLayout

Synopsis

- mkArgDescr :: DynFlags -> [Id] -> ArgDescr
- emitCall :: (Convention, Convention) -> CmmExpr -> [CmmExpr] -> FCode ReturnKind
- emitReturn :: [CmmExpr] -> FCode ReturnKind
- adjustHpBackwards :: FCode ()
- emitClosureProcAndInfoTable :: Bool -> Id -> LambdaFormInfo -> CmmInfoTable -> [NonVoid Id] -> ((Int, LocalReg, [LocalReg]) -> FCode ()) -> FCode ()
- emitClosureAndInfoTable :: CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode ()
- slowCall :: CmmExpr -> [StgArg] -> FCode ReturnKind
- directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind
- mkVirtHeapOffsets :: DynFlags -> Bool -> [(PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, VirtualHpOffset)])
- mkVirtConstrOffsets :: DynFlags -> [(PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, VirtualHpOffset)])
- getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr
- hpRel :: VirtualHpOffset -> VirtualHpOffset -> WordOff
- data ArgRep
  - = P
  - | N
  - | L
  - | V
  - | F
  - | D
  - | V16
  - | V32
  - | V64
- toArgRep :: PrimRep -> ArgRep
- argRepSizeW :: DynFlags -> ArgRep -> WordOff

# Documentation

mkArgDescr :: DynFlags -> [Id] -> ArgDescr Source

emitCall :: (Convention, Convention) -> CmmExpr -> [CmmExpr] -> FCode ReturnKind Source

`emitCall conv fun args` makes a call to the entry-code of `fun`, using the call/return convention `conv`, passing `args`, and returning the results to the current sequel.

emitReturn :: [CmmExpr] -> FCode ReturnKind Source

Return multiple values to the sequel

If the sequel is `Return`

        return (x,y)

If the sequel is `AssignTo [p,q]`

       p=x; q=y;

adjustHpBackwards :: FCode () Source

emitClosureProcAndInfoTable :: Bool -> Id -> LambdaFormInfo -> CmmInfoTable -> [NonVoid Id] -> ((Int, LocalReg, [LocalReg]) -> FCode ()) -> FCode () Source

emitClosureAndInfoTable :: CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode () Source

slowCall :: CmmExpr -> [StgArg] -> FCode ReturnKind Source

directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind Source

mkVirtHeapOffsets :: DynFlags -> Bool -> [(PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, VirtualHpOffset)]) Source

mkVirtConstrOffsets :: DynFlags -> [(PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, VirtualHpOffset)]) Source

getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr Source

hpRel :: VirtualHpOffset -> VirtualHpOffset -> WordOff Source

data ArgRep Source

Constructors

P |
N |
L |
V |
F |
D |
V16 |
V32 |
V64 |

Instances

Outputable ArgRep |

toArgRep :: PrimRep -> ArgRep Source

argRepSizeW :: DynFlags -> ArgRep -> WordOff Source