浏览代码

cpu_detect: Add missing `lzcnt` detection

Wunkolo 4 年之前
父节点
当前提交
873a9fa7e5
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/common/x64/cpu_detect.cpp

+ 1 - 0
src/common/x64/cpu_detect.cpp

@@ -138,6 +138,7 @@ static CPUCaps Detect() {
     if (max_ex_fn >= 0x80000001) {
         // Check for more features
         __cpuid(cpu_id, 0x80000001);
+        caps.lzcnt = Common::Bit<5>(cpu_id[2]);
         caps.fma4 = Common::Bit<16>(cpu_id[2]);
     }