From 4b95d712c7923741fb91ca38967038af83fd2035 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 28 Jun 2021 23:46:22 -0700 Subject: remove old movsx/movzx-related memory size hacks --- src/protected_mode/display.rs | 82 +++++++------------------------------------ 1 file changed, 12 insertions(+), 70 deletions(-) (limited to 'src/protected_mode/display.rs') diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs index acbb43f..0736fc1 100644 --- a/src/protected_mode/display.rs +++ b/src/protected_mode/display.rs @@ -394,9 +394,6 @@ const MNEMONICS: &[&'static str] = &[ "cvtss2sd", "cvtdq2pd", "lddqu", - "movsx", - "movsx", - "movzx", "movzx", "movsx", "movsxd", @@ -2834,10 +2831,7 @@ impl Colorize 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 | @@ -3700,74 +3694,22 @@ impl ShowContextual { - 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)? - } - } - } - } } } } -- cgit v1.1