Skip to main content

DecoderOptions

Struct DecoderOptions 

Source
pub struct DecoderOptions;
Expand description

Decoder options

Implementations§

Source§

impl DecoderOptions

Source

pub const NONE: u32 = 0x0000_0000

No option is enabled

Source

pub const NO_INVALID_CHECK: u32 = 0x0000_0001

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 = 0x0000_0002

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 = 0x0000_0004

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

Source

pub const UMOV: u32 = 0x0000_0008

Decode UMOV instructions

Source

pub const XBTS: u32 = 0x0000_0010

Decode XBTS/IBTS

Source

pub const CMPXCHG486A: u32 = 0x0000_0020

Decode 0FA6/0FA7 as CMPXCHG

Source

pub const OLD_FPU: u32 = 0x0000_0040

Decode some old removed FPU instructions (eg. FRSTPM)

Source

pub const PCOMMIT: u32 = 0x0000_0080

Decode PCOMMIT

Source

pub const LOADALL286: u32 = 0x0000_0100

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

Source

pub const LOADALL386: u32 = 0x0000_0200

Decode 386 LOADALL

Source

pub const CL1INVMB: u32 = 0x0000_0400

Decode CL1INVMB

Source

pub const MOV_TR: u32 = 0x0000_0800

Decode MOV r32,tr and MOV tr,r32

Source

pub const JMPE: u32 = 0x0000_1000

Decode JMPE instructions

Source

pub const NO_PAUSE: u32 = 0x0000_2000

Don’t decode PAUSE, decode NOP instead

Source

pub const NO_WBNOINVD: u32 = 0x0000_4000

Don’t decode WBNOINVD, decode WBINVD instead

Source

pub const UDBG: u32 = 0x0000_8000

Decode undocumented Intel RDUDBG and WRUDBG instructions

Source

pub const NO_MPFX_0FBC: u32 = 0x0001_0000

Don’t decode TZCNT, decode BSF instead

Source

pub const NO_MPFX_0FBD: u32 = 0x0002_0000

Don’t decode LZCNT, decode BSR instead

Source

pub const NO_LAHF_SAHF_64: u32 = 0x0004_0000

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

Source

pub const MPX: u32 = 0x0008_0000

Decode MPX instructions

Source

pub const CYRIX: u32 = 0x0010_0000

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

Source

pub const CYRIX_SMINT_0F7E: u32 = 0x0020_0000

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

Source

pub const CYRIX_DMI: u32 = 0x0040_0000

Decode Cyrix DMI instructions (AMD Geode GX/LX)

Source

pub const ALTINST: u32 = 0x0080_0000

Decode Centaur ALTINST

Source

pub const KNC: u32 = 0x0100_0000

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

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.