[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/28] target/arm: Introduce gen_exception_insn_el_v
From: |
Peter Maydell |
Subject: |
[PULL 10/28] target/arm: Introduce gen_exception_insn_el_v |
Date: |
Fri, 10 Jun 2022 17:07:20 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Create a function below gen_exception_insn that takes
the target_el as a TCGv_i32, replacing gen_exception_el.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220609202901.1177572-11-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/translate.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index dc033600c0e..9cb31663ddb 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -1086,8 +1086,8 @@ static void gen_exception_internal_insn(DisasContext *s,
uint32_t pc, int excp)
s->base.is_jmp = DISAS_NORETURN;
}
-void gen_exception_insn(DisasContext *s, uint64_t pc, int excp,
- uint32_t syn, uint32_t target_el)
+static void gen_exception_insn_el_v(DisasContext *s, uint64_t pc, int excp,
+ uint32_t syn, TCGv_i32 tcg_el)
{
if (s->aarch64) {
gen_a64_set_pc_im(pc);
@@ -1095,10 +1095,17 @@ void gen_exception_insn(DisasContext *s, uint64_t pc,
int excp,
gen_set_condexec(s);
gen_set_pc_im(s, pc);
}
- gen_exception(excp, syn, target_el);
+ gen_helper_exception_with_syndrome_el(cpu_env, tcg_constant_i32(excp),
+ tcg_constant_i32(syn), tcg_el);
s->base.is_jmp = DISAS_NORETURN;
}
+void gen_exception_insn(DisasContext *s, uint64_t pc, int excp,
+ uint32_t syn, uint32_t target_el)
+{
+ gen_exception_insn_el_v(s, pc, excp, syn, tcg_constant_i32(target_el));
+}
+
static void gen_exception_bkpt_insn(DisasContext *s, uint32_t syn)
{
gen_set_condexec(s);
@@ -1114,17 +1121,6 @@ void unallocated_encoding(DisasContext *s)
default_exception_el(s));
}
-static void gen_exception_el(DisasContext *s, int excp, uint32_t syn,
- TCGv_i32 tcg_el)
-{
- gen_set_condexec(s);
- gen_set_pc_im(s, s->pc_curr);
- gen_helper_exception_with_syndrome_el(cpu_env,
- tcg_constant_i32(excp),
- tcg_constant_i32(syn), tcg_el);
- s->base.is_jmp = DISAS_NORETURN;
-}
-
/* Force a TB lookup after an instruction that changes the CPU state. */
void gen_lookup_tb(DisasContext *s)
{
@@ -2847,7 +2843,8 @@ static bool msr_banked_access_decode(DisasContext *s, int
r, int sysm, int rn,
tcg_el = tcg_constant_i32(3);
}
- gen_exception_el(s, EXCP_UDEF, syn_uncategorized(), tcg_el);
+ gen_exception_insn_el_v(s, s->pc_curr, EXCP_UDEF,
+ syn_uncategorized(), tcg_el);
tcg_temp_free_i32(tcg_el);
return false;
}
--
2.25.1
- [PULL 02/28] target/arm: Add coproc parameter to syn_fp_access_trap, (continued)
- [PULL 02/28] target/arm: Add coproc parameter to syn_fp_access_trap, Peter Maydell, 2022/06/10
- [PULL 01/28] target/arm: Mark exception helpers as noreturn, Peter Maydell, 2022/06/10
- [PULL 04/28] target/arm: Move arm_singlestep_active out of line, Peter Maydell, 2022/06/10
- [PULL 05/28] target/arm: Move arm_generate_debug_exceptions out of line, Peter Maydell, 2022/06/10
- [PULL 08/28] target/arm: Move arm_debug_exception_fsr to debug_helper.c, Peter Maydell, 2022/06/10
- [PULL 09/28] target/arm: Rename helper_exception_with_syndrome, Peter Maydell, 2022/06/10
- [PULL 12/28] target/arm: Introduce gen_exception_insn, Peter Maydell, 2022/06/10
- [PULL 11/28] target/arm: Rename gen_exception_insn to gen_exception_insn_el, Peter Maydell, 2022/06/10
- [PULL 03/28] target/arm: Move exception_target_el out of line, Peter Maydell, 2022/06/10
- [PULL 06/28] target/arm: Use is_a64 in arm_generate_debug_exceptions, Peter Maydell, 2022/06/10
- [PULL 10/28] target/arm: Introduce gen_exception_insn_el_v,
Peter Maydell <=
- [PULL 20/28] target/arm: Remove default_exception_el, Peter Maydell, 2022/06/10
- [PULL 18/28] target/arm: Introduce gen_exception_el_v, Peter Maydell, 2022/06/10
- [PULL 15/28] target/arm: Move gen_exception to translate.c, Peter Maydell, 2022/06/10
- [PULL 23/28] target/arm: Fix Secure PL1 tests in fp_exception_el, Peter Maydell, 2022/06/10
- [PULL 21/28] target/arm: Create raise_exception_debug, Peter Maydell, 2022/06/10
- [PULL 25/28] target/arm: Adjust format test in scr_write, Peter Maydell, 2022/06/10
- [PULL 28/28] semihosting/config: Merge --semihosting-config option groups, Peter Maydell, 2022/06/10
- [PULL 13/28] target/arm: Create helper_exception_swstep, Peter Maydell, 2022/06/10
- [PULL 14/28] target/arm: Remove TBFLAG_ANY.DEBUG_TARGET_EL, Peter Maydell, 2022/06/10
- [PULL 16/28] target/arm: Rename gen_exception to gen_exception_el, Peter Maydell, 2022/06/10