Copyright | (c) roki 2019 |
---|---|
License | MIT |
Maintainer | falgon53@yahoo.co.jp |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
The modules of intrinsic (x86_64) assembly
Synopsis
- data SizeUnit
- class Show a => UnaryInstruction a where
- push :: a -> Asm TextLabelCtx e ()
- pop :: a -> Asm TextLabelCtx e ()
- pushl :: a -> Asm TextLabelCtx e ()
- popl :: a -> Asm TextLabelCtx e ()
- idiv :: a -> Asm TextLabelCtx e ()
- not :: a -> Asm TextLabelCtx e ()
- class Show a => BinaryInstruction a where
- mov :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- movl :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- movsx :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- movsxd :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- movabs :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- movzb :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- cmp :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- add :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- sub :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- imul :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- and :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- or :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- xor :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- shl :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- sar :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- lea :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e ()
- newtype Offset = Offset Text
- data Ptr a = Ptr SizeUnit (Ref a)
- sete :: Register -> Asm TextLabelCtx e ()
- setne :: Register -> Asm TextLabelCtx e ()
- setl :: Register -> Asm TextLabelCtx e ()
- setle :: Register -> Asm TextLabelCtx e ()
- setg :: Register -> Asm TextLabelCtx e ()
- setge :: Register -> Asm TextLabelCtx e ()
- byte :: IsOperand a => (SizeUnit -> Ref a -> Ptr a) -> Ref a -> Ptr a
- word :: IsOperand a => (SizeUnit -> Ref a -> Ptr a) -> Ref a -> Ptr a
- dword :: IsOperand a => (SizeUnit -> Ref a -> Ptr a) -> Ref a -> Ptr a
- cqo :: Asm TextLabelCtx e ()
- ret :: Asm TextLabelCtx e ()
- leave :: Asm TextLabelCtx e ()
- jmp :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e ()
- je :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e ()
- jne :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e ()
- jnz :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e ()
- call :: Text -> Asm TextLabelCtx e ()
Documentation
Unit of size of data to be loaded
Instances
Bounded SizeUnit Source # | |
Enum SizeUnit Source # | |
Defined in Htcc.Asm.Intrinsic.Structure.Section.Text.Instruction | |
Eq SizeUnit Source # | |
Ord SizeUnit Source # | |
Show SizeUnit Source # | |
class Show a => UnaryInstruction a where Source #
A class of x86_64 instructions with unary arguments.
Nothing
push :: a -> Asm TextLabelCtx e () Source #
push
instruction
pop :: a -> Asm TextLabelCtx e () Source #
pop
instruction
pushl :: a -> Asm TextLabelCtx e () Source #
pushl
instruction
popl :: a -> Asm TextLabelCtx e () Source #
popl
instruction
idiv :: a -> Asm TextLabelCtx e () Source #
idiv
instruction
not :: a -> Asm TextLabelCtx e () Source #
not
instruction
Instances
class Show a => BinaryInstruction a where Source #
A class of x86_64 instructions with binary arguments.
Nothing
mov :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
mov
instruction
movl :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
movl
instruction
movsx :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
movsx
instruction
movsxd :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
movsxd
instruction
movabs :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
movabs
instruction
movzb :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
movzb
instruction
cmp :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
cmp
instruction
add :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
add
instruction
sub :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
sub
instruction
imul :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
imul
instruction
and :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
and
instruction
or :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
or
instruction
xor :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
xor
instruction
shl :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
shl
instruction
sar :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
sar
instruction
lea :: BinaryInstruction b => a -> b -> Asm TextLabelCtx e () Source #
Instances
offset
instruction
Instances
The ptr
instruction
Instances
byte :: IsOperand a => (SizeUnit -> Ref a -> Ptr a) -> Ref a -> Ptr a Source #
byte
is a helper function for intuitively writing byte
instructions
word :: IsOperand a => (SizeUnit -> Ref a -> Ptr a) -> Ref a -> Ptr a Source #
word
is a helper function for intuitively writing word
instructions
dword :: IsOperand a => (SizeUnit -> Ref a -> Ptr a) -> Ref a -> Ptr a Source #
dword
is a helper function for intuitively writing dword
instructions
cqo :: Asm TextLabelCtx e () Source #
cqo
instruction
ret :: Asm TextLabelCtx e () Source #
ret
instruction
leave :: Asm TextLabelCtx e () Source #
leave
instruction
jmp :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e () Source #
jmp
instruction
je :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e () Source #
je
instruction
jne :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e () Source #
jne
instruction
jnz :: Asm TargetLabelCtx e () -> Asm TextLabelCtx e () Source #
jnz
instruction