From 26a76461f259031f2c30cd5843a5ca91e056cf03 Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 25 Jun 2006 18:15:32 +0000 Subject: C99 64 bit printf git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2018 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-i386/helper.c | 4 ++-- target-i386/helper2.c | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'target-i386') diff --git a/target-i386/helper.c b/target-i386/helper.c index 379cfd5a45..d7b41ea0b4 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -3259,7 +3259,7 @@ static void mul64(uint64_t *plow, uint64_t *phigh, uint64_t a, uint64_t b) v = (uint64_t)a1 * (uint64_t)b1; *phigh += v; #ifdef DEBUG_MULDIV - printf("mul: 0x%016llx * 0x%016llx = 0x%016llx%016llx\n", + printf("mul: 0x%016" PRIx64 " * 0x%016" PRIx64 " = 0x%016" PRIx64 "%016" PRIx64 "\n", a, b, *phigh, *plow); #endif } @@ -3308,7 +3308,7 @@ static int div64(uint64_t *plow, uint64_t *phigh, uint64_t b) a0 = (a0 << 1) | qb; } #if defined(DEBUG_MULDIV) - printf("div: 0x%016llx%016llx / 0x%016llx: q=0x%016llx r=0x%016llx\n", + printf("div: 0x%016" PRIx64 "%016" PRIx64 " / 0x%016" PRIx64 ": q=0x%016" PRIx64 " r=0x%016" PRIx64 "\n", *phigh, *plow, b, a0, a1); #endif *plow = a0; diff --git a/target-i386/helper2.c b/target-i386/helper2.c index ac7d0568b2..19af159f92 100644 --- a/target-i386/helper2.c +++ b/target-i386/helper2.c @@ -264,11 +264,11 @@ void cpu_dump_state(CPUState *env, FILE *f, #ifdef TARGET_X86_64 if (env->hflags & HF_CS64_MASK) { cpu_fprintf(f, - "RAX=%016llx RBX=%016llx RCX=%016llx RDX=%016llx\n" - "RSI=%016llx RDI=%016llx RBP=%016llx RSP=%016llx\n" - "R8 =%016llx R9 =%016llx R10=%016llx R11=%016llx\n" - "R12=%016llx R13=%016llx R14=%016llx R15=%016llx\n" - "RIP=%016llx RFL=%08x [%c%c%c%c%c%c%c] CPL=%d II=%d A20=%d HLT=%d\n", + "RAX=%016" PRIx64 " RBX=%016" PRIx64 " RCX=%016" PRIx64 " RDX=%016" PRIx64 "\n" + "RSI=%016" PRIx64 " RDI=%016" PRIx64 " RBP=%016" PRIx64 " RSP=%016" PRIx64 "\n" + "R8 =%016" PRIx64 " R9 =%016" PRIx64 " R10=%016" PRIx64 " R11=%016" PRIx64 "\n" + "R12=%016" PRIx64 " R13=%016" PRIx64 " R14=%016" PRIx64 " R15=%016" PRIx64 "\n" + "RIP=%016" PRIx64 " RFL=%08x [%c%c%c%c%c%c%c] CPL=%d II=%d A20=%d HLT=%d\n", env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX], @@ -329,28 +329,28 @@ void cpu_dump_state(CPUState *env, FILE *f, if (env->hflags & HF_LMA_MASK) { for(i = 0; i < 6; i++) { SegmentCache *sc = &env->segs[i]; - cpu_fprintf(f, "%s =%04x %016llx %08x %08x\n", + cpu_fprintf(f, "%s =%04x %016" PRIx64 " %08x %08x\n", seg_name[i], sc->selector, sc->base, sc->limit, sc->flags); } - cpu_fprintf(f, "LDT=%04x %016llx %08x %08x\n", + cpu_fprintf(f, "LDT=%04x %016" PRIx64 " %08x %08x\n", env->ldt.selector, env->ldt.base, env->ldt.limit, env->ldt.flags); - cpu_fprintf(f, "TR =%04x %016llx %08x %08x\n", + cpu_fprintf(f, "TR =%04x %016" PRIx64 " %08x %08x\n", env->tr.selector, env->tr.base, env->tr.limit, env->tr.flags); - cpu_fprintf(f, "GDT= %016llx %08x\n", + cpu_fprintf(f, "GDT= %016" PRIx64 " %08x\n", env->gdt.base, env->gdt.limit); - cpu_fprintf(f, "IDT= %016llx %08x\n", + cpu_fprintf(f, "IDT= %016" PRIx64 " %08x\n", env->idt.base, env->idt.limit); - cpu_fprintf(f, "CR0=%08x CR2=%016llx CR3=%016llx CR4=%08x\n", + cpu_fprintf(f, "CR0=%08x CR2=%016" PRIx64 " CR3=%016" PRIx64 " CR4=%08x\n", (uint32_t)env->cr[0], env->cr[2], env->cr[3], @@ -394,7 +394,7 @@ void cpu_dump_state(CPUState *env, FILE *f, snprintf(cc_op_name, sizeof(cc_op_name), "[%d]", env->cc_op); #ifdef TARGET_X86_64 if (env->hflags & HF_CS64_MASK) { - cpu_fprintf(f, "CCS=%016llx CCD=%016llx CCO=%-8s\n", + cpu_fprintf(f, "CCS=%016" PRIx64 " CCD=%016" PRIx64 " CCO=%-8s\n", env->cc_src, env->cc_dst, cc_op_name); } else @@ -427,10 +427,10 @@ void cpu_dump_state(CPUState *env, FILE *f, } l; } tmp; tmp.d = env->fpregs[i].d; - cpu_fprintf(f, "FPR%d=%016llx %04x", + cpu_fprintf(f, "FPR%d=%016" PRIx64 " %04x", i, tmp.l.lower, tmp.l.upper); #else - cpu_fprintf(f, "FPR%d=%016llx", + cpu_fprintf(f, "FPR%d=%016" PRIx64, i, env->fpregs[i].mmx.q); #endif if ((i & 1) == 1) -- cgit v1.2.3