Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- compileT :: Monad m => AsmBuilderT m a -> m [CodeLine]
- compile :: AsmBuilder a -> [CodeLine]
- ppCodeLines :: [CodeLine] -> Text
- mainFunction :: MonadAsmBuilder m => (() -> m ()) -> m ()
- function :: MonadAsmBuilder m => Text -> Int64 -> ([Operand] -> m Operand) -> m Operand
- globalVar :: MonadAsmBuilder m => Text -> m Operand
- externFunction :: MonadAsmBuilder m => Text -> m Operand
- data AsmBuilderT m a
- type AsmBuilder = AsmBuilderT Identity
- data Operand
- data CodeLine
- immediate :: MonadAsmBuilder m => Int64 -> m Operand
- and :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- or :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- add :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- sub :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- mul :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- neg :: MonadAsmBuilder m => Operand -> m Operand
- eq :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- ne :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- lt :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- le :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- gt :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- ge :: MonadAsmBuilder m => Operand -> Operand -> m Operand
- call :: MonadAsmBuilder m => Operand -> [Operand] -> m Operand
- ite :: MonadAsmBuilder m => Operand -> (() -> m Operand) -> (() -> m Operand) -> m Operand
- storeToLabeledAddr :: MonadAsmBuilder m => Operand -> Operand -> m ()
Documentation
compile :: AsmBuilder a -> [CodeLine] Source #
Compile the code
ppCodeLines :: [CodeLine] -> Text Source #
mainFunction :: MonadAsmBuilder m => (() -> m ()) -> m () Source #
Emit main function (entry point routine)
function :: MonadAsmBuilder m => Text -> Int64 -> ([Operand] -> m Operand) -> m Operand Source #
Emit main function (entry point routine)
externFunction :: MonadAsmBuilder m => Text -> m Operand Source #
Get external function operand
data AsmBuilderT m a Source #
Instances
type AsmBuilder = AsmBuilderT Identity Source #
storeToLabeledAddr :: MonadAsmBuilder m => Operand -> Operand -> m () Source #