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/protected_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/protected_mode/display.rs')
| -rw-r--r-- | src/protected_mode/display.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs index 46449d1..bbb43ab 100644 --- a/src/protected_mode/display.rs +++ b/src/protected_mode/display.rs @@ -2092,6 +2092,10 @@ const MNEMONICS: &[&'static str] = &[ "pvalidate", "rmpadjust", "rmpupdate", + + "pushad", + "popad", + "jcxz", ]; impl Opcode { @@ -2574,6 +2578,10 @@ pub(crate) fn contextualize_c<T: DisplaySink>(instr: &Instruction, out: &mut T) 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)?; + }, Opcode::LOOP => { out.write_str("ecx--; if ecx != 0 then jmp ")?; write_jmp_operand(instr.operand(0), out)?; @@ -2764,8 +2772,9 @@ impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::St } } -static RELATIVE_BRANCHES: [Opcode; 22] = [ - Opcode::JMP, Opcode::CALL, Opcode::JECXZ, +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, |
