From: Stefan Weil Date: Wed, 12 May 2010 18:34:39 +0000 (+0200) Subject: target-sparc: Fix wrong printf argument X-Git-Tag: v0.13.0-rc0~566 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=113c61069cb46f871f9c976f6b99097ec3a3cb8f;p=thirdparty%2Fqemu.git target-sparc: Fix wrong printf argument cpu_get_ccr() returns a target_ulong, so a type cast is needed to avoid wrong output on big endian hosts. We could also use TARGET_FMT_lx, but that would print 8 instead of 2 digits. Cc: Blue Swirl Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl --- diff --git a/target-sparc/helper.c b/target-sparc/helper.c index 46421225c47..582de1082c1 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -1490,7 +1490,7 @@ void cpu_dump_state(CPUState *env, FILE *f, } #ifdef TARGET_SPARC64 cpu_fprintf(f, "pstate: %08x ccr: %02x (icc: ", env->pstate, - cpu_get_ccr(env)); + (unsigned)cpu_get_ccr(env)); cpu_print_cc(f, cpu_fprintf, cpu_get_ccr(env) << PSR_CARRY_SHIFT); cpu_fprintf(f, " xcc: "); cpu_print_cc(f, cpu_fprintf, cpu_get_ccr(env) << (PSR_CARRY_SHIFT - 4));