diff options
| author | iximeow <me@iximeow.net> | 2025-06-01 09:11:30 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2025-06-01 09:21:57 +0000 |
| commit | 54538a07bf4e0b8b2335e146198cda02a49589c8 (patch) | |
| tree | 6033f4b63cb1426fcce9d1240e7f8deb10461d7b /src/long_mode/mod.rs | |
| parent | 72968a35438e5284a0ba63c947e70f8880b3abb5 (diff) | |
revise_instruction is the same on all bitnesses, so macro it too
Diffstat (limited to 'src/long_mode/mod.rs')
| -rw-r--r-- | src/long_mode/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index e471391..1ec924a 100644 --- a/src/long_mode/mod.rs +++ b/src/long_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 { @@ -2865,7 +2868,7 @@ fn decode_with_annotation< return Err(DecodeError::TooLong); } - isa_settings::revise_instruction(decoder, instr)?; + revise_instruction(decoder, instr)?; Ok(()) } |
