aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-19 05:46:03 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-19 05:46:03 +0000
commit71c8b8fd7bdf6165e32cc9c9ed6d701d0ad6b3e0 (patch)
tree8778bf6e4bc72d38831bbeb5fcd40221ced1efdd
parent5eb7995e34ebf8cf9a3fc43ed2c7af93149d1b0d (diff)
TARGET_FMT_lu may also be useful.
Fix compilation warnings. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3190 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--cpu-defs.h2
-rw-r--r--target-ppc/cpu.h3
-rw-r--r--target-ppc/op_helper.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/cpu-defs.h b/cpu-defs.h
index e474152d50..915877617c 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -45,11 +45,13 @@ typedef int32_t target_long;
typedef uint32_t target_ulong;
#define TARGET_FMT_lx "%08x"
#define TARGET_FMT_ld "%d"
+#define TARGET_FMT_lu "%u"
#elif TARGET_LONG_SIZE == 8
typedef int64_t target_long;
typedef uint64_t target_ulong;
#define TARGET_FMT_lx "%016" PRIx64
#define TARGET_FMT_ld "%" PRId64
+#define TARGET_FMT_lu "%" PRIu64
#else
#error TARGET_LONG_SIZE undefined
#endif
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 8b3fb03600..f36c979244 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -55,12 +55,13 @@ typedef uint64_t ppc_gpr_t;
*/
typedef uint64_t ppc_gpr_t;
#define TARGET_GPR_BITS 64
+#define REGX "%08" PRIx64
#else
typedef uint32_t ppc_gpr_t;
#define TARGET_GPR_BITS 32
+#define REGX "%08" PRIx32
#endif
#define TARGET_LONG_BITS 32
-#define REGX "%08" PRIx32
#define TARGET_PAGE_BITS 12
#endif
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 56f2a5519c..9e26deb9fb 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -2537,7 +2537,8 @@ void do_4xx_tlbwe_hi (void)
* of the ppc or ppc64 one
*/
if ((T1 & 0x40) && tlb->size < TARGET_PAGE_SIZE) {
- cpu_abort(env, "TLB size %u < %u are not supported (%d)\n",
+ cpu_abort(env, "TLB size " TARGET_FMT_lu " < %u "
+ "are not supported (%d)\n",
tlb->size, TARGET_PAGE_SIZE, (int)((T1 >> 7) & 0x7));
}
tlb->EPN = (T1 & 0xFFFFFC00) & ~(tlb->size - 1);