summaryrefslogtreecommitdiff
path: root/src/common/cpu_detect.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-07-21 19:49:33 -0400
committerbunnei <bunneidev@gmail.com>2015-08-15 17:33:44 -0400
commit4d517922856791decfed475cdd536aedcaa25c30 (patch)
treee6ac9daf302ea079411052bb0e78428fb71f1440 /src/common/cpu_detect.h
parent3f69c2039de1c3d084ac2c9eb0aa9315490346bf (diff)
Common: Ported over Dolphin's code for x86 CPU capability detection.
Diffstat (limited to 'src/common/cpu_detect.h')
-rw-r--r--src/common/cpu_detect.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/common/cpu_detect.h b/src/common/cpu_detect.h
index b585f9608..19a2c25d6 100644
--- a/src/common/cpu_detect.h
+++ b/src/common/cpu_detect.h
@@ -3,11 +3,13 @@
// Refer to the license.txt file included.
-// Detect the cpu, so we'll know which optimizations to use
+// Detect the CPU, so we'll know which optimizations to use
#pragma once
#include <string>
+namespace Common {
+
enum CPUVendor
{
VENDOR_INTEL = 0,
@@ -40,29 +42,28 @@ struct CPUInfo
bool bLZCNT;
bool bSSE4A;
bool bAVX;
+ bool bAVX2;
+ bool bBMI1;
+ bool bBMI2;
+ bool bFMA;
+ bool bFMA4;
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.
+ bool bFlushToZero;
bool bLAHFSAHF64;
bool bLongMode;
-
- // ARM specific CPUInfo
- bool bSwp;
- bool bHalf;
- bool bThumb;
- bool bFastMult;
- bool bVFP;
- bool bEDSP;
- bool bThumbEE;
- bool bNEON;
- bool bVFPv3;
- bool bTLS;
- bool bVFPv4;
- bool bIDIVa;
- bool bIDIVt;
- bool bArmV7; // enable MOVT, MOVW etc
+ bool bAtom;
// ARMv8 specific
bool bFP;
bool bASIMD;
+ bool bCRC32;
+ bool bSHA1;
+ bool bSHA2;
// Call Detect()
explicit CPUInfo();
@@ -76,3 +77,5 @@ private:
};
extern CPUInfo cpu_info;
+
+} // namespace Common