aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-08 06:29:06 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-08 06:29:06 +0000
commit925fb139be707fe637bdadb25138c72efcf333b5 (patch)
treed9ffcfa74c9238d9cc92aeaf90c0a963b753e39a
parent1c6e907082cf00c483be24612c9c4504446f09e1 (diff)
Sparc32/64 CPU selection for user emulator
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2637 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--linux-user/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 74798c7cc5..277f194d94 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1745,6 +1745,8 @@ int main(int argc, char **argv)
arm_cpu_list();
#elif defined(TARGET_MIPS)
mips_cpu_list(stdout, &fprintf);
+#elif defined(TARGET_SPARC)
+ sparc_cpu_list(stdout, &fprintf);
#endif
_exit(1);
}
@@ -1900,6 +1902,20 @@ int main(int argc, char **argv)
#elif defined(TARGET_SPARC)
{
int i;
+ const sparc_def_t *def;
+#ifdef TARGET_SPARC64
+ if (cpu_model == NULL)
+ cpu_model = "TI UltraSparc II";
+#else
+ if (cpu_model == NULL)
+ cpu_model = "Fujitsu MB86904";
+#endif
+ sparc_find_by_name(cpu_model, &def);
+ if (def == NULL) {
+ fprintf(stderr, "Unable to find Sparc CPU definition\n");
+ exit(1);
+ }
+ cpu_sparc_register(env, def);
env->pc = regs->pc;
env->npc = regs->npc;
env->y = regs->y;