From 20e82ec08c9ab811b04664a6a4f9859924f712f0 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Thu, 22 Aug 2013 01:08:14 +0200 Subject: [PATCH] Fix the fix to AVX support detection Should be xgetbv(0) & 6 == 6, not just & 6. Thanks to tueidj for pointing this out. --- Source/Core/Common/Src/x64CPUDetect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/Src/x64CPUDetect.cpp b/Source/Core/Common/Src/x64CPUDetect.cpp index b72a146167..e4eac54ef1 100644 --- a/Source/Core/Common/Src/x64CPUDetect.cpp +++ b/Source/Core/Common/Src/x64CPUDetect.cpp @@ -165,7 +165,7 @@ void CPUInfo::Detect() // - XGETBV result has the XCR bit set. if (((cpu_id[2] >> 28) & 1) && ((cpu_id[2] >> 27) & 1)) { - if (_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) + if ((_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6) bAVX = true; } }