summaryrefslogtreecommitdiffstats
path: root/target-ppc/cpu.h
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-23 17:33:12 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-23 17:33:12 +0000
commit9b605b9eaee7845353f32aed23e8b9085bfa44ee (patch)
treee4150ea6372a563393d2ef2ca0df258190288feb /target-ppc/cpu.h
parent493ae1f01cad47c3b4143059e986ba76e4d5202e (diff)
downloadhqemu-9b605b9eaee7845353f32aed23e8b9085bfa44ee.zip
hqemu-9b605b9eaee7845353f32aed23e8b9085bfa44ee.tar.gz
Fix ppc32 register dumps on 64-bit hosts.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3723 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/cpu.h')
-rw-r--r--target-ppc/cpu.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 365d836..0630a6e 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -30,7 +30,6 @@
typedef uint64_t ppc_gpr_t;
#define TARGET_GPR_BITS 64
#define TARGET_LONG_BITS 64
-#define REGX "%016" PRIx64
#define TARGET_PAGE_BITS 12
#else /* defined (TARGET_PPC64) */
@@ -43,11 +42,9 @@ typedef uint64_t ppc_gpr_t;
*/
typedef uint64_t ppc_gpr_t;
#define TARGET_GPR_BITS 64
-#define REGX "%08" PRIx64
#else /* (HOST_LONG_BITS >= 64) */
typedef uint32_t ppc_gpr_t;
#define TARGET_GPR_BITS 32
-#define REGX "%08" PRIx32
#endif /* (HOST_LONG_BITS >= 64) */
#define TARGET_LONG_BITS 32
@@ -72,6 +69,10 @@ typedef uint32_t ppc_gpr_t;
#endif /* defined (TARGET_PPC64) */
+/* A ppc_gpr_t should not be printed directly as the high bits may be
+ garbage. It should always be cast to a target_ulong first. */
+#define REGX TARGET_FMT_lx
+
#include "cpu-defs.h"
#define ADDRX TARGET_FMT_lx
OpenPOWER on IntegriCloud