[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 44/47] target/arm: Use tcg_constant in do_zzi_{sat, ool}, do_fp_i
From: |
Richard Henderson |
Subject: |
[PATCH 44/47] target/arm: Use tcg_constant in do_zzi_{sat, ool}, do_fp_imm |
Date: |
Tue, 26 Apr 2022 09:30:40 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-sve.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 92339a19e3..a684d489d2 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -3853,9 +3853,8 @@ static bool do_zzi_sat(DisasContext *s, arg_rri_esz *a,
bool u, bool d)
return false;
}
if (sve_access_check(s)) {
- TCGv_i64 val = tcg_const_i64(a->imm);
- do_sat_addsub_vec(s, a->esz, a->rd, a->rn, val, u, d);
- tcg_temp_free_i64(val);
+ do_sat_addsub_vec(s, a->esz, a->rd, a->rn,
+ tcg_constant_i64(a->imm), u, d);
}
return true;
}
@@ -3884,12 +3883,9 @@ static bool do_zzi_ool(DisasContext *s, arg_rri_esz *a,
gen_helper_gvec_2i *fn)
{
if (sve_access_check(s)) {
unsigned vsz = vec_full_reg_size(s);
- TCGv_i64 c = tcg_const_i64(a->imm);
-
tcg_gen_gvec_2i_ool(vec_full_reg_offset(s, a->rd),
vec_full_reg_offset(s, a->rn),
- c, vsz, vsz, 0, fn);
- tcg_temp_free_i64(c);
+ tcg_constant_i64(a->imm), vsz, vsz, 0, fn);
}
return true;
}
@@ -4520,9 +4516,8 @@ static void do_fp_scalar(DisasContext *s, int zd, int zn,
int pg, bool is_fp16,
static void do_fp_imm(DisasContext *s, arg_rpri_esz *a, uint64_t imm,
gen_helper_sve_fp2scalar *fn)
{
- TCGv_i64 temp = tcg_const_i64(imm);
- do_fp_scalar(s, a->rd, a->rn, a->pg, a->esz == MO_16, temp, fn);
- tcg_temp_free_i64(temp);
+ do_fp_scalar(s, a->rd, a->rn, a->pg, a->esz == MO_16,
+ tcg_constant_i64(imm), fn);
}
#define DO_FP_IMM(NAME, name, const0, const1) \
--
2.34.1
- [PATCH 40/47] target/arm: Use tcg_constant in do_clast_scalar, (continued)
- [PATCH 40/47] target/arm: Use tcg_constant in do_clast_scalar, Richard Henderson, 2022/04/26
- [PATCH 41/47] target/arm: Use tcg_constant in WHILE, Richard Henderson, 2022/04/26
- [PATCH 42/47] target/arm: Use tcg_constant in LD1, ST1, Richard Henderson, 2022/04/26
- [PATCH 43/47] target/arm: Use tcg_constant in SUBR, Richard Henderson, 2022/04/26
- [PATCH 45/47] target/arm: Use tcg_constant for predicate descriptors, Richard Henderson, 2022/04/26
- [PATCH 44/47] target/arm: Use tcg_constant in do_zzi_{sat, ool}, do_fp_imm,
Richard Henderson <=
- [PATCH 46/47] target/arm: Use tcg_constant for do_brk{2,3}, Richard Henderson, 2022/04/26
- [PATCH 47/47] target/arm: Use tcg_constant for vector descriptor, Richard Henderson, 2022/04/26
- Re: [PATCH 00/47] target/arm: Use tcg_constant, Peter Maydell, 2022/04/28