cas(): modify assembly syntax to make it work everywhere (hopefully)
authorSimon Marlow <simonmar@microsoft.com>
Tue, 21 Nov 2006 13:26:46 +0000 (13:26 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 21 Nov 2006 13:26:46 +0000 (13:26 +0000)
includes/SMP.h

index 89aa420..bba80f7 100644 (file)
@@ -103,7 +103,7 @@ cas(StgVolatilePtr p, StgWord o, StgWord n)
 {
 #if i386_HOST_ARCH || x86_64_HOST_ARCH
     __asm__ __volatile__ (
-         "lock cmpxchg %3,%1"
+         "lock\ncmpxchg %3,%1"
           :"=a"(o), "=m" (*(volatile unsigned int *)p) 
           :"0" (o), "r" (n));
     return o;