From f85aba5d21cc34c626f44389a4009eb68753049d Mon Sep 17 00:00:00 2001 From: SChernykh Date: Wed, 18 Dec 2019 12:20:21 +0100 Subject: [PATCH] Fixed AVX detection --- src/crypto/randomx/jit_compiler_x86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/randomx/jit_compiler_x86.cpp b/src/crypto/randomx/jit_compiler_x86.cpp index 9abd320bb..c6f792767 100644 --- a/src/crypto/randomx/jit_compiler_x86.cpp +++ b/src/crypto/randomx/jit_compiler_x86.cpp @@ -292,7 +292,7 @@ namespace randomx { int32_t info[4]; cpuid(1, info); - hasAVX = (info[2] & (1 << 28)) != 0; + hasAVX = ((info[2] & (1 << 27)) != 0) && ((info[2] & (1 << 28)) != 0); allocatedCode = (uint8_t*)allocExecutableMemory(CodeSize * 2); // Shift code base address to improve caching - all threads will use different L2/L3 cache sets