aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 272db75..1d798ab 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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<(), ()> {