diff options
Diffstat (limited to 'src/protected_mode/mod.rs')
| -rw-r--r-- | src/protected_mode/mod.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index 170a830..835c934 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -3,7 +3,6 @@ mod evex; #[cfg(feature = "fmt")] mod display; pub mod uarch; -mod isa_settings; pub use crate::MemoryAccessSize; @@ -19,6 +18,10 @@ use yaxpeax_arch::annotation::{AnnotatingDecoder, DescriptionSink, NullSink}; use yaxpeax_arch::{DecodeError as ArchDecodeError}; use yaxpeax_arch::safer_unchecked::unreachable_kinda_unchecked as unreachable_unchecked; +// generate InstDecoder settings and `revise_instruction` here. a bit early, but +// gets it out of the way.. +crate::isa_settings::gen_arch_isa_settings!(Instruction, Opcode, DecodeError, InstDecoder); + use core::fmt; impl fmt::Display for DecodeError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2779,7 +2782,7 @@ fn decode_with_annotation< return Err(DecodeError::TooLong); } - isa_settings::revise_instruction(decoder, instr)?; + revise_instruction(decoder, instr)?; Ok(()) } @@ -6546,7 +6549,7 @@ fn read_operands< ); vex::three_byte_vex(words, modrm, instruction, sink)?; - isa_settings::revise_instruction(decoder, instruction)?; + revise_instruction(decoder, instruction)?; return Ok(()); } @@ -6578,7 +6581,7 @@ fn read_operands< ); vex::two_byte_vex(words, modrm, instruction, sink)?; - isa_settings::revise_instruction(decoder, instruction)?; + revise_instruction(decoder, instruction)?; return Ok(()); } |
