aboutsummaryrefslogtreecommitdiff
path: root/src/protected_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/protected_mode')
-rw-r--r--src/protected_mode/display.rs5
-rw-r--r--src/protected_mode/mod.rs7
2 files changed, 4 insertions, 8 deletions
diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs
index 38b5891..1db34cb 100644
--- a/src/protected_mode/display.rs
+++ b/src/protected_mode/display.rs
@@ -2797,9 +2797,8 @@ impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::St
}
}
-// TODO: should include CALL
-static RELATIVE_BRANCHES: [Opcode; 21] = [
- Opcode::JMP, Opcode::JECXZ,
+static RELATIVE_BRANCHES: [Opcode; 22] = [
+ Opcode::JMP, Opcode::CALL, Opcode::JECXZ,
Opcode::LOOP, Opcode::LOOPZ, Opcode::LOOPNZ,
Opcode::JO, Opcode::JNO,
Opcode::JB, Opcode::JNB,
diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs
index f2b10f5..38f8310 100644
--- a/src/protected_mode/mod.rs
+++ b/src/protected_mode/mod.rs
@@ -7529,11 +7529,8 @@ fn read_operands<
.with_id(modrm_start - 8)
);
if instruction.operands[0] == OperandSpec::RegMMM {
- if opcode == Opcode::CALL || opcode == Opcode::JMP {
- instruction.regs[1].bank = RegisterBank::D;
- if opcode == Opcode::CALL {
- instruction.mem_size = 4;
- }
+ if opcode == Opcode::CALL {
+ instruction.mem_size = 4;
} else if opcode == Opcode::PUSH || opcode == Opcode::POP {
if instruction.prefixes.operand_size() {
instruction.mem_size = 2;