From 95677c4ac42788fb824674994f0bb2c161aa6998 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 29 Nov 2022 22:31:21 +0800 Subject: [PATCH] fix: get cpu id on x86 only --- source/os/src/osSysinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index f336b84e1e..7ec1da0530 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -481,6 +481,7 @@ int32_t taosGetCpuInstructions(char* sse42, char* avx, char* avx2, char* fma) { #elif defined(_TD_DARWIN_64) #else +#ifdef _TD_X86_ // Since the compiler is not support avx/avx2 instructions, the global variables always need to be // set to be false #if __AVX__ || __AVX2__ @@ -504,6 +505,7 @@ int32_t taosGetCpuInstructions(char* sse42, char* avx, char* avx2, char* fma) { // Ref to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756 __cpuid_fix(7u, eax, ebx, ecx, edx); *avx2 = (char) ((ebx & bit_AVX2) == bit_AVX2); +#endif // _TD_X86_ #endif return 0;