summary refs log tree commit diff stats
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-18 19:59:49 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-18 19:59:49 +0000
commite85e7c6ea411c42e24e6e7b8ff5cdd99faae317a (patch)
tree06881989ac288ea39c84a11517aa53c8156a4625 /linux-user/main.c
parentb533415989c55d929804d56ea4bfb93e8d5ce021 (diff)
downloadfocaccia-qemu-e85e7c6ea411c42e24e6e7b8ff5cdd99faae317a.tar.gz
focaccia-qemu-e85e7c6ea411c42e24e6e7b8ff5cdd99faae317a.zip
Use the new TARGET_ABI32 feature to implement a ppc64abi32-linux-user target
  (PowerPC 64 running in 32 bits mode).
Use the new TARGET_ABI_DIR feature to implement a ppcemb-linux-user target
  (PowerPC 32 with 64 bits GPRs and vector extensions).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3409 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 1388d48338..7c39121515 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1008,7 +1008,7 @@ void cpu_loop(CPUPPCState *env)
                       "Aborting\n");
             break;
 #endif /* defined(TARGET_PPCEMB) */
-#if defined(TARGET_PPC64) /* PowerPC 64 */
+#if defined(TARGET_PPC64) && !defined(TARGET_ABI32) /* PowerPC 64 */
         case POWERPC_EXCP_DSEG:     /* Data segment exception                */
             cpu_abort(env, "Data segment exception while in user mode. "
                       "Aborting\n");
@@ -1017,19 +1017,21 @@ void cpu_loop(CPUPPCState *env)
             cpu_abort(env, "Instruction segment exception "
                       "while in user mode. Aborting\n");
             break;
-#endif /* defined(TARGET_PPC64) */
-#if defined(TARGET_PPC64H) /* PowerPC 64 with hypervisor mode support */
+#endif /* defined(TARGET_PPC64) && !defined(TARGET_ABI32) */
+#if defined(TARGET_PPC64H) && !defined(TARGET_ABI32)
+        /* PowerPC 64 with hypervisor mode support */
         case POWERPC_EXCP_HDECR:    /* Hypervisor decrementer exception      */
             cpu_abort(env, "Hypervisor decrementer interrupt "
                       "while in user mode. Aborting\n");
             break;
-#endif /* defined(TARGET_PPC64H) */
+#endif /* defined(TARGET_PPC64H) && !defined(TARGET_ABI32) */
         case POWERPC_EXCP_TRACE:    /* Trace exception                       */
             /* Nothing to do:
              * we use this exception to emulate step-by-step execution mode.
              */
             break;
-#if defined(TARGET_PPC64H) /* PowerPC 64 with hypervisor mode support */
+#if defined(TARGET_PPC64H) && !defined(TARGET_ABI32)
+        /* PowerPC 64 with hypervisor mode support */
         case POWERPC_EXCP_HDSI:     /* Hypervisor data storage exception     */
             cpu_abort(env, "Hypervisor data storage exception "
                       "while in user mode. Aborting\n");
@@ -1046,7 +1048,7 @@ void cpu_loop(CPUPPCState *env)
             cpu_abort(env, "Hypervisor instruction segment exception "
                       "while in user mode. Aborting\n");
             break;
-#endif /* defined(TARGET_PPC64H) */
+#endif /* defined(TARGET_PPC64H) && !defined(TARGET_ABI32) */
         case POWERPC_EXCP_VPU:      /* Vector unavailable exception          */
             EXCP_DUMP(env, "No Altivec instructions allowed\n");
             info.si_signo = TARGET_SIGILL;
@@ -2170,8 +2172,10 @@ int main(int argc, char **argv)
             if (i != 12 && i != 6 && i != 13)
                 env->msr[i] = (regs->msr >> i) & 1;
         }
-#if defined(TARGET_PPC64)
+#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
         msr_sf = 1;
+#else
+        msr_sf = 0;
 #endif
         env->nip = regs->nip;
         for(i = 0; i < 32; i++) {