]> granicus.if.org Git - libatomic_ops/commit
Implement char CAS and char/short add for msftc X86[_64] (VS 2013+)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 23 Jan 2017 22:42:06 +0000 (01:42 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 23 Jan 2017 22:42:06 +0000 (01:42 +0300)
commit90281551455f043fc027ad98ac9e7063803b7b31
treed4c71939199809f73e0c4b445cd579f0cc0061e6
parenta013152ae8fb09223b91f3183b40869960a7a79e
Implement char CAS and char/short add for msftc X86[_64] (VS 2013+)

* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800]
(_InterlockedCompareExchange8): Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED && !_M_ARM] (_InterlockedExchangeAdd16,
_InterlockedExchangeAdd8): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER>=1800]
(_InterlockedCompareExchange8): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED] (_InterlockedExchangeAdd16,
_InterlockedExchangeAdd8): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800]
(AO_char_fetch_compare_and_swap_full): Implement using intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED && !_M_ARM] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER>=1800]
(AO_char_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86.h [!AO_NO_ASM_XADD]
(AO_char_fetch_and_add_full, AO_short_fetch_and_add_full): Do not
define if AO_HAVE_char_fetch_and_add_full.
* src/atomic_ops/sysdeps/msftc/x86_64.h [AO_ASM_X64_AVAILABLE]
(AO_char_fetch_and_add_full, AO_short_fetch_and_add_full): Do not use
asm-based implementation if _MSC_VER>=1800.
src/atomic_ops/sysdeps/msftc/common32_defs.h
src/atomic_ops/sysdeps/msftc/x86.h
src/atomic_ops/sysdeps/msftc/x86_64.h