StgCmmUtils

ghc-7.6.3: The GHC API

Safe Haskell | None

StgCmmUtils

Synopsis

- cgLit :: Literal -> FCode CmmLit
- mkSimpleLit :: 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 ()
- emitRtsCallWithVols :: PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> [GlobalReg] -> Bool -> FCode ()
- emitRtsCallWithResult :: LocalReg -> ForeignHint -> PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
- emitRtsCallGen :: [(LocalReg, ForeignHint)] -> PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> Maybe [GlobalReg] -> 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 :: TyCon -> CmmExpr -> CmmExpr
- mkTaggedObjectLoad :: LocalReg -> LocalReg -> WordOff -> DynTag -> CmmAGraph
- callerSaves :: GlobalReg -> Bool
- callerSaveVolatileRegs :: (CmmAGraph, CmmAGraph)
- get_GlobalReg_addr :: GlobalReg -> CmmExpr
- cmmAndWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmOrWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmNegate :: CmmExpr -> CmmExpr
- cmmEqWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmNeWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmUGtWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmSubWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmMulWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmAddWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmUShrWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmOffsetExprW :: CmmExpr -> CmmExpr -> CmmExpr
- cmmOffsetExprB :: CmmExpr -> CmmExpr -> CmmExpr
- cmmRegOffW :: CmmReg -> WordOff -> CmmExpr
- cmmRegOffB :: CmmReg -> ByteOff -> CmmExpr
- cmmLabelOffW :: CLabel -> WordOff -> CmmLit
- cmmLabelOffB :: CLabel -> ByteOff -> CmmLit
- cmmOffsetW :: CmmExpr -> WordOff -> CmmExpr
- cmmOffsetB :: CmmExpr -> ByteOff -> CmmExpr
- cmmOffsetLitW :: CmmLit -> WordOff -> CmmLit
- cmmOffsetLitB :: CmmLit -> ByteOff -> CmmLit
- cmmLoadIndexW :: CmmExpr -> Int -> CmmType -> CmmExpr
- cmmConstrTag :: CmmExpr -> CmmExpr
- cmmConstrTag1 :: CmmExpr -> CmmExpr
- cmmUntag :: CmmExpr -> CmmExpr
- cmmIsTagged :: CmmExpr -> CmmExpr
- cmmGetTag :: CmmExpr -> CmmExpr
- addToMem :: CmmType -> CmmExpr -> Int -> CmmAGraph
- addToMemE :: CmmType -> CmmExpr -> CmmExpr -> CmmAGraph
- addToMemLbl :: CmmType -> CLabel -> Int -> CmmAGraph
- mkWordCLit :: StgWord -> CmmLit
- newStringCLit :: String -> FCode CmmLit
- newByteStringCLit :: [Word8] -> FCode CmmLit
- packHalfWordsCLit :: (Integral a, Integral b) => a -> b -> CmmLit
- blankWord :: CmmStatic
- srt_escape :: StgHalfWord

# Documentation

cgLit :: Literal -> FCode CmmLit

mkSimpleLit :: 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 ()

emitRtsCallWithVols :: PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> [GlobalReg] -> Bool -> FCode ()

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

emitRtsCallGen :: [(LocalReg, ForeignHint)] -> PackageId -> FastString -> [(CmmExpr, ForeignHint)] -> Maybe [GlobalReg] -> 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 :: TyCon -> CmmExpr -> CmmExpr

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

callerSaves :: GlobalReg -> Bool

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

callerSaveVolatileRegs :: (CmmAGraph, CmmAGraph)

get_GlobalReg_addr :: GlobalReg -> CmmExpr

cmmAndWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmOrWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmNegate :: CmmExpr -> CmmExpr

cmmEqWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmNeWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmUGtWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmSubWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmMulWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmAddWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmUShrWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmOffsetExprW :: CmmExpr -> CmmExpr -> CmmExpr

cmmOffsetExprB :: CmmExpr -> CmmExpr -> CmmExpr

cmmRegOffW :: CmmReg -> WordOff -> CmmExpr

cmmRegOffB :: CmmReg -> ByteOff -> CmmExpr

cmmLabelOffW :: CLabel -> WordOff -> CmmLit

cmmLabelOffB :: CLabel -> ByteOff -> CmmLit

cmmOffsetW :: CmmExpr -> WordOff -> CmmExpr

cmmOffsetB :: CmmExpr -> ByteOff -> CmmExpr

cmmOffsetLitW :: CmmLit -> WordOff -> CmmLit

cmmOffsetLitB :: CmmLit -> ByteOff -> CmmLit

cmmLoadIndexW :: CmmExpr -> Int -> CmmType -> CmmExpr

cmmConstrTag :: CmmExpr -> CmmExpr

cmmConstrTag1 :: CmmExpr -> CmmExpr

cmmUntag :: CmmExpr -> CmmExpr

cmmIsTagged :: CmmExpr -> CmmExpr

cmmGetTag :: CmmExpr -> CmmExpr

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

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

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

mkWordCLit :: StgWord -> CmmLit

newStringCLit :: String -> FCode CmmLit

newByteStringCLit :: [Word8] -> FCode CmmLit

packHalfWordsCLit :: (Integral a, Integral b) => a -> b -> CmmLit

blankWord :: CmmStatic

srt_escape :: StgHalfWord