Use memory barriers in FORCE_RET / RETURN.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 23 Dec 2006 00:49:32 +0000 (00:49 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 23 Dec 2006 00:49:32 +0000 (00:49 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2273 c046a42c-6fe2-441c-8c8c-71466251a162

dyngen-exec.h
target-mips/exec.h
target-ppc/exec.h

index 0c39228..2f38785 100644 (file)
@@ -188,7 +188,7 @@ extern int printf(const char *, ...);
 #endif
 
 /* force GCC to generate only one epilog at the end of the function */
-#define FORCE_RET() asm volatile ("");
+#define FORCE_RET() __asm__ __volatile__("" : : : "memory");
 
 #ifndef OPPROTO
 #define OPPROTO
index 9e1fcdc..e364d8a 100644 (file)
@@ -45,9 +45,9 @@ register host_uint_t T2 asm(AREG3);
 #endif
 
 #if defined (DEBUG_OP)
-#define RETURN() __asm__ __volatile__("nop");
+# define RETURN() __asm__ __volatile__("nop" : : : "memory");
 #else
-#define RETURN() __asm__ __volatile__("");
+# define RETURN() __asm__ __volatile__("" : : : "memory");
 #endif
 
 #include "cpu.h"
index 3ef0968..89171f9 100644 (file)
@@ -38,9 +38,9 @@ register uint32_t T2 asm(AREG3);
 #define FT2 (env->ft2)
 
 #if defined (DEBUG_OP)
-#define RETURN() __asm__ __volatile__("nop");
+# define RETURN() __asm__ __volatile__("nop" : : : "memory");
 #else
-#define RETURN() __asm__ __volatile__("");
+# define RETURN() __asm__ __volatile__("" : : : "memory");
 #endif
 
 #include "cpu.h"