[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 22/27] target/s390x: Split per_breaking_event from per_branch_
From: |
Richard Henderson |
Subject: |
[PATCH v3 22/27] target/s390x: Split per_breaking_event from per_branch_* |
Date: |
Mon, 9 Jan 2023 12:08:14 -0800 |
This allows us to update gbea before other updates to psw_addr,
which will be important for TARGET_TB_PCREL.
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/s390x/tcg/translate.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index aca2d214bb..3b7591790d 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -353,7 +353,6 @@ static inline bool per_enabled(DisasContext *s)
static void per_branch_dest(DisasContext *s, TCGv_i64 dest)
{
#ifndef CONFIG_USER_ONLY
- gen_psw_addr_disp(s, gbea, 0);
if (per_enabled(s)) {
gen_helper_per_branch(cpu_env, gbea, dest);
}
@@ -363,7 +362,6 @@ static void per_branch_dest(DisasContext *s, TCGv_i64 dest)
static void per_branch_disp(DisasContext *s, int64_t disp)
{
#ifndef CONFIG_USER_ONLY
- gen_psw_addr_disp(s, gbea, 0);
if (per_enabled(s)) {
TCGv_i64 dest = tcg_temp_new_i64();
gen_psw_addr_disp(s, dest, disp);
@@ -1153,13 +1151,14 @@ struct DisasInsn {
static DisasJumpType help_goto_direct(DisasContext *s, int64_t disp)
{
+ per_breaking_event(s);
+
if (disp == s->ilen) {
per_branch_disp(s, disp);
return DISAS_NEXT;
}
if (use_goto_tb(s, s->base.pc_next + disp)) {
update_cc_op(s);
- per_breaking_event(s);
tcg_gen_goto_tb(0);
update_psw_addr_disp(s, disp);
tcg_gen_exit_tb(s->base.tb, 0);
@@ -1173,6 +1172,7 @@ static DisasJumpType help_goto_direct(DisasContext *s,
int64_t disp)
static DisasJumpType help_goto_indirect(DisasContext *s, TCGv_i64 dest)
{
+ per_breaking_event(s);
tcg_gen_mov_i64(psw_addr, dest);
per_branch_dest(s, psw_addr);
return DISAS_PC_UPDATED;
@@ -1233,6 +1233,7 @@ static DisasJumpType help_branch(DisasContext *s,
DisasCompare *c,
}
/* Branch taken. */
+ per_breaking_event(s);
if (is_imm) {
gen_psw_addr_disp(s, psw_addr, disp);
}
--
2.34.1
- [PATCH v3 12/27] target/s390x: Use gen_psw_addr_disp in op_sam, (continued)
- [PATCH v3 12/27] target/s390x: Use gen_psw_addr_disp in op_sam, Richard Henderson, 2023/01/09
- [PATCH v3 13/27] target/s390x: Use ilen instead in branches, Richard Henderson, 2023/01/09
- [PATCH v3 15/27] target/s390x: Add disp argument to update_psw_addr, Richard Henderson, 2023/01/09
- [PATCH v3 16/27] target/s390x: Don't set gbea for user-only, Richard Henderson, 2023/01/09
- [PATCH v3 18/27] target/s390x: Disable conditional branch-to-next for PER, Richard Henderson, 2023/01/09
- [PATCH v3 14/27] target/s390x: Assert masking of psw.addr in cpu_get_tb_cpu_state, Richard Henderson, 2023/01/09
- [PATCH v3 17/27] target/s390x: Introduce per_enabled, Richard Henderson, 2023/01/09
- [PATCH v3 19/27] target/s390x: Introduce help_goto_indirect, Richard Henderson, 2023/01/09
- [PATCH v3 20/27] target/s390x: Split per_branch, Richard Henderson, 2023/01/09
- [PATCH v3 21/27] target/s390x: Simplify help_branch, Richard Henderson, 2023/01/09
- [PATCH v3 22/27] target/s390x: Split per_breaking_event from per_branch_*,
Richard Henderson <=
- [PATCH v3 23/27] target/s390x: Remove PER check from use_goto_tb, Richard Henderson, 2023/01/09
- [PATCH v3 24/27] target/s390x: Fix successful-branch PER events, Richard Henderson, 2023/01/09
- [PATCH v3 25/27] tests/tcg/s390x: Add per.S, Richard Henderson, 2023/01/09
- [PATCH v3 26/27] target/s390x: Pass original r2 register to BCR, Richard Henderson, 2023/01/09
- [PATCH v3 27/27] target/s390x: Enable TARGET_TB_PCREL, Richard Henderson, 2023/01/09