Revision 0411a972 target-ppc/translate.c

b/target-ppc/translate.c
6538 6538
GEN_OPCODE_MARK(end);
6539 6539

  
6540 6540
#include "translate_init.c"
6541
#include "helper_regs.h"
6541 6542

  
6542 6543
/*****************************************************************************/
6543 6544
/* Misc PowerPC helpers */
6544
static always_inline uint32_t load_xer (CPUState *env)
6545
{
6546
    return (xer_so << XER_SO) |
6547
        (xer_ov << XER_OV) |
6548
        (xer_ca << XER_CA) |
6549
        (xer_bc << XER_BC) |
6550
        (xer_cmp << XER_CMP);
6551
}
6552

  
6553 6545
void cpu_dump_state (CPUState *env, FILE *f,
6554 6546
                     int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
6555 6547
                     int flags)
......
6566 6558

  
6567 6559
    int i;
6568 6560

  
6569
    cpu_fprintf(f, "NIP " ADDRX " LR " ADDRX " CTR " ADDRX "\n",
6570
                env->nip, env->lr, env->ctr);
6561
    cpu_fprintf(f, "NIP " ADDRX " LR " ADDRX " CTR " ADDRX " idx %d\n",
6562
                env->nip, env->lr, env->ctr, env->mmu_idx);
6571 6563
    cpu_fprintf(f, "MSR " REGX FILL " XER %08x      "
6572 6564
#if !defined(NO_TIMER_DUMP)
6573 6565
                "TB %08x %08x "
......
6576 6568
#endif
6577 6569
#endif
6578 6570
                "\n",
6579
                do_load_msr(env), load_xer(env)
6571
                env->msr, hreg_load_xer(env)
6580 6572
#if !defined(NO_TIMER_DUMP)
6581 6573
                , cpu_ppc_load_tbu(env), cpu_ppc_load_tbl(env)
6582 6574
#if !defined(CONFIG_USER_ONLY)
......
6753 6745
        if (loglevel & CPU_LOG_TB_IN_ASM) {
6754 6746
            fprintf(logfile, "----------------\n");
6755 6747
            fprintf(logfile, "nip=" ADDRX " super=%d ir=%d\n",
6756
                    ctx.nip, 1 - msr_pr, msr_ir);
6748
                    ctx.nip, supervisor, (int)msr_ir);
6757 6749
        }
6758 6750
#endif
6759 6751
        ctx.opcode = ldl_code(ctx.nip);
......
6787 6779
                fprintf(logfile, "invalid/unsupported opcode: "
6788 6780
                        "%02x - %02x - %02x (%08x) 0x" ADDRX " %d\n",
6789 6781
                        opc1(ctx.opcode), opc2(ctx.opcode),
6790
                        opc3(ctx.opcode), ctx.opcode, ctx.nip - 4, msr_ir);
6782
                        opc3(ctx.opcode), ctx.opcode, ctx.nip - 4, (int)msr_ir);
6791 6783
            } else {
6792 6784
                printf("invalid/unsupported opcode: "
6793 6785
                       "%02x - %02x - %02x (%08x) 0x" ADDRX " %d\n",
6794 6786
                       opc1(ctx.opcode), opc2(ctx.opcode),
6795
                       opc3(ctx.opcode), ctx.opcode, ctx.nip - 4, msr_ir);
6787
                       opc3(ctx.opcode), ctx.opcode, ctx.nip - 4, (int)msr_ir);
6796 6788
            }
6797 6789
        } else {
6798 6790
            if (unlikely((ctx.opcode & handler->inval) != 0)) {

Also available in: Unified diff