[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/54] target/arm: Use tcg_constant for MOVW, UMAAL, CRC32
From: |
Peter Maydell |
Subject: |
[PULL 29/54] target/arm: Use tcg_constant for MOVW, UMAAL, CRC32 |
Date: |
Thu, 28 Apr 2022 15:39:33 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220426163043.100432-30-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/translate.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 223fd5fdfe7..cc540f2b47f 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -5652,14 +5652,11 @@ static bool trans_ADR(DisasContext *s, arg_ri *a)
static bool trans_MOVW(DisasContext *s, arg_MOVW *a)
{
- TCGv_i32 tmp;
-
if (!ENABLE_ARCH_6T2) {
return false;
}
- tmp = tcg_const_i32(a->imm);
- store_reg(s, a->rd, tmp);
+ store_reg(s, a->rd, tcg_constant_i32(a->imm));
return true;
}
@@ -6030,14 +6027,13 @@ static bool trans_UMAAL(DisasContext *s, arg_UMAAL *a)
t0 = load_reg(s, a->rm);
t1 = load_reg(s, a->rn);
tcg_gen_mulu2_i32(t0, t1, t0, t1);
- zero = tcg_const_i32(0);
+ zero = tcg_constant_i32(0);
t2 = load_reg(s, a->ra);
tcg_gen_add2_i32(t0, t1, t0, t1, t2, zero);
tcg_temp_free_i32(t2);
t2 = load_reg(s, a->rd);
tcg_gen_add2_i32(t0, t1, t0, t1, t2, zero);
tcg_temp_free_i32(t2);
- tcg_temp_free_i32(zero);
store_reg(s, a->ra, t0);
store_reg(s, a->rd, t1);
return true;
@@ -6284,14 +6280,13 @@ static bool op_crc32(DisasContext *s, arg_rrr *a, bool
c, MemOp sz)
default:
g_assert_not_reached();
}
- t3 = tcg_const_i32(1 << sz);
+ t3 = tcg_constant_i32(1 << sz);
if (c) {
gen_helper_crc32c(t1, t1, t2, t3);
} else {
gen_helper_crc32(t1, t1, t2, t3);
}
tcg_temp_free_i32(t2);
- tcg_temp_free_i32(t3);
store_reg(s, a->rd, t1);
return true;
}
--
2.25.1
- [PULL 16/54] target/arm: Use tcg_constant in disas_data_proc_2src, (continued)
- [PULL 16/54] target/arm: Use tcg_constant in disas_data_proc_2src, Peter Maydell, 2022/04/28
- [PULL 03/54] target/arm: Use tcg_constant in gen_exception*, Peter Maydell, 2022/04/28
- [PULL 08/54] target/arm: Use tcg_constant in gen_compare_and_swap_pair, Peter Maydell, 2022/04/28
- [PULL 10/54] target/arm: Use tcg_constant in disas_ldst_*, Peter Maydell, 2022/04/28
- [PULL 12/54] target/arm: Use tcg_constant in disas_movw_imm, Peter Maydell, 2022/04/28
- [PULL 18/54] target/arm: Use tcg_constant in simd shift expanders, Peter Maydell, 2022/04/28
- [PULL 19/54] target/arm: Use tcg_constant in simd fp/int conversion, Peter Maydell, 2022/04/28
- [PULL 20/54] target/arm: Use tcg_constant in 2misc expanders, Peter Maydell, 2022/04/28
- [PULL 23/54] target/arm: Use tcg_constant for disas_iwmmxt_insn, Peter Maydell, 2022/04/28
- [PULL 22/54] target/arm: Use tcg_constant for aa32 exceptions, Peter Maydell, 2022/04/28
- [PULL 29/54] target/arm: Use tcg_constant for MOVW, UMAAL, CRC32,
Peter Maydell <=
- [PULL 17/54] target/arm: Use tcg_constant in disas_fp*, Peter Maydell, 2022/04/28
- [PULL 34/54] target/arm: Use tcg_constant in trans_CPS_v7m, Peter Maydell, 2022/04/28
- [PULL 35/54] target/arm: Use tcg_constant in trans_CSEL, Peter Maydell, 2022/04/28
- [PULL 41/54] target/arm: Use tcg_constant in WHILE, Peter Maydell, 2022/04/28
- [PULL 37/54] target/arm: Use tcg_constant in SINCDEC, INCDEC, Peter Maydell, 2022/04/28
- [PULL 43/54] target/arm: Use tcg_constant in SUBR, Peter Maydell, 2022/04/28
- [PULL 44/54] target/arm: Use tcg_constant in do_zzi_{sat, ool}, do_fp_imm, Peter Maydell, 2022/04/28
- [PULL 52/54] target/arm: Advertise support for FEAT_TTL, Peter Maydell, 2022/04/28
- [PULL 26/54] target/arm: Use tcg_constant for do_coproc_insn, Peter Maydell, 2022/04/28
- [PULL 39/54] target/arm: Use tcg_constant in {incr, wrap}_last_active, Peter Maydell, 2022/04/28