]> granicus.if.org Git - libatomic_ops/commitdiff
Fix asm constraint of compare_and_swap for clang-3.1/mips
authorIvan Maidanski <ivmai@mail.ru>
Tue, 12 Mar 2013 18:29:33 +0000 (22:29 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 29 Mar 2013 10:19:17 +0000 (14:19 +0400)
(Apply commit 3e4c369 from 'master' branch.)

* src/atomic_ops/sysdeps/gcc/mips.h (AO_compare_and_swap): Use "+m"
asm constraint for *addr instead of "+R" (the letter is unsupported
by clang3.1 resulting in "invalid output constraint in asm" error).

Conflicts:

    src/atomic_ops/sysdeps/gcc/mips.h

src/atomic_ops/sysdeps/gcc/mips.h

index 527a34741a663fab11582e0bfbab36120533c90a..e09a558d0d2eeba751d8811007ee0a94631056e0 100644 (file)
@@ -59,7 +59,7 @@ AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
       "       beqz    %0, 1b      \n"
       "       li      %2, 1       \n"
       "2:                           "
-      : "=&r" (temp), "+R" (*addr), "+r" (was_equal)
+      : "=&r" (temp), "+m" (*addr), "+r" (was_equal)
       : "r" (new_val), "r" (old)
       : "memory");
   return was_equal;