diff --git a/Source/Core/Common/Src/CPUDetect.h b/Source/Core/Common/Src/CPUDetect.h index be6ce34985..e93a902d63 100644 --- a/Source/Core/Common/Src/CPUDetect.h +++ b/Source/Core/Common/Src/CPUDetect.h @@ -41,6 +41,7 @@ struct CPUInfo bool bLZCNT; bool bSSE4A; bool bAVX; + bool bFMA; bool bAES; bool bLAHFSAHF64; bool bLongMode; diff --git a/Source/Core/Common/Src/x64CPUDetect.cpp b/Source/Core/Common/Src/x64CPUDetect.cpp index 07b35cb968..2b434ad2b6 100644 --- a/Source/Core/Common/Src/x64CPUDetect.cpp +++ b/Source/Core/Common/Src/x64CPUDetect.cpp @@ -169,7 +169,11 @@ void CPUInfo::Detect() if (((cpu_id[2] >> 28) & 1) && ((cpu_id[2] >> 27) & 1)) { if ((_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6) + { bAVX = true; + if ((cpu_id[2] >> 12) & 1) + bFMA = true; + } } } if (max_ex_fn >= 0x80000004) { @@ -225,6 +229,7 @@ std::string CPUInfo::Summarize() if (bSSE4_2) sum += ", SSE4.2"; if (HTT) sum += ", HTT"; if (bAVX) sum += ", AVX"; + if (bFMA) sum += ", FMA"; if (bAES) sum += ", AES"; if (bLongMode) sum += ", 64-bit support"; return sum;