ghc-7.4.1: The GHC API

Safe Haskell | Safe-Infered

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
- withTemp :: CmmType -> (LocalReg -> CmmAGraph) -> CmmAGraph
- newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
- mkMultiAssign :: [LocalReg] -> [CmmExpr] -> CmmAGraph
- mkCmmSwitch :: Bool -> CmmExpr -> [(ConTagZ, CmmAGraph)] -> Maybe CmmAGraph -> ConTagZ -> ConTagZ -> CmmAGraph
- mkCmmLitSwitch :: CmmExpr -> [(Literal, CmmAGraph)] -> CmmAGraph -> CmmAGraph
- 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
- cmmMulWord, cmmAddWord, cmmUShrWord, cmmAndWord, cmmOrWord, cmmEqWord, cmmNeWord, cmmSubWord, cmmUGtWord :: CmmExpr -> CmmExpr -> CmmExpr
- cmmNegate :: 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, cmmConstrTag1 :: CmmExpr -> CmmExpr
- cmmUntag, cmmGetTag :: CmmExpr -> CmmExpr
- cmmIsTagged :: 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
- getSRTInfo :: SRT -> FCode C_SRT
- 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

withTemp :: CmmType -> (LocalReg -> CmmAGraph) -> CmmAGraph

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

mkMultiAssign :: [LocalReg] -> [CmmExpr] -> CmmAGraph

mkCmmSwitch :: Bool -> CmmExpr -> [(ConTagZ, CmmAGraph)] -> Maybe CmmAGraph -> ConTagZ -> ConTagZ -> CmmAGraph

mkCmmLitSwitch :: CmmExpr -> [(Literal, CmmAGraph)] -> CmmAGraph -> CmmAGraph

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

cmmMulWord, cmmAddWord, cmmUShrWord, cmmAndWord, cmmOrWord, cmmEqWord, cmmNeWord, cmmSubWord, cmmUGtWord :: CmmExpr -> CmmExpr -> CmmExpr

cmmNegate :: 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, cmmConstrTag1 :: CmmExpr -> CmmExpr

cmmUntag, cmmGetTag :: CmmExpr -> CmmExpr

cmmIsTagged :: 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

getSRTInfo :: SRT -> FCode C_SRT

srt_escape :: StgHalfWord