From 46b862fe5e85b63777bb90fb721f4250eff50d27 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Wed, 20 Nov 2019 20:41:03 +0000 Subject: [PATCH] do not truncate disasm branch target in 64-bit mode --- bochs/cpu/decoder/disasm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bochs/cpu/decoder/disasm.cc b/bochs/cpu/decoder/disasm.cc index a31a07a6c..eaa7f0fec 100644 --- a/bochs/cpu/decoder/disasm.cc +++ b/bochs/cpu/decoder/disasm.cc @@ -475,7 +475,7 @@ char *disasm_branch_target(char *disbufptr, const bxInstruction_c *i, unsigned s case BX_IMMBD_SE: // 8-bit signed value sign extended to 32-bit size disbufptr = dis_sprintf(disbufptr, ".%+d", (Bit32s) i->Id()); if (cs_base != BX_JUMP_TARGET_NOT_REQ) { - Bit32u target = rip + i->ilen() + (Bit32s) i->Id(); + bx_address target = rip + i->ilen() + (Bit32s) i->Id(); disbufptr = dis_sprintf(disbufptr, " (0x" FMT_ADDRX ")", (Bit64u) (cs_base + target)); } break;