mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/arm: Move define_debug_regs() to debug_helper.c
The target/arm/helper.c file is very long and is a grabbag of all kinds of functionality. We have already a debug_helper.c which has code for implementing architectural debug. Move the code which defines the debug-related system registers out to this file also. This affects the define_debug_regs() function and the various functions and arrays which are used only by it. The functions raw_write() and arm_mdcr_el2_eff() and define_debug_regs() now need to be global rather than local to helper.c; everything else is pure code movement. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220630194116.3438513-3-peter.maydell@linaro.org
This commit is contained in:
@@ -442,6 +442,9 @@ void arm_cp_write_ignore(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
/* CPReadFn that can be used for read-as-zero behaviour */
|
||||
uint64_t arm_cp_read_zero(CPUARMState *env, const ARMCPRegInfo *ri);
|
||||
|
||||
/* CPWriteFn that just writes the value to ri->fieldoffset */
|
||||
void raw_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value);
|
||||
|
||||
/*
|
||||
* CPResetFn that does nothing, for use if no reset is required even
|
||||
* if fieldoffset is non zero.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-530
File diff suppressed because it is too large
Load Diff
@@ -1307,6 +1307,15 @@ int exception_target_el(CPUARMState *env);
|
||||
bool arm_singlestep_active(CPUARMState *env);
|
||||
bool arm_generate_debug_exceptions(CPUARMState *env);
|
||||
|
||||
/* Add the cpreg definitions for debug related system registers */
|
||||
void define_debug_regs(ARMCPU *cpu);
|
||||
|
||||
/* Effective value of MDCR_EL2 */
|
||||
static inline uint64_t arm_mdcr_el2_eff(CPUARMState *env)
|
||||
{
|
||||
return arm_is_el2_enabled(env) ? env->cp15.mdcr_el2 : 0;
|
||||
}
|
||||
|
||||
/* Powers of 2 for sve_vq_map et al. */
|
||||
#define SVE_VQ_POW2_MAP \
|
||||
((1 << (1 - 1)) | (1 << (2 - 1)) | \
|
||||
|
||||
Reference in New Issue
Block a user