[−][src]Struct iced_x86::Instruction
A 16/32/64-bit x86 instruction. Created by Decoder
or by Instruction::with*()
methods.
Methods
impl Instruction
[src]
#[must_use]pub fn new() -> Self
[src]
Creates an empty Instruction
(all fields are cleared). See also the with_*()
constructor methods.
#[must_use]pub fn eq_all_bits(&self, other: &Self) -> bool
[src]
Checks if two instructions are equal, comparing all bits, not ignoring anything. ==
ignores some fields.
#[must_use]pub fn ip16(&self) -> u16
[src]
Gets the 16-bit IP of the instruction
pub fn set_ip16(&mut self, new_value: u16)
[src]
#[must_use]pub fn ip32(&self) -> u32
[src]
Gets the 32-bit IP of the instruction
pub fn set_ip32(&mut self, new_value: u32)
[src]
#[must_use]pub fn ip(&self) -> u64
[src]
Gets the 64-bit IP of the instruction
pub fn set_ip(&mut self, new_value: u64)
[src]
#[must_use]pub fn next_ip16(&self) -> u16
[src]
Gets the 16-bit IP of the next instruction
pub fn set_next_ip16(&mut self, new_value: u16)
[src]
#[must_use]pub fn next_ip32(&self) -> u32
[src]
Gets the 32-bit IP of the next instruction
pub fn set_next_ip32(&mut self, new_value: u32)
[src]
#[must_use]pub fn next_ip(&self) -> u64
[src]
Gets the 64-bit IP of the next instruction
pub fn set_next_ip(&mut self, new_value: u64)
[src]
#[must_use]pub fn code_size(&self) -> CodeSize
[src]
Gets the code size when the instruction was decoded. This value is informational and can be used by a formatter.
pub fn set_code_size(&mut self, new_value: CodeSize)
[src]
Sets the code size when the instruction was decoded. This value is informational and can be used by a formatter.
Arguments
new_value
: new value
#[must_use]pub fn code(&self) -> Code
[src]
Gets the instruction code, see also mnemonic()
pub fn set_code(&mut self, new_value: Code)
[src]
#[must_use]pub fn mnemonic(&self) -> Mnemonic
[src]
Gets the mnemonic, see also code()
#[must_use]pub fn op_count(&self) -> u32
[src]
Gets the operand count. An instruction can have 0-5 operands.
Examples
use iced_x86::*; // add [rax],ebx let bytes = b"\x01\x18"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let instr = decoder.decode(); assert_eq!(2, instr.op_count());
#[must_use]pub fn len(&self) -> usize
[src]
Gets the length of the instruction, 0-15 bytes. This is just informational. If you modify the instruction or create a new one, this method could return the wrong value.
pub fn set_len(&mut self, new_value: usize)
[src]
Sets the length of the instruction, 0-15 bytes. This is just informational. If you modify the instruction or create a new one, this method could return the wrong value.
Arguments
new_value
: new value
#[must_use]pub fn has_xacquire_prefix(&self) -> bool
[src]
true
if the instruction has the XACQUIRE
prefix (F2
)
pub fn set_has_xacquire_prefix(&mut self, new_value: bool)
[src]
#[must_use]pub fn has_xrelease_prefix(&self) -> bool
[src]
true
if the instruction has the XRELEASE
prefix (F3
)
pub fn set_has_xrelease_prefix(&mut self, new_value: bool)
[src]
#[must_use]pub fn has_rep_prefix(&self) -> bool
[src]
true
if the instruction has the REPE
or REP
prefix (F3
)
pub fn set_has_rep_prefix(&mut self, new_value: bool)
[src]
#[must_use]pub fn has_repe_prefix(&self) -> bool
[src]
true
if the instruction has the REPE
or REP
prefix (F3
)
pub fn set_has_repe_prefix(&mut self, new_value: bool)
[src]
#[must_use]pub fn has_repne_prefix(&self) -> bool
[src]
true
if the instruction has the REPNE
prefix (F2
)
pub fn set_has_repne_prefix(&mut self, new_value: bool)
[src]
#[must_use]pub fn has_lock_prefix(&self) -> bool
[src]
true
if the instruction has the LOCK
prefix (F0
)
pub fn set_has_lock_prefix(&mut self, new_value: bool)
[src]
#[must_use]pub fn op0_kind(&self) -> OpKind
[src]
Gets operand #0's kind if the operand exists (see op_count()
and op_kind()
)
pub fn set_op0_kind(&mut self, new_value: OpKind)
[src]
Sets operand #0's kind if the operand exists (see op_count()
and set_op_kind()
)
Arguments
new_value
: new value
#[must_use]pub fn op1_kind(&self) -> OpKind
[src]
Gets operand #1's kind if the operand exists (see op_count()
and op_kind()
)
pub fn set_op1_kind(&mut self, new_value: OpKind)
[src]
Sets operand #1's kind if the operand exists (see op_count()
and set_op_kind()
)
Arguments
new_value
: new value
#[must_use]pub fn op2_kind(&self) -> OpKind
[src]
Gets operand #2's kind if the operand exists (see op_count()
and op_kind()
)
pub fn set_op2_kind(&mut self, new_value: OpKind)
[src]
Sets operand #2's kind if the operand exists (see op_count()
and set_op_kind()
)
Arguments
new_value
: new value
#[must_use]pub fn op3_kind(&self) -> OpKind
[src]
Gets operand #3's kind if the operand exists (see op_count()
and op_kind()
)
pub fn set_op3_kind(&mut self, new_value: OpKind)
[src]
Sets operand #3's kind if the operand exists (see op_count()
and set_op_kind()
)
Arguments
new_value
: new value
#[must_use]pub fn op4_kind(&self) -> OpKind
[src]
Gets operand #4's kind if the operand exists (see op_count()
and op_kind()
)
pub fn set_op4_kind(&mut self, new_value: OpKind)
[src]
Sets operand #4's kind if the operand exists (see op_count()
and set_op_kind()
)
Panics
Panics if new_value
is invalid.
Arguments
new_value
: new value
#[must_use]pub fn op_kind(&self, operand: u32) -> OpKind
[src]
Gets an operand's kind if it exists (see op_count()
)
Panics
Panics if operand
is invalid
Arguments
operand
: Operand number, 0-4
Examples
use iced_x86::*; // add [rax],ebx let bytes = b"\x01\x18"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let instr = decoder.decode(); assert_eq!(2, instr.op_count()); assert_eq!(OpKind::Memory, instr.op_kind(0)); assert_eq!(Register::RAX, instr.memory_base()); assert_eq!(Register::None, instr.memory_index()); assert_eq!(OpKind::Register, instr.op_kind(1)); assert_eq!(Register::EBX, instr.op_register(1));
pub fn set_op_kind(&mut self, operand: u32, op_kind: OpKind)
[src]
Sets an operand's kind
Panics
Panics if operand
is invalid
Arguments
operand
: Operand number, 0-4op_kind
: Operand kind
#[must_use]pub fn has_segment_prefix(&self) -> bool
[src]
Checks if the instruction has a segment override prefix, see segment_prefix()
#[must_use]pub fn segment_prefix(&self) -> Register
[src]
Gets the segment override prefix or Register::None
if none. See also memory_segment()
.
Use this method if the operand has kind OpKind::Memory
, OpKind::Memory64
,
OpKind::MemorySegSI
, OpKind::MemorySegESI
, OpKind::MemorySegRSI
pub fn set_segment_prefix(&mut self, new_value: Register)
[src]
Sets the segment override prefix or Register::None
if none. See also memory_segment()
.
Use this method if the operand has kind OpKind::Memory
, OpKind::Memory64
,
OpKind::MemorySegSI
, OpKind::MemorySegESI
, OpKind::MemorySegRSI
Arguments
new_value
: Segment register prefix
#[must_use]pub fn memory_segment(&self) -> Register
[src]
Gets the effective segment register used to reference the memory location.
Use this method if the operand has kind OpKind::Memory
, OpKind::Memory64
,
OpKind::MemorySegSI
, OpKind::MemorySegESI
, OpKind::MemorySegRSI
#[must_use]pub fn memory_displ_size(&self) -> u32
[src]
Gets the size of the memory displacement in bytes. Valid values are 0
, 1
(16/32/64-bit), 2
(16-bit), 4
(32-bit), 8
(64-bit).
Note that the return value can be 1 and memory_displacement()
may still not fit in
a signed byte if it's an EVEX encoded instruction.
Use this method if the operand has kind OpKind::Memory
pub fn set_memory_displ_size(&mut self, new_value: u32)
[src]
Sets the size of the memory displacement in bytes. Valid values are 0
, 1
(16/32/64-bit), 2
(16-bit), 4
(32-bit), 8
(64-bit).
Note that the return value can be 1 and memory_displacement()
may still not fit in
a signed byte if it's an EVEX encoded instruction.
Use this method if the operand has kind OpKind::Memory
Arguments
new_value
: Displacement size
#[must_use]pub fn is_broadcast(&self) -> bool
[src]
true
if the data is broadcasted (EVEX instructions only)
pub fn set_is_broadcast(&mut self, new_value: bool)
[src]
#[must_use]pub fn memory_size(&self) -> MemorySize
[src]
Gets the size of the memory location that is referenced by the operand. See also is_broadcast()
.
Use this method if the operand has kind OpKind::Memory
, OpKind::Memory64
,
OpKind::MemorySegSI
, OpKind::MemorySegESI
, OpKind::MemorySegRSI
,
OpKind::MemoryESDI
, OpKind::MemoryESEDI
, OpKind::MemoryESRDI
#[must_use]pub fn memory_index_scale(&self) -> u32
[src]
Gets the index register scale value, valid values are *1
, *2
, *4
, *8
. Use this method if the operand has kind OpKind::Memory
pub fn set_memory_index_scale(&mut self, new_value: u32)
[src]
Sets the index register scale value, valid values are *1
, *2
, *4
, *8
. Use this method if the operand has kind OpKind::Memory
Arguments
new_value
: New value (1, 2, 4 or 8)
#[must_use]pub fn memory_displacement(&self) -> u32
[src]
Gets the memory operand's displacement. This should be sign extended to 64 bits if it's 64-bit addressing (see memory_displacement64()
).
Use this method if the operand has kind OpKind::Memory
pub fn set_memory_displacement(&mut self, new_value: u32)
[src]
Sets the memory operand's displacement. This should be sign extended to 64 bits if it's 64-bit addressing.
Use this method if the operand has kind OpKind::Memory
Arguments
new_value
: New value
#[must_use]pub fn memory_displacement64(&self) -> u64
[src]
Gets the memory operand's displacement sign extended to 64 bits.
Use this method if the operand has kind OpKind::Memory
#[must_use]pub fn immediate(&self, operand: u32) -> u64
[src]
Gets an operand's immediate value
Panics
Panics if operand
is invalid or if it's not an immediate operand
Arguments
operand
: Operand number, 0-4
pub fn set_immediate_i32(&mut self, operand: u32, new_value: i32)
[src]
Sets an operand's immediate value
Panics
Panics if operand
is invalid or if it's not an immediate operand
Arguments
operand
: Operand number, 0-4new_value
: Immediate
pub fn set_immediate_u32(&mut self, operand: u32, new_value: u32)
[src]
Sets an operand's immediate value
Panics
Panics if operand
is invalid or if it's not an immediate operand
Arguments
operand
: Operand number, 0-4new_value
: Immediate
pub fn set_immediate_i64(&mut self, operand: u32, new_value: i64)
[src]
Sets an operand's immediate value
Panics
Panics if operand
is invalid or if it's not an immediate operand
Arguments
operand
: Operand number, 0-4new_value
: Immediate
pub fn set_immediate_u64(&mut self, operand: u32, new_value: u64)
[src]
Sets an operand's immediate value
Panics
Panics if operand
is invalid or if it's not an immediate operand
Arguments
operand
: Operand number, 0-4new_value
: Immediate
#[must_use]pub fn immediate8(&self) -> u8
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8
pub fn set_immediate8(&mut self, new_value: u8)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8
Arguments
new_value
: New value
#[must_use]pub fn immediate8_2nd(&self) -> u8
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8_2nd
pub fn set_immediate8_2nd(&mut self, new_value: u8)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8_2nd
Arguments
new_value
: New value
#[must_use]pub fn immediate16(&self) -> u16
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate16
pub fn set_immediate16(&mut self, new_value: u16)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate16
Arguments
new_value
: New value
#[must_use]pub fn immediate32(&self) -> u32
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate32
pub fn set_immediate32(&mut self, new_value: u32)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate32
Arguments
new_value
: New value
#[must_use]pub fn immediate64(&self) -> u64
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate64
pub fn set_immediate64(&mut self, new_value: u64)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate64
Arguments
new_value
: New value
#[must_use]pub fn immediate8to16(&self) -> i16
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8to16
pub fn set_immediate8to16(&mut self, new_value: i16)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8to16
Arguments
new_value
: New value
#[must_use]pub fn immediate8to32(&self) -> i32
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8to32
pub fn set_immediate8to32(&mut self, new_value: i32)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8to32
Arguments
new_value
: New value
#[must_use]pub fn immediate8to64(&self) -> i64
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8to64
pub fn set_immediate8to64(&mut self, new_value: i64)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate8to64
Arguments
new_value
: New value
#[must_use]pub fn immediate32to64(&self) -> i64
[src]
Gets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate32to64
pub fn set_immediate32to64(&mut self, new_value: i64)
[src]
Sets the operand's immediate value. Use this method if the operand has kind OpKind::Immediate32to64
Arguments
new_value
: New value
#[must_use]pub fn memory_address64(&self) -> u64
[src]
Gets the operand's 64-bit address value. Use this method if the operand has kind OpKind::Memory64
pub fn set_memory_address64(&mut self, new_value: u64)
[src]
Sets the operand's 64-bit address value. Use this method if the operand has kind OpKind::Memory64
Arguments
new_value
: New value
#[must_use]pub fn near_branch16(&self) -> u16
[src]
Gets the operand's branch target. Use this method if the operand has kind OpKind::NearBranch16
pub fn set_near_branch16(&mut self, new_value: u16)
[src]
Sets the operand's branch target. Use this method if the operand has kind OpKind::NearBranch16
Arguments
new_value
: New value
#[must_use]pub fn near_branch32(&self) -> u32
[src]
Gets the operand's branch target. Use this method if the operand has kind OpKind::NearBranch32
pub fn set_near_branch32(&mut self, new_value: u32)
[src]
Sets the operand's branch target. Use this method if the operand has kind OpKind::NearBranch32
Arguments
new_value
: New value
#[must_use]pub fn near_branch64(&self) -> u64
[src]
Gets the operand's branch target. Use this method if the operand has kind OpKind::NearBranch64
pub fn set_near_branch64(&mut self, new_value: u64)
[src]
Sets the operand's branch target. Use this method if the operand has kind OpKind::NearBranch64
Arguments
new_value
: New value
#[must_use]pub fn near_branch_target(&self) -> u64
[src]
Gets the near branch target if it's a CALL
/JMP
/Jcc
near branch instruction
(i.e., if op0_kind()
is OpKind::NearBranch16
, OpKind::NearBranch32
or OpKind::NearBranch64
)
#[must_use]pub fn far_branch16(&self) -> u16
[src]
Gets the operand's branch target. Use this method if the operand has kind OpKind::FarBranch16
pub fn set_far_branch16(&mut self, new_value: u16)
[src]
Sets the operand's branch target. Use this method if the operand has kind OpKind::FarBranch16
Arguments
new_value
: New value
#[must_use]pub fn far_branch32(&self) -> u32
[src]
Gets the operand's branch target. Use this method if the operand has kind OpKind::FarBranch32
pub fn set_far_branch32(&mut self, new_value: u32)
[src]
Sets the operand's branch target. Use this method if the operand has kind OpKind::FarBranch32
Arguments
new_value
: New value
#[must_use]pub fn far_branch_selector(&self) -> u16
[src]
Gets the operand's branch target selector. Use this method if the operand has kind OpKind::FarBranch16
or OpKind::FarBranch32
pub fn set_far_branch_selector(&mut self, new_value: u16)
[src]
Sets the operand's branch target selector. Use this method if the operand has kind OpKind::FarBranch16
or OpKind::FarBranch32
Arguments
new_value
: New value
#[must_use]pub fn memory_base(&self) -> Register
[src]
Gets the memory operand's base register or Register::None
if none. Use this method if the operand has kind OpKind::Memory
pub fn set_memory_base(&mut self, new_value: Register)
[src]
Sets the memory operand's base register or Register::None
if none. Use this method if the operand has kind OpKind::Memory
Arguments
new_value
: New value
#[must_use]pub fn memory_index(&self) -> Register
[src]
Gets the memory operand's index register or Register::None
if none. Use this method if the operand has kind OpKind::Memory
pub fn set_memory_index(&mut self, new_value: Register)
[src]
Sets the memory operand's index register or Register::None
if none. Use this method if the operand has kind OpKind::Memory
Arguments
new_value
: New value
#[must_use]pub fn op0_register(&self) -> Register
[src]
Gets operand #0's register value. Use this method if operand #0 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
pub fn set_op0_register(&mut self, new_value: Register)
[src]
Sets operand #0's register value. Use this method if operand #0 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
Arguments
new_value
: New value
#[must_use]pub fn op1_register(&self) -> Register
[src]
Gets operand #1's register value. Use this method if operand #1 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
pub fn set_op1_register(&mut self, new_value: Register)
[src]
Sets operand #1's register value. Use this method if operand #1 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
Arguments
new_value
: New value
#[must_use]pub fn op2_register(&self) -> Register
[src]
Gets operand #2's register value. Use this method if operand #2 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
pub fn set_op2_register(&mut self, new_value: Register)
[src]
Sets operand #2's register value. Use this method if operand #2 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
Arguments
new_value
: New value
#[must_use]pub fn op3_register(&self) -> Register
[src]
Gets operand #3's register value. Use this method if operand #3 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
pub fn set_op3_register(&mut self, new_value: Register)
[src]
Sets operand #3's register value. Use this method if operand #3 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
Arguments
new_value
: New value
#[must_use]pub fn op4_register(&self) -> Register
[src]
Gets operand #4's register value. Use this method if operand #4 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
pub fn set_op4_register(&mut self, new_value: Register)
[src]
Sets operand #4's register value. Use this method if operand #4 (op0_kind()
) has kind OpKind::Register
, see op_count()
and op_register()
Panics
Panics if new_value
is invalid
Arguments
new_value
: New value
#[must_use]pub fn op_register(&self, operand: u32) -> Register
[src]
Gets the operand's register value. Use this method if the operand has kind OpKind::Register
Panics
Panics if operand
is invalid
Arguments
operand
: Operand number, 0-4
Examples
use iced_x86::*; // add [rax],ebx let bytes = b"\x01\x18"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let instr = decoder.decode(); assert_eq!(2, instr.op_count()); assert_eq!(OpKind::Memory, instr.op_kind(0)); assert_eq!(OpKind::Register, instr.op_kind(1)); assert_eq!(Register::EBX, instr.op_register(1));
pub fn set_op_register(&mut self, operand: u32, new_value: Register)
[src]
Sets the operand's register value. Use this method if the operand has kind OpKind::Register
Panics
Panics if operand
is invalid
Arguments
operand
: Operand number, 0-4new_value
: New value
#[must_use]pub fn op_mask(&self) -> Register
[src]
Gets the op mask register (Register::K1
- Register::K7
) or Register::None
if none
pub fn set_op_mask(&mut self, new_value: Register)
[src]
Sets the op mask register (Register::K1
- Register::K7
) or Register::None
if none
Arguments
new_value
: New value
#[must_use]pub fn has_op_mask(&self) -> bool
[src]
Checks if there's an op mask register (op_mask()
)
#[must_use]pub fn zeroing_masking(&self) -> bool
[src]
true
if zeroing-masking, false
if merging-masking.
Only used by most EVEX encoded instructions that use op mask registers.
pub fn set_zeroing_masking(&mut self, new_value: bool)
[src]
true
if zeroing-masking, false
if merging-masking.
Only used by most EVEX encoded instructions that use op mask registers.
Arguments
new_value
: New value
#[must_use]pub fn merging_masking(&self) -> bool
[src]
true
if merging-masking, false
if zeroing-masking.
Only used by most EVEX encoded instructions that use op mask registers.
pub fn set_merging_masking(&mut self, new_value: bool)
[src]
true
if merging-masking, false
if zeroing-masking.
Only used by most EVEX encoded instructions that use op mask registers.
Arguments
new_value
: New value
#[must_use]pub fn rounding_control(&self) -> RoundingControl
[src]
Gets the rounding control (suppress_all_exceptions()
is implied but still returns false
)
or RoundingControl::None
if the instruction doesn't use it.
pub fn set_rounding_control(&mut self, new_value: RoundingControl)
[src]
Sets the rounding control (suppress_all_exceptions()
is implied but still returns false
)
or RoundingControl::None
if the instruction doesn't use it.
Arguments
new_value
: New value
#[must_use]pub fn declare_data_len(&self) -> usize
[src]
Gets the number of elements in a db
/dw
/dd
/dq
directive.
Can only be called if code()
is Code::DeclareByte
, Code::DeclareWord
, Code::DeclareDword
, Code::DeclareQword
pub fn set_declare_data_len(&mut self, new_value: usize)
[src]
Sets the number of elements in a db
/dw
/dd
/dq
directive.
Can only be called if code()
is Code::DeclareByte
, Code::DeclareWord
, Code::DeclareDword
, Code::DeclareQword
Arguments
new_value
: New value:db
: 1-16;dw
: 1-8;dd
: 1-4;dq
: 1-2
pub fn set_declare_byte_value_i8(&mut self, index: usize, new_value: i8)
[src]
Sets a new db
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareByte
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-15)new_value
: New value
pub fn set_declare_byte_value(&mut self, index: usize, new_value: u8)
[src]
Sets a new db
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareByte
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-15)new_value
: New value
#[must_use]pub fn get_declare_byte_value(&self, index: usize) -> u8
[src]
Gets a db
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareByte
Panics
Panics if index
is invalid
Arguments
index
: Index (0-15)
pub fn set_declare_word_value_i16(&mut self, index: usize, new_value: i16)
[src]
Sets a new dw
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareWord
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-7)new_value
: New value
pub fn set_declare_word_value(&mut self, index: usize, new_value: u16)
[src]
Sets a new dw
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareWord
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-7)new_value
: New value
#[must_use]pub fn get_declare_word_value(&self, index: usize) -> u16
[src]
Gets a dw
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareWord
Panics
Panics if index
is invalid
Arguments
index
: Index (0-7)
pub fn set_declare_dword_value_i32(&mut self, index: usize, new_value: i32)
[src]
Sets a new dd
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareDword
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-3)new_value
: New value
pub fn set_declare_dword_value(&mut self, index: usize, new_value: u32)
[src]
Sets a new dd
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareDword
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-3)new_value
: New value
#[must_use]pub fn get_declare_dword_value(&self, index: usize) -> u32
[src]
Gets a dd
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareDword
Panics
Panics if index
is invalid
Arguments
index
: Index (0-3)
pub fn set_declare_qword_value_i64(&mut self, index: usize, new_value: i64)
[src]
Sets a new dq
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareQword
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-1)new_value
: New value
pub fn set_declare_qword_value(&mut self, index: usize, new_value: u64)
[src]
Sets a new dq
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareQword
Panics
- Panics if
index
is invalid - Panics if
db
feature wasn't enabled
Arguments
index
: Index (0-1)new_value
: New value
#[must_use]pub fn get_declare_qword_value(&self, index: usize) -> u64
[src]
Gets a dq
value, see also declare_data_len()
.
Can only be called if code()
is Code::DeclareQword
Panics
Panics if index
is invalid
Arguments
index
: Index (0-1)
#[must_use]pub fn is_vsib(&self) -> bool
[src]
Checks if this is a VSIB instruction, see also is_vsib32()
, is_vsib64()
#[must_use]pub fn is_vsib32(&self) -> bool
[src]
VSIB instructions only (is_vsib()
): true
if it's using 32-bit indexes, false
if it's using 64-bit indexes
#[must_use]pub fn is_vsib64(&self) -> bool
[src]
VSIB instructions only (is_vsib()
): true
if it's using 64-bit indexes, false
if it's using 32-bit indexes
#[must_use]pub fn vsib(&self) -> Option<bool>
[src]
Checks if it's a vsib instruction.
Returns
Some(true)
if it's a VSIB instruction with 64-bit indexesSome(false)
if it's a VSIB instruction with 32-bit indexesNone
if it's not a VSIB instruction.
#[must_use]pub fn suppress_all_exceptions(&self) -> bool
[src]
Gets the suppress all exceptions flag (EVEX encoded instructions). Note that if rounding_control()
is
not RoundingControl::None
, SAE is implied but this method will still return false
.
pub fn set_suppress_all_exceptions(&mut self, new_value: bool)
[src]
Sets the suppress all exceptions flag (EVEX encoded instructions). Note that if rounding_control()
is
not RoundingControl::None
, SAE is implied but this method will still return false
.
Arguments
new_value
: New value
#[must_use]pub fn is_ip_rel_memory_operand(&self) -> bool
[src]
Checks if the memory operand is RIP
/EIP
relative
#[must_use]pub fn ip_rel_memory_address(&self) -> u64
[src]
Gets the RIP
/EIP
releative address ((next_ip()
or next_ip32()
) + memory_displacement()
).
This method is only valid if there's a memory operand with RIP
/EIP
relative addressing, see is_ip_rel_memory_operand()
#[must_use]pub fn virtual_address<F>(
&self,
operand: u32,
element_index: usize,
get_register_value: F
) -> u64 where
F: Fn(Register, usize, usize) -> u64,
[src]
&self,
operand: u32,
element_index: usize,
get_register_value: F
) -> u64 where
F: Fn(Register, usize, usize) -> u64,
Gets the virtual address of a memory operand
Panics
Panics if operand
is invalid
Arguments
operand
: Operand number, must be a memory operandelement_index
: Only used if it's a vsib memory operand. This is the element index of the vector index register.get_register_value
: Function that returns the value of a register or the base address of a segment register.
Call-back function args
- Arg 1:
register
: Register (GPR8, GPR16, GPR32, GPR64, XMM, YMM, ZMM, seg). If it's a segment register, the call-back function should return the segment's base value, not the segment register value. - Arg 2:
element_index
: Only used if it's a vsib memory operand. This is the element index of the vector index register. - Arg 3:
element_size
: Only used if it's a vsib memory operand. Size in bytes of elements in vector index register (4 or 8).
Examples
use iced_x86::*; // add [rdi+r12*8-5AA5EDCCh],esi let bytes = b"\x42\x01\xB4\xE7\x34\x12\x5A\xA5"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let instr = decoder.decode(); let va = instr.virtual_address(0, 0, |register, element_index, element_size| { match register { // The base address of ES, CS, SS and DS is always 0 in 64-bit mode Register::DS => 0x0000_0000_0000_0000, Register::RDI => 0x0000_0000_1000_0000, Register::R12 => 0x0000_0004_0000_0000, _ => unimplemented!(), } }); assert_eq!(0x0000_001F_B55A_1234, va);
impl Instruction
[src]
#[must_use]pub fn stack_pointer_increment(&self) -> i32
[src]
Gets the number of bytes added to SP
/ESP
/RSP
or 0 if it's not an instruction that pushes or pops data. This method assumes
the instruction doesn't change the privilege level (eg. IRET/D/Q
). If it's the LEAVE
instruction, this method returns 0.
Examples
use iced_x86::*; // pushfq let bytes = b"\x9C"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let instr = decoder.decode(); assert!(instr.is_stack_instruction()); assert_eq!(-8, instr.stack_pointer_increment());
#[must_use]pub fn encoding(&self) -> EncodingKind
[src]
Instruction encoding, eg. legacy, VEX, EVEX, ...
Examples
use iced_x86::*; // vmovaps xmm1,xmm5 let bytes = b"\xC5\xF8\x28\xCD"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let instr = decoder.decode(); assert_eq!(EncodingKind::VEX, instr.encoding());
#[must_use]pub fn cpuid_features(&self) -> &'static [CpuidFeature]
[src]
Gets the CPU or CPUID feature flags
Examples
use iced_x86::*; // vmovaps xmm1,xmm5 // vmovaps xmm10{k3}{z},xmm19 let bytes = b"\xC5\xF8\x28\xCD\x62\x31\x7C\x8B\x28\xD3"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // vmovaps xmm1,xmm5 let instr = decoder.decode(); let cpuid = instr.cpuid_features(); assert_eq!(1, cpuid.len()); assert_eq!(CpuidFeature::AVX, cpuid[0]); // vmovaps xmm10{k3}{z},xmm19 let instr = decoder.decode(); let cpuid = instr.cpuid_features(); assert_eq!(2, cpuid.len()); assert_eq!(CpuidFeature::AVX512VL, cpuid[0]); assert_eq!(CpuidFeature::AVX512F, cpuid[1]);
#[must_use]pub fn flow_control(&self) -> FlowControl
[src]
Flow control info
Examples
use iced_x86::*; // or ecx,esi // ud0 rcx,rsi // call rcx let bytes = b"\x0B\xCE\x48\x0F\xFF\xCE\xFF\xD1"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // or ecx,esi let instr = decoder.decode(); assert_eq!(FlowControl::Next, instr.flow_control()); // ud0 rcx,rsi let instr = decoder.decode(); assert_eq!(FlowControl::Exception, instr.flow_control()); // call rcx let instr = decoder.decode(); assert_eq!(FlowControl::IndirectCall, instr.flow_control());
#[must_use]pub fn is_protected_mode(&self) -> bool
[src]
true
if the instruction isn't available in real mode or virtual 8086 mode
#[must_use]pub fn is_privileged(&self) -> bool
[src]
true
if this is a privileged instruction
#[must_use]pub fn is_stack_instruction(&self) -> bool
[src]
true
if this is an instruction that implicitly uses the stack pointer (SP
/ESP
/RSP
), eg. CALL
, PUSH
, POP
, RET
, etc.
See also stack_pointer_increment()
Examples
use iced_x86::*; // or ecx,esi // push rax let bytes = b"\x0B\xCE\x50"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // or ecx,esi let instr = decoder.decode(); assert!(!instr.is_stack_instruction()); // push rax let instr = decoder.decode(); assert!(instr.is_stack_instruction()); assert_eq!(-8, instr.stack_pointer_increment());
#[must_use]pub fn is_save_restore_instruction(&self) -> bool
[src]
true
if it's an instruction that saves or restores too many registers (eg. FXRSTOR
, XSAVE
, etc).
#[must_use]pub fn rflags_read(&self) -> u32
[src]
All flags that are read by the CPU when executing the instruction.
This method returns a RflagsBits
value. See also rflags_modified()
.
Examples
use iced_x86::*; // adc rsi,rcx // xor rdi,5Ah let bytes = b"\x48\x11\xCE\x48\x83\xF7\x5A"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // adc rsi,rcx let instr = decoder.decode(); assert_eq!(RflagsBits::CF, instr.rflags_read()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::NONE, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::NONE, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified()); // xor rdi,5Ah let instr = decoder.decode(); assert_eq!(RflagsBits::NONE, instr.rflags_read()); assert_eq!(RflagsBits::SF | RflagsBits::ZF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::OF | RflagsBits::CF, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::AF, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified());
#[must_use]pub fn rflags_written(&self) -> u32
[src]
All flags that are written by the CPU, except those flags that are known to be undefined, always set or always cleared.
This method returns a RflagsBits
value. See also rflags_modified()
.
Examples
use iced_x86::*; // adc rsi,rcx // xor rdi,5Ah let bytes = b"\x48\x11\xCE\x48\x83\xF7\x5A"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // adc rsi,rcx let instr = decoder.decode(); assert_eq!(RflagsBits::CF, instr.rflags_read()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::NONE, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::NONE, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified()); // xor rdi,5Ah let instr = decoder.decode(); assert_eq!(RflagsBits::NONE, instr.rflags_read()); assert_eq!(RflagsBits::SF | RflagsBits::ZF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::OF | RflagsBits::CF, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::AF, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified());
#[must_use]pub fn rflags_cleared(&self) -> u32
[src]
All flags that are always cleared by the CPU.
This method returns a RflagsBits
value. See also rflags_modified()
.
Examples
use iced_x86::*; // adc rsi,rcx // xor rdi,5Ah let bytes = b"\x48\x11\xCE\x48\x83\xF7\x5A"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // adc rsi,rcx let instr = decoder.decode(); assert_eq!(RflagsBits::CF, instr.rflags_read()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::NONE, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::NONE, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified()); // xor rdi,5Ah let instr = decoder.decode(); assert_eq!(RflagsBits::NONE, instr.rflags_read()); assert_eq!(RflagsBits::SF | RflagsBits::ZF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::OF | RflagsBits::CF, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::AF, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified());
#[must_use]pub fn rflags_set(&self) -> u32
[src]
All flags that are always set by the CPU.
This method returns a RflagsBits
value. See also rflags_modified()
.
Examples
use iced_x86::*; // adc rsi,rcx // xor rdi,5Ah let bytes = b"\x48\x11\xCE\x48\x83\xF7\x5A"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // adc rsi,rcx let instr = decoder.decode(); assert_eq!(RflagsBits::CF, instr.rflags_read()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::NONE, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::NONE, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified()); // xor rdi,5Ah let instr = decoder.decode(); assert_eq!(RflagsBits::NONE, instr.rflags_read()); assert_eq!(RflagsBits::SF | RflagsBits::ZF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::OF | RflagsBits::CF, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::AF, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified());
#[must_use]pub fn rflags_undefined(&self) -> u32
[src]
All flags that are undefined after executing the instruction.
This method returns a RflagsBits
value. See also rflags_modified()
.
Examples
use iced_x86::*; // adc rsi,rcx // xor rdi,5Ah let bytes = b"\x48\x11\xCE\x48\x83\xF7\x5A"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // adc rsi,rcx let instr = decoder.decode(); assert_eq!(RflagsBits::CF, instr.rflags_read()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::NONE, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::NONE, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified()); // xor rdi,5Ah let instr = decoder.decode(); assert_eq!(RflagsBits::NONE, instr.rflags_read()); assert_eq!(RflagsBits::SF | RflagsBits::ZF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::OF | RflagsBits::CF, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::AF, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified());
#[must_use]pub fn rflags_modified(&self) -> u32
[src]
All flags that are modified by the CPU. This is rflags_written() + rflags_cleared() + rflags_set() + rflags_undefined()
. This method returns a RflagsBits
value.
Examples
use iced_x86::*; // adc rsi,rcx // xor rdi,5Ah let bytes = b"\x48\x11\xCE\x48\x83\xF7\x5A"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // adc rsi,rcx let instr = decoder.decode(); assert_eq!(RflagsBits::CF, instr.rflags_read()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::NONE, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::NONE, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified()); // xor rdi,5Ah let instr = decoder.decode(); assert_eq!(RflagsBits::NONE, instr.rflags_read()); assert_eq!(RflagsBits::SF | RflagsBits::ZF | RflagsBits::PF, instr.rflags_written()); assert_eq!(RflagsBits::OF | RflagsBits::CF, instr.rflags_cleared()); assert_eq!(RflagsBits::NONE, instr.rflags_set()); assert_eq!(RflagsBits::AF, instr.rflags_undefined()); assert_eq!(RflagsBits::OF | RflagsBits::SF | RflagsBits::ZF | RflagsBits::AF | RflagsBits::CF | RflagsBits::PF, instr.rflags_modified());
#[must_use]pub fn is_jcc_short_or_near(&self) -> bool
[src]
Checks if it's a Jcc SHORT
or Jcc NEAR
instruction
#[must_use]pub fn is_jcc_near(&self) -> bool
[src]
Checks if it's a Jcc NEAR
instruction
#[must_use]pub fn is_jcc_short(&self) -> bool
[src]
Checks if it's a Jcc SHORT
instruction
#[must_use]pub fn is_jmp_short(&self) -> bool
[src]
Checks if it's a JMP SHORT
instruction
#[must_use]pub fn is_jmp_near(&self) -> bool
[src]
Checks if it's a JMP NEAR
instruction
#[must_use]pub fn is_jmp_short_or_near(&self) -> bool
[src]
Checks if it's a JMP SHORT
or a JMP NEAR
instruction
#[must_use]pub fn is_jmp_far(&self) -> bool
[src]
Checks if it's a JMP FAR
instruction
#[must_use]pub fn is_call_near(&self) -> bool
[src]
Checks if it's a CALL NEAR
instruction
#[must_use]pub fn is_call_far(&self) -> bool
[src]
Checks if it's a CALL FAR
instruction
#[must_use]pub fn is_jmp_near_indirect(&self) -> bool
[src]
Checks if it's a JMP NEAR reg/[mem]
instruction
#[must_use]pub fn is_jmp_far_indirect(&self) -> bool
[src]
Checks if it's a JMP FAR [mem]
instruction
#[must_use]pub fn is_call_near_indirect(&self) -> bool
[src]
Checks if it's a CALL NEAR reg/[mem]
instruction
#[must_use]pub fn is_call_far_indirect(&self) -> bool
[src]
Checks if it's a CALL FAR [mem]
instruction
pub fn negate_condition_code(&mut self)
[src]
Negates the condition code, eg. JE
-> JNE
. Can be used if it's Jcc
, SETcc
, CMOVcc
and does
nothing if the instruction doesn't have a condition code.
Examples
use iced_x86::*; // setbe al let bytes = b"\x0F\x96\xC0"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let mut instr = decoder.decode(); assert_eq!(Code::Setbe_rm8, instr.code()); assert_eq!(ConditionCode::be, instr.condition_code()); instr.negate_condition_code(); assert_eq!(Code::Seta_rm8, instr.code()); assert_eq!(ConditionCode::a, instr.condition_code());
pub fn as_short_branch(&mut self)
[src]
Converts Jcc/JMP NEAR
to Jcc/JMP SHORT
and does nothing if it's not a Jcc/JMP NEAR
instruction
Examples
use iced_x86::*; // jbe near ptr label let bytes = b"\x0F\x86\x5A\xA5\x12\x34"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let mut instr = decoder.decode(); assert_eq!(Code::Jbe_rel32_64, instr.code()); instr.as_short_branch(); assert_eq!(Code::Jbe_rel8_64, instr.code()); instr.as_short_branch(); assert_eq!(Code::Jbe_rel8_64, instr.code());
pub fn as_near_branch(&mut self)
[src]
Converts Jcc/JMP SHORT
to Jcc/JMP NEAR
and does nothing if it's not a Jcc/JMP SHORT
instruction
Examples
use iced_x86::*; // jbe short label let bytes = b"\x76\x5A"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); let mut instr = decoder.decode(); assert_eq!(Code::Jbe_rel8_64, instr.code()); instr.as_near_branch(); assert_eq!(Code::Jbe_rel32_64, instr.code()); instr.as_near_branch(); assert_eq!(Code::Jbe_rel32_64, instr.code());
#[must_use]pub fn condition_code(&self) -> ConditionCode
[src]
Gets the condition code if it's Jcc
, SETcc
, CMOVcc
else ConditionCode::None
is returned
Examples
use iced_x86::*; // setbe al // jl short label // cmovne ecx,esi // nop let bytes = b"\x0F\x96\xC0\x7C\x5A\x0F\x45\xCE\x90"; let mut decoder = Decoder::new(64, bytes, DecoderOptions::NONE); // setbe al let instr = decoder.decode(); assert_eq!(ConditionCode::be, instr.condition_code()); // jl short label let instr = decoder.decode(); assert_eq!(ConditionCode::l, instr.condition_code()); // cmovne ecx,esi let instr = decoder.decode(); assert_eq!(ConditionCode::ne, instr.condition_code()); // nop let instr = decoder.decode(); assert_eq!(ConditionCode::None, instr.condition_code());
impl Instruction
[src]
#[must_use]pub fn op_code(&self) -> &'static OpCodeInfo
[src]
Gets the OpCodeInfo
#[must_use]pub fn with(code: Code) -> Self
[src]
#[must_use]pub fn with_reg(code: Code, register: Register) -> Self
[src]
#[must_use]pub fn with_i32(code: Code, immediate: i32) -> Self
[src]
Creates an instruction with 1 operand
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueimmediate
: op0: Immediate value
#[must_use]pub fn with_u32(code: Code, immediate: u32) -> Self
[src]
Creates an instruction with 1 operand
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueimmediate
: op0: Immediate value
#[must_use]pub fn with_mem(code: Code, memory: MemoryOperand) -> Self
[src]
#[must_use]pub fn with_reg_reg(
code: Code,
register1: Register,
register2: Register
) -> Self
[src]
code: Code,
register1: Register,
register2: Register
) -> Self
Creates an instruction with 2 operands
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Register
#[must_use]pub fn with_reg_i32(code: Code, register: Register, immediate: i32) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister
: op0: Registerimmediate
: op1: Immediate value
#[must_use]pub fn with_reg_u32(code: Code, register: Register, immediate: u32) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister
: op0: Registerimmediate
: op1: Immediate value
#[must_use]pub fn with_reg_i64(code: Code, register: Register, immediate: i64) -> Self
[src]
Creates an instruction with 2 operands
Arguments
code
: Code valueregister
: op0: Registerimmediate
: op1: Immediate value
#[must_use]pub fn with_reg_u64(code: Code, register: Register, immediate: u64) -> Self
[src]
Creates an instruction with 2 operands
Arguments
code
: Code valueregister
: op0: Registerimmediate
: op1: Immediate value
#[must_use]pub fn with_reg_mem(
code: Code,
register: Register,
memory: MemoryOperand
) -> Self
[src]
code: Code,
register: Register,
memory: MemoryOperand
) -> Self
Creates an instruction with 2 operands
Arguments
code
: Code valueregister
: op0: Registermemory
: op1: Memory operand
#[must_use]pub fn with_i32_reg(code: Code, immediate: i32, register: Register) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueimmediate
: op0: Immediate valueregister
: op1: Register
#[must_use]pub fn with_u32_reg(code: Code, immediate: u32, register: Register) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueimmediate
: op0: Immediate valueregister
: op1: Register
#[must_use]pub fn with_i32_i32(code: Code, immediate1: i32, immediate2: i32) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueimmediate1
: op0: Immediate valueimmediate2
: op1: Immediate value
#[must_use]pub fn with_u32_u32(code: Code, immediate1: u32, immediate2: u32) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueimmediate1
: op0: Immediate valueimmediate2
: op1: Immediate value
#[must_use]pub fn with_mem_reg(
code: Code,
memory: MemoryOperand,
register: Register
) -> Self
[src]
code: Code,
memory: MemoryOperand,
register: Register
) -> Self
Creates an instruction with 2 operands
Arguments
code
: Code valuememory
: op0: Memory operandregister
: op1: Register
#[must_use]pub fn with_mem_i32(code: Code, memory: MemoryOperand, immediate: i32) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valuememory
: op0: Memory operandimmediate
: op1: Immediate value
#[must_use]pub fn with_mem_u32(code: Code, memory: MemoryOperand, immediate: u32) -> Self
[src]
Creates an instruction with 2 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valuememory
: op0: Memory operandimmediate
: op1: Immediate value
#[must_use]pub fn with_reg_reg_reg(
code: Code,
register1: Register,
register2: Register,
register3: Register
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register
) -> Self
Creates an instruction with 3 operands
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Register
#[must_use]pub fn with_reg_reg_i32(
code: Code,
register1: Register,
register2: Register,
immediate: i32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
immediate: i32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerimmediate
: op2: Immediate value
#[must_use]pub fn with_reg_reg_u32(
code: Code,
register1: Register,
register2: Register,
immediate: u32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
immediate: u32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerimmediate
: op2: Immediate value
#[must_use]pub fn with_reg_reg_mem(
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand
) -> Self
Creates an instruction with 3 operands
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registermemory
: op2: Memory operand
#[must_use]pub fn with_reg_i32_i32(
code: Code,
register: Register,
immediate1: i32,
immediate2: i32
) -> Self
[src]
code: Code,
register: Register,
immediate1: i32,
immediate2: i32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister
: op0: Registerimmediate1
: op1: Immediate valueimmediate2
: op2: Immediate value
#[must_use]pub fn with_reg_u32_u32(
code: Code,
register: Register,
immediate1: u32,
immediate2: u32
) -> Self
[src]
code: Code,
register: Register,
immediate1: u32,
immediate2: u32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister
: op0: Registerimmediate1
: op1: Immediate valueimmediate2
: op2: Immediate value
#[must_use]pub fn with_reg_mem_reg(
code: Code,
register1: Register,
memory: MemoryOperand,
register2: Register
) -> Self
[src]
code: Code,
register1: Register,
memory: MemoryOperand,
register2: Register
) -> Self
Creates an instruction with 3 operands
Arguments
code
: Code valueregister1
: op0: Registermemory
: op1: Memory operandregister2
: op2: Register
#[must_use]pub fn with_reg_mem_i32(
code: Code,
register: Register,
memory: MemoryOperand,
immediate: i32
) -> Self
[src]
code: Code,
register: Register,
memory: MemoryOperand,
immediate: i32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister
: op0: Registermemory
: op1: Memory operandimmediate
: op2: Immediate value
#[must_use]pub fn with_reg_mem_u32(
code: Code,
register: Register,
memory: MemoryOperand,
immediate: u32
) -> Self
[src]
code: Code,
register: Register,
memory: MemoryOperand,
immediate: u32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister
: op0: Registermemory
: op1: Memory operandimmediate
: op2: Immediate value
#[must_use]pub fn with_mem_reg_reg(
code: Code,
memory: MemoryOperand,
register1: Register,
register2: Register
) -> Self
[src]
code: Code,
memory: MemoryOperand,
register1: Register,
register2: Register
) -> Self
Creates an instruction with 3 operands
Arguments
code
: Code valuememory
: op0: Memory operandregister1
: op1: Registerregister2
: op2: Register
#[must_use]pub fn with_mem_reg_i32(
code: Code,
memory: MemoryOperand,
register: Register,
immediate: i32
) -> Self
[src]
code: Code,
memory: MemoryOperand,
register: Register,
immediate: i32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valuememory
: op0: Memory operandregister
: op1: Registerimmediate
: op2: Immediate value
#[must_use]pub fn with_mem_reg_u32(
code: Code,
memory: MemoryOperand,
register: Register,
immediate: u32
) -> Self
[src]
code: Code,
memory: MemoryOperand,
register: Register,
immediate: u32
) -> Self
Creates an instruction with 3 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valuememory
: op0: Memory operandregister
: op1: Registerimmediate
: op2: Immediate value
#[must_use]pub fn with_reg_reg_reg_reg(
code: Code,
register1: Register,
register2: Register,
register3: Register,
register4: Register
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
register4: Register
) -> Self
Creates an instruction with 4 operands
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registerregister4
: op3: Register
#[must_use]pub fn with_reg_reg_reg_i32(
code: Code,
register1: Register,
register2: Register,
register3: Register,
immediate: i32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
immediate: i32
) -> Self
Creates an instruction with 4 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registerimmediate
: op3: Immediate value
#[must_use]pub fn with_reg_reg_reg_u32(
code: Code,
register1: Register,
register2: Register,
register3: Register,
immediate: u32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
immediate: u32
) -> Self
Creates an instruction with 4 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registerimmediate
: op3: Immediate value
#[must_use]pub fn with_reg_reg_reg_mem(
code: Code,
register1: Register,
register2: Register,
register3: Register,
memory: MemoryOperand
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
memory: MemoryOperand
) -> Self
Creates an instruction with 4 operands
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registermemory
: op3: Memory operand
#[must_use]pub fn with_reg_reg_i32_i32(
code: Code,
register1: Register,
register2: Register,
immediate1: i32,
immediate2: i32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
immediate1: i32,
immediate2: i32
) -> Self
Creates an instruction with 4 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerimmediate1
: op2: Immediate valueimmediate2
: op3: Immediate value
#[must_use]pub fn with_reg_reg_u32_u32(
code: Code,
register1: Register,
register2: Register,
immediate1: u32,
immediate2: u32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
immediate1: u32,
immediate2: u32
) -> Self
Creates an instruction with 4 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerimmediate1
: op2: Immediate valueimmediate2
: op3: Immediate value
#[must_use]pub fn with_reg_reg_mem_reg(
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
register3: Register
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
register3: Register
) -> Self
Creates an instruction with 4 operands
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registermemory
: op2: Memory operandregister3
: op3: Register
#[must_use]pub fn with_reg_reg_mem_i32(
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
immediate: i32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
immediate: i32
) -> Self
Creates an instruction with 4 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registermemory
: op2: Memory operandimmediate
: op3: Immediate value
#[must_use]pub fn with_reg_reg_mem_u32(
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
immediate: u32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
immediate: u32
) -> Self
Creates an instruction with 4 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registermemory
: op2: Memory operandimmediate
: op3: Immediate value
#[must_use]pub fn with_reg_reg_reg_reg_i32(
code: Code,
register1: Register,
register2: Register,
register3: Register,
register4: Register,
immediate: i32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
register4: Register,
immediate: i32
) -> Self
Creates an instruction with 5 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registerregister4
: op3: Registerimmediate
: op4: Immediate value
#[must_use]pub fn with_reg_reg_reg_reg_u32(
code: Code,
register1: Register,
register2: Register,
register3: Register,
register4: Register,
immediate: u32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
register4: Register,
immediate: u32
) -> Self
Creates an instruction with 5 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registerregister4
: op3: Registerimmediate
: op4: Immediate value
#[must_use]pub fn with_reg_reg_reg_mem_i32(
code: Code,
register1: Register,
register2: Register,
register3: Register,
memory: MemoryOperand,
immediate: i32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
memory: MemoryOperand,
immediate: i32
) -> Self
Creates an instruction with 5 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registermemory
: op3: Memory operandimmediate
: op4: Immediate value
#[must_use]pub fn with_reg_reg_reg_mem_u32(
code: Code,
register1: Register,
register2: Register,
register3: Register,
memory: MemoryOperand,
immediate: u32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
register3: Register,
memory: MemoryOperand,
immediate: u32
) -> Self
Creates an instruction with 5 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registerregister3
: op2: Registermemory
: op3: Memory operandimmediate
: op4: Immediate value
#[must_use]pub fn with_reg_reg_mem_reg_i32(
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
register3: Register,
immediate: i32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
register3: Register,
immediate: i32
) -> Self
Creates an instruction with 5 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registermemory
: op2: Memory operandregister3
: op3: Registerimmediate
: op4: Immediate value
#[must_use]pub fn with_reg_reg_mem_reg_u32(
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
register3: Register,
immediate: u32
) -> Self
[src]
code: Code,
register1: Register,
register2: Register,
memory: MemoryOperand,
register3: Register,
immediate: u32
) -> Self
Creates an instruction with 5 operands
Panics
Panics if the immediate is invalid
Arguments
code
: Code valueregister1
: op0: Registerregister2
: op1: Registermemory
: op2: Memory operandregister3
: op3: Registerimmediate
: op4: Immediate value
#[must_use]pub fn with_branch(code: Code, target: u64) -> Self
[src]
#[must_use]pub fn with_far_branch(code: Code, selector: u16, offset: u32) -> Self
[src]
Creates a new far branch instruction
Arguments
code
: Code valueselector
: Selector/segment valueoffset
: Offset
#[must_use]pub fn with_xbegin(bitness: u32, target: u64) -> Self
[src]
Creates a new XBEGIN
instruction
Panics
Panics if bitness
is not one of 16, 32, 64.
Arguments
bitness
: 16, 32, or 64target
: Target address
#[must_use]pub fn with_reg_mem64(
code: Code,
register: Register,
address: u64,
segment_prefix: Register
) -> Self
[src]
code: Code,
register: Register,
address: u64,
segment_prefix: Register
) -> Self
Creates an instruction with a 64-bit memory offset as the second operand, eg. mov al,[123456789ABCDEF0]
Arguments
code
: Code valueregister
: Register (AL
,AX
,EAX
,RAX
)address
: 64-bit addresssegment_prefix
: Segment override orRegister::None
#[must_use]pub fn with_mem64_reg(
code: Code,
address: u64,
register: Register,
segment_prefix: Register
) -> Self
[src]
code: Code,
address: u64,
register: Register,
segment_prefix: Register
) -> Self
Creates an instruction with a 64-bit memory offset as the first operand, eg. mov [123456789ABCDEF0],al
Arguments
code
: Code valueaddress
: 64-bit addressregister
: Register (AL
,AX
,EAX
,RAX
)segment_prefix
: Segment override orRegister::None
#[must_use]pub fn with_outsb(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a OUTSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_outsb(address_size: u32) -> Self
[src]
Creates a REP OUTSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_outsw(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a OUTSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_outsw(address_size: u32) -> Self
[src]
Creates a REP OUTSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_outsd(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a OUTSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_outsd(address_size: u32) -> Self
[src]
Creates a REP OUTSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_lodsb(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a LODSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_lodsb(address_size: u32) -> Self
[src]
Creates a REP LODSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_lodsw(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a LODSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_lodsw(address_size: u32) -> Self
[src]
Creates a REP LODSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_lodsd(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a LODSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_lodsd(address_size: u32) -> Self
[src]
Creates a REP LODSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_lodsq(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a LODSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_lodsq(address_size: u32) -> Self
[src]
Creates a REP LODSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_scasb(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a SCASB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_scasb(address_size: u32) -> Self
[src]
Creates a REPE SCASB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_scasb(address_size: u32) -> Self
[src]
Creates a REPNE SCASB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_scasw(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a SCASW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_scasw(address_size: u32) -> Self
[src]
Creates a REPE SCASW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_scasw(address_size: u32) -> Self
[src]
Creates a REPNE SCASW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_scasd(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a SCASD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_scasd(address_size: u32) -> Self
[src]
Creates a REPE SCASD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_scasd(address_size: u32) -> Self
[src]
Creates a REPNE SCASD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_scasq(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a SCASQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_scasq(address_size: u32) -> Self
[src]
Creates a REPE SCASQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_scasq(address_size: u32) -> Self
[src]
Creates a REPNE SCASQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_insb(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a INSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_insb(address_size: u32) -> Self
[src]
Creates a REP INSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_insw(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a INSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_insw(address_size: u32) -> Self
[src]
Creates a REP INSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_insd(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a INSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_insd(address_size: u32) -> Self
[src]
Creates a REP INSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_stosb(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a STOSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_stosb(address_size: u32) -> Self
[src]
Creates a REP STOSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_stosw(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a STOSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_stosw(address_size: u32) -> Self
[src]
Creates a REP STOSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_stosd(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a STOSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_stosd(address_size: u32) -> Self
[src]
Creates a REP STOSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_stosq(address_size: u32, rep_prefix: RepPrefixKind) -> Self
[src]
Creates a STOSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_stosq(address_size: u32) -> Self
[src]
Creates a REP STOSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_cmpsb(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a CMPSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_cmpsb(address_size: u32) -> Self
[src]
Creates a REPE CMPSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_cmpsb(address_size: u32) -> Self
[src]
Creates a REPNE CMPSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_cmpsw(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a CMPSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_cmpsw(address_size: u32) -> Self
[src]
Creates a REPE CMPSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_cmpsw(address_size: u32) -> Self
[src]
Creates a REPNE CMPSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_cmpsd(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a CMPSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_cmpsd(address_size: u32) -> Self
[src]
Creates a REPE CMPSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_cmpsd(address_size: u32) -> Self
[src]
Creates a REPNE CMPSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_cmpsq(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a CMPSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_repe_cmpsq(address_size: u32) -> Self
[src]
Creates a REPE CMPSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_repne_cmpsq(address_size: u32) -> Self
[src]
Creates a REPNE CMPSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_movsb(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a MOVSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_movsb(address_size: u32) -> Self
[src]
Creates a REP MOVSB
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_movsw(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a MOVSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_movsw(address_size: u32) -> Self
[src]
Creates a REP MOVSW
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_movsd(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a MOVSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_movsd(address_size: u32) -> Self
[src]
Creates a REP MOVSD
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_movsq(
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
[src]
address_size: u32,
segment_prefix: Register,
rep_prefix: RepPrefixKind
) -> Self
Creates a MOVSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64segment_prefix
: Segment override orRegister::None
rep_prefix
: Rep prefix orRepPrefixKind::None
#[must_use]pub fn with_rep_movsq(address_size: u32) -> Self
[src]
Creates a REP MOVSQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64
#[must_use]pub fn with_maskmovq(
address_size: u32,
register1: Register,
register2: Register,
segment_prefix: Register
) -> Self
[src]
address_size: u32,
register1: Register,
register2: Register,
segment_prefix: Register
) -> Self
Creates a MASKMOVQ
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64register1
: Registerregister2
: Registersegment_prefix
: Segment override orRegister::None
#[must_use]pub fn with_maskmovdqu(
address_size: u32,
register1: Register,
register2: Register,
segment_prefix: Register
) -> Self
[src]
address_size: u32,
register1: Register,
register2: Register,
segment_prefix: Register
) -> Self
Creates a MASKMOVDQU
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64register1
: Registerregister2
: Registersegment_prefix
: Segment override orRegister::None
#[must_use]pub fn with_vmaskmovdqu(
address_size: u32,
register1: Register,
register2: Register,
segment_prefix: Register
) -> Self
[src]
address_size: u32,
register1: Register,
register2: Register,
segment_prefix: Register
) -> Self
Creates a VMASKMOVDQU
instruction
Panics
Panics if address_size
is not one of 16, 32, 64.
Arguments
address_size
: 16, 32, or 64register1
: Registerregister2
: Registersegment_prefix
: Segment override orRegister::None
#[must_use]pub fn with_declare_byte_1(b0: u8) -> Self
[src]
#[must_use]pub fn with_declare_byte_2(b0: u8, b1: u8) -> Self
[src]
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1
#[must_use]pub fn with_declare_byte_3(b0: u8, b1: u8, b2: u8) -> Self
[src]
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2
#[must_use]pub fn with_declare_byte_4(b0: u8, b1: u8, b2: u8, b3: u8) -> Self
[src]
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3
#[must_use]pub fn with_declare_byte_5(b0: u8, b1: u8, b2: u8, b3: u8, b4: u8) -> Self
[src]
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4
#[must_use]pub fn with_declare_byte_6(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5
#[must_use]pub fn with_declare_byte_7(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6
#[must_use]pub fn with_declare_byte_8(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7
#[must_use]pub fn with_declare_byte_9(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8
#[must_use]pub fn with_declare_byte_10(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8b9
: Byte 9
#[must_use]pub fn with_declare_byte_11(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8b9
: Byte 9b10
: Byte 10
#[must_use]pub fn with_declare_byte_12(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8b9
: Byte 9b10
: Byte 10b11
: Byte 11
#[must_use]pub fn with_declare_byte_13(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8b9
: Byte 9b10
: Byte 10b11
: Byte 11b12
: Byte 12
#[must_use]pub fn with_declare_byte_14(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8,
b13: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8,
b13: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8b9
: Byte 9b10
: Byte 10b11
: Byte 11b12
: Byte 12b13
: Byte 13
#[must_use]pub fn with_declare_byte_15(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8,
b13: u8,
b14: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8,
b13: u8,
b14: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8b9
: Byte 9b10
: Byte 10b11
: Byte 11b12
: Byte 12b13
: Byte 13b14
: Byte 14
#[must_use]pub fn with_declare_byte_16(
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8,
b13: u8,
b14: u8,
b15: u8
) -> Self
[src]
b0: u8,
b1: u8,
b2: u8,
b3: u8,
b4: u8,
b5: u8,
b6: u8,
b7: u8,
b8: u8,
b9: u8,
b10: u8,
b11: u8,
b12: u8,
b13: u8,
b14: u8,
b15: u8
) -> Self
Creates a db
/.byte
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
b0
: Byte 0b1
: Byte 1b2
: Byte 2b3
: Byte 3b4
: Byte 4b5
: Byte 5b6
: Byte 6b7
: Byte 7b8
: Byte 8b9
: Byte 9b10
: Byte 10b11
: Byte 11b12
: Byte 12b13
: Byte 13b14
: Byte 14b15
: Byte 15
#[must_use]pub fn with_declare_byte(data: &[u8]) -> Self
[src]
Creates a db
/.byte
asm directive
Panics
- Panics if
data.len()
is not 1-16 - Panics if
db
feature wasn't enabled
Arguments
data
: Data
#[must_use]pub fn with_declare_word_1(w0: u16) -> Self
[src]
#[must_use]pub fn with_declare_word_2(w0: u16, w1: u16) -> Self
[src]
Creates a dw
/.word
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
w0
: Word 0w1
: Word 1
#[must_use]pub fn with_declare_word_3(w0: u16, w1: u16, w2: u16) -> Self
[src]
Creates a dw
/.word
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
w0
: Word 0w1
: Word 1w2
: Word 2
#[must_use]pub fn with_declare_word_4(w0: u16, w1: u16, w2: u16, w3: u16) -> Self
[src]
Creates a dw
/.word
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
w0
: Word 0w1
: Word 1w2
: Word 2w3
: Word 3
#[must_use]pub fn with_declare_word_5(w0: u16, w1: u16, w2: u16, w3: u16, w4: u16) -> Self
[src]
Creates a dw
/.word
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
w0
: Word 0w1
: Word 1w2
: Word 2w3
: Word 3w4
: Word 4
#[must_use]pub fn with_declare_word_6(
w0: u16,
w1: u16,
w2: u16,
w3: u16,
w4: u16,
w5: u16
) -> Self
[src]
w0: u16,
w1: u16,
w2: u16,
w3: u16,
w4: u16,
w5: u16
) -> Self
Creates a dw
/.word
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
w0
: Word 0w1
: Word 1w2
: Word 2w3
: Word 3w4
: Word 4w5
: Word 5
#[must_use]pub fn with_declare_word_7(
w0: u16,
w1: u16,
w2: u16,
w3: u16,
w4: u16,
w5: u16,
w6: u16
) -> Self
[src]
w0: u16,
w1: u16,
w2: u16,
w3: u16,
w4: u16,
w5: u16,
w6: u16
) -> Self
Creates a dw
/.word
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
w0
: Word 0w1
: Word 1w2
: Word 2w3
: Word 3w4
: Word 4w5
: Word 5w6
: Word 6
#[must_use]pub fn with_declare_word_8(
w0: u16,
w1: u16,
w2: u16,
w3: u16,
w4: u16,
w5: u16,
w6: u16,
w7: u16
) -> Self
[src]
w0: u16,
w1: u16,
w2: u16,
w3: u16,
w4: u16,
w5: u16,
w6: u16,
w7: u16
) -> Self
Creates a dw
/.word
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
w0
: Word 0w1
: Word 1w2
: Word 2w3
: Word 3w4
: Word 4w5
: Word 5w6
: Word 6w7
: Word 7
#[must_use]pub fn with_declare_word_slice_u8(data: &[u8]) -> Self
[src]
Creates a dw
/.word
asm directive
Panics
- Panics if
data.len()
is not 2-16 or not a multiple of 2 - Panics if
db
feature wasn't enabled
Arguments
data
: Data
#[must_use]pub fn with_declare_word(data: &[u16]) -> Self
[src]
Creates a dw
/.word
asm directive
Panics
- Panics if
data.len()
is not 1-8 - Panics if
db
feature wasn't enabled
Arguments
data
: Data
#[must_use]pub fn with_declare_dword_1(d0: u32) -> Self
[src]
#[must_use]pub fn with_declare_dword_2(d0: u32, d1: u32) -> Self
[src]
Creates a dd
/.int
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
d0
: Dword 0d1
: Dword 1
#[must_use]pub fn with_declare_dword_3(d0: u32, d1: u32, d2: u32) -> Self
[src]
Creates a dd
/.int
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
d0
: Dword 0d1
: Dword 1d2
: Dword 2
#[must_use]pub fn with_declare_dword_4(d0: u32, d1: u32, d2: u32, d3: u32) -> Self
[src]
Creates a dd
/.int
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
d0
: Dword 0d1
: Dword 1d2
: Dword 2d3
: Dword 3
#[must_use]pub fn with_declare_dword_slice_u8(data: &[u8]) -> Self
[src]
Creates a dd
/.int
asm directive
Panics
- Panics if
data.len()
is not 4-16 or not a multiple of 4 - Panics if
db
feature wasn't enabled
Arguments
data
: Data
#[must_use]pub fn with_declare_dword(data: &[u32]) -> Self
[src]
Creates a dd
/.int
asm directive
Panics
- Panics if
data.len()
is not 1-4 - Panics if
db
feature wasn't enabled
Arguments
data
: Data
#[must_use]pub fn with_declare_qword_1(q0: u64) -> Self
[src]
#[must_use]pub fn with_declare_qword_2(q0: u64, q1: u64) -> Self
[src]
Creates a dq
/.quad
asm directive
Panics
Panics if db
feature wasn't enabled
Arguments
q0
: Qword 0q1
: Qword 1
#[must_use]pub fn with_declare_qword_slice_u8(data: &[u8]) -> Self
[src]
Creates a dq
/.quad
asm directive
Panics
- Panics if
data.len()
is not 8-16 or not a multiple of 8 - Panics if
db
feature wasn't enabled
Arguments
data
: Data
#[must_use]pub fn with_declare_qword(data: &[u64]) -> Self
[src]
Trait Implementations
impl Clone for Instruction
[src]
fn clone(&self) -> Instruction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Instruction
[src]
impl Debug for Instruction
[src]
impl Default for Instruction
[src]
fn default() -> Instruction
[src]
impl Display for Instruction
[src]
impl Eq for Instruction
[src]
impl Hash for Instruction
[src]
fn hash<'a, H: Hasher>(&self, state: &'a mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Instruction> for Instruction
[src]
Auto Trait Implementations
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,