Skip to main content

OperandData

Struct OperandData 

Source
#[repr(C)]
pub struct OperandData {
Show 14 fields pub kind: u8, pub idx: u8, pub offb: u8, pub data_type: u8, pub access: u8, pub scale: u8, pub reg: RegisterData, pub base: RegisterData, pub index: RegisterData, pub disp: i64, pub value: u64, pub addr: u64, pub sel: u16, pub broadcast: u8,
}
Expand description

One decoded operand; which fields are meaningful depends on kind.

Fields§

§kind: u8

Semantic kind (0 reg, 1 mem, 2 imm, 3 near, 4 far).

§idx: u8

Original operand slot index (feature bits are keyed by it).

§offb: u8

Raw op_t::offb: the operand’s byte offset within the encoded instruction.

§data_type: u8

Raw op_dtype_t.

§access: u8

Access bits: bit0 read, bit1 written.

§scale: u8

Memory index scale multiplier (1/2/4/8).

§reg: RegisterData

Register (kind = reg). Named reg, not register (a C++ keyword).

§base: RegisterData

Memory base register (kind = mem).

§index: RegisterData

Memory index register (kind = mem).

§disp: i64

Memory displacement (kind = mem).

§value: u64

Immediate value (kind = imm) or far offset (kind = far).

§addr: u64

Near target, or memory static target / BADADDR (kind = near/mem).

§sel: u16

Far selector (kind = far).

§broadcast: u8

EVEX embedded-broadcast factor N of a {1toN} memory operand, as IDA renders it, else 0.

Trait Implementations§

Source§

impl ExternType for OperandData

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.