From c6b2db422646f9a653d067a181cc8994914e608f Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 18 Sep 2012 19:03:19 +0400 Subject: [PATCH] Fix cmpxchg16b-based compare_double_and_swap_double for SunCC/x86_64 * src/atomic_ops/sysdeps/sunc/x86_64.h (AO_compare_double_and_swap_double_full): Fix inline assembly arguments commenting out "m"(*addr) one (similar to that in sunc/x86.h) if AO_CMPXCHG16B_AVAILABLE defined. --- src/atomic_ops/sysdeps/sunc/x86_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atomic_ops/sysdeps/sunc/x86_64.h b/src/atomic_ops/sysdeps/sunc/x86_64.h index fbd50c0..e0f7987 100644 --- a/src/atomic_ops/sysdeps/sunc/x86_64.h +++ b/src/atomic_ops/sysdeps/sunc/x86_64.h @@ -180,7 +180,7 @@ AO_compare_double_and_swap_double_full (volatile AO_double_t *addr, char result; __asm__ __volatile__ ("lock; cmpxchg16b %0; setz %1" : "=m"(*addr), "=a"(result) - : "m"(*addr), "d" (old_val2), "a" (old_val1), + : /* "m" (*addr), */ "d" (old_val2), "a" (old_val1), "c" (new_val2), "b" (new_val1) : "memory"); return (int) result; } -- 2.7.4