Revision 6b542af7 target-ppc/translate.c

b/target-ppc/translate.c
3265 3265
             */
3266 3266
            if (sprn != SPR_PVR) {
3267 3267
                if (loglevel != 0) {
3268
                    fprintf(logfile, "Trying to read privileged spr %d %03x at"
3268
                    fprintf(logfile, "Trying to read privileged spr %d %03x at "
3269 3269
                            ADDRX "\n", sprn, sprn, ctx->nip);
3270 3270
                }
3271 3271
                printf("Trying to read privileged spr %d %03x at " ADDRX "\n",
......
3741 3741
    GEN_EXCP_PRIVOPC(ctx);
3742 3742
#else
3743 3743
    if (unlikely(!ctx->supervisor)) {
3744
        if (loglevel != 0)
3745
            fprintf(logfile, "%s: ! supervisor\n", __func__);
3746 3744
        GEN_EXCP_PRIVOPC(ctx);
3747 3745
        return;
3748 3746
    }
......
3795 3793
    GEN_EXCP_PRIVOPC(ctx);
3796 3794
#else
3797 3795
    if (unlikely(!ctx->supervisor)) {
3798
        if (loglevel != 0)
3799
            fprintf(logfile, "%s: ! supervisor\n", __func__);
3800 3796
        GEN_EXCP_PRIVOPC(ctx);
3801 3797
        return;
3802 3798
    }
......
6060 6056
                     int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
6061 6057
                     int flags)
6062 6058
{
6063
#if defined(TARGET_PPC64) || 1
6064
#define FILL ""
6065 6059
#define RGPL  4
6066 6060
#define RFPL  4
6067
#else
6068
#define FILL "        "
6069
#define RGPL  8
6070
#define RFPL  4
6071
#endif
6072 6061

  
6073 6062
    int i;
6074 6063

  
6075 6064
    cpu_fprintf(f, "NIP " ADDRX "   LR " ADDRX " CTR " ADDRX " XER %08x\n",
6076 6065
                env->nip, env->lr, env->ctr, hreg_load_xer(env));
6077
    cpu_fprintf(f, "MSR " REGX FILL " HID0 " REGX FILL "  HF " REGX FILL
6078
                " idx %d\n",
6079
                env->msr, env->hflags, env->spr[SPR_HID0], env->mmu_idx);
6066
    cpu_fprintf(f, "MSR " ADDRX " HID0 " ADDRX "  HF " ADDRX " idx %d\n",
6067
                env->msr, env->spr[SPR_HID0], env->hflags, env->mmu_idx);
6080 6068
#if !defined(NO_TIMER_DUMP)
6081 6069
    cpu_fprintf(f, "TB %08x %08x "
6082 6070
#if !defined(CONFIG_USER_ONLY)
......
6092 6080
    for (i = 0; i < 32; i++) {
6093 6081
        if ((i & (RGPL - 1)) == 0)
6094 6082
            cpu_fprintf(f, "GPR%02d", i);
6095
        cpu_fprintf(f, " " REGX, (target_ulong)env->gpr[i]);
6083
        cpu_fprintf(f, " " REGX, ppc_dump_gpr(env, i));
6096 6084
        if ((i & (RGPL - 1)) == (RGPL - 1))
6097 6085
            cpu_fprintf(f, "\n");
6098 6086
    }
......
6110 6098
            a = 'E';
6111 6099
        cpu_fprintf(f, " %c%c", a, env->crf[i] & 0x01 ? 'O' : ' ');
6112 6100
    }
6113
    cpu_fprintf(f, " ]             " FILL "RES " REGX "\n", env->reserve);
6101
    cpu_fprintf(f, " ]             RES " ADDRX "\n", env->reserve);
6114 6102
    for (i = 0; i < 32; i++) {
6115 6103
        if ((i & (RFPL - 1)) == 0)
6116 6104
            cpu_fprintf(f, "FPR%02d", i);
......
6119 6107
            cpu_fprintf(f, "\n");
6120 6108
    }
6121 6109
#if !defined(CONFIG_USER_ONLY)
6122
    cpu_fprintf(f, "SRR0 " REGX " SRR1 " REGX " SDR1 " REGX "\n",
6110
    cpu_fprintf(f, "SRR0 " ADDRX " SRR1 " ADDRX " SDR1 " ADDRX "\n",
6123 6111
                env->spr[SPR_SRR0], env->spr[SPR_SRR1], env->sdr1);
6124 6112
#endif
6125 6113

  
6126 6114
#undef RGPL
6127 6115
#undef RFPL
6128
#undef FILL
6129 6116
}
6130 6117

  
6131 6118
void cpu_dump_statistics (CPUState *env, FILE*f,
......
6289 6276
        if (unlikely(handler->handler == &gen_invalid)) {
6290 6277
            if (loglevel != 0) {
6291 6278
                fprintf(logfile, "invalid/unsupported opcode: "
6292
                        "%02x - %02x - %02x (%08x) 0x" ADDRX " %d\n",
6279
                        "%02x - %02x - %02x (%08x) " ADDRX " %d\n",
6293 6280
                        opc1(ctx.opcode), opc2(ctx.opcode),
6294 6281
                        opc3(ctx.opcode), ctx.opcode, ctx.nip - 4, (int)msr_ir);
6295 6282
            } else {
6296 6283
                printf("invalid/unsupported opcode: "
6297
                       "%02x - %02x - %02x (%08x) 0x" ADDRX " %d\n",
6284
                       "%02x - %02x - %02x (%08x) " ADDRX " %d\n",
6298 6285
                       opc1(ctx.opcode), opc2(ctx.opcode),
6299 6286
                       opc3(ctx.opcode), ctx.opcode, ctx.nip - 4, (int)msr_ir);
6300 6287
            }
......
6302 6289
            if (unlikely((ctx.opcode & handler->inval) != 0)) {
6303 6290
                if (loglevel != 0) {
6304 6291
                    fprintf(logfile, "invalid bits: %08x for opcode: "
6305
                            "%02x - %02x - %02x (%08x) 0x" ADDRX "\n",
6292
                            "%02x - %02x - %02x (%08x) " ADDRX "\n",
6306 6293
                            ctx.opcode & handler->inval, opc1(ctx.opcode),
6307 6294
                            opc2(ctx.opcode), opc3(ctx.opcode),
6308 6295
                            ctx.opcode, ctx.nip - 4);
6309 6296
                } else {
6310 6297
                    printf("invalid bits: %08x for opcode: "
6311
                           "%02x - %02x - %02x (%08x) 0x" ADDRX "\n",
6298
                           "%02x - %02x - %02x (%08x) " ADDRX "\n",
6312 6299
                           ctx.opcode & handler->inval, opc1(ctx.opcode),
6313 6300
                           opc2(ctx.opcode), opc3(ctx.opcode),
6314 6301
                           ctx.opcode, ctx.nip - 4);

Also available in: Unified diff