From 556e6348fc490f6f825c9304fae551a50ce6de3e Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 29 Mar 2013 08:00:42 +0400 Subject: 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. --- src/atomic_ops/sysdeps/gcc/x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3