From d45f87cf3599b3614ea4b126728aedeb51737695 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 17 May 2021 13:35:42 +0200 Subject: score: Add _CPU_Context_switch_no_return() The __builtin_unreachable() cannot be used with current GCC versions to tell the compiler that a function does not return to the caller, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151 Add a no return variant of _CPU_Context_switch() to avoid generation of dead code in _Thread_Start_multitasking() if RTEMS was built with SMP support enabled. --- bsps/powerpc/shared/cpu_asm.S | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bsps') diff --git a/bsps/powerpc/shared/cpu_asm.S b/bsps/powerpc/shared/cpu_asm.S index e4d627016c..63f6a3fdfe 100644 --- a/bsps/powerpc/shared/cpu_asm.S +++ b/bsps/powerpc/shared/cpu_asm.S @@ -258,7 +258,9 @@ PROC (_CPU_Context_restore_fp): ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER) PUBLIC_PROC (_CPU_Context_switch) + PUBLIC_PROC (_CPU_Context_switch_no_return) PROC (_CPU_Context_switch): +PROC (_CPU_Context_switch_no_return): #ifdef BSP_USE_SYNC_IN_CONTEXT_SWITCH sync -- cgit v1.2.3