Commit 69facb7897ef6404175b4739751f9255fc0c8a2e

Authored by j_mayer
1 parent 9b605b9e

Revert foolish patch.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3724 c046a42c-6fe2-441c-8c8c-71466251a162
hw/ppc_oldworld.c
... ... @@ -93,8 +93,7 @@ static int vga_osi_call (CPUState *env)
93 93 /* R6 = x, R7 = y, R8 = visible, R9 = data */
94 94 break;
95 95 default:
96   - fprintf(stderr, "unsupported OSI call R5=" REGX "\n",
97   - (target_ulong)env->gpr[5]);
  96 + fprintf(stderr, "unsupported OSI call R5=" REGX "\n", env->gpr[5]);
98 97 break;
99 98 }
100 99  
... ...
target-ppc/cpu.h
... ... @@ -30,6 +30,7 @@
30 30 typedef uint64_t ppc_gpr_t;
31 31 #define TARGET_GPR_BITS 64
32 32 #define TARGET_LONG_BITS 64
  33 +#define REGX "%016" PRIx64
33 34 #define TARGET_PAGE_BITS 12
34 35  
35 36 #else /* defined (TARGET_PPC64) */
... ... @@ -42,9 +43,11 @@ typedef uint64_t ppc_gpr_t;
42 43 */
43 44 typedef uint64_t ppc_gpr_t;
44 45 #define TARGET_GPR_BITS 64
  46 +#define REGX "%08" PRIx64
45 47 #else /* (HOST_LONG_BITS >= 64) */
46 48 typedef uint32_t ppc_gpr_t;
47 49 #define TARGET_GPR_BITS 32
  50 +#define REGX "%08" PRIx32
48 51 #endif /* (HOST_LONG_BITS >= 64) */
49 52  
50 53 #define TARGET_LONG_BITS 32
... ... @@ -69,10 +72,6 @@ typedef uint32_t ppc_gpr_t;
69 72  
70 73 #endif /* defined (TARGET_PPC64) */
71 74  
72   -/* A ppc_gpr_t should not be printed directly as the high bits may be
73   - garbage. It should always be cast to a target_ulong first. */
74   -#define REGX TARGET_FMT_lx
75   -
76 75 #include "cpu-defs.h"
77 76  
78 77 #define ADDRX TARGET_FMT_lx
... ...
target-ppc/helper.c
... ... @@ -2169,9 +2169,8 @@ static always_inline void dump_syscall (CPUState *env)
2169 2169 {
2170 2170 fprintf(logfile, "syscall r0=0x" REGX " r3=0x" REGX " r4=0x" REGX
2171 2171 " r5=0x" REGX " r6=0x" REGX " nip=0x" ADDRX "\n",
2172   - (target_ulong)env->gpr[0], (target_ulong)env->gpr[3],
2173   - (target_ulong)env->gpr[4], (target_ulong)env->gpr[5],
2174   - (target_ulong)env->gpr[6], env->nip);
  2172 + env->gpr[0], env->gpr[3], env->gpr[4],
  2173 + env->gpr[5], env->gpr[6], env->nip);
2175 2174 }
2176 2175  
2177 2176 /* Note that this function should be greatly optimized
... ...
target-ppc/op_helper.c
... ... @@ -2920,8 +2920,7 @@ void do_4xx_tlbwe_hi (void)
2920 2920  
2921 2921 #if defined (DEBUG_SOFTWARE_TLB)
2922 2922 if (loglevel != 0) {
2923   - fprintf(logfile, "%s T0 " REGX " T1 " REGX "\n", __func__,
2924   - (target_ulong)T0, (target_ulong)T1);
  2923 + fprintf(logfile, "%s T0 " REGX " T1 " REGX "\n", __func__, T0, T1);
2925 2924 }
2926 2925 #endif
2927 2926 T0 &= 0x3F;
... ... @@ -2990,8 +2989,7 @@ void do_4xx_tlbwe_lo (void)
2990 2989  
2991 2990 #if defined (DEBUG_SOFTWARE_TLB)
2992 2991 if (loglevel != 0) {
2993   - fprintf(logfile, "%s T0 " REGX " T1 " REGX "\n", __func__,
2994   - (targt_ulong)T0, (target_ulong)T1);
  2992 + fprintf(logfile, "%s T0 " REGX " T1 " REGX "\n", __func__, T0, T1);
2995 2993 }
2996 2994 #endif
2997 2995 T0 &= 0x3F;
... ... @@ -3025,7 +3023,7 @@ void do_440_tlbwe (int word)
3025 3023 #if defined (DEBUG_SOFTWARE_TLB)
3026 3024 if (loglevel != 0) {
3027 3025 fprintf(logfile, "%s word %d T0 " REGX " T1 " REGX "\n",
3028   - __func__, word, (target_ulong)T0, (target_ulong)T1);
  3026 + __func__, word, T0, T1);
3029 3027 }
3030 3028 #endif
3031 3029 do_flush_tlbs = 0;
... ...