[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/47] target/arm: Use tcg_constant in gen_mte_check*
From: |
Richard Henderson |
Subject: |
[PATCH 02/47] target/arm: Use tcg_constant in gen_mte_check* |
Date: |
Tue, 26 Apr 2022 09:29:58 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-a64.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index c6ab0433af..7b5bfb0889 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -258,7 +258,6 @@ static TCGv_i64 gen_mte_check1_mmuidx(DisasContext *s,
TCGv_i64 addr,
int core_idx)
{
if (tag_checked && s->mte_active[is_unpriv]) {
- TCGv_i32 tcg_desc;
TCGv_i64 ret;
int desc = 0;
@@ -267,11 +266,9 @@ static TCGv_i64 gen_mte_check1_mmuidx(DisasContext *s,
TCGv_i64 addr,
desc = FIELD_DP32(desc, MTEDESC, TCMA, s->tcma);
desc = FIELD_DP32(desc, MTEDESC, WRITE, is_write);
desc = FIELD_DP32(desc, MTEDESC, SIZEM1, (1 << log2_size) - 1);
- tcg_desc = tcg_const_i32(desc);
ret = new_tmp_a64(s);
- gen_helper_mte_check(ret, cpu_env, tcg_desc, addr);
- tcg_temp_free_i32(tcg_desc);
+ gen_helper_mte_check(ret, cpu_env, tcg_constant_i32(desc), addr);
return ret;
}
@@ -292,7 +289,6 @@ TCGv_i64 gen_mte_checkN(DisasContext *s, TCGv_i64 addr,
bool is_write,
bool tag_checked, int size)
{
if (tag_checked && s->mte_active[0]) {
- TCGv_i32 tcg_desc;
TCGv_i64 ret;
int desc = 0;
@@ -301,11 +297,9 @@ TCGv_i64 gen_mte_checkN(DisasContext *s, TCGv_i64 addr,
bool is_write,
desc = FIELD_DP32(desc, MTEDESC, TCMA, s->tcma);
desc = FIELD_DP32(desc, MTEDESC, WRITE, is_write);
desc = FIELD_DP32(desc, MTEDESC, SIZEM1, size - 1);
- tcg_desc = tcg_const_i32(desc);
ret = new_tmp_a64(s);
- gen_helper_mte_check(ret, cpu_env, tcg_desc, addr);
- tcg_temp_free_i32(tcg_desc);
+ gen_helper_mte_check(ret, cpu_env, tcg_constant_i32(desc), addr);
return ret;
}
--
2.34.1
- [PATCH 00/47] target/arm: Use tcg_constant, Richard Henderson, 2022/04/26
- [PATCH 07/47] target/arm: Use tcg_constant in disas_exc, Richard Henderson, 2022/04/26
- [PATCH 02/47] target/arm: Use tcg_constant in gen_mte_check*,
Richard Henderson <=
- [PATCH 04/47] target/arm: Use tcg_constant in gen_adc_CC, Richard Henderson, 2022/04/26
- [PATCH 14/47] target/arm: Use tcg_constant in disas_cond_select, Richard Henderson, 2022/04/26
- [PATCH 11/47] target/arm: Use tcg_constant in disas_add_sum_imm*, Richard Henderson, 2022/04/26
- [PATCH 19/47] target/arm: Use tcg_constant in simd fp/int conversion, Richard Henderson, 2022/04/26
- [PATCH 18/47] target/arm: Use tcg_constant in simd shift expanders, Richard Henderson, 2022/04/26