From: Ivan Maidanski Date: Mon, 23 Jan 2017 21:26:23 +0000 (+0300) Subject: Really implement char and/or/xor and short CAS for msftc ARM (VS 2013+) X-Git-Tag: v7.6.0~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf9732e5e7e49e5409a8d80336a028046913e448;p=libatomic_ops Really implement char and/or/xor and short CAS for msftc ARM (VS 2013+) (fix commit 9182c62) * src/atomic_ops/sysdeps/msftc/common32_defs.h [_M_ARM] (_InterlockedAnd8, _InterlockedCompareExchange16, _InterlockedOr8, _InterlockedXor8): Declare intrinsic if _MSC_VER>=1800. * src/atomic_ops/sysdeps/msftc/common32_defs.h [_M_ARM] (AO_char_and_full, AO_char_or_full, AO_char_xor_full, AO_short_fetch_compare_and_swap_full): Implement (using intrinsic) if _MSC_VER>=1800. --- diff --git a/src/atomic_ops/sysdeps/msftc/common32_defs.h b/src/atomic_ops/sysdeps/msftc/common32_defs.h index de55fef..dfb8cf6 100644 --- a/src/atomic_ops/sysdeps/msftc/common32_defs.h +++ b/src/atomic_ops/sysdeps/msftc/common32_defs.h @@ -117,7 +117,7 @@ AO_fetch_and_sub1_full(volatile AO_t *p) # define AO_HAVE_fetch_compare_and_swap_full #endif /* AO_ASSUME_WINDOWS98 */ -#if (_MSC_VER > 1400) && !defined(_M_ARM) +#if (_MSC_VER > 1400) && (!defined(_M_ARM) || _MSC_VER >= 1800) # pragma intrinsic (_InterlockedAnd8) # pragma intrinsic (_InterlockedCompareExchange16)