htcc-0.0.0.1: The full scratch implementation of tiny C compiler (x86_64)
Copyright(c) roki 2019
LicenseMIT
Maintainerfalgon53@yahoo.co.jp
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Htcc.Asm.Intrinsic.Structure.Section.Text.Directive

Description

The modules of intrinsic (x86_64) assembly

Synopsis

Context type

data TextSectionCtx Source #

the type representing the context inside the text section

data TextLabelCtx Source #

the type representing the context inside the label

data TargetLabelCtx Source #

the type representing the context inside the instruction that needs to be specified, such as a jmp instruction.

Directives

text :: Asm TextSectionCtx e a -> Asm AsmCodeCtx e a Source #

text section

global :: Text -> Asm TextSectionCtx e () Source #

global directive

Labels

fn :: Text -> Asm TextLabelCtx e a -> Asm TextSectionCtx e a Source #

the label as function definition in text section

label :: (Show i, Show e) => Text -> i -> Asm TextLabelCtx e () Source #

the label in text section

begin :: (Show e, Show i) => i -> Asm TextLabelCtx e () Source #

begin label

end :: (Show e, Show i) => i -> Asm TextLabelCtx e () Source #

end label

eLse :: (Show e, Show i) => i -> Asm TextLabelCtx e () Source #

else label

cAse :: (Show e, Show i) => i -> Asm TextLabelCtx e () Source #

case label

break :: (Show e, Show i) => i -> Asm TextLabelCtx e () Source #

break label

continue :: (Show e, Show i) => i -> Asm TextLabelCtx e () Source #

continue label

gotoLabel :: Text -> Asm TextLabelCtx e () Source #

goto label

ref :: (Show e, Show i) => Text -> i -> Asm TargetLabelCtx e () Source #

reference to general label

refBegin :: (Show e, Show i) => i -> Asm TargetLabelCtx e () Source #

reference to begin label

refEnd :: (Show e, Show i) => i -> Asm TargetLabelCtx e () Source #

reference to end label

refElse :: (Show e, Show i) => i -> Asm TargetLabelCtx e () Source #

reference to else label

refBreak :: (Show e, Show i) => i -> Asm TargetLabelCtx e () Source #

reference for break label

refHBreak :: Show e => Asm TargetLabelCtx e () Source #

reference for break label (applying value by brkCnt)

refContinue :: (Show e, Show i) => i -> Asm TargetLabelCtx e () Source #

reference for continue label

refHContinue :: Show e => Asm TargetLabelCtx e () Source #

reference for break label (applying value by cntCnt)

refReturn :: Show e => Asm TargetLabelCtx e () Source #

reference for return label

refGoto :: Text -> Asm TargetLabelCtx e () Source #

reference for goto label

Generator

makeCases :: (Show e, Enum e, Integral e, Show i, Num i) => [ATree i] -> Asm TextLabelCtx e [ATree i] Source #

generate cases and return abstract tree