diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-27 17:54:30 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-27 17:54:30 +0000 |
commit | 7c58044c0ab79f11604f71aa04b4691baacef886 (patch) | |
tree | b8a4f5b7e4ab2ada25ced61c0bd05a5d6a49e3f2 /linux-user | |
parent | a32ff1ad95c4f09420c4b5e19dfd86ded0d2bc79 (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 'linux-user')
-rw-r--r-- | linux-user/main.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index cac9561ba1..88a2e48863 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -829,12 +829,6 @@ void cpu_loop(CPUPPCState *env) switch (env->error_code & ~0xF) { 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 = TARGET_SIGFPE; info.si_errno = 0; switch (env->error_code & 0xF) { @@ -854,7 +848,7 @@ void cpu_loop(CPUPPCState *env) case POWERPC_EXCP_FP_VXSOFT: info.si_code = TARGET_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: |