StgCmmUtils

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

StgCmmUtils

Synopsis

- cgLit :: Literal -> FCode CmmLit
- mkSimpleLit :: DynFlags -> Literal -> CmmLit
- emitDataLits :: CLabel -> [CmmLit] -> FCode ()
- mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt
- emitRODataLits :: CLabel -> [CmmLit] -> FCode ()
- mkRODataLits :: CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt
- emitRtsCall :: PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
- emitRtsCallWithResult :: LocalReg -> ForeignHint -> PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
- emitRtsCallGen :: [(LocalReg, ForeignHint)] -> CLabel -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
- assignTemp :: CmmExpr -> FCode LocalReg
- newTemp :: CmmType -> FCode LocalReg
- newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
- emitMultiAssign :: [LocalReg] -> [CmmExpr] -> FCode ()
- emitCmmLitSwitch :: CmmExpr -> [(Literal, CmmAGraph)] -> CmmAGraph -> FCode ()
- emitSwitch :: CmmExpr -> [(ConTagZ, CmmAGraph)] -> Maybe CmmAGraph -> ConTagZ -> ConTagZ -> FCode ()
- tagToClosure :: DynFlags -> TyCon -> CmmExpr -> CmmExpr
- mkTaggedObjectLoad :: DynFlags -> LocalReg -> LocalReg -> WordOff -> DynTag -> CmmAGraph
- callerSaves :: Platform -> GlobalReg -> Bool
- callerSaveVolatileRegs :: DynFlags -> (CmmAGraph, CmmAGraph)
- get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr
- cmmAndWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmOrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmNegate :: DynFlags -> CmmExpr -> CmmExpr
- cmmEqWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmNeWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmUGtWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmSubWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmMulWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmAddWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmUShrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmOffsetExprW :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmOffsetExprB :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- cmmRegOffW :: DynFlags -> CmmReg -> WordOff -> CmmExpr
- cmmRegOffB :: CmmReg -> ByteOff -> CmmExpr
- cmmLabelOffW :: DynFlags -> CLabel -> WordOff -> CmmLit
- cmmLabelOffB :: CLabel -> ByteOff -> CmmLit
- cmmOffsetW :: DynFlags -> CmmExpr -> WordOff -> CmmExpr
- cmmOffsetB :: DynFlags -> CmmExpr -> ByteOff -> CmmExpr
- cmmOffsetLitW :: DynFlags -> CmmLit -> WordOff -> CmmLit
- cmmOffsetLitB :: CmmLit -> ByteOff -> CmmLit
- cmmLoadIndexW :: DynFlags -> CmmExpr -> Int -> CmmType -> CmmExpr
- cmmConstrTag1 :: DynFlags -> CmmExpr -> CmmExpr
- cmmUntag :: DynFlags -> CmmExpr -> CmmExpr
- cmmIsTagged :: DynFlags -> CmmExpr -> CmmExpr
- addToMem :: CmmType -> CmmExpr -> Int -> CmmAGraph
- addToMemE :: CmmType -> CmmExpr -> CmmExpr -> CmmAGraph
- addToMemLblE :: CmmType -> CLabel -> CmmExpr -> CmmAGraph
- addToMemLbl :: CmmType -> CLabel -> Int -> CmmAGraph
- mkWordCLit :: DynFlags -> Integer -> CmmLit
- newStringCLit :: String -> FCode CmmLit
- newByteStringCLit :: [Word8] -> FCode CmmLit
- blankWord :: DynFlags -> CmmStatic

# Documentation

cgLit :: Literal -> FCode CmmLit Source

mkSimpleLit :: DynFlags -> Literal -> CmmLit Source

emitDataLits :: CLabel -> [CmmLit] -> FCode () Source

mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt Source

emitRODataLits :: CLabel -> [CmmLit] -> FCode () Source

mkRODataLits :: CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt Source

emitRtsCall :: PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode () Source

emitRtsCallWithResult :: LocalReg -> ForeignHint -> PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode () Source

emitRtsCallGen :: [(LocalReg, ForeignHint)] -> CLabel -> [(CmmExpr, ForeignHint)] -> Bool -> FCode () Source

assignTemp :: CmmExpr -> FCode LocalReg Source

newTemp :: CmmType -> FCode LocalReg Source

newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint]) Source

emitMultiAssign :: [LocalReg] -> [CmmExpr] -> FCode () Source

emitCmmLitSwitch :: CmmExpr -> [(Literal, CmmAGraph)] -> CmmAGraph -> FCode () Source

emitSwitch :: CmmExpr -> [(ConTagZ, CmmAGraph)] -> Maybe CmmAGraph -> ConTagZ -> ConTagZ -> FCode () Source

tagToClosure :: DynFlags -> TyCon -> CmmExpr -> CmmExpr Source

mkTaggedObjectLoad :: DynFlags -> LocalReg -> LocalReg -> WordOff -> DynTag -> CmmAGraph Source

callerSaves :: Platform -> GlobalReg -> Bool Source

Returns `True` if this global register is stored in a caller-saves machine register.

callerSaveVolatileRegs :: DynFlags -> (CmmAGraph, CmmAGraph) Source

get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr Source

cmmAndWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmOrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmNegate :: DynFlags -> CmmExpr -> CmmExpr Source

cmmEqWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmNeWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmUGtWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmSubWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmMulWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmAddWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmUShrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmOffsetExprW :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmOffsetExprB :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr Source

cmmRegOffW :: DynFlags -> CmmReg -> WordOff -> CmmExpr Source

cmmRegOffB :: CmmReg -> ByteOff -> CmmExpr Source

cmmLabelOffW :: DynFlags -> CLabel -> WordOff -> CmmLit Source

cmmLabelOffB :: CLabel -> ByteOff -> CmmLit Source

cmmOffsetW :: DynFlags -> CmmExpr -> WordOff -> CmmExpr Source

cmmOffsetB :: DynFlags -> CmmExpr -> ByteOff -> CmmExpr Source

cmmOffsetLitW :: DynFlags -> CmmLit -> WordOff -> CmmLit Source

cmmOffsetLitB :: CmmLit -> ByteOff -> CmmLit Source

cmmLoadIndexW :: DynFlags -> CmmExpr -> Int -> CmmType -> CmmExpr Source

cmmConstrTag1 :: DynFlags -> CmmExpr -> CmmExpr Source

cmmUntag :: DynFlags -> CmmExpr -> CmmExpr Source

cmmIsTagged :: DynFlags -> CmmExpr -> CmmExpr Source

addToMem :: CmmType -> CmmExpr -> Int -> CmmAGraph Source

addToMemE :: CmmType -> CmmExpr -> CmmExpr -> CmmAGraph Source

addToMemLblE :: CmmType -> CLabel -> CmmExpr -> CmmAGraph Source

addToMemLbl :: CmmType -> CLabel -> Int -> CmmAGraph Source

mkWordCLit :: DynFlags -> Integer -> CmmLit Source

newStringCLit :: String -> FCode CmmLit Source

newByteStringCLit :: [Word8] -> FCode CmmLit Source

blankWord :: DynFlags -> CmmStatic Source