]> granicus.if.org Git - libatomic_ops/commit
Properly fix compare_double_and_swap_double for gcc/x32 (use built-in CAS)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 8 Oct 2012 10:51:30 +0000 (14:51 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 8 Oct 2012 10:53:07 +0000 (14:53 +0400)
commitcbe517e6d41ab721a14151c0db40dd56cb98cc86
tree014e4614a879fab2fc37e2b5b8425af57464617e
parent995764573c4c101931cf30faabb8d458ed86d718
Properly fix compare_double_and_swap_double for gcc/x32 (use built-in CAS)

* src/atomic_ops/sysdeps/gcc/x86.h (AO_double_compare_and_swap_full):
New function (only if __x86_64__) implemented using GCC built-in
__sync CAS primitive available for x32.
* src/atomic_ops/sysdeps/gcc/x86.h
(AO_HAVE_double_compare_and_swap_full): New macro (for x32 only).
* src/atomic_ops/sysdeps/gcc/x86.h
(AO_compare_double_and_swap_double_full): Implement using
double_compare_and_swap_full instead of cmpxchg8b for x32 (since
x86_64 has available cmpxchg and cmpxchg16b but not cmpxchg8b).
src/atomic_ops/sysdeps/gcc/x86.h