diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1330,6 +1330,7 @@ pub struct InstDecoder { // 52. tbm // 53. intel quirks // 54. amd quirks + // 55. avx (intel ?, amd ?) flags: u64, } @@ -1839,6 +1840,15 @@ impl InstDecoder { self } + pub fn avx(&self) -> bool { + self.flags & (1 << 54) != 0 + } + + pub fn with_avx(mut self) -> Self { + self.flags |= 1 << 54; + self + } + /// Optionally reject or reinterpret instruction according to the decoder's /// declared extensions. fn revise_instruction(&self, inst: &mut Instruction) -> Result<(), ()> { |