diff options
Diffstat (limited to 'src/long_mode')
-rw-r--r-- | src/long_mode/display.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index c1c6c65..1a31073 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -3862,12 +3862,14 @@ impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::St write!(out, "lock ")?; } - if [Opcode::MOVS, Opcode::CMPS, Opcode::LODS, Opcode::STOS, Opcode::INS, Opcode::OUTS].contains(&self.opcode) { - // only a few of you actually use the prefix... - if self.prefixes.rep() { - write!(out, "rep ")?; - } else if self.prefixes.repnz() { - write!(out, "repnz ")?; + if self.prefixes.rep_any() { + if [Opcode::MOVS, Opcode::CMPS, Opcode::LODS, Opcode::STOS, Opcode::INS, Opcode::OUTS].contains(&self.opcode) { + // only a few of you actually use the prefix... + if self.prefixes.rep() { + write!(out, "rep ")?; + } else if self.prefixes.repnz() { + write!(out, "repnz ")?; + } } } |