aboutsummaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-01-10 22:04:45 -0800
committeriximeow <me@iximeow.net>2020-01-12 16:10:14 -0800
commitb7b781db7a2ba94c816ff5138a713114c39d4034 (patch)
treec974ffbdd16e70677f5ee215d9010f6034571064 /src/display.rs
parent6f897e655a5f18b28b47542d76ac88d0aebcbc5d (diff)
"fix warnings"
this assists many misdecodes from being totally wrong to only slightly wrong and more clear about it (rrr-selected opcodes or W-bit-selected opcodes were accidentally decoded as the first variant of their opcode) also fixes sillier warnings all over the place, and probably a few incorrectly counted lengths
Diffstat (limited to 'src/display.rs')
-rw-r--r--src/display.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/display.rs b/src/display.rs
index dd46055..bea5340 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -16,6 +16,7 @@ impl fmt::Display for DecodeError {
DecodeError::InvalidOperand => { write!(f, "invalid operand") },
DecodeError::InvalidPrefixes => { write!(f, "invalid prefixes") },
DecodeError::TooLong => { write!(f, "too long") },
+ DecodeError::IncompleteDecoder => { write!(f, "the decoder is incomplete") },
}
}
}
@@ -641,7 +642,6 @@ impl fmt::Display for Opcode {
&Opcode::ENCLU => write!(f, "enclu"),
&Opcode::RDPKRU => write!(f, "rdpkru"),
&Opcode::WRPKRU => write!(f, "wrpkru"),
- &Opcode::VMOVUPS => write!(f, "vmovups"),
&Opcode::VADDPD => write!(f, "vaddpd"),
&Opcode::VADDPS => write!(f, "vaddps"),
&Opcode::VADDSUBPD => write!(f, "vaddsubpd"),
@@ -1617,7 +1617,6 @@ impl <T: std::fmt::Write> Colorize<T> for Opcode {
Opcode::MOVQ2DQ |
Opcode::MOVSHDUP |
Opcode::MOVUPS |
- Opcode::VMOVUPS |
Opcode::PEXTRW |
Opcode::PINSRW |
Opcode::MOV |
@@ -1908,7 +1907,7 @@ impl <T: std::fmt::Write> ShowContextual<u64, [Option<String>], T> for Instructi
&OperandSpec::RegMMM => {
write!(out, ", ")?;
}
- x @ _ => {
+ _ => {
write!(out, ", byte ")?;
if let Some(prefix) = self.segment_override_for_op(1) {
write!(out, "{}:", prefix)?;