Struct Evex

Source
pub struct Evex {
    pub length: Length,
    pub pp: Option<VexPrefix>,
    pub mmm: Option<VexEscape>,
    pub w: WBit,
    pub opcode: u8,
    pub modrm: Option<ModRmKind>,
    pub imm: Imm,
    pub tuple_type: TupleType,
}

Fields§

§length: Length

The vector length of the operand (e.g., 128-bit, 256-bit, or 512-bit).

§pp: Option<VexPrefix>

Any SIMD prefixes, but encoded in the EVEX.pp bit field (see similar: Vex::pp).

§mmm: Option<VexEscape>

The mmm bits.

Bits 1:0 are identical to the lowest 2 bits of VEX.mmmmm; EVEX adds one more bit here. From the reference manual: “provides access to up to eight decoding maps. Currently, only the following decoding maps are supported: 1, 2, 3, 5, and 6. Map ids 1, 2, and 3 are denoted by 0F, 0F38, and 0F3A, respectively, in the instruction encoding descriptions.”

§w: WBit

The W bit.

§opcode: u8

EVEX-encoded instructions opcode byte“

§modrm: Option<ModRmKind>

See Rex.modrm.

§imm: Imm

See Rex.imm.

§tuple_type: TupleType

The “Tuple Type” corresponding to scaling of the 8-bit displacement parameter for memory operands. See TupleType for more information.

Implementations§

Source§

impl Evex

Source

pub fn _66(self) -> Self

Set the pp field to use VexPrefix::_66; equivalent to .66 in the manual.

Source

pub fn _f2(self) -> Self

Set the pp field to use VexPrefix::_F2; equivalent to .F2 in the manual.

Source

pub fn _f3(self) -> Self

Set the pp field to use VexPrefix::_F3; equivalent to .F3 in the manual.

Source

pub fn _0f(self) -> Self

Set the mmmmmm field to use VexEscape::_0F; equivalent to .0F in the manual.

Source

pub fn _0f3a(self) -> Self

Set the mmmmmm field to use VexEscape::_0F3A; equivalent to .0F3A in the manual.

Source

pub fn _0f38(self) -> Self

Set the mmmmmm field to use VexEscape::_0F38; equivalent to .0F38 in the manual.

Source

pub fn w0(self) -> Self

Set the W bit to 0; equivalent to .W0 in the manual.

Source

pub fn w1(self) -> Self

Set the W bit to 1; equivalent to .W1 in the manual.

Source

pub fn wig(self) -> Self

Ignore the W bit; equivalent to .WIG in the manual.

Source

pub fn op(self, opcode: u8) -> Self

Set the single opcode for this VEX-encoded instruction.

Source

pub fn r(self) -> Self

Set the ModR/M byte to contain a register operand; see Rex::r.

Source

pub fn unwrap_digit(&self) -> Option<u8>

Retrieve the digit extending the opcode, if available.

Source

pub fn digit(self, extension: u8) -> Self

Set the digit extending the opcode; equivalent to /<digit> in the reference manual.

§Panics

Panics if extension is too large.

Source

pub fn ib(self) -> Self

Append a byte-sized immediate operand (8-bit); equivalent to ib in the reference manual.

§Panics

Panics if an immediate operand is already set.

Trait Implementations§

Source§

impl Display for Evex

Source§

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

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

impl From<Evex> for Encoding

Source§

fn from(evex: Evex) -> Encoding

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Evex

§

impl RefUnwindSafe for Evex

§

impl Send for Evex

§

impl Sync for Evex

§

impl Unpin for Evex

§

impl UnwindSafe for Evex

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.