From f900a92e13528d2cd0eba365a495c09ea9e4e494 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Sat, 17 Sep 2016 15:25:08 +0200 Subject: [PATCH] [BUG] Fix avx512 detection (#136) --- src/asmjit/base/cpuinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asmjit/base/cpuinfo.cpp b/src/asmjit/base/cpuinfo.cpp index a5b0b66..2be7ed7 100644 --- a/src/asmjit/base/cpuinfo.cpp +++ b/src/asmjit/base/cpuinfo.cpp @@ -501,7 +501,7 @@ static void x86DetectCpuInfo(CpuInfo* cpuInfo) noexcept { // XMM/YMM states need to be enabled by OS. // - XCR0[7:5] == 111b // Upper 256-bit of ZMM0-XMM15 and ZMM16-ZMM31 need to be enabled by the OS. - if ((xcr0.eax & 0x00000076U) == 0x00000076U) { + if ((xcr0.eax & 0x000000E6U) == 0x000000E6U) { cpuInfo->addFeature(CpuInfo::kX86FeatureAVX512F); if (regs.ebx & 0x00020000U) cpuInfo->addFeature(CpuInfo::kX86FeatureAVX512DQ);