[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/18] target/arm: Move arm_singlestep_active out of line
From: |
Richard Henderson |
Subject: |
[PATCH 05/18] target/arm: Move arm_singlestep_active out of line |
Date: |
Mon, 23 May 2022 13:47:29 -0700 |
Move the function to debug_helper.c, and the
declaration to internals.h.
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 c1865ad5da..2e115a0281 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -3087,16 +3087,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 a71f795628..b447d850ae 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1317,5 +1317,6 @@ void define_cortex_a72_a57_a53_cp_reginfo(ARMCPU *cpu);
#endif
void aa32_max_features(ARMCPU *cpu);
+bool arm_singlestep_active(CPUARMState *env);
#endif
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 00/18] target/arm: tidy exception routing, Richard Henderson, 2022/05/23
- [PATCH 01/18] target/arm: Allow raise_exception to handle finding target EL, Richard Henderson, 2022/05/23
- [PATCH 02/18] target/arm: Use arm_current_el for simple exceptions, Richard Henderson, 2022/05/23
- [PATCH 04/18] target/arm: Move HCR_TGE check into exception_target_el, Richard Henderson, 2022/05/23
- [PATCH 03/18] target/arm: Move and expand parameters to exception_target_el, Richard Henderson, 2022/05/23
- [PATCH 05/18] target/arm: Move arm_singlestep_active out of line,
Richard Henderson <=
- [PATCH 06/18] target/arm: Move arm_generate_debug_exceptions out of line, Richard Henderson, 2022/05/23
- [PATCH 07/18] target/arm: Hoist arm_current_el in arm_generate_debug_exceptions, Richard Henderson, 2022/05/23
- [PATCH 08/18] target/arm: Use is_a64 in arm_generate_debug_exceptions, Richard Henderson, 2022/05/23
- [PATCH 09/18] target/arm: Move exception_bkpt_insn to debug_helper.c, Richard Henderson, 2022/05/23
- [PATCH 10/18] target/arm: Move arm_debug_exception_fsr to debug_helper.c, Richard Henderson, 2022/05/23