pub struct DecoderOptions;
Expand description

Decoder options

Implementations§

source§

impl DecoderOptions

source

pub const NONE: u32 = 0u32

No option is enabled

source

pub const NO_INVALID_CHECK: u32 = 1u32

Disable some checks for invalid encodings of instructions, eg. most instructions can’t use a LOCK prefix so if one is found, they’re decoded as Code::INVALID unless this option is enabled.

source

pub const AMD: u32 = 2u32

AMD decoder: allow 16-bit branch/ret instructions in 64-bit mode, no o64 CALL/JMP FAR [mem], o64 LSS/LFS/LGS, UD0 has no modr/m byte, decode LOCK MOV CR. The AMD decoder can still decode Intel instructions.

source

pub const FORCE_RESERVED_NOP: u32 = 4u32

Decode opcodes 0F0D and 0F18-0F1F as reserved-nop instructions (eg. Code::Reservednop_rm32_r32_0F1D)

source

pub const UMOV: u32 = 8u32

Decode UMOV instructions

source

pub const XBTS: u32 = 16u32

Decode XBTS/IBTS

source

pub const CMPXCHG486A: u32 = 32u32

Decode 0FA6/0FA7 as CMPXCHG

source

pub const OLD_FPU: u32 = 64u32

Decode some old removed FPU instructions (eg. FRSTPM)

source

pub const PCOMMIT: u32 = 128u32

Decode PCOMMIT

source

pub const LOADALL286: u32 = 256u32

Decode 286 STOREALL/LOADALL (0F04 and 0F05)

source

pub const LOADALL386: u32 = 512u32

Decode 386 LOADALL

source

pub const CL1INVMB: u32 = 1_024u32

Decode CL1INVMB

source

pub const MOV_TR: u32 = 2_048u32

Decode MOV r32,tr and MOV tr,r32

source

pub const JMPE: u32 = 4_096u32

Decode JMPE instructions

source

pub const NO_PAUSE: u32 = 8_192u32

Don’t decode PAUSE, decode NOP instead

source

pub const NO_WBNOINVD: u32 = 16_384u32

Don’t decode WBNOINVD, decode WBINVD instead

source

pub const UDBG: u32 = 32_768u32

Decode undocumented Intel RDUDBG and WRUDBG instructions

source

pub const NO_MPFX_0FBC: u32 = 65_536u32

Don’t decode TZCNT, decode BSF instead

source

pub const NO_MPFX_0FBD: u32 = 131_072u32

Don’t decode LZCNT, decode BSR instead

source

pub const NO_LAHF_SAHF_64: u32 = 262_144u32

Don’t decode LAHF and SAHF in 64-bit mode

source

pub const MPX: u32 = 524_288u32

Decode MPX instructions

source

pub const CYRIX: u32 = 1_048_576u32

Decode most Cyrix instructions: FPU, EMMI, SMM, DDI

source

pub const CYRIX_SMINT_0F7E: u32 = 2_097_152u32

Decode Cyrix SMINT 0F7E (Cyrix 6x86 or earlier)

source

pub const CYRIX_DMI: u32 = 4_194_304u32

Decode Cyrix DMI instructions (AMD Geode GX/LX)

source

pub const ALTINST: u32 = 8_388_608u32

Decode Centaur ALTINST

source

pub const KNC: u32 = 16_777_216u32

Decode Intel Knights Corner instructions (requires the mvex feature)

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

§

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.