Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/libatomic_ops.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-03-29 08:00:42 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-03-29 14:01:20 +0400
commit556e6348fc490f6f825c9304fae551a50ce6de3e (patch)
treee06bf4afff91bd8e8ca998fd24e04f834ac660b7
parent2d8afff72a4d5f6d27022a2f7529406d61f57970 (diff)
Fix fetch_compare_and_swap asm constraints in gcc/x86.h
* src/atomic_ops/sysdeps/gcc/x86.h (AO_fetch_compare_and_swap_full): Use same asm constraints for old_val and new_val as in AO_compare_and_swap_full.
-rw-r--r--src/atomic_ops/sysdeps/gcc/x86.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/atomic_ops/sysdeps/gcc/x86.h b/src/atomic_ops/sysdeps/gcc/x86.h
index bed51d1..9ce3949 100644
--- a/src/atomic_ops/sysdeps/gcc/x86.h
+++ b/src/atomic_ops/sysdeps/gcc/x86.h
@@ -163,7 +163,7 @@ AO_fetch_compare_and_swap_full(volatile AO_t *addr, AO_t old_val,
AO_t fetched_val;
__asm__ __volatile__ ("lock; cmpxchg %3, %4"
: "=a" (fetched_val), "=m" (*addr)
- : "0" (old_val), "q" (new_val), "m" (*addr)
+ : "a" (old_val), "r" (new_val), "m" (*addr)
: "memory");
return fetched_val;
# endif