[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 04/23] target/arm: Move arm_singlestep_active out of line
From: |
Richard Henderson |
Subject: |
[PATCH v3 04/23] target/arm: Move arm_singlestep_active out of line |
Date: |
Thu, 9 Jun 2022 13:28:42 -0700 |
Move the function to debug_helper.c, and the
declaration to internals.h.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu.h | 10 ----------
target/arm/internals.h | 1 +
target/arm/debug_helper.c | 12 ++++++++++++
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 78dbcb5592..bb1dc3289a 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -3106,16 +3106,6 @@ static inline bool
arm_generate_debug_exceptions(CPUARMState *env)
}
}
-/* Is single-stepping active? (Note that the "is EL_D AArch64?" check
- * implicitly means this always returns false in pre-v8 CPUs.)
- */
-static inline bool arm_singlestep_active(CPUARMState *env)
-{
- return extract32(env->cp15.mdscr_el1, 0, 1)
- && arm_el_is_aa64(env, arm_debug_target_el(env))
- && arm_generate_debug_exceptions(env);
-}
-
static inline bool arm_sctlr_b(CPUARMState *env)
{
return
diff --git a/target/arm/internals.h b/target/arm/internals.h
index af9de2dbe5..64e2c1dfad 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1325,6 +1325,7 @@ bool el_is_in_host(CPUARMState *env, int el);
void aa32_max_features(ARMCPU *cpu);
int exception_target_el(CPUARMState *env);
+bool arm_singlestep_active(CPUARMState *env);
/* Powers of 2 for sve_vq_map et al. */
#define SVE_VQ_POW2_MAP \
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c
index 46893697cc..1abf41c5f8 100644
--- a/target/arm/debug_helper.c
+++ b/target/arm/debug_helper.c
@@ -11,6 +11,18 @@
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
+
+/*
+ * Is single-stepping active? (Note that the "is EL_D AArch64?" check
+ * implicitly means this always returns false in pre-v8 CPUs.)
+ */
+bool arm_singlestep_active(CPUARMState *env)
+{
+ return extract32(env->cp15.mdscr_el1, 0, 1)
+ && arm_el_is_aa64(env, arm_debug_target_el(env))
+ && arm_generate_debug_exceptions(env);
+}
+
/* Return true if the linked breakpoint entry lbn passes its checks */
static bool linked_bp_matches(ARMCPU *cpu, int lbn)
{
--
2.34.1
- [PATCH v3 00/23] target/arm: tidy exception routing, Richard Henderson, 2022/06/09
- [PATCH v3 01/23] target/arm: Mark exception helpers as noreturn, Richard Henderson, 2022/06/09
- [PATCH v3 02/23] target/arm: Add coproc parameter to syn_fp_access_trap, Richard Henderson, 2022/06/09
- [PATCH v3 04/23] target/arm: Move arm_singlestep_active out of line,
Richard Henderson <=
- [PATCH v3 03/23] target/arm: Move exception_target_el out of line, Richard Henderson, 2022/06/09
- [PATCH v3 06/23] target/arm: Use is_a64 in arm_generate_debug_exceptions, Richard Henderson, 2022/06/09
- [PATCH v3 08/23] target/arm: Move arm_debug_exception_fsr to debug_helper.c, Richard Henderson, 2022/06/09
- [PATCH v3 09/23] target/arm: Rename helper_exception_with_syndrome, Richard Henderson, 2022/06/09
- [PATCH v3 07/23] target/arm: Move exception_bkpt_insn to debug_helper.c, Richard Henderson, 2022/06/09
- [PATCH v3 10/23] target/arm: Introduce gen_exception_insn_el_v, Richard Henderson, 2022/06/09
- [PATCH v3 11/23] target/arm: Rename gen_exception_insn to gen_exception_insn_el, Richard Henderson, 2022/06/09
- [PATCH v3 12/23] target/arm: Introduce gen_exception_insn, Richard Henderson, 2022/06/09
- [PATCH v3 13/23] target/arm: Create helper_exception_swstep, Richard Henderson, 2022/06/09
- [PATCH v3 17/23] target/arm: Introduce gen_exception, Richard Henderson, 2022/06/09