[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/47] target/arm: Use tcg_constant in simd shift expanders
From: |
Richard Henderson |
Subject: |
[PATCH 18/47] target/arm: Use tcg_constant in simd shift expanders |
Date: |
Tue, 26 Apr 2022 09:30:14 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-a64.c | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 847da725ea..45abac6892 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -8353,7 +8353,7 @@ static void handle_shri_with_rndacc(TCGv_i64 tcg_res,
TCGv_i64 tcg_src,
/* Deal with the rounding step */
if (round) {
if (extended_result) {
- TCGv_i64 tcg_zero = tcg_const_i64(0);
+ TCGv_i64 tcg_zero = tcg_constant_i64(0);
if (!is_u) {
/* take care of sign extending tcg_res */
tcg_gen_sari_i64(tcg_src_hi, tcg_src, 63);
@@ -8365,7 +8365,6 @@ static void handle_shri_with_rndacc(TCGv_i64 tcg_res,
TCGv_i64 tcg_src,
tcg_src, tcg_zero,
tcg_rnd, tcg_zero);
}
- tcg_temp_free_i64(tcg_zero);
} else {
tcg_gen_add_i64(tcg_src, tcg_src, tcg_rnd);
}
@@ -8451,8 +8450,7 @@ static void handle_scalar_simd_shri(DisasContext *s,
}
if (round) {
- uint64_t round_const = 1ULL << (shift - 1);
- tcg_round = tcg_const_i64(round_const);
+ tcg_round = tcg_constant_i64(1ULL << (shift - 1));
} else {
tcg_round = NULL;
}
@@ -8478,9 +8476,6 @@ static void handle_scalar_simd_shri(DisasContext *s,
tcg_temp_free_i64(tcg_rn);
tcg_temp_free_i64(tcg_rd);
- if (round) {
- tcg_temp_free_i64(tcg_round);
- }
}
/* SHL/SLI - Scalar shift left */
@@ -8578,8 +8573,7 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool
is_scalar, bool is_q,
tcg_final = tcg_const_i64(0);
if (round) {
- uint64_t round_const = 1ULL << (shift - 1);
- tcg_round = tcg_const_i64(round_const);
+ tcg_round = tcg_constant_i64(1ULL << (shift - 1));
} else {
tcg_round = NULL;
}
@@ -8599,9 +8593,6 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool
is_scalar, bool is_q,
write_vec_element(s, tcg_final, rd, 1, MO_64);
}
- if (round) {
- tcg_temp_free_i64(tcg_round);
- }
tcg_temp_free_i64(tcg_rn);
tcg_temp_free_i64(tcg_rd);
tcg_temp_free_i32(tcg_rd_narrowed);
@@ -8653,7 +8644,7 @@ static void handle_simd_qshl(DisasContext *s, bool
scalar, bool is_q,
}
if (size == 3) {
- TCGv_i64 tcg_shift = tcg_const_i64(shift);
+ TCGv_i64 tcg_shift = tcg_constant_i64(shift);
static NeonGenTwo64OpEnvFn * const fns[2][2] = {
{ gen_helper_neon_qshl_s64, gen_helper_neon_qshlu_s64 },
{ NULL, gen_helper_neon_qshl_u64 },
@@ -8670,10 +8661,9 @@ static void handle_simd_qshl(DisasContext *s, bool
scalar, bool is_q,
tcg_temp_free_i64(tcg_op);
}
- tcg_temp_free_i64(tcg_shift);
clear_vec_high(s, is_q, rd);
} else {
- TCGv_i32 tcg_shift = tcg_const_i32(shift);
+ TCGv_i32 tcg_shift = tcg_constant_i32(shift);
static NeonGenTwoOpEnvFn * const fns[2][2][3] = {
{
{ gen_helper_neon_qshl_s8,
@@ -8718,7 +8708,6 @@ static void handle_simd_qshl(DisasContext *s, bool
scalar, bool is_q,
tcg_temp_free_i32(tcg_op);
}
- tcg_temp_free_i32(tcg_shift);
if (!scalar) {
clear_vec_high(s, is_q, rd);
--
2.34.1
- [PATCH 02/47] target/arm: Use tcg_constant in gen_mte_check*, (continued)
- [PATCH 02/47] target/arm: Use tcg_constant in gen_mte_check*, Richard Henderson, 2022/04/26
- [PATCH 04/47] target/arm: Use tcg_constant in gen_adc_CC, Richard Henderson, 2022/04/26
- [PATCH 14/47] target/arm: Use tcg_constant in disas_cond_select, Richard Henderson, 2022/04/26
- [PATCH 11/47] target/arm: Use tcg_constant in disas_add_sum_imm*, Richard Henderson, 2022/04/26
- [PATCH 19/47] target/arm: Use tcg_constant in simd fp/int conversion, Richard Henderson, 2022/04/26
- [PATCH 18/47] target/arm: Use tcg_constant in simd shift expanders,
Richard Henderson <=
- [PATCH 06/47] target/arm: Use tcg_constant in handle_sys, Richard Henderson, 2022/04/26
- [PATCH 09/47] target/arm: Use tcg_constant in disas_ld_lit, Richard Henderson, 2022/04/26
- [PATCH 03/47] target/arm: Use tcg_constant in gen_exception*, Richard Henderson, 2022/04/26
- [PATCH 01/47] target/arm: Use tcg_constant in gen_probe_access, Richard Henderson, 2022/04/26
- [PATCH 17/47] target/arm: Use tcg_constant in disas_fp*, Richard Henderson, 2022/04/26