NCG: Use sync instead of msync for a memory barrier for powerpc
authorBen.Lippmeier@anu.edu.au <unknown>
Fri, 13 Feb 2009 00:49:10 +0000 (00:49 +0000)
committerBen.Lippmeier@anu.edu.au <unknown>
Fri, 13 Feb 2009 00:49:10 +0000 (00:49 +0000)
  Darwin 9.6.0 + GCC 4.0.1 doesn't understand "msync".
  I think "sync" means the same thing.

includes/SMP.h

index c851054..223f158 100644 (file)
@@ -195,7 +195,7 @@ store_load_barrier(void) {
 #elif x86_64_HOST_ARCH
     __asm__ __volatile__ ("lock; addq $0,0(%%rsp)" : : : "memory");
 #elif powerpc_HOST_ARCH
-    __asm__ __volatile__ ("msync" : : : "memory");
+    __asm__ __volatile__ ("sync" : : : "memory");
 #elif sparc_HOST_ARCH
     /* Sparc in TSO mode does not require write/write barriers. */
     __asm__ __volatile__ ("membar" : : : "memory");