Commit 70ead4341212ecb3181d5c780284cef0fc7b51fc
1 parent
5bf08934
Use memory barriers in FORCE_RET / RETURN.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2273 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
5 additions
and
5 deletions
dyngen-exec.h
| @@ -188,7 +188,7 @@ extern int printf(const char *, ...); | @@ -188,7 +188,7 @@ extern int printf(const char *, ...); | ||
| 188 | #endif | 188 | #endif |
| 189 | 189 | ||
| 190 | /* force GCC to generate only one epilog at the end of the function */ | 190 | /* force GCC to generate only one epilog at the end of the function */ |
| 191 | -#define FORCE_RET() asm volatile (""); | 191 | +#define FORCE_RET() __asm__ __volatile__("" : : : "memory"); |
| 192 | 192 | ||
| 193 | #ifndef OPPROTO | 193 | #ifndef OPPROTO |
| 194 | #define OPPROTO | 194 | #define OPPROTO |
target-mips/exec.h
| @@ -45,9 +45,9 @@ register host_uint_t T2 asm(AREG3); | @@ -45,9 +45,9 @@ register host_uint_t T2 asm(AREG3); | ||
| 45 | #endif | 45 | #endif |
| 46 | 46 | ||
| 47 | #if defined (DEBUG_OP) | 47 | #if defined (DEBUG_OP) |
| 48 | -#define RETURN() __asm__ __volatile__("nop"); | 48 | +# define RETURN() __asm__ __volatile__("nop" : : : "memory"); |
| 49 | #else | 49 | #else |
| 50 | -#define RETURN() __asm__ __volatile__(""); | 50 | +# define RETURN() __asm__ __volatile__("" : : : "memory"); |
| 51 | #endif | 51 | #endif |
| 52 | 52 | ||
| 53 | #include "cpu.h" | 53 | #include "cpu.h" |
target-ppc/exec.h
| @@ -38,9 +38,9 @@ register uint32_t T2 asm(AREG3); | @@ -38,9 +38,9 @@ register uint32_t T2 asm(AREG3); | ||
| 38 | #define FT2 (env->ft2) | 38 | #define FT2 (env->ft2) |
| 39 | 39 | ||
| 40 | #if defined (DEBUG_OP) | 40 | #if defined (DEBUG_OP) |
| 41 | -#define RETURN() __asm__ __volatile__("nop"); | 41 | +# define RETURN() __asm__ __volatile__("nop" : : : "memory"); |
| 42 | #else | 42 | #else |
| 43 | -#define RETURN() __asm__ __volatile__(""); | 43 | +# define RETURN() __asm__ __volatile__("" : : : "memory"); |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | #include "cpu.h" | 46 | #include "cpu.h" |