fix: get cpu id on x86 only
This commit is contained in:
parent
30fa44ea38
commit
95677c4ac4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue