diff options
| author | iximeow <me@iximeow.net> | 2026-05-25 17:32:57 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2026-05-25 18:00:30 +0000 |
| commit | f2a2a09688421f2c532ab6f02527bf68f095407a (patch) | |
| tree | e7b5c3c5302c4c1a4ef89c1a5852b50059850986 /src/real_mode/display.rs | |
| parent | 94f39674e0aee55ff6f6bb59f7d7c4873d2d1a6c (diff) | |
j*cxz/pusha/popa alternate size forms
these all existed since forever but the library did not distinguish them
and did not provide prefix information for users to tell which had been
decoded.
Diffstat (limited to 'src/real_mode/display.rs')
| -rw-r--r-- | src/real_mode/display.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/real_mode/display.rs b/src/real_mode/display.rs index e686b0a..888b0b1 100644 --- a/src/real_mode/display.rs +++ b/src/real_mode/display.rs @@ -2094,6 +2094,10 @@ const MNEMONICS: &[&'static str] = &[ "pvalidate", "rmpadjust", "rmpupdate", + + "pushad", + "popad", + "jecxz", ]; impl Opcode { @@ -2572,6 +2576,10 @@ pub(crate) fn contextualize_c<T: DisplaySink>(instr: &Instruction, out: &mut T) out.write_str("jmp ")?; write_jmp_operand(instr.operand(0), out)?; }, + Opcode::JECXZ => { + out.write_str("if ecx == 0 then jmp ")?; + write_jmp_operand(instr.operand(0), out)?; + }, Opcode::JCXZ => { out.write_str("if cx == 0 then jmp ")?; write_jmp_operand(instr.operand(0), out)?; @@ -2766,8 +2774,9 @@ impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::St } } -static RELATIVE_BRANCHES: [Opcode; 22] = [ - Opcode::JMP, Opcode::CALL, Opcode::JCXZ, +static RELATIVE_BRANCHES: [Opcode; 23] = [ + Opcode::JMP, Opcode::CALL, + Opcode::JECXZ, Opcode::JCXZ, Opcode::LOOP, Opcode::LOOPZ, Opcode::LOOPNZ, Opcode::JO, Opcode::JNO, Opcode::JB, Opcode::JNB, |
