mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-16 07:10:40 +00:00
Utils: Add detection for Icelake-client tier AVX-512
- Implies support for everything that Skylake-X supports as well as AVX512IFMA, AVX512VBMI, AVX512VBMI2, AVX512VPOPCNTDQ, AVX512BITALG, AVX512VNNI, AVX512VPCLMULQDQ, AVX512GFNI, AVX512VAES
This commit is contained in:
parent
96428a7555
commit
f188589685
@ -64,6 +64,13 @@ bool utils::has_avx512()
|
||||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_avx512_icl()
|
||||
{
|
||||
// Check AVX512IFMA, AVX512VBMI, AVX512VBMI2, AVX512VPOPCNTDQ, AVX512BITALG, AVX512VNNI, AVX512VPCLMULQDQ, AVX512GFNI, AVX512VAES (Icelake-client level support)
|
||||
static const bool g_value = has_avx512() && (get_cpuid(7, 0)[1] & 0x00200000) == 0x00200000 && (get_cpuid(7, 0)[2] & 0x00005f42) == 0x00005f42;
|
||||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_xop()
|
||||
{
|
||||
static const bool g_value = has_avx() && get_cpuid(0x80000001, 0)[2] & 0x800;
|
||||
@ -145,12 +152,16 @@ std::string utils::get_system_info()
|
||||
{
|
||||
result += " | AVX";
|
||||
|
||||
if (has_avx2())
|
||||
{
|
||||
result += '+';
|
||||
}
|
||||
|
||||
if (has_avx512())
|
||||
{
|
||||
result += "-512";
|
||||
|
||||
if (has_avx512_icl())
|
||||
{
|
||||
result += '+';
|
||||
}
|
||||
}
|
||||
else if (has_avx2())
|
||||
{
|
||||
result += '+';
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ namespace utils
|
||||
|
||||
bool has_avx512();
|
||||
|
||||
bool has_avx512_icl();
|
||||
|
||||
bool has_xop();
|
||||
|
||||
bool has_clwb();
|
||||
|
Loading…
Reference in New Issue
Block a user