diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-10 15:15:54 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-10 15:15:54 +0000 |
commit | aaed909a495e78364abc6812df672d2e764961a8 (patch) | |
tree | 704ab4280f250fa310bee6a3d0ba94e5417daef3 /target-mips/translate.c | |
parent | 7d77bf200682ed8cbd0c94bdfbac64dc4b23b149 (diff) |
added cpu_model parameter to cpu_init()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3562 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/translate.c')
-rw-r--r-- | target-mips/translate.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c index 578cd9a25c..ac439d27a1 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -6725,13 +6725,21 @@ void cpu_dump_state (CPUState *env, FILE *f, #endif } -CPUMIPSState *cpu_mips_init (void) +#include "translate_init.c" + +CPUMIPSState *cpu_mips_init (const char *cpu_model) { CPUMIPSState *env; + const mips_def_t *def; + def = cpu_mips_find_by_name(cpu_model); + if (!def) + return NULL; env = qemu_mallocz(sizeof(CPUMIPSState)); if (!env) return NULL; + env->cpu_model = def; + cpu_exec_init(env); cpu_reset(env); return env; @@ -6780,6 +6788,5 @@ void cpu_reset (CPUMIPSState *env) #else env->hflags = MIPS_HFLAG_CP0; #endif + cpu_mips_register(env, env->cpu_model); } - -#include "translate_init.c" |