aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/display.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r--src/long_mode/display.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index b6cca48..71bb1dd 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -638,6 +638,13 @@ const MNEMONICS: &[&'static str] = &[
"not",
"xadd",
"xchg",
+ "cmps",
+ "scas",
+ "movs",
+ "lods",
+ "stos",
+ "ins",
+ "outs",
"invalid",
"bt",
"bsf",
@@ -719,17 +726,10 @@ const MNEMONICS: &[&'static str] = &[
"cwd",
"cdq",
"cqo",
- "lods",
- "stos",
"lahf",
"sahf",
- "cmps",
- "scas",
- "movs",
"test",
- "ins",
"in",
- "outs",
"out",
"imul",
"jo",
@@ -3613,7 +3613,7 @@ fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors:
}
if instr.prefixes.rep_any() {
- if [Opcode::MOVS, Opcode::CMPS, Opcode::LODS, Opcode::STOS, Opcode::INS, Opcode::OUTS].contains(&instr.opcode) {
+ if instr.opcode.can_rep() {
if instr.prefixes.rep() {
write!(out, "rep ")?;
} else if instr.prefixes.repnz() {
@@ -3769,7 +3769,7 @@ fn contextualize_c<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors: &Y,
}
if instr.prefixes.rep_any() {
- if [Opcode::MOVS, Opcode::CMPS, Opcode::LODS, Opcode::STOS, Opcode::INS, Opcode::OUTS].contains(&instr.opcode) {
+ if instr.opcode.can_rep() {
let word_str = match instr.mem_size {
1 => "byte",
2 => "word",