[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 30/47] target/arm: Use tcg_constant for v7m MRS, MSR
From: |
Richard Henderson |
Subject: |
[PATCH 30/47] target/arm: Use tcg_constant for v7m MRS, MSR |
Date: |
Tue, 26 Apr 2022 09:30:26 -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 cc540f2b47..b604a820c0 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -6369,8 +6369,8 @@ static bool trans_MRS_v7m(DisasContext *s, arg_MRS_v7m *a)
if (!arm_dc_feature(s, ARM_FEATURE_M)) {
return false;
}
- tmp = tcg_const_i32(a->sysm);
- gen_helper_v7m_mrs(tmp, cpu_env, tmp);
+ tmp = tcg_temp_new_i32();
+ gen_helper_v7m_mrs(tmp, cpu_env, tcg_constant_i32(a->sysm));
store_reg(s, a->rd, tmp);
return true;
}
@@ -6382,10 +6382,9 @@ static bool trans_MSR_v7m(DisasContext *s, arg_MSR_v7m
*a)
if (!arm_dc_feature(s, ARM_FEATURE_M)) {
return false;
}
- addr = tcg_const_i32((a->mask << 10) | a->sysm);
+ addr = tcg_constant_i32((a->mask << 10) | a->sysm);
reg = load_reg(s, a->rn);
gen_helper_v7m_msr(cpu_env, addr, reg);
- tcg_temp_free_i32(addr);
tcg_temp_free_i32(reg);
/* If we wrote to CONTROL, the EL might have changed */
gen_rebuild_hflags(s, true);
--
2.34.1
- [PATCH 09/47] target/arm: Use tcg_constant in disas_ld_lit, (continued)
- [PATCH 09/47] target/arm: Use tcg_constant in disas_ld_lit, Richard Henderson, 2022/04/26
- [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 <=
- [PATCH 35/47] target/arm: Use tcg_constant in trans_CSEL, Richard Henderson, 2022/04/26
- [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