Enum yaxpeax_x86::real_mode::Operand [−][src]
#[non_exhaustive] pub enum Operand {}Show 29 variants
ImmediateI8(i8), ImmediateU8(u8), ImmediateI16(i16), ImmediateU16(u16), ImmediateI32(i32), ImmediateU32(u32), Register(RegSpec), RegisterMaskMerge(RegSpec, RegSpec, MergeMode), RegisterMaskMergeSae(RegSpec, RegSpec, MergeMode, SaeMode), RegisterMaskMergeSaeNoround(RegSpec, RegSpec, MergeMode), DisplacementU16(u16), DisplacementU32(u32), RegDeref(RegSpec), RegDisp(RegSpec, i32), RegScale(RegSpec, u8), RegIndexBase(RegSpec, RegSpec), RegIndexBaseDisp(RegSpec, RegSpec, i32), RegScaleDisp(RegSpec, u8, i32), RegIndexBaseScale(RegSpec, RegSpec, u8), RegIndexBaseScaleDisp(RegSpec, RegSpec, u8, i32), RegDerefMasked(RegSpec, RegSpec), RegDispMasked(RegSpec, i32, RegSpec), RegScaleMasked(RegSpec, u8, RegSpec), RegIndexBaseMasked(RegSpec, RegSpec, RegSpec), RegIndexBaseDispMasked(RegSpec, RegSpec, i32, RegSpec), RegScaleDispMasked(RegSpec, u8, i32, RegSpec), RegIndexBaseScaleMasked(RegSpec, RegSpec, u8, RegSpec), RegIndexBaseScaleDispMasked(RegSpec, RegSpec, u8, i32, RegSpec), Nothing,
Expand description
an operand for an x86
instruction.
Operand::Nothing
should be unreachable in practice; any such instructions should have an
operand count of 0 (or at least one fewer than the Nothing
operand’s position).
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
ImmediateI8(i8)
a sign-extended byte
ImmediateU8(u8)
a zero-extended byte
ImmediateI16(i16)
a sign-extended word
ImmediateU16(u16)
a zero-extended word
ImmediateI32(i32)
a sign-extended dword
ImmediateU32(u32)
a zero-extended dword
Register(RegSpec)
a bare register operand, such as rcx
.
an avx512
register operand with optional mask register and merge mode, such as
zmm3{k4}{z}
.
if the mask register is k0
, there is no masking applied, and the default x86 operation is
MergeMode::Merge
.
an avx512
register operand with optional mask register, merge mode, and suppressed
exceptions, such as zmm3{k4}{z}{rd-sae}
.
if the mask register is k0
, there is no masking applied, and the default x86 operation is
MergeMode::Merge
.
an avx512
register operand with optional mask register, merge mode, and suppressed
exceptions, with no overridden rounding mode, such as zmm3{k4}{z}{sae}
.
if the mask register is k0
, there is no masking applied, and the default x86 operation is
MergeMode::Merge
.
DisplacementU16(u16)
a memory access to a literal word address. it’s extremely rare that a well-formed x86
instruction uses this mode. as an example, [0x1133]
DisplacementU32(u32)
a memory access to a literal qword address. it’s relatively rare that a well-formed x86
instruction uses this mode, but plausibe. for example, fs:[0x14]
. segment overrides,
however, are maintained on the instruction itself.
RegDeref(RegSpec)
a simple dereference of the address held in some register. for example: [esi]
.
a dereference of the address held in some register with offset. for example: [esi + 0x14]
.
a dereference of the address held in some register scaled by 1, 2, 4, or 8. this is almost always used with the lea
instruction. for example: [edx * 4]
.
a dereference of the address from summing two registers. for example: [ebp + rax]
a dereference of the address from summing two registers with offset. for example: [edi + ecx + 0x40]
a dereference of the address held in some register scaled by 1, 2, 4, or 8 with offset. this is almost always used with the lea
instruction. for example: [eax * 4 + 0x30]
.
a dereference of the address from summing a register and index register scaled by 1, 2, 4,
or 8. for
example: [esi + ecx * 4]
a dereference of the address from summing a register and index register scaled by 1, 2, 4,
or 8, with offset. for
example: [esi + ecx * 4 + 0x1234]
an avx512
dereference of register with optional masking. for example: [edx]{k3}
an avx512
dereference of register plus offset, with optional masking. for example: [esp + 0x40]{k3}
an avx512
dereference of a register scaled by 1, 2, 4, or 8, with optional masking. this
seems extraordinarily unlikely to occur in practice. for example: [esi * 4]{k2}
an avx512
dereference of a register plus index scaled by 1, 2, 4, or 8, with optional masking.
for example: [esi + eax * 4]{k6}
an avx512
dereference of a register plus offset, with optional masking. for example:
[esi + eax + 0x1313]{k6}
an avx512
dereference of a register scaled by 1, 2, 4, or 8 plus offset, with optional
masking. this seems extraordinarily unlikely to occur in practice. for example: [esi * 4 + 0x1357]{k2}
an avx512
dereference of a register plus index scaled by 1, 2, 4, or 8, with optional
masking. for example: [esi + eax * 4]{k6}
an avx512
dereference of a register plus index scaled by 1, 2, 4, or 8 and offset, with
optional masking. for example: [esi + eax * 4 + 0x1313]{k6}
no operand. it is a bug for yaxpeax-x86
to construct an Operand
of this kind for public
use; the instruction’s operand_count
should be reduced so as to make this invisible to
library clients.
Implementations
returns true
if this operand implies a memory access, false
otherwise.
notably, the lea
instruction uses a memory operand without actually ever accessing
memory.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Operand
impl UnwindSafe for Operand
Blanket Implementations
Mutably borrows from an owned value. Read more