[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 20/26] target/arm/tcg: Move v8m_stackcheck() from op_helper.c
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 20/26] target/arm/tcg: Move v8m_stackcheck() from op_helper.c to m_helper.c |
Date: |
Sun, 11 Jun 2023 10:58:40 +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
- [PATCH v2 12/26] target/arm/tcg: Move neon_tbl() from op_helper.c to neon_helper.c, (continued)
- [PATCH v2 12/26] target/arm/tcg: Move neon_tbl() from op_helper.c to neon_helper.c, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 13/26] target/arm/tcg: Extract NEON definitions to 'helper-neon.h.inc', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 14/26] target/arm/tcg: Reduce 'helper-neon.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 18/26] target/arm/tcg: Reduce 'helper-sme.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 16/26] target/arm/tcg: Reduce 'helper-sve.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 17/26] target/arm/tcg: Reduce 'helper-mve.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 20/26] target/arm/tcg: Move v8m_stackcheck() from op_helper.c to m_helper.c,
Philippe Mathieu-Daudé <=
- [PATCH v2 15/26] target/arm/tcg: Extract SVE2 definitions to 'helper-sve.h.inc', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 24/26] target/arm/tcg: Inline 'exec/helper-proto.h', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 19/26] target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 21/26] target/arm/tcg: Extract M-profile definitions to 'helper-m.h.inc', Philippe Mathieu-Daudé, 2023/06/11