diff options
author | iximeow <me@iximeow.net> | 2021-07-03 16:18:28 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-07-03 16:18:28 -0700 |
commit | 3a1de246641e14e51dc138120d67842448c2bf21 (patch) | |
tree | 0702a788bf16db67b0559aa49f44604564dd9ebb /src/long_mode/display.rs | |
parent | 282645e18ac920b2c1051a0bdf3e3236ee5839d6 (diff) |
factor out MemoryAccessSize
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r-- | src/long_mode/display.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index d042119..f4d7a2c 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -1,5 +1,7 @@ extern crate yaxpeax_arch; +use MEM_SIZE_STRINGS; + use core::fmt; use yaxpeax_arch::{Colorize, ShowContextual, NoColors, YaxColors}; @@ -3334,7 +3336,7 @@ fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors: let x = Operand::from_spec(instr, instr.operands[0]); if x.is_memory() { - out.write_str(super::MEM_SIZE_STRINGS[instr.mem_size as usize - 1])?; + out.write_str(MEM_SIZE_STRINGS[instr.mem_size as usize - 1])?; out.write_str(" ")?; } @@ -3354,7 +3356,7 @@ fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors: out.write_str(", ")?; let x = Operand::from_spec(instr, instr.operands[i as usize]); if x.is_memory() { - out.write_str(super::MEM_SIZE_STRINGS[instr.mem_size as usize - 1])?; + out.write_str(MEM_SIZE_STRINGS[instr.mem_size as usize - 1])?; out.write_str(" ")?; } if let Some(prefix) = instr.segment_override_for_op(i) { |