[rtems commit] validation: Support powerpc in test case

Sebastian Huber sebh at rtems.org
Thu Oct 12 14:07:57 UTC 2023


Module:    rtems
Branch:    master
Commit:    43b74b142e928b7be8118a10e963c465ce1ff625
Changeset: http://git.rtems.org/rtems/commit/?id=43b74b142e928b7be8118a10e963c465ce1ff625

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Oct 12 16:32:17 2023 +0200

validation: Support powerpc in test case

Update #4955.

---

 testsuites/validation/tc-score-isr.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/testsuites/validation/tc-score-isr.c b/testsuites/validation/tc-score-isr.c
index 5d6c5728a2..f29abbbfe8 100644
--- a/testsuites/validation/tc-score-isr.c
+++ b/testsuites/validation/tc-score-isr.c
@@ -128,6 +128,23 @@ void __wrap_bsp_interrupt_dispatch( void )
 }
 #endif
 
+#if defined(__PPC__) || defined(__powerpc64__)
+void __real_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void );
+
+void __wrap_bsp_interrupt_dispatch( void )
+{
+  register uintptr_t sp __asm__( "14" );
+
+  if ( interrupted_stack_at_multitasking_start == 0 ) {
+    interrupted_stack_at_multitasking_start = sp;
+  }
+
+  __real_bsp_interrupt_dispatch();
+}
+#endif
+
 #if defined(__riscv)
 void __real__RISCV_Interrupt_dispatch(
   uintptr_t        mcause,



More information about the vc mailing list