25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: cpu_x86.c,v 1.15 2006/06/16 18:31:26 debug Exp $ |
* $Id: cpu_x86.c,v 1.17 2006/07/16 13:32:26 debug Exp $ |
29 |
* |
* |
30 |
* x86 (and amd64) CPU emulation. |
* x86 (and amd64) CPU emulation. |
31 |
* |
* |
95 |
|
|
96 |
cpu->cd.x86.model = models[i]; |
cpu->cd.x86.model = models[i]; |
97 |
|
|
98 |
cpu->translate_address = x86_translate_address; |
cpu->translate_v2p = x86_translate_v2p; |
99 |
|
|
100 |
/* Initial startup is in 16-bit real mode: */ |
/* Initial startup is in 16-bit real mode: */ |
101 |
cpu->pc = 0xfff0; |
cpu->pc = 0xfff0; |
124 |
1 : 0; |
1 : 0; |
125 |
|
|
126 |
if (cpu->is_32bit) { |
if (cpu->is_32bit) { |
127 |
|
cpu->run_instr = x8632_run_instr; |
128 |
cpu->update_translation_table = x8632_update_translation_table; |
cpu->update_translation_table = x8632_update_translation_table; |
129 |
cpu->invalidate_translation_caches = |
cpu->invalidate_translation_caches = |
130 |
x8632_invalidate_translation_caches; |
x8632_invalidate_translation_caches; |
131 |
cpu->invalidate_code_translation = |
cpu->invalidate_code_translation = |
132 |
x8632_invalidate_code_translation; |
x8632_invalidate_code_translation; |
133 |
} else { |
} else { |
134 |
|
cpu->run_instr = x86_run_instr; |
135 |
cpu->update_translation_table = x86_update_translation_table; |
cpu->update_translation_table = x86_update_translation_table; |
136 |
cpu->invalidate_translation_caches = |
cpu->invalidate_translation_caches = |
137 |
x86_invalidate_translation_caches; |
x86_invalidate_translation_caches; |
144 |
debug("%s", cpu->name); |
debug("%s", cpu->name); |
145 |
} |
} |
146 |
|
|
|
x86_init_64bit_dummy_tables(cpu); |
|
|
|
|
147 |
return 1; |
return 1; |
148 |
} |
} |
149 |
|
|
3164 |
} |
} |
3165 |
|
|
3166 |
|
|
3167 |
#define TRANSLATE_ADDRESS x86_translate_address |
#define TRANSLATE_ADDRESS x86_translate_v2p |
3168 |
#include "memory_x86.c" |
#include "memory_x86.c" |
3169 |
#undef TRANSLATE_ADDRESS |
#undef TRANSLATE_ADDRESS |
3170 |
|
|