aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/helper.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-02 22:35:33 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-02 22:35:33 +0000
commit5b52b9911f5fecd936fa982a99c37750544e87f8 (patch)
treebc5ae4b536b23b0abaafcf3232c2bd2732a9791b /target-ppc/helper.c
parent89343ecde51e7c287e8647a13f9e18f68a37c87c (diff)
Fix PowerPC program exception that was broken by FPU exception patches
(bug reported by Jason Wessel) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3509 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/helper.c')
-rw-r--r--target-ppc/helper.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index d3b8db7e61..f68656d5d2 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -2146,10 +2146,9 @@ static always_inline void powerpc_excp (CPUState *env,
new_msr |= (target_ulong)1 << MSR_HV;
#endif
msr |= 0x00100000;
- if (msr_fe0 != msr_fe1) {
- msr |= 0x00010000;
- goto store_current;
- }
+ if (msr_fe0 == msr_fe1)
+ goto store_next;
+ msr |= 0x00010000;
break;
case POWERPC_EXCP_INVAL:
#if defined (DEBUG_EXCEPTIONS)
@@ -2187,7 +2186,7 @@ static always_inline void powerpc_excp (CPUState *env,
env->error_code);
break;
}
- goto store_next;
+ goto store_current;
case POWERPC_EXCP_FPU: /* Floating-point unavailable exception */
new_msr &= ~((target_ulong)1 << MSR_RI);
#if defined(TARGET_PPC64H)