mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-05 06:22:45 +01:00
common/cpu_detect: Add AVX512 detection
This commit is contained in:
parent
7d1dca4c98
commit
d6474b4aca
2 changed files with 6 additions and 0 deletions
|
@ -110,6 +110,11 @@ static CPUCaps Detect() {
|
||||||
caps.bmi1 = true;
|
caps.bmi1 = true;
|
||||||
if ((cpu_id[1] >> 8) & 1)
|
if ((cpu_id[1] >> 8) & 1)
|
||||||
caps.bmi2 = true;
|
caps.bmi2 = true;
|
||||||
|
// Checks for AVX512F, AVX512CD, AVX512VL, AVX512DQ, AVX512BW (Intel Skylake-X/SP)
|
||||||
|
if ((cpu_id[1] >> 16) & 1 && (cpu_id[1] >> 28) & 1 && (cpu_id[1] >> 31) & 1 &&
|
||||||
|
(cpu_id[1] >> 17) & 1 && (cpu_id[1] >> 30) & 1) {
|
||||||
|
caps.avx512 = caps.avx2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ struct CPUCaps {
|
||||||
bool lzcnt;
|
bool lzcnt;
|
||||||
bool avx;
|
bool avx;
|
||||||
bool avx2;
|
bool avx2;
|
||||||
|
bool avx512;
|
||||||
bool bmi1;
|
bool bmi1;
|
||||||
bool bmi2;
|
bool bmi2;
|
||||||
bool fma;
|
bool fma;
|
||||||
|
|
Loading…
Reference in a new issue