Commit 5b52b9911f5fecd936fa982a99c37750544e87f8
1 parent
89343ecd
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
Showing
1 changed file
with
4 additions
and
5 deletions
target-ppc/helper.c
... | ... | @@ -2146,10 +2146,9 @@ static always_inline void powerpc_excp (CPUState *env, |
2146 | 2146 | new_msr |= (target_ulong)1 << MSR_HV; |
2147 | 2147 | #endif |
2148 | 2148 | msr |= 0x00100000; |
2149 | - if (msr_fe0 != msr_fe1) { | |
2150 | - msr |= 0x00010000; | |
2151 | - goto store_current; | |
2152 | - } | |
2149 | + if (msr_fe0 == msr_fe1) | |
2150 | + goto store_next; | |
2151 | + msr |= 0x00010000; | |
2153 | 2152 | break; |
2154 | 2153 | case POWERPC_EXCP_INVAL: |
2155 | 2154 | #if defined (DEBUG_EXCEPTIONS) |
... | ... | @@ -2187,7 +2186,7 @@ static always_inline void powerpc_excp (CPUState *env, |
2187 | 2186 | env->error_code); |
2188 | 2187 | break; |
2189 | 2188 | } |
2190 | - goto store_next; | |
2189 | + goto store_current; | |
2191 | 2190 | case POWERPC_EXCP_FPU: /* Floating-point unavailable exception */ |
2192 | 2191 | new_msr &= ~((target_ulong)1 << MSR_RI); |
2193 | 2192 | #if defined(TARGET_PPC64H) | ... | ... |