summaryrefslogtreecommitdiff
path: root/darwin-user
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-27 17:54:30 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-27 17:54:30 +0000
commit7c58044c0ab79f11604f71aa04b4691baacef886 (patch)
treeb8a4f5b7e4ab2ada25ced61c0bd05a5d6a49e3f2 /darwin-user
parenta32ff1ad95c4f09420c4b5e19dfd86ded0d2bc79 (diff)
Fix PowerPC FPSCR update and floating-point exception generation
in most useful cases. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3458 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'darwin-user')
-rw-r--r--darwin-user/main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/darwin-user/main.c b/darwin-user/main.c
index d0de491e0..70328ec8e 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -224,11 +224,6 @@ void cpu_loop(CPUPPCState *env)
case POWERPC_EXCP_FP:
EXCP_DUMP(env, "Floating point program exception\n");
/* Set FX */
- env->fpscr[7] |= 0x8;
- /* Finally, update FEX */
- if ((((env->fpscr[7] & 0x3) << 3) | (env->fpscr[6] >> 1)) &
- ((env->fpscr[1] << 1) | (env->fpscr[0] >> 3)))
- env->fpscr[7] |= 0x4;
info.si_signo = SIGFPE;
info.si_errno = 0;
switch (env->error_code & 0xF) {
@@ -248,7 +243,7 @@ void cpu_loop(CPUPPCState *env)
case POWERPC_EXCP_FP_VXSOFT:
info.si_code = FPE_FLTINV;
break;
- case POWERPC_EXCP_FP_VXNAN:
+ case POWERPC_EXCP_FP_VXSNAN:
case POWERPC_EXCP_FP_VXISI:
case POWERPC_EXCP_FP_VXIDI:
case POWERPC_EXCP_FP_VXIMZ: