aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/display.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-06-28 23:46:22 -0700
committeriximeow <me@iximeow.net>2021-06-28 23:46:22 -0700
commit4b95d712c7923741fb91ca38967038af83fd2035 (patch)
treeb65bbf19db07896e6be26d423077cfacc63cb1cb /src/long_mode/display.rs
parent0ef199f018cafeeb0334470328c417023ff702eb (diff)
remove old movsx/movzx-related memory size hacks
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r--src/long_mode/display.rs82
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)?
- }
- }
- }
- }
}
}
}