]> granicus.if.org Git - libatomic_ops/commitdiff
Really implement char and/or/xor and short CAS for msftc ARM (VS 2013+)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 23 Jan 2017 21:26:23 +0000 (00:26 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 23 Jan 2017 21:26:23 +0000 (00:26 +0300)
(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.

src/atomic_ops/sysdeps/msftc/common32_defs.h

index de55fefd6ba9d808103d57e6bcaa5fcfc8b10a70..dfb8cf6ea9e1f092919a731cc7ad6e02c53578d9 100644 (file)
@@ -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)