]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/i386/emulate: fix target_ulong format strings
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 2 May 2025 19:58:09 +0000 (21:58 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 May 2025 14:02:04 +0000 (16:02 +0200)
Do not assume that TARGET_FMT_lx is %llx.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/emulate/x86_decode.c
target/i386/emulate/x86_emu.c

index 7efa2f570ea901d6418618860406934287c8c521..88be9479a8212e1ea3bc9cea585c070a7c99937d 100644 (file)
@@ -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]);
     }
index 26a4876aac096e1887b9bc09b1a6a4d1dc4578aa..7773b51b95ecfdd146881035ceae473e4c316435 100644 (file)
@@ -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;