Module code_asm

Source
Expand description

Easier creating of instructions (eg. a.mov(eax, ecx)) than using Instruction::with*() functions.

This requires the code_asm feature to use (not enabled by default). Add it to your Cargo.toml:

[dependencies.iced-x86]
version = "1.21.0"
features = ["code_asm"]

See CodeAssembler docs for usage.

Re-exports§

pub use crate::IcedError;
pub use crate::code_asm::registers::*;

Modules§

asm_traits
registers
This module contains all registers that can be used.

Structs§

AsmMemoryOperand
A memory operand passed to CodeAssembler methods.
AsmRegister8
All 8-bit general purpose registers.
AsmRegister16
All 16-bit general purpose registers.
AsmRegister32
All 32-bit general purpose registers.
AsmRegister64
All 64-bit general purpose registers.
AsmRegisterBnd
All bound registers.
AsmRegisterCr
All control registers.
AsmRegisterDr
All debug registers.
AsmRegisterK
All opmask registers.
AsmRegisterMm
All MMX registers.
AsmRegisterSegment
All segment registers.
AsmRegisterSt
All FPU registers.
AsmRegisterTmm
All tile registers.
AsmRegisterTr
All test registers.
AsmRegisterXmm
All 128-bit vector registers (XMM).
AsmRegisterYmm
All 256-bit vector registers (YMM).
AsmRegisterZmm
All 512-bit vector registers (ZMM).
CodeAssembler
Creates and encodes instructions. It’s easier to use this struct than to call Instruction::with*() functions.
CodeAssemblerResult
Result of assembling the instructions
CodeLabel
A label created by CodeAssembler

Functions§

bcst
Creates a broadcast memory operand with no size hint
byte_ptr
Creates a memory operand with a BYTE PTR size hint
dword_bcst
Creates a broadcast memory operand with a DWORD BCST size hint
dword_ptr
Creates a memory operand with a DWORD PTR size hint
fword_ptr
Creates a memory operand with an FWORD PTR size hint
mmword_ptr
Creates a memory operand with an MMWORD PTR size hint
oword_ptr
Creates a memory operand with an OWORD PTR size hint
ptr
Creates a memory operand with no size hint
qword_bcst
Creates a broadcast memory operand with a QWORD BCST size hint
qword_ptr
Creates a memory operand with a QWORD PTR size hint
tbyte_ptr
Creates a memory operand with a TBYTE PTR size hint
tword_ptr
Creates a memory operand with a TWORD PTR size hint
word_bcst
Creates a broadcast memory operand with a WORD BCST size hint
word_ptr
Creates a memory operand with a WORD PTR size hint
xmmword_ptr
Creates a memory operand with an XMMWORD PTR size hint
ymmword_ptr
Creates a memory operand with a YMMWORD PTR size hint
zmmword_ptr
Creates a memory operand with a ZMMWORD PTR size hint