[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 20/28] target/arm: Move code blocks around
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v4 20/28] target/arm: Move code blocks around |
Date: |
Wed, 3 Mar 2021 22:47:00 +0100 |
To simplify later #ifdef'ry, move some code around.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/arm/internals.h | 16 ++++++++--------
target/arm/debug_helper.c | 22 +++++++++++-----------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index d6ace004855..3fb295431ae 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -278,14 +278,6 @@ void hw_watchpoint_update_all(ARMCPU *cpu);
* Update a QEMU breakpoint based on the information the guest has set in the
* DBGBCR<n>_EL1 and DBGBVR<n>_EL1 registers.
*/
-void hw_breakpoint_update(ARMCPU *cpu, int n);
-/*
- * Update the QEMU breakpoints for every guest breakpoint. This does a
- * complete delete-and-reinstate of the QEMU breakpoint list and so is
- * suitable for use after migration or on reset.
- */
-void hw_breakpoint_update_all(ARMCPU *cpu);
-
/* Callback function for checking if a watchpoint should trigger. */
bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp);
@@ -295,6 +287,14 @@ bool arm_debug_check_watchpoint(CPUState *cs,
CPUWatchpoint *wp);
*/
vaddr arm_adjust_watchpoint_address(CPUState *cs, vaddr addr, int len);
+void hw_breakpoint_update(ARMCPU *cpu, int n);
+/*
+ * Update the QEMU breakpoints for every guest breakpoint. This does a
+ * complete delete-and-reinstate of the QEMU breakpoint list and so is
+ * suitable for use after migration or on reset.
+ */
+void hw_breakpoint_update_all(ARMCPU *cpu);
+
/* Callback function for when a watchpoint or breakpoint triggers. */
void arm_debug_excp_handler(CPUState *cs);
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c
index 2ff72d47d19..c01d8524443 100644
--- a/target/arm/debug_helper.c
+++ b/target/arm/debug_helper.c
@@ -216,6 +216,17 @@ static bool check_watchpoints(ARMCPU *cpu)
return false;
}
+bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp)
+{
+ /*
+ * Called by core code when a CPU watchpoint fires; need to check if this
+ * is also an architectural watchpoint match.
+ */
+ ARMCPU *cpu = ARM_CPU(cs);
+
+ return check_watchpoints(cpu);
+}
+
static bool check_breakpoints(ARMCPU *cpu)
{
CPUARMState *env = &cpu->env;
@@ -247,17 +258,6 @@ void HELPER(check_breakpoints)(CPUARMState *env)
}
}
-bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp)
-{
- /*
- * Called by core code when a CPU watchpoint fires; need to check if this
- * is also an architectural watchpoint match.
- */
- ARMCPU *cpu = ARM_CPU(cs);
-
- return check_watchpoints(cpu);
-}
-
void arm_debug_excp_handler(CPUState *cs)
{
/*
--
2.26.2
- [PATCH v4 11/28] cpu: Move CPUClass::write_elf* to SysemuCPUOps, (continued)
- [PATCH v4 11/28] cpu: Move CPUClass::write_elf* to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 12/28] cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 13/28] cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 14/28] cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 15/28] cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 17/28] linux-user: Remove dead code, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 18/28] gdbstub: Remove watchpoint dead code in gdbserver_fork(), Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 19/28] target/arm/internals: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 20/28] target/arm: Move code blocks around,
Philippe Mathieu-Daudé <=
- [PATCH v4 21/28] target/arm: Refactor some function bodies, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 22/28] target/arm: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 23/28] target/i386: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 24/28] target/xtensa: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 25/28] accel/tcg/cpu-exec: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 26/28] cpu: Remove watchpoint stubs for user emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 27/28] cpu: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 28/28] cpu: Move sysemu specific declarations to 'sysemu-cpu-ops.h', Philippe Mathieu-Daudé, 2021/03/03