[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 29/47] target/arm: Use tcg_constant for MOVW, UMAAL, CRC32
From: |
Richard Henderson |
Subject: |
[PATCH 29/47] target/arm: Use tcg_constant for MOVW, UMAAL, CRC32 |
Date: |
Tue, 26 Apr 2022 09:30:25 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@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 223fd5fdfe..cc540f2b47 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.34.1
- [PATCH 28/47] target/arm: Use tcg_constant for op_s_{rri,rxi}_rot, (continued)
- [PATCH 28/47] target/arm: Use tcg_constant for op_s_{rri,rxi}_rot, Richard Henderson, 2022/04/26
- [PATCH 26/47] target/arm: Use tcg_constant for do_coproc_insn, Richard Henderson, 2022/04/26
- [PATCH 23/47] target/arm: Use tcg_constant for disas_iwmmxt_insn, Richard Henderson, 2022/04/26
- [PATCH 24/47] target/arm: Use tcg_constant for gen_{msr,mrs}, Richard Henderson, 2022/04/26
- [PATCH 27/47] target/arm: Use tcg_constant for gen_srs, Richard Henderson, 2022/04/26
- [PATCH 29/47] target/arm: Use tcg_constant for MOVW, UMAAL, CRC32,
Richard Henderson <=
- [PATCH 34/47] target/arm: Use tcg_constant in trans_CPS_v7m, Richard Henderson, 2022/04/26
- [PATCH 33/47] target/arm: Use tcg_constant in CLRM, DLS, WLS, LE, Richard Henderson, 2022/04/26
- [PATCH 22/47] target/arm: Use tcg_constant for aa32 exceptions, Richard Henderson, 2022/04/26
- [PATCH 25/47] target/arm: Use tcg_constant for vector shift expanders, Richard Henderson, 2022/04/26
- [PATCH 32/47] target/arm: Use tcg_constant in LDM, STM, Richard Henderson, 2022/04/26