[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 28/47] target/arm: Use tcg_constant for op_s_{rri,rxi}_rot
From: |
Richard Henderson |
Subject: |
[PATCH 28/47] target/arm: Use tcg_constant for op_s_{rri,rxi}_rot |
Date: |
Tue, 26 Apr 2022 09:30:24 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 8476f259fc..223fd5fdfe 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -5495,18 +5495,16 @@ static bool op_s_rri_rot(DisasContext *s, arg_s_rri_rot
*a,
void (*gen)(TCGv_i32, TCGv_i32, TCGv_i32),
int logic_cc, StoreRegKind kind)
{
- TCGv_i32 tmp1, tmp2;
+ TCGv_i32 tmp1;
uint32_t imm;
imm = ror32(a->imm, a->rot);
if (logic_cc && a->rot) {
tcg_gen_movi_i32(cpu_CF, imm >> 31);
}
- tmp2 = tcg_const_i32(imm);
tmp1 = load_reg(s, a->rn);
- gen(tmp1, tmp1, tmp2);
- tcg_temp_free_i32(tmp2);
+ gen(tmp1, tmp1, tcg_constant_i32(imm));
if (logic_cc) {
gen_logic_CC(tmp1);
@@ -5525,9 +5523,10 @@ static bool op_s_rxi_rot(DisasContext *s, arg_s_rri_rot
*a,
if (logic_cc && a->rot) {
tcg_gen_movi_i32(cpu_CF, imm >> 31);
}
- tmp = tcg_const_i32(imm);
- gen(tmp, tmp);
+ tmp = tcg_temp_new_i32();
+ gen(tmp, tcg_constant_i32(imm));
+
if (logic_cc) {
gen_logic_CC(tmp);
}
--
2.34.1
- [PATCH 15/47] target/arm: Use tcg_constant in handle_{rev16,crc32}, (continued)
- [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
- [PATCH 28/47] target/arm: Use tcg_constant for op_s_{rri,rxi}_rot,
Richard Henderson <=
- [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, 2022/04/26