Struct iced_x86::ConstantOffsets
source · [−]pub struct ConstantOffsets { /* private fields */ }
Expand description
Contains the offsets of the displacement and immediate. Call Decoder::get_constant_offsets()
or
Encoder::get_constant_offsets()
to get the offsets of the constants after the instruction has been
decoded/encoded.
Implementations
sourceimpl ConstantOffsets
impl ConstantOffsets
sourcepub fn displacement_offset(&self) -> usize
pub fn displacement_offset(&self) -> usize
The offset of the displacement, if any
sourcepub fn displacement_size(&self) -> usize
pub fn displacement_size(&self) -> usize
Size in bytes of the displacement, or 0 if there’s no displacement
sourcepub fn immediate_offset(&self) -> usize
pub fn immediate_offset(&self) -> usize
The offset of the first immediate, if any.
This field can be invalid even if the operand has an immediate if it’s an immediate that isn’t part
of the instruction stream, eg. SHL AL,1
.
sourcepub fn immediate_size(&self) -> usize
pub fn immediate_size(&self) -> usize
Size in bytes of the first immediate, or 0 if there’s no immediate
sourcepub fn immediate_offset2(&self) -> usize
pub fn immediate_offset2(&self) -> usize
The offset of the second immediate, if any.
sourcepub fn immediate_size2(&self) -> usize
pub fn immediate_size2(&self) -> usize
Size in bytes of the second immediate, or 0 if there’s no second immediate
sourcepub fn has_displacement(&self) -> bool
pub fn has_displacement(&self) -> bool
true
if displacement_offset()
and displacement_size()
are valid
sourcepub fn has_immediate(&self) -> bool
pub fn has_immediate(&self) -> bool
true
if immediate_offset()
and immediate_size()
are valid
sourcepub fn has_immediate2(&self) -> bool
pub fn has_immediate2(&self) -> bool
true
if immediate_offset2()
and immediate_size2()
are valid
Trait Implementations
sourceimpl Clone for ConstantOffsets
impl Clone for ConstantOffsets
sourcefn clone(&self) -> ConstantOffsets
fn clone(&self) -> ConstantOffsets
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more