[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 37/47] target/arm: Use tcg_constant in SINCDEC, INCDEC
From: |
Richard Henderson |
Subject: |
[PATCH 37/47] target/arm: Use tcg_constant in SINCDEC, INCDEC |
Date: |
Tue, 26 Apr 2022 09:30:33 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-sve.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 8b173f5c4a..9321457f31 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -2103,9 +2103,7 @@ static bool trans_SINCDEC_r_32(DisasContext *s,
arg_incdec_cnt *a)
tcg_gen_ext32s_i64(reg, reg);
}
} else {
- TCGv_i64 t = tcg_const_i64(inc);
- do_sat_addsub_32(reg, t, a->u, a->d);
- tcg_temp_free_i64(t);
+ do_sat_addsub_32(reg, tcg_constant_i64(inc), a->u, a->d);
}
return true;
}
@@ -2122,9 +2120,7 @@ static bool trans_SINCDEC_r_64(DisasContext *s,
arg_incdec_cnt *a)
TCGv_i64 reg = cpu_reg(s, a->rd);
if (inc != 0) {
- TCGv_i64 t = tcg_const_i64(inc);
- do_sat_addsub_64(reg, t, a->u, a->d);
- tcg_temp_free_i64(t);
+ do_sat_addsub_64(reg, tcg_constant_i64(inc), a->u, a->d);
}
return true;
}
@@ -2141,11 +2137,10 @@ static bool trans_INCDEC_v(DisasContext *s,
arg_incdec2_cnt *a)
if (inc != 0) {
if (sve_access_check(s)) {
- TCGv_i64 t = tcg_const_i64(a->d ? -inc : inc);
tcg_gen_gvec_adds(a->esz, vec_full_reg_offset(s, a->rd),
vec_full_reg_offset(s, a->rn),
- t, fullsz, fullsz);
- tcg_temp_free_i64(t);
+ tcg_constant_i64(a->d ? -inc : inc),
+ fullsz, fullsz);
}
} else {
do_mov_z(s, a->rd, a->rn);
@@ -2165,9 +2160,8 @@ static bool trans_SINCDEC_v(DisasContext *s,
arg_incdec2_cnt *a)
if (inc != 0) {
if (sve_access_check(s)) {
- TCGv_i64 t = tcg_const_i64(inc);
- do_sat_addsub_vec(s, a->esz, a->rd, a->rn, t, a->u, a->d);
- tcg_temp_free_i64(t);
+ do_sat_addsub_vec(s, a->esz, a->rd, a->rn,
+ tcg_constant_i64(inc), a->u, a->d);
}
} else {
do_mov_z(s, a->rd, a->rn);
--
2.34.1
- [PATCH 30/47] target/arm: Use tcg_constant for v7m MRS, MSR, (continued)
- [PATCH 30/47] target/arm: Use tcg_constant for v7m MRS, MSR, Richard Henderson, 2022/04/26
- [PATCH 35/47] target/arm: Use tcg_constant in trans_CSEL, Richard Henderson, 2022/04/26
- [PATCH 08/47] target/arm: Use tcg_constant in gen_compare_and_swap_pair, Richard Henderson, 2022/04/26
- [PATCH 13/47] target/arm: Use tcg_constant in shift_reg_imm, Richard Henderson, 2022/04/26
- [PATCH 12/47] target/arm: Use tcg_constant in disas_movw_imm, Richard Henderson, 2022/04/26
- [PATCH 37/47] target/arm: Use tcg_constant in SINCDEC, INCDEC,
Richard Henderson <=
- [PATCH 15/47] target/arm: Use tcg_constant in handle_{rev16,crc32}, Richard Henderson, 2022/04/26
- [PATCH 10/47] target/arm: Use tcg_constant in disas_ldst_*, Richard Henderson, 2022/04/26
- [PATCH 20/47] target/arm: Use tcg_constant in 2misc expanders, Richard Henderson, 2022/04/26
- [PATCH 21/47] target/arm: Use tcg_constant in balance of translate-a64.c, Richard Henderson, 2022/04/26
- [PATCH 16/47] target/arm: Use tcg_constant in disas_data_proc_2src, Richard Henderson, 2022/04/26