[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 66/76] target/sparc: Drop get_temp_i32
From: |
Richard Henderson |
Subject: |
[PATCH 66/76] target/sparc: Drop get_temp_i32 |
Date: |
Fri, 24 Feb 2023 23:14:17 -1000 |
Translators are no longer required to free tcg temporaries,
therefore there's no need to record temps for later freeing.
Replace the few uses with tcg_temp_new_i32.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 2b4af692f6..bdf464f802 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -84,8 +84,6 @@ typedef struct DisasContext {
uint32_t cc_op; /* current CC operation */
sparc_def_t *def;
- TCGv_i32 t32[3];
- int n_t32;
#ifdef TARGET_SPARC64
int fprs_dirty;
int asi;
@@ -129,14 +127,6 @@ static int sign_extend(int x, int len)
#define IS_IMM (insn & (1<<13))
-static inline TCGv_i32 get_temp_i32(DisasContext *dc)
-{
- TCGv_i32 t;
- assert(dc->n_t32 < ARRAY_SIZE(dc->t32));
- dc->t32[dc->n_t32++] = t = tcg_temp_new_i32();
- return t;
-}
-
static inline void gen_update_fprs_dirty(DisasContext *dc, int rd)
{
#if defined(TARGET_SPARC64)
@@ -153,7 +143,7 @@ static inline void gen_update_fprs_dirty(DisasContext *dc,
int rd)
/* floating point registers moves */
static TCGv_i32 gen_load_fpr_F(DisasContext *dc, unsigned int src)
{
- TCGv_i32 ret = get_temp_i32(dc);
+ TCGv_i32 ret = tcg_temp_new_i32();
if (src & 1) {
tcg_gen_extrl_i64_i32(ret, cpu_fpr[src / 2]);
} else {
@@ -175,7 +165,7 @@ static void gen_store_fpr_F(DisasContext *dc, unsigned int
dst, TCGv_i32 v)
static TCGv_i32 gen_dest_fpr_F(DisasContext *dc)
{
- return get_temp_i32(dc);
+ return tcg_temp_new_i32();
}
static TCGv_i64 gen_load_fpr_D(DisasContext *dc, unsigned int src)
@@ -5516,7 +5506,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned
int insn)
break;
}
#endif
- cpu_dst_32 = get_temp_i32(dc);
+ cpu_dst_32 = tcg_temp_new_i32();
tcg_gen_qemu_ld_i32(cpu_dst_32, cpu_addr,
dc->mem_idx, MO_TEUL);
gen_helper_ldfsr(cpu_fsr, cpu_env, cpu_fsr, cpu_dst_32);
@@ -5762,14 +5752,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned
int insn)
gen_exception(dc, TT_NCP_INSN);
goto egress;
#endif
- egress:
- if (dc->n_t32 != 0) {
- int i;
- for (i = dc->n_t32 - 1; i >= 0; --i) {
- tcg_temp_free_i32(dc->t32[i]);
- }
- dc->n_t32 = 0;
- }
+ egress:;
}
static void sparc_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
--
2.34.1
- [PATCH 58/76] target/s390x: Use tcg_constant_* in translate_vx.c.inc, (continued)
- [PATCH 58/76] target/s390x: Use tcg_constant_* in translate_vx.c.inc, Richard Henderson, 2023/02/25
- [PATCH 50/76] target/ppc: Drop tcg_temp_free, Richard Henderson, 2023/02/25
- [PATCH 53/76] target/riscv: Drop tcg_temp_free, Richard Henderson, 2023/02/25
- [PATCH 54/76] target/rx: Drop tcg_temp_free, Richard Henderson, 2023/02/25
- [PATCH 57/76] target/s390x: Use tcg_constant_i32 for fpinst_extract_m34, Richard Henderson, 2023/02/25
- [PATCH 56/76] target/s390x: Use tcg_constant_* for DisasCompare, Richard Henderson, 2023/02/25
- [PATCH 64/76] target/sh4: Drop tcg_temp_free, Richard Henderson, 2023/02/25
- [PATCH 66/76] target/sparc: Drop get_temp_i32,
Richard Henderson <=
- [PATCH 67/76] target/sparc: Remove egress label in disas_sparc_context, Richard Henderson, 2023/02/25
- [PATCH 59/76] target/s390x: Drop free_compare, Richard Henderson, 2023/02/25
- [PATCH 68/76] target/sparc: Drop free_compare, Richard Henderson, 2023/02/25
- [PATCH 60/76] target/s390x: Drop tcg_temp_free from translate_vx.c.inc, Richard Henderson, 2023/02/25
- [PATCH 61/76] target/s390x: Drop tcg_temp_free from translate.c, Richard Henderson, 2023/02/25
- [PATCH 62/76] target/s390x: Remove assert vs g_in2, Richard Henderson, 2023/02/25
- [PATCH 72/76] target/xtensa: Drop tcg_temp_free, Richard Henderson, 2023/02/25
- [PATCH 73/76] include/exec/gen-icount: Drop tcg_temp_free in gen_tb_start, Richard Henderson, 2023/02/25
- [PATCH 75/76] tcg: Create tcg/tcg-temp-internal.h, Richard Henderson, 2023/02/25