[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 71/76] target/sparc: Drop reset_sar_tracker
From: |
Richard Henderson |
Subject: |
[PATCH 71/76] target/sparc: Drop reset_sar_tracker |
Date: |
Fri, 24 Feb 2023 23:14:22 -1000 |
Translators are no longer required to free tcg temporaries.
Remove sar_m32_allocated, as sar_m32 non-null is equivalent.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/xtensa/translate.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 4af0650deb..910350dec6 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -57,7 +57,6 @@ struct DisasContext {
bool sar_5bit;
bool sar_m32_5bit;
- bool sar_m32_allocated;
TCGv_i32 sar_m32;
unsigned window;
@@ -284,14 +283,7 @@ static void init_sar_tracker(DisasContext *dc)
{
dc->sar_5bit = false;
dc->sar_m32_5bit = false;
- dc->sar_m32_allocated = false;
-}
-
-static void reset_sar_tracker(DisasContext *dc)
-{
- if (dc->sar_m32_allocated) {
- tcg_temp_free(dc->sar_m32);
- }
+ dc->sar_m32 = NULL;
}
static void gen_right_shift_sar(DisasContext *dc, TCGv_i32 sa)
@@ -306,9 +298,8 @@ static void gen_right_shift_sar(DisasContext *dc, TCGv_i32
sa)
static void gen_left_shift_sar(DisasContext *dc, TCGv_i32 sa)
{
- if (!dc->sar_m32_allocated) {
+ if (!dc->sar_m32) {
dc->sar_m32 = tcg_temp_new_i32();
- dc->sar_m32_allocated = true;
}
tcg_gen_andi_i32(dc->sar_m32, sa, 0x1f);
tcg_gen_sub_i32(cpu_SR[SAR], tcg_constant_i32(32), dc->sar_m32);
@@ -1247,7 +1238,6 @@ static void xtensa_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
- reset_sar_tracker(dc);
if (dc->icount) {
tcg_temp_free(dc->next_icount);
}
--
2.34.1
- [PATCH 60/76] target/s390x: Drop tcg_temp_free from translate_vx.c.inc, (continued)
- [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
- [PATCH 63/76] target/s390x: Remove g_out, g_out2, g_in1, g_in2 from DisasContext, Richard Henderson, 2023/02/25
- [PATCH 65/76] target/sparc: Drop get_temp_tl, Richard Henderson, 2023/02/25
- [PATCH 70/76] target/tricore: Drop tcg_temp_free, Richard Henderson, 2023/02/25
- [PATCH 71/76] target/sparc: Drop reset_sar_tracker,
Richard Henderson <=
- [PATCH 69/76] target/sparc: Drop tcg_temp_free, Richard Henderson, 2023/02/25
- [PATCH 74/76] tracing: remove transform.py, Richard Henderson, 2023/02/25
- Re: [PATCH 74/76] tracing: remove transform.py, Daniel Henrique Barboza, 2023/02/25
- [PATCH 76/76] docs/devel/tcg-ops: Drop recommendation to free temps, Richard Henderson, 2023/02/25