From: Paolo Bonzini Date: Fri, 2 May 2025 19:58:09 +0000 (+0200) Subject: target/i386/emulate: fix target_ulong format strings X-Git-Tag: v10.1.0-rc0~101^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7abf0d95ac6437b38437ad75711c081363995285;p=thirdparty%2Fqemu.git target/i386/emulate: fix target_ulong format strings Do not assume that TARGET_FMT_lx is %llx. Signed-off-by: Paolo Bonzini --- diff --git a/target/i386/emulate/x86_decode.c b/target/i386/emulate/x86_decode.c index 7efa2f570ea..88be9479a82 100644 --- a/target/i386/emulate/x86_decode.c +++ b/target/i386/emulate/x86_decode.c @@ -26,7 +26,7 @@ static void decode_invalid(CPUX86State *env, struct x86_decode *decode) { - printf("%llx: failed to decode instruction ", env->eip); + printf(TARGET_FMT_lx ": failed to decode instruction ", env->eip); for (int i = 0; i < decode->opcode_len; i++) { printf("%x ", decode->opcode[i]); } diff --git a/target/i386/emulate/x86_emu.c b/target/i386/emulate/x86_emu.c index 26a4876aac0..7773b51b95e 100644 --- a/target/i386/emulate/x86_emu.c +++ b/target/i386/emulate/x86_emu.c @@ -1241,7 +1241,7 @@ static void init_cmd_handler(void) bool exec_instruction(CPUX86State *env, struct x86_decode *ins) { if (!_cmd_handler[ins->cmd].handler) { - printf("Unimplemented handler (%llx) for %d (%x %x) \n", env->eip, + printf("Unimplemented handler (" TARGET_FMT_lx ") for %d (%x %x) \n", env->eip, ins->cmd, ins->opcode[0], ins->opcode_len > 1 ? ins->opcode[1] : 0); env->eip += ins->len;