diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/protected_mode/mod.rs | 12 |
2 files changed, 8 insertions, 8 deletions
@@ -15,7 +15,7 @@ x86 decoders implemented as part of the yaxpeax project. the decoders provided by `yaxpeax-x86` are designed to be usable in a `no_std` setting, and does so by default. to build `yaxpeax_x86` decoders in `no_std` you'll want to set `default-features = false` as with many other `no_std` Rust crates. serde currently (though it doesn't seem _necessarily_?) relies on `std`, as well as the `colors` feature to render instructions with default (eg terminal-friendly) syntax highlighting. ### instruction set extensions -`yaxpeax-x86` decoders provide the option to specify what [instruction set extensions](http://git.iximeow.net/yaxpeax-x86/tree/src/long_mode/mod.rs#n1297) are eligible when decoding, to support decoding x86 instructions as understood by a particular microarchitecture. the default `yaxpeax_x86::InstDecoder` takes an optimistsic approach to decoding and assumes all feature sets are available, as well as accepting both intel-specific and amd-specific quirks around undefined encodings. +`yaxpeax-x86` decoders provide the option to specify what [instruction set extensions](http://git.iximeow.net/yaxpeax-x86/tree/src/long_mode/mod.rs#n1297) are eligible when decoding, to support decoding x86 instructions as understood by a particular microarchitecture. the default impls of decoders in `yaxpeax_x86` take an optimistsic approach to decoding and assumes all feature sets are available, as well as accepting both intel-specific and amd-specific quirks around undefined encodings. ### pretty fast by the in-repo benchmark, `yaxpeax_x86::long_mode` decodes `x86_64` instructions at anywhere between 60 million instructions per second to just shy of 100 million instructions per second, depending on hardware and distribution of instructions being decoded. when hooked up to `disasm-bench`, `yaxpeax_x86::long_mode` has shown roughly 150mb/s decode throughput. @@ -34,7 +34,7 @@ the canonical copy of `yaxpeax-x86` is at [https://git.iximeow.net/yaxpeax-x86/] ### ! user beware ! * while the decoder has the option to select instruction set extensions, it is entirely likely that some extensions are not yet properly rejected when the corresponding flag is disabled. user beware! * `yaxpeax-x86` likely has many corners where it does not reject instructions it should. particularly likely is accepting a register operand where the corresponding instruction specifically only allows memory encodings - `lea` is a good example of this. user beware! -* `yaxpeax-x86` will, but does not yet, have decoders for protected-mode and real-mode `x86`. currently, `yaxpeax-x86` assumes that it is decoding long mode `x86_64` instructions. it is strongly recommended to use `<yaxpeax_x86::x86_64 as Arch>::Instruction` and similar type aliases, rather than using struct and operand types directly. user beware! +* `yaxpeax-x86` will, but does not yet, have a decoder for real-mode `x86`. it is strongly recommended to use `<yaxpeax_x86::protected_mode::Arch as Arch>::Instruction` and similar type aliases, rather than using struct and operand types directly. user beware! * avx512 is not yet supported. user beware! * avx256 support is questionable. user beware! * x87 is not yet supported. user beware! diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index d561fe3..4405cc8 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -1289,7 +1289,7 @@ enum OperandSpec { // the Hash, Eq, and PartialEq impls here are possibly misleading. // They exist because downstream some structs are spelled like -// Foo<T> for T == x86_64. This is only to access associated types +// Foo<T> for T == x86 This is only to access associated types // which themselves are bounded, but their #[derive] require T to // implement these traits. #[cfg(feature="use-serde")] @@ -1368,9 +1368,9 @@ pub struct InstDecoder { // 41. avx512_vpopcntdq // 42. avx512_4vnniw // 43. avx512_4fmaps - // 44. cx8 // cmpxchg8 - is this actually optional in x86_64? - // 45. syscall // syscall/sysret - actually optional in x86_64? - // 46. rdtscp // actually optional in x86_64? + // 44. cx8 // cmpxchg8 - is this actually optional in x86? + // 45. syscall // syscall/sysret - actually optional in x86? + // 46. rdtscp // actually optional in x86? // 47. abm (lzcnt, popcnt) // 48. sse4a // 49. 3dnowprefetch // actually optional? @@ -1384,7 +1384,7 @@ pub struct InstDecoder { } impl InstDecoder { - /// Instantiates an x86_64 decoder that decodes the bare minimum of x86_64. + /// Instantiates an x86 decoder that decodes the bare minimum of protected-mode x86. /// /// Pedantic and only decodes what the spec says is well-defined, rejecting undefined sequences /// and any instructions defined by extensions. @@ -2420,7 +2420,7 @@ impl InstDecoder { } impl Default for InstDecoder { - /// Instantiates an x86_64 decoder that probably decodes what you want. + /// Instantiates an x86 decoder that probably decodes what you want. /// /// Attempts to match real processors in interpretation of undefined sequences, and decodes any /// instruction defined in any extension. |