diff options
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r-- | src/long_mode/display.rs | 82 |
1 files changed, 12 insertions, 70 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index 7532101..107eb94 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -405,9 +405,6 @@ const MNEMONICS: &[&'static str] = &[ "cvtss2sd", "cvtdq2pd", "lddqu", - "movsx", - "movsx", - "movzx", "movzx", "movsx", "movsxd", @@ -2830,10 +2827,7 @@ impl <T: fmt::Write, Y: YaxColors> Colorize<T, Y> for Opcode { Opcode::IN | Opcode::OUTS | Opcode::OUT | - Opcode::MOVSX_b | - Opcode::MOVSX_w | - Opcode::MOVZX_b | - Opcode::MOVZX_w | + Opcode::MOVZX | Opcode::MOVSX | Opcode::MOVSXD | Opcode::FILD | @@ -3692,74 +3686,22 @@ impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::St }; for i in 1..self.operand_count { let i = i as usize; - match self.opcode { - Opcode::MOVSX_b | - Opcode::MOVZX_b => { - match context.and_then(|xs| xs[i].as_ref()) { - Some(s) => { write!(out, ", {}", s)? } - None => { - match &self.operands[i] { - &OperandSpec::Nothing => { - return Ok(()); - }, - &OperandSpec::RegMMM => { - write!(out, ", ")?; - } - _ => { - write!(out, ", byte ")?; - if let Some(prefix) = self.segment_override_for_op(1) { - write!(out, "{}:", prefix)?; - } - } - } - let x = Operand::from_spec(self, self.operands[i]); - x.colorize(colors, out)? - } - } - }, - Opcode::MOVSX_w | - Opcode::MOVZX_w => { - match context.and_then(|xs| xs[i].as_ref()) { - Some(s) => { write!(out, ", {}", s)? } - None => { - match &self.operands[i] { - &OperandSpec::Nothing => { - return Ok(()); - }, - &OperandSpec::RegMMM => { - write!(out, ", ")?; - } - _ => { - write!(out, ", word ")?; - if let Some(prefix) = self.segment_override_for_op(1) { - write!(out, "{}:", prefix)?; - } - } + match context.and_then(|xs| xs[i].as_ref()) { + Some(s) => { write!(out, ", {}", s)? } + None => { + match &self.operands[i] { + &OperandSpec::Nothing => { + return Ok(()); + }, + _ => { + write!(out, ", ")?; + if let Some(prefix) = self.segment_override_for_op(1) { + write!(out, "{}:", prefix)?; } let x = Operand::from_spec(self, self.operands[i]); x.colorize(colors, out)? } } - }, - _ => { - match context.and_then(|xs| xs[i].as_ref()) { - Some(s) => { write!(out, ", {}", s)? } - None => { - match &self.operands[i] { - &OperandSpec::Nothing => { - return Ok(()); - }, - _ => { - write!(out, ", ")?; - if let Some(prefix) = self.segment_override_for_op(1) { - write!(out, "{}:", prefix)?; - } - let x = Operand::from_spec(self, self.operands[i]); - x.colorize(colors, out)? - } - } - } - } } } } |