25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: cpu_hppa.c,v 1.13 2006/06/16 18:31:25 debug Exp $ |
* $Id: cpu_hppa.c,v 1.16 2006/09/19 10:50:08 debug Exp $ |
29 |
* |
* |
30 |
* HP PA-RISC CPU emulation. |
* HP PA-RISC CPU emulation. |
31 |
* |
* |
41 |
#include "machine.h" |
#include "machine.h" |
42 |
#include "memory.h" |
#include "memory.h" |
43 |
#include "misc.h" |
#include "misc.h" |
44 |
|
#include "settings.h" |
45 |
#include "symbol.h" |
#include "symbol.h" |
46 |
|
|
47 |
|
|
71 |
cpu->cd.hppa.bits = 32; |
cpu->cd.hppa.bits = 32; |
72 |
|
|
73 |
if (cpu->is_32bit) { |
if (cpu->is_32bit) { |
74 |
|
cpu->run_instr = hppa32_run_instr; |
75 |
cpu->update_translation_table = hppa32_update_translation_table; |
cpu->update_translation_table = hppa32_update_translation_table; |
76 |
cpu->invalidate_translation_caches = |
cpu->invalidate_translation_caches = |
77 |
hppa32_invalidate_translation_caches; |
hppa32_invalidate_translation_caches; |
78 |
cpu->invalidate_code_translation = |
cpu->invalidate_code_translation = |
79 |
hppa32_invalidate_code_translation; |
hppa32_invalidate_code_translation; |
80 |
} else { |
} else { |
81 |
|
cpu->run_instr = hppa_run_instr; |
82 |
cpu->update_translation_table = hppa_update_translation_table; |
cpu->update_translation_table = hppa_update_translation_table; |
83 |
cpu->invalidate_translation_caches = |
cpu->invalidate_translation_caches = |
84 |
hppa_invalidate_translation_caches; |
hppa_invalidate_translation_caches; |
91 |
debug("%s", cpu->name); |
debug("%s", cpu->name); |
92 |
} |
} |
93 |
|
|
94 |
hppa_init_64bit_dummy_tables(cpu); |
/* Add all register names to the settings: */ |
95 |
|
CPU_SETTINGS_ADD_REGISTER64("pc", cpu->pc); |
96 |
|
|
97 |
return 1; |
return 1; |
98 |
} |
} |
172 |
} |
} |
173 |
} |
} |
174 |
|
|
|
|
|
|
/* |
|
|
* hppa_cpu_register_match(): |
|
|
*/ |
|
|
void hppa_cpu_register_match(struct machine *m, char *name, |
|
|
int writeflag, uint64_t *valuep, int *match_register) |
|
|
{ |
|
|
int cpunr = 0; |
|
|
|
|
|
/* CPU number: */ |
|
|
|
|
|
/* TODO */ |
|
|
|
|
|
/* Register name: */ |
|
|
if (strcasecmp(name, "pc") == 0) { |
|
|
if (writeflag) { |
|
|
m->cpus[cpunr]->pc = *valuep; |
|
|
} else |
|
|
*valuep = m->cpus[cpunr]->pc; |
|
|
*match_register = 1; |
|
|
} |
|
|
} |
|
|
|
|
175 |
|
|
176 |
/* |
/* |
177 |
* hppa_cpu_tlbdump(): |
* hppa_cpu_tlbdump(): |