Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix the fix to AVX support detection
Should be xgetbv(0) & 6 == 6, not just & 6. Thanks to tueidj for pointing this
out.
  • Loading branch information
delroth committed Aug 21, 2013
1 parent 5f0c892 commit 20e82ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/x64CPUDetect.cpp
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 20e82ec

Please sign in to comment.