aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-08-02 20:32:06 -0700
committeriximeow <me@iximeow.net>2020-08-09 01:38:57 -0700
commitf87d5d33c50adc6c7112945e61b23e4c4dd3e83c (patch)
tree619c4de6b0929bcda47de5410bf46ef456d79a87
parent158507298f1a67b130bf4b9d1caebfccf96eccfa (diff)
warnings-b-gon
-rw-r--r--src/long_mode/mod.rs14
-rw-r--r--test/long_mode/mod.rs2
2 files changed, 10 insertions, 6 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 40f7904..61ae89f 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -3327,6 +3327,7 @@ struct EmbeddedOperandInstructions {
}
impl EmbeddedOperandInstructions {
+ #[allow(unused)]
fn bits(&self) -> u16 {
self.bits
}
@@ -3362,7 +3363,8 @@ impl OperandCodeBuilder {
self
}
- fn op0_is_rrr(&self) -> bool {
+ #[allow(unused)]
+ const fn op0_is_rrr(&self) -> bool {
self.bits & 0x2000 != 0
}
@@ -3380,6 +3382,7 @@ impl OperandCodeBuilder {
}
}
+ #[allow(unused)]
fn special_case_handler_index(&self) -> u16 {
self.bits & 0x1ff
}
@@ -3440,6 +3443,7 @@ impl OperandCodeBuilder {
(self.bits & 0x0800) != 0
}
+ #[allow(unused)]
const fn has_mem_reg(&self) -> bool {
(self.bits & 0x0400) != 0
}
@@ -5713,10 +5717,10 @@ fn read_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T,
}
return Ok(());
},
- Err(embedded_operand_instructions) => {
- if operand_code.op0_is_rrr() {
- }
- }
+ // EmbeddedOperandInstructions but those are entirely handled in the fall-through
+ // below. one day this may grow to be an `Err(the_operand_instructions)` though, so for
+ // a simpler diff the above is pre-`match`/`Ok`'d.
+ _ => {}
}
}
diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs
index 8f041e9..ca4670c 100644
--- a/test/long_mode/mod.rs
+++ b/test/long_mode/mod.rs
@@ -4,7 +4,7 @@ mod operand;
use std::fmt::Write;
use yaxpeax_arch::{AddressBase, Decoder, LengthedInstruction};
-use yaxpeax_x86::long_mode::{DecodeError, InstDecoder, Opcode};
+use yaxpeax_x86::long_mode::{InstDecoder, Opcode};
fn test_invalid(data: &[u8]) {
test_invalid_under(&InstDecoder::default(), data);