提交 cff4cbed 编写于 作者: T ths

Support -cpu selection for mips usermode emulation. Fix segfault when

dispaying the -cpu list help.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2497 c046a42c-6fe2-441c-8c8c-71466251a162
上级 b1f9be31
...@@ -1644,7 +1644,7 @@ int main(int argc, char **argv) ...@@ -1644,7 +1644,7 @@ int main(int argc, char **argv)
#elif defined(TARGET_MIPS) #elif defined(TARGET_MIPS)
mips_cpu_list(stdout, &fprintf); mips_cpu_list(stdout, &fprintf);
#endif #endif
exit(1); _exit(1);
} }
} else } else
#ifdef USE_CODE_COPY #ifdef USE_CODE_COPY
...@@ -1849,9 +1849,17 @@ int main(int argc, char **argv) ...@@ -1849,9 +1849,17 @@ int main(int argc, char **argv)
} }
#elif defined(TARGET_MIPS) #elif defined(TARGET_MIPS)
{ {
mips_def_t *def;
int i; int i;
/* XXX: set CPU model */ /* Choose and initialise CPU */
if (cpu_model == NULL)
cpu_model = "24Kf";
mips_find_by_name(cpu_model, &def);
if (def == NULL)
cpu_abort(env, "Unable to find MIPS CPU definition\n");
cpu_mips_register(env, def);
for(i = 0; i < 32; i++) { for(i = 0; i < 32; i++) {
env->gpr[i] = regs->regs[i]; env->gpr[i] = regs->regs[i];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册