diff options
Diffstat (limited to 'src/long_mode')
-rw-r--r-- | src/long_mode/display.rs | 5 | ||||
-rw-r--r-- | src/long_mode/mod.rs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index f765fb7..4f4e739 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -4245,9 +4245,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::JRCXZ, +static RELATIVE_BRANCHES: [Opcode; 22] = [ + Opcode::JMP, Opcode::CALL, Opcode::JRCXZ, Opcode::LOOP, Opcode::LOOPZ, Opcode::LOOPNZ, Opcode::JO, Opcode::JNO, Opcode::JB, Opcode::JNB, diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index fab8fde..3c25506 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -7660,6 +7660,8 @@ fn read_operands< .with_id(modrm_start - 8) ); if instruction.operands[0] == OperandSpec::RegMMM { + // in 64-bit mode, operand size overrides do not actually shink the operand for + // `call`/`jmp`. if opcode == Opcode::CALL || opcode == Opcode::JMP { instruction.regs[1].bank = RegisterBank::Q; if opcode == Opcode::CALL { |