aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r--target-ppc/translate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 046f168bf9..41737d4a84 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -1956,6 +1956,8 @@ GEN_HANDLER(tw, 0x1F, 0x04, 0xFF, 0x00000001, PPC_FLOW)
{
gen_op_load_gpr_T0(rA(ctx->opcode));
gen_op_load_gpr_T1(rB(ctx->opcode));
+ /* Update the nip since this might generate a trap exception */
+ gen_op_update_nip(ctx->nip);
gen_op_tw(TO(ctx->opcode));
}