aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/ports/MSP430X/chcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/ports/MSP430X/chcore.c')
-rw-r--r--os/common/ports/MSP430X/chcore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/common/ports/MSP430X/chcore.c b/os/common/ports/MSP430X/chcore.c
index 4e09b8f..7a8d7f2 100644
--- a/os/common/ports/MSP430X/chcore.c
+++ b/os/common/ports/MSP430X/chcore.c
@@ -58,11 +58,11 @@
* @param[in] ntp the thread to be switched in
* @param[in] otp the thread to be switched out
*/
-#if !defined(__DOXYGEN__) && defined(__OPTIMIZE__)
+#if !(__GNUC__ < 6 && __GNUC_MINOR__ < 4) || defined(__OPTIMIZE__)
__attribute__((naked))
#endif
void _port_switch(thread_t *ntp, thread_t *otp) {
-#if !defined(__OPTIMIZE__)
+#if (__GNUC__ < 6 && __GNUC_MINOR__ < 4) && !defined(__OPTIMIZE__)
asm volatile ("add #4, r1");
#endif
(void)(ntp);