--- upstream/dynamips-0.2.7-RC1/ppc32.c 2007/10/06 16:23:47 7 +++ trunk/ppc32.c 2007/10/06 16:45:40 12 @@ -42,6 +42,9 @@ /* Initialize a PowerPC processor */ int ppc32_init(cpu_ppc_t *cpu) { + /* Initialize JIT operations */ + jit_op_init_cpu(cpu->gen); + /* Initialize idle timer */ cpu->gen->idle_max = 1500; cpu->gen->idle_sleep_time = 30000; @@ -50,6 +53,9 @@ cpu->timer_irq_check_itv = 1000; cpu->timer_irq_freq = 250; + /* Enable/disable direct block jump */ + cpu->exec_blk_direct_jump = cpu->vm->exec_blk_direct_jump; + /* Idle loop mutex and condition */ pthread_mutex_init(&cpu->gen->idle_mutex,NULL); pthread_cond_init(&cpu->gen->idle_cond,NULL); @@ -64,6 +70,9 @@ cpu->gen->set_idle_pc = (void *)ppc32_set_idle_pc; cpu->gen->get_idling_pc = (void *)ppc32_get_idling_pc; + /* zzz */ + memset(cpu->vtlb,0xFF,sizeof(cpu->vtlb)); + /* Set the startup parameters */ ppc32_reset(cpu); return(0); @@ -226,7 +235,21 @@ printf("Restart the emulator with \"--idle-pc=0x%llx\" (for example)\n", cpu->idle_pc_prop[0].pc); } else { - printf("Done. No suggestion for idling PC\n"); + printf("Done. No suggestion for idling PC, dumping the full table:\n"); + + for(i=0;inext) { + printf(" 0x%8.8x (%3u)\n",p->ia,p->count); + + if (cpu->idle_pc_prop_count < CPU_IDLE_PC_MAX_RES) { + res = &cpu->idle_pc_prop[cpu->idle_pc_prop_count++]; + + res->pc = p->ia; + res->count = p->count; + } + } + + printf("\n"); } /* Re-enable IRQ */ @@ -400,7 +423,7 @@ printf("\n"); printf(" ia = 0x%8.8x, lr = 0x%8.8x\n", pcpu->ia, pcpu->lr); printf(" cr = 0x%8.8x, msr = 0x%8.8x, xer = 0x%8.8x, dec = 0x%8.8x\n", - pcpu->cr, pcpu->msr, + ppc32_get_cr(pcpu), pcpu->msr, pcpu->xer | (pcpu->xer_ca << PPC32_XER_CA_BIT), pcpu->dec); @@ -418,6 +441,8 @@ printf(" Timer IRQ count: %llu, pending: %u, timer drift: %u\n\n", pcpu->timer_irq_count,pcpu->timer_irq_pending,pcpu->timer_drift); + printf(" Device access count: %llu\n",cpu->dev_access_counter); + printf("\n"); }