From a14fa4358d81cff24dbf0dbc37046b8e1629b512 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 31 Aug 2010 18:46:59 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2152 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/PPC/chcore.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/ports/GCC/PPC/chcore.h') diff --git a/os/ports/GCC/PPC/chcore.h b/os/ports/GCC/PPC/chcore.h index 70f301c45..77056b6bd 100644 --- a/os/ports/GCC/PPC/chcore.h +++ b/os/ports/GCC/PPC/chcore.h @@ -263,12 +263,12 @@ struct context { /** * @details Implemented as global interrupt disable. */ -#define port_lock() asm ("wrteei 0") +#define port_lock() asm volatile ("wrteei 0" : : : "memory") /** * @details Implemented as global interrupt enable. */ -#define port_unlock() asm ("wrteei 1") +#define port_unlock() asm volatile("wrteei 1" : : : "memory") /** * @details Implemented as global interrupt disable. @@ -283,18 +283,18 @@ struct context { /** * @details Implemented as global interrupt disable. */ -#define port_disable() asm ("wrteei 0") +#define port_disable() asm volatile ("wrteei 0" : : : "memory") /** * @details Same as @p port_disable() in this port, there is no difference * between the two states. */ -#define port_suspend() asm ("wrteei 0") +#define port_suspend() asm volatile ("wrteei 0" : : : "memory") /** * @details Implemented as global interrupt enable. */ -#define port_enable() asm ("wrteei 1") +#define port_enable() asm volatile ("wrteei 1" : : : "memory") /** * @details This port function is implemented as inlined code for performance @@ -303,7 +303,7 @@ struct context { #if ENABLE_WFI_IDLE != 0 #ifndef port_wait_for_interrupt #define port_wait_for_interrupt() { \ - asm ("wait"); \ + asm volatile ("wait" : : : "memory"); \ } #endif #else -- cgit v1.2.3