From b7b781db7a2ba94c816ff5138a713114c39d4034 Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 10 Jan 2020 22:04:45 -0800 Subject: "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 --- src/display.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/display.rs') 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 Colorize for Opcode { Opcode::MOVQ2DQ | Opcode::MOVSHDUP | Opcode::MOVUPS | - Opcode::VMOVUPS | Opcode::PEXTRW | Opcode::PINSRW | Opcode::MOV | @@ -1908,7 +1907,7 @@ impl ShowContextual], T> for Instructi &OperandSpec::RegMMM => { write!(out, ", ")?; } - x @ _ => { + _ => { write!(out, ", byte ")?; if let Some(prefix) = self.segment_override_for_op(1) { write!(out, "{}:", prefix)?; -- cgit v1.1