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.323 2005/11/13 22:34:21 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 |
*/ |
*/ |
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) |
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 |
|
|
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 |
|
|
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 |
{ |
{ |
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 |
679 |
add_cpu_family(mips_cpu_family_init, ARCH_MIPS); |
add_cpu_family(mips_cpu_family_init, ARCH_MIPS); |
680 |
#endif |
#endif |
681 |
|
|
682 |
|
#ifdef ENABLE_NEWMIPS |
683 |
|
add_cpu_family(newmips_cpu_family_init, ARCH_NEWMIPS); |
684 |
|
#endif |
685 |
|
|
686 |
#ifdef ENABLE_PPC |
#ifdef ENABLE_PPC |
687 |
add_cpu_family(ppc_cpu_family_init, ARCH_PPC); |
add_cpu_family(ppc_cpu_family_init, ARCH_PPC); |
688 |
#endif |
#endif |
689 |
|
|
690 |
|
#ifdef ENABLE_SH |
691 |
|
add_cpu_family(sh_cpu_family_init, ARCH_SH); |
692 |
|
#endif |
693 |
|
|
694 |
#ifdef ENABLE_SPARC |
#ifdef ENABLE_SPARC |
695 |
add_cpu_family(sparc_cpu_family_init, ARCH_SPARC); |
add_cpu_family(sparc_cpu_family_init, ARCH_SPARC); |
696 |
#endif |
#endif |