Instruction

Struct Instruction 

Source
pub struct Instruction {
    pub typ: Opcode,
    pub flags: u8,
    pub segment: u8,
    pub addrsz: u8,
    pub operandsz: u8,
    pub size: u8,
    pub evex: u8,
    pub operands: [Op; 4],
    pub disp: i64,
    pub imm: i64,
    pub address: u64,
}

Fields§

§typ: Opcode§flags: u8§segment: u8§addrsz: u8§operandsz: u8§size: u8§evex: u8§operands: [Op; 4]§disp: i64§imm: i64§address: u64

Implementations§

Source§

impl Instruction

Source

pub fn is_valid(&self) -> bool

Source

pub fn code(&self) -> Opcode

Source

pub fn address(&self) -> u64

Source

pub fn size(&self) -> usize

Source

pub fn segment(&self) -> Option<Reg>

Source

pub fn addrsize(&self) -> usize

Source

pub fn addrsize_log(&self) -> usize

Source

pub fn opsize(&self) -> usize

Source

pub fn opsize_log(&self) -> usize

Source

pub fn has_rep(&self) -> bool

Source

pub fn has_repnz(&self) -> bool

Source

pub fn has_lock(&self) -> bool

Source

pub fn is_64(&self) -> bool

Source

pub fn op_type(&self, idx: usize) -> OperandType

Source

pub fn op_size(&self, idx: usize) -> usize

Source

pub fn op_size_log(&self, idx: usize) -> usize

Source

pub fn op_reg(&self, idx: usize) -> Option<Reg>

Source

pub fn op_reg_type(&self, idx: usize) -> Option<RegType>

Source

pub fn op_reg_high(&self, idx: usize) -> bool

Source

pub fn op_base(&self, idx: usize) -> Option<Reg>

Source

pub fn op_index(&self, idx: usize) -> Option<Reg>

Source

pub fn op_scale(&self, idx: usize) -> u8

Source

pub fn op_disp(&self, idx: usize) -> i64

Source

pub fn op_bcstsz(&self, idx: usize) -> usize

Source

pub fn op_bcstsz_log(&self, idx: usize) -> usize

Source

pub fn op_imm(&self, idx: usize) -> i64

Source

pub fn maskreg(&self) -> Option<Reg>

Source

pub fn maskzero(&self) -> bool

Source

pub fn round_control(&self) -> Option<RoundControl>

Trait Implementations§

Source§

impl Default for Instruction

Source§

fn default() -> Instruction

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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

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.