summaryrefslogtreecommitdiff
path: root/Source/Core/Common/x64CPUDetect.cpp
diff options
context:
space:
mode:
authorFiora <fioraaeterna@gmail.com>2014-09-14 05:31:22 -0700
committerFiora <fioraaeterna@gmail.com>2014-09-14 05:31:22 -0700
commit997c5c2d0e52969edc34ea463985a9c12be7c96c (patch)
tree9806958634821e5ce6a8cbfa40057c0d3ac34f07 /Source/Core/Common/x64CPUDetect.cpp
parent84a564a304e9eb003fd3a39dcc5df652037c1dc5 (diff)
x64Emitter: add LZCNT/TZCNT support and detection
Also add a unit test.
Diffstat (limited to 'Source/Core/Common/x64CPUDetect.cpp')
-rw-r--r--Source/Core/Common/x64CPUDetect.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/Core/Common/x64CPUDetect.cpp b/Source/Core/Common/x64CPUDetect.cpp
index 8c3738034a..0da02d0fb4 100644
--- a/Source/Core/Common/x64CPUDetect.cpp
+++ b/Source/Core/Common/x64CPUDetect.cpp
@@ -197,6 +197,7 @@ void CPUInfo::Detect()
// Check for more features.
__cpuid(cpu_id, 0x80000001);
if (cpu_id[2] & 1) bLAHFSAHF64 = true;
+ if ((cpu_id[2] >> 5) & 1) bLZCNT = true;
if ((cpu_id[3] >> 29) & 1) bLongMode = true;
}