[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 18/25] target/arm: Introduce gen_exception
From: |
Richard Henderson |
Subject: |
[PATCH v2 18/25] target/arm: Introduce gen_exception |
Date: |
Mon, 6 Jun 2022 19:47:27 -0700 |
Create a new wrapper function that passes the default
exception target to gen_exception_el.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index edb7d3f394..5a48937ede 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -1093,6 +1093,11 @@ static void gen_exception_el(int excp, uint32_t
syndrome, uint32_t target_el)
tcg_constant_i32(target_el));
}
+static void gen_exception(DisasContext *s, int excp, uint32_t syndrome)
+{
+ gen_exception_el(excp, syndrome, default_exception_el(s));
+}
+
static void gen_exception_insn_el_v(DisasContext *s, uint64_t pc, int excp,
uint32_t syn, TCGv_i32 tcg_el)
{
@@ -9758,8 +9763,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cpu)
switch (dc->base.is_jmp) {
case DISAS_SWI:
gen_ss_advance(dc);
- gen_exception_el(EXCP_SWI, syn_aa32_svc(dc->svc_imm, dc->thumb),
- default_exception_el(dc));
+ gen_exception(dc, EXCP_SWI, syn_aa32_svc(dc->svc_imm, dc->thumb));
break;
case DISAS_HVC:
gen_ss_advance(dc);
@@ -9828,8 +9832,7 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cpu)
gen_helper_yield(cpu_env);
break;
case DISAS_SWI:
- gen_exception_el(EXCP_SWI, syn_aa32_svc(dc->svc_imm, dc->thumb),
- default_exception_el(dc));
+ gen_exception(dc, EXCP_SWI, syn_aa32_svc(dc->svc_imm, dc->thumb));
break;
case DISAS_HVC:
gen_exception_el(EXCP_HVC, syn_aa32_hvc(dc->svc_imm), 2);
--
2.34.1
- [PATCH v2 12/25] target/arm: Rename gen_exception_insn to gen_exception_insn_el, (continued)
- [PATCH v2 12/25] target/arm: Rename gen_exception_insn to gen_exception_insn_el, Richard Henderson, 2022/06/06
- [PATCH v2 14/25] target/arm: Create helper_exception_swstep, Richard Henderson, 2022/06/06
- [PATCH v2 15/25] target/arm: Remove TBFLAG_ANY.DEBUG_TARGET_EL, Richard Henderson, 2022/06/06
- [PATCH v2 17/25] target/arm: Rename gen_exception to gen_exception_el, Richard Henderson, 2022/06/06
- [PATCH v2 16/25] target/arm: Move gen_exception to translate.c, Richard Henderson, 2022/06/06
- [PATCH v2 18/25] target/arm: Introduce gen_exception,
Richard Henderson <=
- [PATCH v2 22/25] target/arm: Create raise_exception_debug, Richard Henderson, 2022/06/06
- [PATCH v2 20/25] target/arm: Introduce helper_exception_with_syndrome, Richard Henderson, 2022/06/06
- [PATCH v2 23/25] target/arm: Move arm_debug_target_el to debug_helper.c, Richard Henderson, 2022/06/06
- [PATCH v2 25/25] target/arm: Fix Secure PL1 tests in fp_exception_el, Richard Henderson, 2022/06/06
- [PATCH v2 19/25] target/arm: Introduce gen_exception_el_v, Richard Henderson, 2022/06/06