aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/tcg/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/tcg/translate.c')
-rw-r--r--target/s390x/tcg/translate.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index ebd96ab..4c3ff19 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -6424,13 +6424,14 @@ static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s)
#ifndef CONFIG_USER_ONLY
if (s->base.tb->flags & FLAG_MASK_PER) {
- /* An exception might be triggered, save PSW if not already done. */
+ TCGv_i64 next_pc = psw_addr;
+
if (ret == DISAS_NEXT || ret == DISAS_TOO_MANY) {
- tcg_gen_movi_i64(psw_addr, s->pc_tmp);
+ next_pc = tcg_constant_i64(s->pc_tmp);
}
-
- /* Call the helper to check for a possible PER exception. */
- gen_helper_per_check_exception(tcg_env);
+ update_cc_op(s);
+ gen_helper_per_check_exception(tcg_env, next_pc,
+ tcg_constant_i32(s->ilen));
}
#endif