Struct bddisasm::operand::OpReg

source ·
pub struct OpReg {
    pub kind: OpRegType,
    pub size: u32,
    pub index: usize,
    pub count: u32,
    pub is_high8: bool,
    pub is_block: bool,
}
Expand description

Describes a register operand.

Fields§

§kind: OpRegType

The type of the register.

§size: u32

Indicates the register size, in bytes.

This may not be equal to the Operand::size field, as a smaller amount of data may be processed from a register (especially if we have a SSE register or a mask register).

§index: usize

The register index/ID.

Registers are numbered as they are in the Intel documentation. Examples:

  • AL = AX = EAX = RAX = 0
  • R15B = R15W = R15D = R15 = 15
  • XMM0 = 0
  • ZMM31 = 31
  • ES = 0
  • CS = 1

§Remarks

If kind is OpRegType::Gpr, the high and low part of 16-bit registers will have the same index (for example, AH and AL). To differentiate between them use is_high8.

§count: u32

The number of registers accessed, starting with id.

§is_high8: bool

true if this is the high part of a 16-bit GPR: AH, CH, DH, or BH.

§is_block: bool

true if this is a block register addressing.

Trait Implementations§

source§

impl Clone for OpReg

source§

fn clone(&self) -> OpReg

Returns a copy 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 Debug for OpReg

source§

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

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

impl Hash for OpReg

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for OpReg

source§

fn eq(&self, other: &OpReg) -> 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.
source§

impl Copy for OpReg

source§

impl Eq for OpReg

source§

impl StructuralPartialEq for OpReg

Auto Trait Implementations§

§

impl RefUnwindSafe for OpReg

§

impl Send for OpReg

§

impl Sync for OpReg

§

impl Unpin for OpReg

§

impl UnwindSafe for OpReg

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> ToOwned for T
where T: Clone,

§

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

§

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.