x64Emitter: add LZCNT/TZCNT support and detection

Also add a unit test.
This commit is contained in:
Fiora
2014-09-14 05:31:22 -07:00
parent 84a564a304
commit 997c5c2d0e
4 changed files with 51 additions and 36 deletions

View File

@ -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;
}