Skip to main content

InstructionData

Struct InstructionData 

Source
#[repr(C)]
pub struct InstructionData {
Show 16 fields pub status: i32, pub err_op: u8, pub err_optype: u8, pub address: u64, pub target: u64, pub itype: u16, pub len: u8, pub isa: u8, pub nops: u8, pub flow: u8, pub mnemonic: String, pub ops: Vec<OperandData>, pub mask: RegisterData, pub zeroing: u8, pub fp_control: u8, pub round_mode: u8,
}
Expand description

A decoded instruction, returned by value from decode_insn; status carries the raw result code and ops is right-sized to the populated operands.

Fields§

§status: i32

Result code: 0 ok, -1 no instruction, -2 unsupported processor, -3 unmodeled operand, -4 unmodeled register.

§err_op: u8

On the -3/-4 status, the offending operand index.

§err_optype: u8

On -3 the offending raw operand type; on -4 the register number.

§address: u64

Instruction address.

§target: u64

Direct branch/call target, or BADADDR.

§itype: u16

Processor-local canonical instruction id.

§len: u8

Encoded length in bytes.

§isa: u8

0 = x86, 1 = x64.

§nops: u8

Number of populated operands (matches ops.len()).

§flow: u8

FLOW_* bit flags.

§mnemonic: String

Canonical mnemonic.

§ops: Vec<OperandData>

Decoded operands; only meaningful when status == 0.

§mask: RegisterData

EVEX write-mask opmask register (k1..k7), or the REG_NONE sentinel if unmasked.

§zeroing: u8

EVEX zeroing-masking flag: 1 = {z} (zero masked lanes), 0 = merge. Meaningful only with a mask.

§fp_control: u8

EVEX register-form FP control: FPC_* (0 none, 1 static rounding, 2 suppress-exceptions-only).

§round_mode: u8

EVEX static rounding mode ROUND_* (0 nearest, 1 down, 2 up, 3 zero), meaningful when fp_control == FPC_ROUNDING.

Trait Implementations§

Source§

impl ExternType for InstructionData

Source§

type Kind = Trivial

Source§

type Id

A type-level representation of the type’s C++ namespace and type name. 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.