/[gxemul]/trunk/src/cpu.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 /trunk/src/cpu.c

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

revision 12 by dpavlin, Mon Oct 8 16:18:38 2007 UTC revision 18 by dpavlin, Mon Oct 8 16:19:11 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: cpu.c,v 1.316 2005/08/16 05:37:09 debug Exp $   *  $Id: cpu.c,v 1.322 2005/10/26 14:37:01 debug Exp $
29   *   *
30   *  Common routines for CPU emulation. (Not specific to any CPU type.)   *  Common routines for CPU emulation. (Not specific to any CPU type.)
31   */   */
# Line 181  int cpu_disassemble_instr(struct machine Line 181  int cpu_disassemble_instr(struct machine
181   *   *
182   *  Dump cpu registers in a relatively readable format.   *  Dump cpu registers in a relatively readable format.
183   *   *
184   *  gprs: set to non-zero to dump GPRs. (CPU dependant.)   *  gprs: set to non-zero to dump GPRs. (CPU dependent.)
185   *  coprocs: set bit 0..x to dump registers in coproc 0..x. (CPU dependant.)   *  coprocs: set bit 0..x to dump registers in coproc 0..x. (CPU dependent.)
186   */   */
187  void cpu_register_dump(struct machine *m, struct cpu *cpu,  void cpu_register_dump(struct machine *m, struct cpu *cpu,
188          int gprs, int coprocs)          int gprs, int coprocs)
# Line 244  void cpu_functioncall_trace(struct cpu * Line 244  void cpu_functioncall_trace(struct cpu *
244                  fatal("cpu%i:\t", cpu->cpu_id);                  fatal("cpu%i:\t", cpu->cpu_id);
245    
246          cpu->trace_tree_depth ++;          cpu->trace_tree_depth ++;
247            if (cpu->trace_tree_depth > 100)
248                    cpu->trace_tree_depth = 100;
249          for (i=0; i<cpu->trace_tree_depth; i++)          for (i=0; i<cpu->trace_tree_depth; i++)
250                  fatal("  ");                  fatal("  ");
251    
# Line 307  void cpu_create_or_reset_tc(struct cpu * Line 309  void cpu_create_or_reset_tc(struct cpu *
309           *  There might be other translation pointers that still point to           *  There might be other translation pointers that still point to
310           *  within the translation_cache region. Let's invalidate those too:           *  within the translation_cache region. Let's invalidate those too:
311           */           */
312          if (cpu->invalidate_code_translation_caches != NULL)          if (cpu->invalidate_code_translation != NULL)
313                  cpu->invalidate_code_translation_caches(cpu);                  cpu->invalidate_code_translation(cpu, 0, INVALIDATE_ALL);
314  }  }
315    
316    
# Line 334  int cpu_run(struct emul *emul, struct ma Line 336  int cpu_run(struct emul *emul, struct ma
336   *  cpu_dumpinfo():   *  cpu_dumpinfo():
337   *   *
338   *  Dumps info about a CPU using debug(). "cpu0: CPUNAME, running" (or similar)   *  Dumps info about a CPU using debug(). "cpu0: CPUNAME, running" (or similar)
339   *  is outputed, and it is up to CPU dependant code to complete the line.   *  is outputed, and it is up to CPU dependent code to complete the line.
340   */   */
341  void cpu_dumpinfo(struct machine *m, struct cpu *cpu)  void cpu_dumpinfo(struct machine *m, struct cpu *cpu)
342  {  {
# Line 653  void cpu_init(void) Line 655  void cpu_init(void)
655          add_cpu_family(arm_cpu_family_init, ARCH_ARM);          add_cpu_family(arm_cpu_family_init, ARCH_ARM);
656  #endif  #endif
657    
658    #ifdef ENABLE_AVR
659            add_cpu_family(avr_cpu_family_init, ARCH_AVR);
660    #endif
661    
662    #ifdef ENABLE_HPPA
663            add_cpu_family(hppa_cpu_family_init, ARCH_HPPA);
664    #endif
665    
666    #ifdef ENABLE_I960
667            add_cpu_family(i960_cpu_family_init, ARCH_I960);
668    #endif
669    
670  #ifdef ENABLE_IA64  #ifdef ENABLE_IA64
671          add_cpu_family(ia64_cpu_family_init, ARCH_IA64);          add_cpu_family(ia64_cpu_family_init, ARCH_IA64);
672  #endif  #endif
# Line 669  void cpu_init(void) Line 683  void cpu_init(void)
683          add_cpu_family(ppc_cpu_family_init, ARCH_PPC);          add_cpu_family(ppc_cpu_family_init, ARCH_PPC);
684  #endif  #endif
685    
686    #ifdef ENABLE_SH
687            add_cpu_family(sh_cpu_family_init, ARCH_SH);
688    #endif
689    
690  #ifdef ENABLE_SPARC  #ifdef ENABLE_SPARC
691          add_cpu_family(sparc_cpu_family_init, ARCH_SPARC);          add_cpu_family(sparc_cpu_family_init, ARCH_SPARC);
692  #endif  #endif

Legend:
Removed from v.12  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26