diff options
author | Yuri Zaporozhets <yuriz@qrv-systems.net> | 2024-12-01 23:28:49 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-12-15 11:39:23 -0600 |
commit | ae12873de7e57c40f527e913ddcc4be067a70ab1 (patch) | |
tree | c4ae5764e2306a9c1dbd5cd8264c88e16484a995 /drivers/bios_emulator/x86emu/ops.c | |
parent | 5fb5180a1616b714a289ae4c8ff447e5ee0bddb0 (diff) |
bios_emulator: fix incorrect printing of address in "jump near immediate"
In the x86emuOp_jump_call_near_IMM() function the target address is
printed incorrectly when jumping backwards. For example instead of
"jmp 0xe8bc" the string "jmp ffffe8bc" is printed. That's because
of the following macro:
DECODE_PRINTF2("%04x\n", ip);
while it should be
DECODE_PRINTF2("%04x\n", (u16)ip);
Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
Diffstat (limited to 'drivers/bios_emulator/x86emu/ops.c')
-rw-r--r-- | drivers/bios_emulator/x86emu/ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bios_emulator/x86emu/ops.c b/drivers/bios_emulator/x86emu/ops.c index 31b52df9bfe..f332be5a6f5 100644 --- a/drivers/bios_emulator/x86emu/ops.c +++ b/drivers/bios_emulator/x86emu/ops.c @@ -4221,7 +4221,7 @@ void x86emuOp_jump_near_IMM(u8 X86EMU_UNUSED(op1)) DECODE_PRINTF("JMP\t"); ip = (s16)fetch_word_imm(); ip += (s16)M.x86.R_IP; - DECODE_PRINTF2("%04x\n", ip); + DECODE_PRINTF2("%04x\n", (u16)ip); TRACE_AND_STEP(); M.x86.R_IP = (u16)ip; DECODE_CLEAR_SEGOVR(); |