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,
pub apx: Option<ApxClass>,
pub nd: Option<bool>,
pub nf: Option<bool>,
}Fields§
§length: LengthThe 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: WBitThe W bit.
opcode: u8EVEX-encoded instructions opcode byte“
modrm: Option<ModRmKind>See Rex.modrm.
imm: ImmSee Rex.imm.
tuple_type: TupleTypeThe “Tuple Type” corresponding to scaling of the 8-bit displacement
parameter for memory operands. See TupleType for more information.
apx: Option<ApxClass>The APX “Extended EVEX” class, when this instruction is an APX promotion.
Intel APX (Advanced Performance Extensions) reuses the 0x62 EVEX
identifier but does not define a single static payload layout.
Instead, the meaning of the payload bytes (P0, P1, P2) is
re-mapped depending on which class of instruction is being promoted (see
ApxClass). None denotes a standard (AVX-512) EVEX encoding;
Some(_) selects one of the APX layouts and enables addressing of the
extended general-purpose registers R16–R31 (“EGPR”).
nd: Option<bool>The APX ND (New Data destination) bit.
When set, a legacy destructive two-operand instruction is promoted into
a non-destructive three-operand form (the extra destination is encoded
in the EVEX.vvvv field). None when the bit is not part of this
encoding; only valid for ApxClass::LegacyGpr.
nf: Option<bool>The APX NF (No Flags) bit.
When set, the status-flag writes that a legacy integer instruction would
otherwise perform are suppressed. None when the bit is not part of
this encoding; only valid for ApxClass::LegacyGpr.
Implementations§
Source§impl Evex
impl Evex
Sourcepub fn _66(self) -> Self
pub fn _66(self) -> Self
Set the pp field to use VexPrefix::_66; equivalent to .66 in the
manual.
Sourcepub fn _f2(self) -> Self
pub fn _f2(self) -> Self
Set the pp field to use VexPrefix::_F2; equivalent to .F2 in the
manual.
Sourcepub fn _f3(self) -> Self
pub fn _f3(self) -> Self
Set the pp field to use VexPrefix::_F3; equivalent to .F3 in the
manual.
Sourcepub fn _0f(self) -> Self
pub fn _0f(self) -> Self
Set the mmmmmm field to use VexEscape::_0F; equivalent to .0F in
the manual.
Sourcepub fn _0f3a(self) -> Self
pub fn _0f3a(self) -> Self
Set the mmmmmm field to use VexEscape::_0F3A; equivalent to
.0F3A in the manual.
Sourcepub fn _0f38(self) -> Self
pub fn _0f38(self) -> Self
Set the mmmmmm field to use VexEscape::_0F38; equivalent to
.0F38 in the manual.
Sourcepub fn map4(self) -> Self
pub fn map4(self) -> Self
Select the APX “opcode map 4”, promoting a legacy general-purpose-register
instruction into the Extended EVEX space; equivalent to .MAP4 in the
manual.
This both sets the mmm map bits and marks the encoding as
ApxClass::LegacyGpr, which in turn enables addressing of the extended
GPRs R16–R31 (“EGPR”) and permits the ND/NF bits.
§Panics
Panics if the map (mmm) or APX class has already been set.
Sourcepub fn nd(self) -> Self
pub fn nd(self) -> Self
Set the APX ND (New Data destination) bit; equivalent to .ND in the
manual.
§Panics
Panics if this is not an ApxClass::LegacyGpr encoding, or if the bit
has already been set.
Sourcepub fn nf(self) -> Self
pub fn nf(self) -> Self
Set the APX NF (No Flags) bit; equivalent to .NF in the manual.
§Panics
Panics if this is not an ApxClass::LegacyGpr encoding, or if the bit
has already been set.
Sourcepub fn unwrap_digit(&self) -> Option<u8>
pub fn unwrap_digit(&self) -> Option<u8>
Retrieve the digit extending the opcode, if available.