Fix the powerpc atomix swap
authorDavid Schleef <ds@schleef.org>
Mon, 9 Dec 2002 01:32:37 +0000 (01:32 +0000)
committerDavid Schleef <ds@schleef.org>
Mon, 9 Dec 2002 01:32:37 +0000 (01:32 +0000)
Original commit message from CVS:
Fix the powerpc atomix swap

gst/gstatomic.h

index 6e3b0a42641a673bd1d6dbaf3e52571a3783c31f..045f1709c852ff2ebd921b72ae4e55b2b6b7b3eb 100644 (file)
@@ -173,16 +173,17 @@ G_STMT_START {                                            \
 
 #define _GST_ATOMIC_SWAP(swap, val)                            \
 G_STMT_START {                                                 \
+  int tmp;                                                     \
   __asm__ __volatile__ ("1:"                                   \
                         "      lwarx   %0, 0, %2       \n"     \
                         "      stwcx.  %3, 0, %2       \n"     \
                         "      bne-    1b              \n"     \
-                          : "=&r",                             \
+                          : "=&r" (tmp),                       \
                            "=m" (*swap)                        \
                           : "r" (swap),                        \
                            "r" (val),                          \
-                           "m" (*swap)                         \
-                         : "cc", "memory");                    \
+                           "m" (* swap)                        \
+                         : "9", "cc");                         \
 } G_STMT_END
 
 #define _GST_ATOMIC_SWAP_GET(swap, val, res)                   \
@@ -196,7 +197,7 @@ G_STMT_START {                                                      \
                           : "r" (swap),                        \
                            "r" (val),                          \
                            "m" (*swap)                         \
-                         : "cc", "memory");                    \
+                         : "cc");                              \
 } G_STMT_END
 
 #else