[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/26] target/s390x: Use ilen instead in branches
From: |
Richard Henderson |
Subject: |
[PATCH 11/26] target/s390x: Use ilen instead in branches |
Date: |
Wed, 5 Oct 2022 20:44:06 -0700 |
Remove the remaining uses of pc_tmp, and remove the variable.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/s390x/tcg/translate.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 2ea3feb803..67c86996e9 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -141,12 +141,6 @@ struct DisasContext {
TCGOp *insn_start;
DisasFields fields;
uint64_t ex_value;
- /*
- * During translate_one(), pc_tmp is used to determine the instruction
- * to be executed after base.pc_next - e.g. next sequential instruction
- * or a branch target.
- */
- uint64_t pc_tmp;
uint32_t ilen;
enum cc_op cc_op;
bool exit_to_mainloop;
@@ -1198,7 +1192,7 @@ static DisasJumpType help_branch(DisasContext *s,
DisasCompare *c,
goto egress;
}
if (is_imm) {
- if (dest == s->pc_tmp) {
+ if (disp == s->ilen) {
/* Branch to next. */
per_branch(s, true);
ret = DISAS_NEXT;
@@ -1222,7 +1216,7 @@ static DisasJumpType help_branch(DisasContext *s,
DisasCompare *c,
}
}
- if (use_goto_tb(s, s->pc_tmp)) {
+ if (use_goto_tb(s, s->base.pc_next + s->ilen)) {
if (is_imm && use_goto_tb(s, dest)) {
/* Both exits can use goto_tb. */
update_cc_op(s);
@@ -6247,7 +6241,6 @@ static const DisasInsn *extract_insn(CPUS390XState *env,
DisasContext *s)
g_assert_not_reached();
}
}
- s->pc_tmp = s->base.pc_next + ilen;
s->ilen = ilen;
/* We can't actually determine the insn format until we've looked up
@@ -6484,7 +6477,7 @@ static DisasJumpType translate_one(CPUS390XState *env,
DisasContext *s)
out:
/* Advance to the next instruction. */
- s->base.pc_next = s->pc_tmp;
+ s->base.pc_next += s->ilen;
return ret;
}
--
2.34.1
- [PATCH 08/26] target/s390x: Use gen_psw_addr_disp in pc_to_link_info, (continued)
- [PATCH 08/26] target/s390x: Use gen_psw_addr_disp in pc_to_link_info, Richard Henderson, 2022/10/05
- [PATCH 22/26] target/s390x: Pass original r2 register to BCR, Richard Henderson, 2022/10/05
- [PATCH 17/26] target/s390x: Introduce help_goto_indirect, Richard Henderson, 2022/10/05
- [PATCH 20/26] target/s390x: Split per_breaking_event from per_branch_*, Richard Henderson, 2022/10/05
- [PATCH 09/26] target/s390x: Use gen_psw_addr_disp in save_link_info, Richard Henderson, 2022/10/05
- [PATCH 23/26] tcg: Pass TCGTempKind to tcg_temp_new_internal, Richard Henderson, 2022/10/05
- [PATCH 25/26] tcg: Introduce tcg_temp_is_normal_*, Richard Henderson, 2022/10/05
- [PATCH 05/26] target/s390x: Change help_goto_direct to work on displacements, Richard Henderson, 2022/10/05
- [PATCH 18/26] target/s390x: Split per_branch, Richard Henderson, 2022/10/05
- [PATCH 10/26] target/s390x: Use gen_psw_addr_disp in op_sam, Richard Henderson, 2022/10/05
- [PATCH 11/26] target/s390x: Use ilen instead in branches,
Richard Henderson <=
- [PATCH 12/26] target/s390x: Move masking of psw.addr to cpu_get_tb_cpu_state, Richard Henderson, 2022/10/05
- [PATCH 14/26] target/s390x: Don't set gbea for user-only, Richard Henderson, 2022/10/05
- [PATCH 21/26] target/s390x: Remove PER check from use_goto_tb, Richard Henderson, 2022/10/05
- [PATCH 16/26] target/s390x: Disable conditional branch-to-next for PER, Richard Henderson, 2022/10/05
- [PATCH 26/26] target/s390x: Enable TARGET_TB_PCREL, Richard Henderson, 2022/10/05
- [PATCH 13/26] target/s390x: Add disp argument to update_psw_addr, Richard Henderson, 2022/10/05
- [PATCH 15/26] target/s390x: Introduce per_enabled, Richard Henderson, 2022/10/05
- [PATCH 19/26] target/s390x: Simplify help_branch, Richard Henderson, 2022/10/05
- [PATCH 24/26] tcg: Introduce tcg_temp_ebb_new_*, Richard Henderson, 2022/10/05
- Re: [PATCH 00/26] target/s390x: pc-relative translation blocks, Richard Henderson, 2022/10/24