arm64 compile fix

This commit is contained in:
proller 2017-01-13 22:01:45 +03:00
parent 56743008dd
commit c601dacf31
2 changed files with 6 additions and 1 deletions

View File

@ -484,7 +484,10 @@ int32_t inc_ref_counter(zhandle_t* zh,int i)
int32_t fetch_and_add(volatile int32_t* operand, int incr)
{
#ifndef WIN32
#if defined(__ARM_ARCH)
// this is gcc-specific func https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/_005f_005fatomic-Builtins.html
return __atomic_fetch_add(operand, incr, __ATOMIC_RELAXED);
#elif !defined(WIN32)
int32_t result;
asm __volatile__(
"lock xaddl %0,%1\n"

View File

@ -35,6 +35,7 @@ inline bool is_in(char x)
return x == s0 || is_in<s1, tail...>(x);
}
#if defined(__x86_64__)
template <char s0>
inline __m128i mm_is_in(__m128i bytes)
{
@ -49,6 +50,7 @@ inline __m128i mm_is_in(__m128i bytes)
__m128i eq = mm_is_in<s1, tail...>(bytes);
return _mm_or_si128(eq0, eq);
}
#endif
template <char... symbols>