/[dynamips]/upstream/dynamips-0.2.7-RC3/ppc32.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/dynamips-0.2.7-RC3/ppc32.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.7-RC1/ppc32.c revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC upstream/dynamips-0.2.7-RC2/ppc32.c revision 8 by dpavlin, Sat Oct 6 16:24:54 2007 UTC
# Line 50  int ppc32_init(cpu_ppc_t *cpu) Line 50  int ppc32_init(cpu_ppc_t *cpu)
50     cpu->timer_irq_check_itv = 1000;     cpu->timer_irq_check_itv = 1000;
51     cpu->timer_irq_freq      = 250;     cpu->timer_irq_freq      = 250;
52    
53       /* Enable/disable direct block jump */
54       cpu->exec_blk_direct_jump = cpu->vm->exec_blk_direct_jump;
55    
56     /* Idle loop mutex and condition */     /* Idle loop mutex and condition */
57     pthread_mutex_init(&cpu->gen->idle_mutex,NULL);     pthread_mutex_init(&cpu->gen->idle_mutex,NULL);
58     pthread_cond_init(&cpu->gen->idle_cond,NULL);     pthread_cond_init(&cpu->gen->idle_cond,NULL);
# Line 226  int ppc32_get_idling_pc(cpu_gen_t *cpu) Line 229  int ppc32_get_idling_pc(cpu_gen_t *cpu)
229        printf("Restart the emulator with \"--idle-pc=0x%llx\" (for example)\n",        printf("Restart the emulator with \"--idle-pc=0x%llx\" (for example)\n",
230               cpu->idle_pc_prop[0].pc);               cpu->idle_pc_prop[0].pc);
231     } else {     } else {
232        printf("Done. No suggestion for idling PC\n");        printf("Done. No suggestion for idling PC, dumping the full table:\n");
233    
234          for(i=0;i<IDLE_HASH_SIZE;i++)
235             for(p=pc_hash[i];p;p=p->next) {
236                printf("  0x%8.8x (%3u)\n",p->ia,p->count);
237    
238                if (cpu->idle_pc_prop_count < CPU_IDLE_PC_MAX_RES) {
239                   res = &cpu->idle_pc_prop[cpu->idle_pc_prop_count++];
240    
241                   res->pc    = p->ia;
242                   res->count = p->count;
243                }
244             }
245          
246          printf("\n");
247     }     }
248    
249     /* Re-enable IRQ */     /* Re-enable IRQ */
# Line 400  void ppc32_dump_regs(cpu_gen_t *cpu) Line 417  void ppc32_dump_regs(cpu_gen_t *cpu)
417     printf("\n");     printf("\n");
418     printf("  ia = 0x%8.8x, lr = 0x%8.8x\n", pcpu->ia, pcpu->lr);     printf("  ia = 0x%8.8x, lr = 0x%8.8x\n", pcpu->ia, pcpu->lr);
419     printf("  cr = 0x%8.8x, msr = 0x%8.8x, xer = 0x%8.8x, dec = 0x%8.8x\n",     printf("  cr = 0x%8.8x, msr = 0x%8.8x, xer = 0x%8.8x, dec = 0x%8.8x\n",
420            pcpu->cr, pcpu->msr,            ppc32_get_cr(pcpu), pcpu->msr,
421            pcpu->xer | (pcpu->xer_ca << PPC32_XER_CA_BIT),            pcpu->xer | (pcpu->xer_ca << PPC32_XER_CA_BIT),
422            pcpu->dec);            pcpu->dec);
423    
# Line 418  void ppc32_dump_regs(cpu_gen_t *cpu) Line 435  void ppc32_dump_regs(cpu_gen_t *cpu)
435     printf("  Timer IRQ count: %llu, pending: %u, timer drift: %u\n\n",     printf("  Timer IRQ count: %llu, pending: %u, timer drift: %u\n\n",
436            pcpu->timer_irq_count,pcpu->timer_irq_pending,pcpu->timer_drift);            pcpu->timer_irq_count,pcpu->timer_irq_pending,pcpu->timer_drift);
437    
438       printf("  Device access count: %llu\n",cpu->dev_access_counter);
439    
440     printf("\n");     printf("\n");
441  }  }
442    

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26