diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-02 21:58:09 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-06 16:02:04 +0200 |
commit | 7abf0d95ac6437b38437ad75711c081363995285 (patch) | |
tree | 1ca16a305c109ddee10afae74837a12b2d99ea0c | |
parent | 1017041ff4f04e3bdff6404b366d53c836f5d2fe (diff) | |
download | qemu-7abf0d95ac6437b38437ad75711c081363995285.zip qemu-7abf0d95ac6437b38437ad75711c081363995285.tar.gz qemu-7abf0d95ac6437b38437ad75711c081363995285.tar.bz2 |
target/i386/emulate: fix target_ulong format strings
Do not assume that TARGET_FMT_lx is %llx.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | target/i386/emulate/x86_decode.c | 2 | ||||
-rw-r--r-- | target/i386/emulate/x86_emu.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/target/i386/emulate/x86_decode.c b/target/i386/emulate/x86_decode.c index 7efa2f5..88be947 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 26a4876..7773b51 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; |