[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 35/47] target/arm: Use tcg_constant in trans_CSEL
From: |
Richard Henderson |
Subject: |
[PATCH 35/47] target/arm: Use tcg_constant in trans_CSEL |
Date: |
Tue, 26 Apr 2022 09:30:31 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 5ce23947a1..37fb17cdaa 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -8982,13 +8982,14 @@ static bool trans_CSEL(DisasContext *s, arg_CSEL *a)
}
/* In this insn input reg fields of 0b1111 mean "zero", not "PC" */
+ zero = tcg_constant_i32(0);
if (a->rn == 15) {
- rn = tcg_const_i32(0);
+ rn = zero;
} else {
rn = load_reg(s, a->rn);
}
if (a->rm == 15) {
- rm = tcg_const_i32(0);
+ rm = zero;
} else {
rm = load_reg(s, a->rm);
}
@@ -9010,10 +9011,8 @@ static bool trans_CSEL(DisasContext *s, arg_CSEL *a)
}
arm_test_cc(&c, a->fcond);
- zero = tcg_const_i32(0);
tcg_gen_movcond_i32(c.cond, rn, c.value, zero, rn, rm);
arm_free_cc(&c);
- tcg_temp_free_i32(zero);
store_reg(s, a->rd, rn);
tcg_temp_free_i32(rm);
--
2.34.1
- [PATCH 03/47] target/arm: Use tcg_constant in gen_exception*, (continued)
- [PATCH 03/47] target/arm: Use tcg_constant in gen_exception*, Richard Henderson, 2022/04/26
- [PATCH 01/47] target/arm: Use tcg_constant in gen_probe_access, Richard Henderson, 2022/04/26
- [PATCH 17/47] target/arm: Use tcg_constant in disas_fp*, Richard Henderson, 2022/04/26
- [PATCH 05/47] target/arm: Use tcg_constant in handle_msr_i, Richard Henderson, 2022/04/26
- [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 <=
- [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, 2022/04/26
- [PATCH 15/47] target/arm: Use tcg_constant in handle_{rev16,crc32}, Richard Henderson, 2022/04/26