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. --- cpukit/score/cpu/arm/cpu_asm.S | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpukit/score/cpu/arm/cpu_asm.S') diff --git a/cpukit/score/cpu/arm/cpu_asm.S b/cpukit/score/cpu/arm/cpu_asm.S index 66f8ba6032..46eb46b914 100644 --- a/cpukit/score/cpu/arm/cpu_asm.S +++ b/cpukit/score/cpu/arm/cpu_asm.S @@ -54,6 +54,9 @@ */ DEFINE_FUNCTION_ARM(_CPU_Context_switch) + .globl _CPU_Context_switch_no_return + .set _CPU_Context_switch_no_return, _CPU_Context_switch + /* Start saving context */ GET_SELF_CPU_CONTROL r2 ldr r3, [r2, #PER_CPU_ISR_DISPATCH_DISABLE] -- cgit v1.2.3