pub struct X86InsnDetail<'a>(/* private fields */);
Expand description

Contains X86-specific details for an instruction

Implementations§

source§

impl<'a> X86InsnDetail<'a>

source

pub fn prefix(&self) -> &[u8; 4]

Instruction prefix, which can be up to 4 bytes. A prefix byte gets value 0 when irrelevant. See X86Prefix for details.

prefix[0] indicates REP/REPNE/LOCK prefix (See X86_PREFIX_REP/REPNE/LOCK)

prefix[1] indicates segment override (irrelevant for x86_64): See X86_PREFIX_CS/SS/DS/ES/FS/GS.

prefix[2] indicates operand-size override (X86_PREFIX_OPSIZE)

prefix[3] indicates address-size override (X86_PREFIX_ADDRSIZE)

source

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

Instruction opcode, which can be from 1 to 4 bytes in size. This contains VEX opcode as well. A trailing opcode byte gets value 0 when irrelevant.

source

pub fn rex(&self) -> u8

REX prefix: only a non-zero value is relevant for x86_64

source

pub fn addr_size(&self) -> u8

Address size

source

pub fn modrm(&self) -> u8

ModR/M byte

source

pub fn sib(&self) -> u8

SIB (Scaled Index Byte) value, or 0 when irrelevant

source

pub fn disp(&self) -> i64

Displacement value, valid if encoding.disp_offset != 0

source

pub fn sib_index(&self) -> RegId

Scaled Index Byte (SIB) index, or X86_REG_INVALID when irrelevant

source

pub fn sib_scale(&self) -> i8

Scaled Index Byte (SIB) scale, or X86_REG_INVALID when irrelevant

source

pub fn sib_base(&self) -> RegId

Scaled Index Byte (SIB) base register, or X86_REG_INVALID when irrelevant

source

pub fn xop_cc(&self) -> X86XopCC

eXtended Operations (XOP) Code Condition

source

pub fn sse_cc(&self) -> X86SseCC

Streaming SIMD Extensions (SSE) condition codes

source

pub fn avx_cc(&self) -> X86AvxCC

Advanced Vector Extensions (AVX) condition codes

source

pub fn avx_sae(&self) -> bool

Advanced Vector Extensions (AVX) sae

source

pub fn avx_rm(&self) -> X86AvxRm

Advanced Vector Extensions (AVX) rm

Trait Implementations§

source§

impl<'a> Debug for X86InsnDetail<'a>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> DetailsArchInsn for X86InsnDetail<'a>

source§

impl<'a> PartialEq for X86InsnDetail<'a>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for X86InsnDetail<'a>

§

impl<'a> Send for X86InsnDetail<'a>

§

impl<'a> Sync for X86InsnDetail<'a>

§

impl<'a> Unpin for X86InsnDetail<'a>

§

impl<'a> UnwindSafe for X86InsnDetail<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.