[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/85] target/hppa: Remove get_temp_tl
|
From: |
Richard Henderson |
|
Subject: |
[PULL 08/85] target/hppa: Remove get_temp_tl |
|
Date: |
Mon, 6 Nov 2023 19:02:50 -0800 |
Replace with tcg_temp_new_tl without recording into ctx.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/translate.c | 28 +++-------------------------
1 file changed, 3 insertions(+), 25 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 99b9fc0561..3c4a759628 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -254,9 +254,6 @@ typedef struct DisasContext {
target_ureg iaoq_n;
TCGv_reg iaoq_n_var;
- int ntempl;
- TCGv_tl templ[4];
-
DisasCond null_cond;
TCGLabel *null_lab;
@@ -491,15 +488,6 @@ static void cond_free(DisasCond *cond)
}
}
-#ifndef CONFIG_USER_ONLY
-static TCGv_tl get_temp_tl(DisasContext *ctx)
-{
- unsigned i = ctx->ntempl++;
- g_assert(i < ARRAY_SIZE(ctx->templ));
- return ctx->templ[i] = tcg_temp_new_tl();
-}
-#endif
-
static TCGv_reg load_const(DisasContext *ctx, target_sreg v)
{
TCGv_reg t = tcg_temp_new();
@@ -1374,7 +1362,7 @@ static TCGv_i64 space_select(DisasContext *ctx, int sp,
TCGv_reg base)
if (sp < 0) {
sp = ~sp;
}
- spc = get_temp_tl(ctx);
+ spc = tcg_temp_new_tl();
load_spr(ctx, spc, sp);
return spc;
}
@@ -1384,7 +1372,7 @@ static TCGv_i64 space_select(DisasContext *ctx, int sp,
TCGv_reg base)
ptr = tcg_temp_new_ptr();
tmp = tcg_temp_new();
- spc = get_temp_tl(ctx);
+ spc = tcg_temp_new_tl();
tcg_gen_shri_reg(tmp, base, TARGET_REGISTER_BITS - 5);
tcg_gen_andi_reg(tmp, tmp, 030);
@@ -1420,7 +1408,7 @@ static void form_gva(DisasContext *ctx, TCGv_tl *pgva,
TCGv_reg *pofs,
#ifdef CONFIG_USER_ONLY
*pgva = (modify <= 0 ? ofs : base);
#else
- TCGv_tl addr = get_temp_tl(ctx);
+ TCGv_tl addr = tcg_temp_new_tl();
tcg_gen_extu_reg_tl(addr, modify <= 0 ? ofs : base);
if (ctx->tb_flags & PSW_W) {
tcg_gen_andi_tl(addr, addr, 0x3fffffffffffffffull);
@@ -4081,9 +4069,6 @@ static void hppa_tr_init_disas_context(DisasContextBase
*dcbase, CPUState *cs)
/* Bound the number of instructions by those left on the page. */
bound = -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4;
ctx->base.max_insns = MIN(ctx->base.max_insns, bound);
-
- ctx->ntempl = 0;
- memset(ctx->templ, 0, sizeof(ctx->templ));
}
static void hppa_tr_tb_start(DisasContextBase *dcbase, CPUState *cs)
@@ -4112,7 +4097,6 @@ static void hppa_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cs)
DisasContext *ctx = container_of(dcbase, DisasContext, base);
CPUHPPAState *env = cpu_env(cs);
DisasJumpType ret;
- int i, n;
/* Execute one insn. */
#ifdef CONFIG_USER_ONLY
@@ -4151,12 +4135,6 @@ static void hppa_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cs)
}
}
- /* Forget any temporaries allocated. */
- for (i = 0, n = ctx->ntempl; i < n; ++i) {
- ctx->templ[i] = NULL;
- }
- ctx->ntempl = 0;
-
/* Advance the insn queue. Note that this check also detects
a priority change within the instruction queue. */
if (ret == DISAS_NEXT && ctx->iaoq_b != ctx->iaoq_f + 4) {
--
2.34.1
- [PULL 00/85] target/hppa patch queue, Richard Henderson, 2023/11/06
- [PULL 02/85] target/hppa: Rename hppa_tlb_entry to HPPATLBEntry, Richard Henderson, 2023/11/06
- [PULL 05/85] target/hppa: Split out hppa_flush_tlb_range, Richard Henderson, 2023/11/06
- [PULL 01/85] target/hppa: Include PSW_P in tb flags and mmu index, Richard Henderson, 2023/11/06
- [PULL 03/85] target/hppa: Use IntervalTreeNode in HPPATLBEntry, Richard Henderson, 2023/11/06
- [PULL 12/85] target/hppa: Truncate rotate count in trans_shrpw_sar, Richard Henderson, 2023/11/06
- [PULL 14/85] target/hppa: Fix do_add, do_sub for hppa64, Richard Henderson, 2023/11/06
- [PULL 04/85] target/hppa: Always report one page to tlb_set_page, Richard Henderson, 2023/11/06
- [PULL 08/85] target/hppa: Remove get_temp_tl,
Richard Henderson <=
- [PULL 13/85] target/hppa: Fix trans_ds for hppa64, Richard Henderson, 2023/11/06
- [PULL 10/85] target/hppa: Fix hppa64 case in machine.c, Richard Henderson, 2023/11/06
- [PULL 15/85] target/hppa: Fix bb_sar for hppa64, Richard Henderson, 2023/11/06
- [PULL 18/85] target/hppa: Make HPPA_BTLB_ENTRIES variable, Richard Henderson, 2023/11/06
- [PULL 11/85] target/hppa: Fix load in do_load_32, Richard Henderson, 2023/11/06
- [PULL 30/85] target/hppa: Pass d to do_cond, Richard Henderson, 2023/11/06
- [PULL 22/85] target/hppa: Handle absolute addresses for pa2.0, Richard Henderson, 2023/11/06
- [PULL 37/85] target/hppa: Remove TARGET_HPPA64, Richard Henderson, 2023/11/06
- [PULL 38/85] target/hppa: Decode d for logical instructions, Richard Henderson, 2023/11/06
- [PULL 16/85] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/11/06