diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-06-10 14:32:30 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-06-10 14:32:30 +0100 |
commit | 55ba15b73734e09fc8a14c88c34cad4c0e61abb2 (patch) | |
tree | b2e8a60b8a6aac81947598dc65882a7b6c007713 | |
parent | 57287a6e953f6e6f614c87296f8c44ea9c4907b6 (diff) | |
download | qemu-55ba15b73734e09fc8a14c88c34cad4c0e61abb2.zip qemu-55ba15b73734e09fc8a14c88c34cad4c0e61abb2.tar.gz qemu-55ba15b73734e09fc8a14c88c34cad4c0e61abb2.tar.bz2 |
target/arm: Move arm_singlestep_active out of line
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>
Message-id: 20220609202901.1177572-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | target/arm/cpu.h | 10 | ||||
-rw-r--r-- | target/arm/debug_helper.c | 12 | ||||
-rw-r--r-- | target/arm/internals.h | 1 |
3 files changed, 13 insertions, 10 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 78dbcb5..bb1dc32 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/debug_helper.c b/target/arm/debug_helper.c index 4689369..1abf41c 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) { diff --git a/target/arm/internals.h b/target/arm/internals.h index af9de2d..64e2c1d 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 \ |