diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-01 21:49:57 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-01 21:49:57 +0000 |
commit | a97fed52e57385fc749e6f6ef95be7ebdb81ba9b (patch) | |
tree | fb26f5a0ca1db4d31479e4ee47bc27be9a2b63bd /target-ppc/helper.c | |
parent | 51996525c77e61a050562900a499798ded8981d0 (diff) |
Fix reproductible crash: call cpu_loop_exit from micro-op, not from helper.c
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3311 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/helper.c')
-rw-r--r-- | target-ppc/helper.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/target-ppc/helper.c b/target-ppc/helper.c index 5b0fd09b9c..5fa5ee002a 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -1839,7 +1839,7 @@ target_ulong do_load_msr (CPUPPCState *env) ((target_ulong)msr_le << MSR_LE); } -void do_store_msr (CPUPPCState *env, target_ulong value) +int do_store_msr (CPUPPCState *env, target_ulong value) { int enter_pm; @@ -1921,21 +1921,15 @@ void do_store_msr (CPUPPCState *env, target_ulong value) default: break; } - if (enter_pm) { - if (likely(!env->halted)) { - /* power save: exit cpu loop */ - env->halted = 1; - env->exception_index = EXCP_HLT; - cpu_loop_exit(); - } - } + + return enter_pm; } #if defined(TARGET_PPC64) -void ppc_store_msr_32 (CPUPPCState *env, uint32_t value) +int ppc_store_msr_32 (CPUPPCState *env, uint32_t value) { - do_store_msr(env, - (do_load_msr(env) & ~0xFFFFFFFFULL) | (value & 0xFFFFFFFF)); + return do_store_msr(env, (do_load_msr(env) & ~0xFFFFFFFFULL) | + (value & 0xFFFFFFFF)); } #endif |