aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/helper.c5
-rw-r--r--target-ppc/translate.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index c3b02d8cc7..ff1355c541 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -846,6 +846,11 @@ void do_store_msr (CPUPPCState *env, target_ulong value)
msr_ri = (value >> MSR_RI) & 1;
msr_le = (value >> MSR_LE) & 1;
do_compute_hflags(env);
+ if (msr_pow) {
+ /* power save: exit cpu loop */
+ env->exception_index = EXCP_HLT;
+ cpu_loop_exit();
+ }
}
float64 do_load_fpscr (CPUPPCState *env)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 391f82f1d0..3bc6aa376e 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -2097,10 +2097,11 @@ GEN_HANDLER(mtmsr, 0x1F, 0x12, 0x04, 0x001FF801, PPC_MISC)
RET_PRIVREG(ctx);
return;
}
+ gen_op_update_nip((ctx)->nip);
gen_op_load_gpr_T0(rS(ctx->opcode));
gen_op_store_msr();
/* Must stop the translation as machine state (may have) changed */
- RET_STOP(ctx);
+ RET_CHG_FLOW(ctx);
#endif
}