]> git.proxmox.com Git - qemu.git/commitdiff
Sparc32/64 CPU selection for user emulator
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Apr 2007 06:29:06 +0000 (06:29 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Apr 2007 06:29:06 +0000 (06:29 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2637 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/main.c

index 74798c7cc5d05daba9b8c5e0e4cb93309c89d444..277f194d94f6bbde410b785077918c2cdbc2759c 100644 (file)
@@ -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;