pub struct DecoderModes {
pub minimal: bool,
pub amd_branches: bool,
pub knc: bool,
pub mpx: bool,
pub cet: bool,
pub lzcnt: bool,
pub tzcnt: bool,
pub xbegin: bool,
}Expand description
Decoder mode flags
Controls various decoding behaviors, similar to Zydis’s ZydisDecoderMode.
§Modes
- Minimal: Only decode instruction length and basic attributes (faster)
- AMD Branches: Use AMD’s branch semantics instead of Intel’s
- KNC: Support Knights Corner instructions (deprecated)
- MPX: Support Memory Protection Extensions
- CET: Support Control-flow Enforcement Technology
- LZCNT: Special handling for LZCNT instruction
- TZCNT: Special handling for TZCNT instruction
- XBEGIN: Automatic transaction abort for XBEGIN
Fields§
§minimal: boolMinimal decoding mode - only decode instruction length and basic attributes
amd_branches: boolAMD branch semantics - use AMD’s branch behavior interpretation
knc: boolKNC mode - Knights Corner instruction support (deprecated)
mpx: boolMPX mode - Memory Protection Extensions support
cet: boolCET mode - Control-flow Enforcement Technology support
lzcnt: boolLZCNT mode - special handling for LZCNT (vs BSR)
tzcnt: boolTZCNT mode - special handling for TZCNT (vs BSF)
xbegin: boolXBEGIN mode - automatic transaction abort behavior
Implementations§
Source§impl DecoderModes
impl DecoderModes
Sourcepub const fn with_mode(self, mode: DecoderMode, enabled: bool) -> Self
pub const fn with_mode(self, mode: DecoderMode, enabled: bool) -> Self
Enable or disable a specific mode
Sourcepub const fn is_enabled(&self, mode: DecoderMode) -> bool
pub const fn is_enabled(&self, mode: DecoderMode) -> bool
Check if a specific mode is enabled
Trait Implementations§
Source§impl Clone for DecoderModes
impl Clone for DecoderModes
Source§fn clone(&self) -> DecoderModes
fn clone(&self) -> DecoderModes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecoderModes
impl Debug for DecoderModes
Source§impl Default for DecoderModes
impl Default for DecoderModes
Source§fn default() -> DecoderModes
fn default() -> DecoderModes
Returns the “default value” for a type. Read more
impl Copy for DecoderModes
Auto Trait Implementations§
impl Freeze for DecoderModes
impl RefUnwindSafe for DecoderModes
impl Send for DecoderModes
impl Sync for DecoderModes
impl Unpin for DecoderModes
impl UnsafeUnpin for DecoderModes
impl UnwindSafe for DecoderModes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more