Details

Struct Details 

Source
pub struct Details<'c> { /* private fields */ }

Implementations§

Source§

impl<'c> Details<'c>

Source

pub fn has_prefix(&self, prefix: Prefix) -> bool

Returns true if the instruction has the given prefix, or false otherwise.

Source

pub fn opcode(&self) -> &[u8]

Instruction opcode. This value can be from 1 to 4 bytes in size. This will contain the VEX opcode as well.

Source

pub fn rex(&self) -> u8

Returns the REX prefix byte. This value is only relevant for x86_64 and only if it is non-zero.

Source

pub fn addr_size(&self) -> u8

Address size. This can be overriden by the Prefix::AddrSize prefix.

Source

pub fn modrm(&self) -> u8

Returns the ModR/M byte.

Source

pub fn sib(&self) -> u8

Returns the SIB value. This will be zero if it is not relevant.

Source

pub fn disp(&self) -> i64

Returns the displacement value. This is only valid if the value returned by Encoding::disp_offset which can be retrieved via Details::encoding is a non-zero value.

Source

pub fn sib_index(&self) -> Reg

Returns the SIB index register, or Reg::Invalid when irrelevant

Source

pub fn sib_scale(&self) -> i8

Returns the SIB scale, only applicable if sib_index is valid.

Source

pub fn sib_base(&self) -> Reg

Returns the SIB base register, or Reg::Invalid when irrelevant.

Source

pub fn xop_cc(&self) -> XopCC

Returns the XOP condition code.

Source

pub fn sse_cc(&self) -> SseCC

Returns the SSE condition code.

Source

pub fn avx_cc(&self) -> AvxCC

Returns the AVX condition code.

Source

pub fn avx_sae(&self) -> bool

Returns the AVX suppress all exceptions flag.

Source

pub fn avx_rm(&self) -> AvxRm

Returns the AVX static rounding mode.

Source

pub fn op_count(&self) -> usize

Returns the number of operands in this instruction, or zero when this instruction has no operands. This value will be the same as the length of the slice returned by Details::operands.

Source

pub fn operands(&self) -> &[Op]

Returns the operands contained in this instruction. The length of the returned slice will be the same as teh value returned by Details::op_count.

Source

pub fn encoding(&self) -> &Encoding

Returns encoding information about this instruction.

Source

pub fn eflags(&self) -> EFlags

Returns the eflags updated by this instruction. This should not be called if the instruction is an FPU instruction, the return value will be undefined.

Source

pub fn fpu_flags(&self) -> FpuFlags

Returns the FPU flags updated by this instruction. This should only be called if the instruction is in the FPU group, the return value will be undefined.

Trait Implementations§

Source§

impl<'c> Clone for Details<'c>

Source§

fn clone(&self) -> Details<'c>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'c> Copy for Details<'c>

Auto Trait Implementations§

§

impl<'c> Freeze for Details<'c>

§

impl<'c> RefUnwindSafe for Details<'c>

§

impl<'c> Send for Details<'c>

§

impl<'c> Sync for Details<'c>

§

impl<'c> Unpin for Details<'c>

§

impl<'c> UnwindSafe for Details<'c>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.