summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-03-16 01:41:37 +0100
committerPierre Bourdon <delroth@gmail.com>2014-04-11 23:29:03 +0200
commitd2de1ddabc55d65a84fccd480e3ddf34b7d98c8f (patch)
treeffb7ba2bf5c370bcbb3ad5923a997b850cd2f0bc /Source/Core
parent7563e8c6f3cd0bf8b98d04549c3292626fac7a63 (diff)
CPUDetect: add support for MOVBE detection
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/CPUDetect.h1
-rw-r--r--Source/Core/Common/x64CPUDetect.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/Common/CPUDetect.h b/Source/Core/Common/CPUDetect.h
index 51dd20b8ce..e5feb20f88 100644
--- a/Source/Core/Common/CPUDetect.h
+++ b/Source/Core/Common/CPUDetect.h
@@ -44,6 +44,7 @@ struct CPUInfo
bool bAES;
// FXSAVE/FXRSTOR
bool bFXSR;
+ bool bMOVBE;
// This flag indicates that the hardware supports some mode
// in which denormal inputs _and_ outputs are automatically set to (signed) zero.
// TODO: ARM
diff --git a/Source/Core/Common/x64CPUDetect.cpp b/Source/Core/Common/x64CPUDetect.cpp
index 64ded2df3f..e64cd9d1ee 100644
--- a/Source/Core/Common/x64CPUDetect.cpp
+++ b/Source/Core/Common/x64CPUDetect.cpp
@@ -159,6 +159,7 @@ void CPUInfo::Detect()
if ((cpu_id[2] >> 9) & 1) bSSSE3 = true;
if ((cpu_id[2] >> 19) & 1) bSSE4_1 = true;
if ((cpu_id[2] >> 20) & 1) bSSE4_2 = true;
+ if ((cpu_id[2] >> 22) & 1) bMOVBE = true;
if ((cpu_id[2] >> 25) & 1) bAES = true;
// To check DAZ support, we first need to check FXSAVE support.
@@ -263,6 +264,7 @@ std::string CPUInfo::Summarize()
if (bAVX) sum += ", AVX";
if (bFMA) sum += ", FMA";
if (bAES) sum += ", AES";
+ if (bMOVBE) sum += ", MOVBE";
if (bLongMode) sum += ", 64-bit support";
return sum;
}