mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
arm64 compile fix
This commit is contained in:
parent
56743008dd
commit
c601dacf31
@ -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"
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user