[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 28/34] target/arm/tcg: Move v8m_stackcheck() from op_helper.c
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 28/34] target/arm/tcg: Move v8m_stackcheck() from op_helper.c to m_helper.c |
Date: |
Mon, 19 Jun 2023 17:55:04 +0200 |
No need to have the v8m_stackcheck() helper in the generic
op_helper.c, move it with the rest of the M-profile helpers.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/arm/tcg/m_helper.c | 16 ++++++++++++++++
target/arm/tcg/op_helper.c | 16 ----------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c
index 0891acc29c..0780bb3dea 100644
--- a/target/arm/tcg/m_helper.c
+++ b/target/arm/tcg/m_helper.c
@@ -2893,3 +2893,19 @@ uint32_t *arm_v7m_get_sp_ptr(CPUARMState *env, bool
secure, bool threadmode,
}
}
}
+
+void HELPER(v8m_stackcheck)(CPUARMState *env, uint32_t newvalue)
+{
+ /*
+ * Perform the v8M stack limit check for SP updates from translated code,
+ * raising an exception if the limit is breached.
+ */
+ if (newvalue < v7m_sp_limit(env)) {
+ /*
+ * Stack limit exceptions are a rare case, so rather than syncing
+ * PC/condbits before the call, we use raise_exception_ra() so
+ * that cpu_restore_state() will sort them out.
+ */
+ raise_exception_ra(env, EXCP_STKOF, 0, 1, GETPC());
+ }
+}
diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c
index 70a9c37b74..04a90e3e3a 100644
--- a/target/arm/tcg/op_helper.c
+++ b/target/arm/tcg/op_helper.c
@@ -82,22 +82,6 @@ void raise_exception_ra(CPUARMState *env, uint32_t excp,
uint32_t syndrome,
raise_exception(env, excp, syndrome, target_el);
}
-void HELPER(v8m_stackcheck)(CPUARMState *env, uint32_t newvalue)
-{
- /*
- * Perform the v8M stack limit check for SP updates from translated code,
- * raising an exception if the limit is breached.
- */
- if (newvalue < v7m_sp_limit(env)) {
- /*
- * Stack limit exceptions are a rare case, so rather than syncing
- * PC/condbits before the call, we use raise_exception_ra() so
- * that cpu_restore_state() will sort them out.
- */
- raise_exception_ra(env, EXCP_STKOF, 0, 1, GETPC());
- }
-}
-
uint32_t HELPER(add_setq)(CPUARMState *env, uint32_t a, uint32_t b)
{
uint32_t res = a + b;
--
2.38.1
- Re: [PATCH v3 23/34] target/arm/tcg: Reduce 'helper-mve.h.inc' inclusion, (continued)
- [PATCH v3 24/34] target/arm/tcg: Reduce 'helper-sme.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 25/34] target/arm/tcg: Extract PAuth definitions to 'helper-pauth.h.inc', Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 26/34] target/arm/tcg: Extract MemTag definitions to 'helper-mte.h.inc', Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 27/34] target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 29/34] target/arm/tcg: Extract M-profile definitions to 'helper-m.h.inc', Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 28/34] target/arm/tcg: Move v8m_stackcheck() from op_helper.c to m_helper.c,
Philippe Mathieu-Daudé <=
- [PATCH v3 32/34] target/arm/tcg: Inline 'exec/helper-proto.h', Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 31/34] target/arm/tcg: Inline 'exec/helper-gen.h', Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 30/34] target/arm/tcg: Reduce 'helper-m.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 34/34] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc, Philippe Mathieu-Daudé, 2023/06/19
- [PATCH v3 33/34] target/arm/tcg: Rename 'helper.h' -> 'tcg/helper.h.inc', Philippe Mathieu-Daudé, 2023/06/19