More accurate way to check whether AVX OS-support is enabled.
This commit is contained in:
parent
e11b531d86
commit
52c0c777f5
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
@ -63,7 +63,7 @@ MUtils::CPUFetaures::cpu_info_t MUtils::CPUFetaures::detect(void)
|
||||
if(CPUInfo[2] & 0x00100000) features.features |= FLAG_SSE42;
|
||||
if ((CPUInfo[2] & 0x18000000) == 0x18000000)
|
||||
{
|
||||
if (IsProcessorFeaturePresent(PF_XSAVE_ENABLED)) /*AVX requires OS support!*/
|
||||
if((_xgetbv(0) & 0x6ui64) == 0x6ui64) /*AVX requires OS support!*/
|
||||
{
|
||||
features.features |= FLAG_AVX;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user