[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 31/47] target/arm: Use tcg_constant for TT, SAT, SMMLA
From: |
Richard Henderson |
Subject: |
[PATCH 31/47] target/arm: Use tcg_constant for TT, SAT, SMMLA |
Date: |
Tue, 26 Apr 2022 09:30:27 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index b604a820c0..24e522e1d6 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -6596,8 +6596,8 @@ static bool trans_TT(DisasContext *s, arg_TT *a)
}
addr = load_reg(s, a->rn);
- tmp = tcg_const_i32((a->A << 1) | a->T);
- gen_helper_v7m_tt(tmp, cpu_env, addr, tmp);
+ tmp = tcg_temp_new_i32();
+ gen_helper_v7m_tt(tmp, cpu_env, addr, tcg_constant_i32((a->A << 1) |
a->T));
tcg_temp_free_i32(addr);
store_reg(s, a->rd, tmp);
return true;
@@ -7564,7 +7564,7 @@ static bool trans_PKH(DisasContext *s, arg_PKH *a)
static bool op_sat(DisasContext *s, arg_sat *a,
void (*gen)(TCGv_i32, TCGv_env, TCGv_i32, TCGv_i32))
{
- TCGv_i32 tmp, satimm;
+ TCGv_i32 tmp;
int shift = a->imm;
if (!ENABLE_ARCH_6) {
@@ -7578,9 +7578,7 @@ static bool op_sat(DisasContext *s, arg_sat *a,
tcg_gen_shli_i32(tmp, tmp, shift);
}
- satimm = tcg_const_i32(a->satimm);
- gen(tmp, cpu_env, tmp, satimm);
- tcg_temp_free_i32(satimm);
+ gen(tmp, cpu_env, tmp, tcg_constant_i32(a->satimm));
store_reg(s, a->rd, tmp);
return true;
@@ -7915,9 +7913,7 @@ static bool op_smmla(DisasContext *s, arg_rrrr *a, bool
round, bool sub)
* a non-zero multiplicand lowpart, and the correct result
* lowpart for rounding.
*/
- TCGv_i32 zero = tcg_const_i32(0);
- tcg_gen_sub2_i32(t2, t1, zero, t3, t2, t1);
- tcg_temp_free_i32(zero);
+ tcg_gen_sub2_i32(t2, t1, tcg_constant_i32(0), t3, t2, t1);
} else {
tcg_gen_add_i32(t1, t1, t3);
}
--
2.34.1
- [PATCH 34/47] target/arm: Use tcg_constant in trans_CPS_v7m, (continued)
- [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
- [PATCH 31/47] target/arm: Use tcg_constant for TT, SAT, SMMLA,
Richard Henderson <=
- [PATCH 39/47] target/arm: Use tcg_constant in {incr, wrap}_last_active, Richard Henderson, 2022/04/26
- [PATCH 38/47] target/arm: Use tcg_constant in FCPY, CPY, Richard Henderson, 2022/04/26
- [PATCH 36/47] target/arm: Use tcg_constant for trans_INDEX_*, Richard Henderson, 2022/04/26
- [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