aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/MSP430
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-31 18:56:49 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-31 18:56:49 +0000
commit58e000a8366bad3848fe20e84b3cee95836861b1 (patch)
treed51eee9beef5473fc66d3ad8b998b07084d02687 /os/ports/GCC/MSP430
parenta14fa4358d81cff24dbf0dbc37046b8e1629b512 (diff)
downloadChibiOS-58e000a8366bad3848fe20e84b3cee95836861b1.tar.gz
ChibiOS-58e000a8366bad3848fe20e84b3cee95836861b1.tar.bz2
ChibiOS-58e000a8366bad3848fe20e84b3cee95836861b1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2153 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/MSP430')
-rw-r--r--os/ports/GCC/MSP430/chcore.c4
-rw-r--r--os/ports/GCC/MSP430/chcore.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/os/ports/GCC/MSP430/chcore.c b/os/ports/GCC/MSP430/chcore.c
index 6740780a9..cdb98a4c8 100644
--- a/os/ports/GCC/MSP430/chcore.c
+++ b/os/ports/GCC/MSP430/chcore.c
@@ -52,7 +52,7 @@ void port_switch(Thread *ntp, Thread *otp) {
"push r7 \n\t" \
"push r6 \n\t" \
"push r5 \n\t" \
- "push r4");
+ "push r4" : : : "memory");
otp->p_ctx.sp = sp;
sp = ntp->p_ctx.sp;
asm volatile ("pop r4 \n\t" \
@@ -63,7 +63,7 @@ void port_switch(Thread *ntp, Thread *otp) {
"pop r9 \n\t" \
"pop r10 \n\t" \
"pop r11 \n\t" \
- "ret" : : "r" (sp));
+ "ret" : : "r" (sp) : "memory");
}
/**
diff --git a/os/ports/GCC/MSP430/chcore.h b/os/ports/GCC/MSP430/chcore.h
index fcf0a7c1e..7ff87f41d 100644
--- a/os/ports/GCC/MSP430/chcore.h
+++ b/os/ports/GCC/MSP430/chcore.h
@@ -202,7 +202,7 @@ struct context {
* actions.
* @note Implemented as global interrupt disable.
*/
-#define port_lock() asm volatile ("dint")
+#define port_lock() asm volatile ("dint" : : : "memory")
/**
* @brief Kernel-unlock action.
@@ -210,7 +210,7 @@ struct context {
* actions.
* @note Implemented as global interrupt enable.
*/
-#define port_unlock() asm volatile ("eint")
+#define port_unlock() asm volatile ("eint" : : : "memory")
/**
* @brief Kernel-lock action from an interrupt handler.
@@ -235,7 +235,7 @@ struct context {
* @note Of course non maskable interrupt sources are not included.
* @note Implemented as global interrupt disable.
*/
-#define port_disable() asm volatile ("dint")
+#define port_disable() asm volatile ("dint" : : : "memory")
/**
* @brief Disables the interrupt sources below kernel-level priority.
@@ -243,13 +243,13 @@ struct context {
* @note Same as @p port_disable() in this port, there is no difference
* between the two states.
*/
-#define port_suspend() asm volatile ("dint")
+#define port_suspend() asm volatile ("dint" : : : "memory")
/**
* @brief Enables all the interrupt sources.
* @note Implemented as global interrupt enable.
*/
-#define port_enable() asm volatile ("eint")
+#define port_enable() asm volatile ("eint" : : : "memory")
/**
* @brief Enters an architecture-dependent IRQ-waiting mode.
@@ -266,7 +266,7 @@ struct context {
#if ENABLE_WFI_IDLE != 0
#ifndef port_wait_for_interrupt
#define port_wait_for_interrupt() { \
- asm volatile ("nop"); \
+ asm volatile ("nop" : : : "memory"); \
}
#endif
#else