[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/28] target/arm: Drop copies in gen_sve_{ldr,str}
From: |
Richard Henderson |
Subject: |
[PATCH v2 16/28] target/arm: Drop copies in gen_sve_{ldr,str} |
Date: |
Wed, 22 Feb 2023 13:27:03 -1000 |
Since we now get TEMP_TB temporaries by default, we no longer
need to make copies across these loops. These were the only
uses of new_tmp_a64_local(), so remove that as well.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-a64.h | 1 -
target/arm/translate-a64.c | 6 ------
target/arm/translate-sve.c | 32 --------------------------------
3 files changed, 39 deletions(-)
diff --git a/target/arm/translate-a64.h b/target/arm/translate-a64.h
index ad3762d1ac..ca24c39dbe 100644
--- a/target/arm/translate-a64.h
+++ b/target/arm/translate-a64.h
@@ -19,7 +19,6 @@
#define TARGET_ARM_TRANSLATE_A64_H
TCGv_i64 new_tmp_a64(DisasContext *s);
-TCGv_i64 new_tmp_a64_local(DisasContext *s);
TCGv_i64 new_tmp_a64_zero(DisasContext *s);
TCGv_i64 cpu_reg(DisasContext *s, int reg);
TCGv_i64 cpu_reg_sp(DisasContext *s, int reg);
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index da9f877476..300248a0ad 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -436,12 +436,6 @@ TCGv_i64 new_tmp_a64(DisasContext *s)
return s->tmp_a64[s->tmp_a64_count++] = tcg_temp_new_i64();
}
-TCGv_i64 new_tmp_a64_local(DisasContext *s)
-{
- assert(s->tmp_a64_count < TMP_A64_MAX);
- return s->tmp_a64[s->tmp_a64_count++] = tcg_temp_local_new_i64();
-}
-
TCGv_i64 new_tmp_a64_zero(DisasContext *s)
{
TCGv_i64 t = new_tmp_a64(s);
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 621a2abb22..02150d93e8 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -4344,17 +4344,6 @@ void gen_sve_ldr(DisasContext *s, TCGv_ptr base, int
vofs,
TCGLabel *loop = gen_new_label();
TCGv_ptr tp, i = tcg_const_local_ptr(0);
- /* Copy the clean address into a local temp, live across the loop. */
- t0 = clean_addr;
- clean_addr = new_tmp_a64_local(s);
- tcg_gen_mov_i64(clean_addr, t0);
-
- if (base != cpu_env) {
- TCGv_ptr b = tcg_temp_local_new_ptr();
- tcg_gen_mov_ptr(b, base);
- base = b;
- }
-
gen_set_label(loop);
t0 = tcg_temp_new_i64();
@@ -4370,11 +4359,6 @@ void gen_sve_ldr(DisasContext *s, TCGv_ptr base, int
vofs,
tcg_gen_brcondi_ptr(TCG_COND_LTU, i, len_align, loop);
tcg_temp_free_ptr(i);
-
- if (base != cpu_env) {
- tcg_temp_free_ptr(base);
- assert(len_remain == 0);
- }
}
/*
@@ -4445,17 +4429,6 @@ void gen_sve_str(DisasContext *s, TCGv_ptr base, int
vofs,
TCGLabel *loop = gen_new_label();
TCGv_ptr tp, i = tcg_const_local_ptr(0);
- /* Copy the clean address into a local temp, live across the loop. */
- t0 = clean_addr;
- clean_addr = new_tmp_a64_local(s);
- tcg_gen_mov_i64(clean_addr, t0);
-
- if (base != cpu_env) {
- TCGv_ptr b = tcg_temp_local_new_ptr();
- tcg_gen_mov_ptr(b, base);
- base = b;
- }
-
gen_set_label(loop);
t0 = tcg_temp_new_i64();
@@ -4471,11 +4444,6 @@ void gen_sve_str(DisasContext *s, TCGv_ptr base, int
vofs,
tcg_gen_brcondi_ptr(TCG_COND_LTU, i, len_align, loop);
tcg_temp_free_ptr(i);
-
- if (base != cpu_env) {
- tcg_temp_free_ptr(base);
- assert(len_remain == 0);
- }
}
/* Predicate register stores can be any multiple of 2. */
--
2.34.1
- [PATCH v2 06/28] tcg: Add liveness_pass_0, (continued)
- [PATCH v2 06/28] tcg: Add liveness_pass_0, Richard Henderson, 2023/02/22
- [PATCH v2 07/28] tcg: Remove TEMP_NORMAL, Richard Henderson, 2023/02/22
- [PATCH v2 08/28] tcg: Pass TCGTempKind to tcg_temp_new_internal, Richard Henderson, 2023/02/22
- [PATCH v2 09/28] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr}, Richard Henderson, 2023/02/22
- [PATCH v2 10/28] tcg: Add tcg_gen_movi_ptr, Richard Henderson, 2023/02/22
- [PATCH v2 12/28] accel/tcg/plugin: Use tcg_temp_ebb_*, Richard Henderson, 2023/02/22
- [PATCH v2 13/28] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers, Richard Henderson, 2023/02/22
- [PATCH v2 11/28] tcg: Use tcg_temp_ebb_new_* in tcg/, Richard Henderson, 2023/02/22
- [PATCH v2 14/28] tcg: Don't re-use TEMP_TB temporaries, Richard Henderson, 2023/02/22
- [PATCH v2 15/28] tcg: Change default temp lifetime to TEMP_TB, Richard Henderson, 2023/02/22
- [PATCH v2 16/28] target/arm: Drop copies in gen_sve_{ldr,str},
Richard Henderson <=
- [PATCH v2 17/28] target/arm: Don't use tcg_temp_local_new_*, Richard Henderson, 2023/02/22
- [PATCH v2 18/28] target/cris: Don't use tcg_temp_local_new, Richard Henderson, 2023/02/22
- [PATCH v2 21/28] target/i386: Don't use tcg_temp_local_new, Richard Henderson, 2023/02/22
- [PATCH v2 20/28] target/hppa: Don't use tcg_temp_local_new, Richard Henderson, 2023/02/22
- [PATCH v2 22/28] target/mips: Don't use tcg_temp_local_new, Richard Henderson, 2023/02/22
- [PATCH v2 26/28] tcg: Remove tcg_temp_local_new_*, tcg_const_local_*, Richard Henderson, 2023/02/22
- [PATCH v2 23/28] target/ppc: Don't use tcg_temp_local_new, Richard Henderson, 2023/02/22
- [PATCH v2 25/28] exec/gen-icount: Don't use tcg_temp_local_new_i32, Richard Henderson, 2023/02/22
- [PATCH v2 19/28] target/hexagon: Don't use tcg_temp_local_new_*, Richard Henderson, 2023/02/22