One more change, this time for 16- and 64-bit operations.
authordrepper <drepper>
Sat, 17 Feb 2007 06:39:17 +0000 (06:39 +0000)
committerdrepper <drepper>
Sat, 17 Feb 2007 06:39:17 +0000 (06:39 +0000)
sysdeps/x86_64/bits/atomic.h

index 4e58a8e..39c6ecb 100644 (file)
@@ -444,7 +444,7 @@ typedef uintmax_t uatomic_max_t;
                        : "=m" (*mem)                                         \
                        : "iq" (mask), "m" (*mem));                           \
     else if (sizeof (*mem) == 2)                                             \
-      __asm __volatile (LOCK_PREFIX "andw %1, %w0"                           \
+      __asm __volatile (LOCK_PREFIX "andw %w1, %0"                           \
                        : "=m" (*mem)                                         \
                        : "ir" (mask), "m" (*mem));                           \
     else if (sizeof (*mem) == 4)                                             \
@@ -452,7 +452,7 @@ typedef uintmax_t uatomic_max_t;
                        : "=m" (*mem)                                         \
                        : "ir" (mask), "m" (*mem));                           \
     else                                                                     \
-      __asm __volatile (LOCK_PREFIX "andq %1, %q0"                           \
+      __asm __volatile (LOCK_PREFIX "andq %q1, %0"                           \
                        : "=m" (*mem)                                         \
                        : "ir" (mask), "m" (*mem));                           \
   } while (0)
@@ -466,7 +466,7 @@ typedef uintmax_t uatomic_max_t;
                        : "iq" (mask), "m" (*mem),                            \
                          "i" (offsetof (tcbhead_t, multiple_threads)));      \
     else if (sizeof (*mem) == 2)                                             \
-      __asm __volatile (lock "orw %1, %w0"                                   \
+      __asm __volatile (lock "orw %w1, %0"                                   \
                        : "=m" (*mem)                                         \
                        : "ir" (mask), "m" (*mem),                            \
                          "i" (offsetof (tcbhead_t, multiple_threads)));      \
@@ -476,7 +476,7 @@ typedef uintmax_t uatomic_max_t;
                        : "ir" (mask), "m" (*mem),                            \
                          "i" (offsetof (tcbhead_t, multiple_threads)));      \
     else                                                                     \
-      __asm __volatile (lock "orq %1, %q0"                                   \
+      __asm __volatile (lock "orq %q1, %0"                                   \
                        : "=m" (*mem)                                         \
                        : "ir" (mask), "m" (*mem),                            \
                          "i" (offsetof (tcbhead_t, multiple_threads)));      \