diff options
Diffstat (limited to 'os/ports/GCC/ARMCM3/chcore.h')
-rw-r--r-- | os/ports/GCC/ARMCM3/chcore.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/ports/GCC/ARMCM3/chcore.h b/os/ports/GCC/ARMCM3/chcore.h index 7d33251ad..7e68d1aae 100644 --- a/os/ports/GCC/ARMCM3/chcore.h +++ b/os/ports/GCC/ARMCM3/chcore.h @@ -306,13 +306,13 @@ struct context { if (sp - sizeof(struct intctx) - sizeof(Thread) < (char *)_otp) \
asm volatile ("movs r0, #0 \n\t" \
"b chDbgPanic"); \
- asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp)); \
+ asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp) : "memory"); \
}
#else /* !CH_DBG_ENABLE_STACK_CHECK */
#define port_switch(otp, ntp) { \
register Thread *_otp asm ("r0") = (otp); \
register Thread *_ntp asm ("r1") = (ntp); \
- asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp)); \
+ asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp) : "memory"); \
}
#endif /* !CH_DBG_ENABLE_STACK_CHECK */
|