aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/translate.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-29 15:02:38 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-29 15:02:38 +0000
commitdee96f6ca300da3dc3bc97635d9c3d97a73b5e48 (patch)
treee7e8c27710a3f625f65e9564615015427c024e8c /target-ppc/translate.c
parent58a7d32872badb7b94d2010e0100a25443e0ef77 (diff)
PowerPC emulation optimization:
avoid stopping translation after most SPR updates when a context-synchronization instruction is also needed. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3265 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r--target-ppc/translate.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index dc4e758914..e88cfafaee 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -3230,7 +3230,8 @@ GEN_HANDLER(mtmsrd, 0x1F, 0x12, 0x05, 0x001FF801, PPC_64B)
gen_op_load_gpr_T0(rS(ctx->opcode));
gen_op_store_msr();
/* Must stop the translation as machine state (may have) changed */
- GEN_SYNC(ctx);
+ /* Note that mtmsr is not always defined as context-synchronizing */
+ GEN_STOP(ctx);
#endif
}
#endif
@@ -3253,7 +3254,8 @@ GEN_HANDLER(mtmsr, 0x1F, 0x12, 0x04, 0x001FF801, PPC_MISC)
#endif
gen_op_store_msr();
/* Must stop the translation as machine state (may have) changed */
- GEN_SYNC(ctx);
+ /* Note that mtmsrd is not always defined as context-synchronizing */
+ GEN_STOP(ctx);
#endif
}
@@ -4936,6 +4938,9 @@ GEN_HANDLER(wrtee, 0x1F, 0x03, 0x04, 0x000FFC01, PPC_EMB_COMMON)
}
gen_op_load_gpr_T0(rD(ctx->opcode));
gen_op_wrte();
+ /* Stop translation to have a chance to raise an exception
+ * if we just set msr_ee to 1
+ */
GEN_STOP(ctx);
#endif
}
@@ -4952,6 +4957,9 @@ GEN_HANDLER(wrteei, 0x1F, 0x03, 0x05, 0x000EFC01, PPC_EMB_COMMON)
}
gen_op_set_T0(ctx->opcode & 0x00010000);
gen_op_wrte();
+ /* Stop translation to have a chance to raise an exception
+ * if we just set msr_ee to 1
+ */
GEN_STOP(ctx);
#endif
}