mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
SPU: add some AVX-512 variants
This commit is contained in:
parent
4aee4ed6d7
commit
6d34dcd75f
5 changed files with 229 additions and 41 deletions
|
@ -19,6 +19,12 @@ bool utils::has_avx()
|
|||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_avx2()
|
||||
{
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && get_cpuid(7, 0)[1] & 0x20;
|
||||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_rtm()
|
||||
{
|
||||
// Check RTM and MPX extensions in order to filter out TSX on Haswell CPUs
|
||||
|
@ -26,6 +32,13 @@ bool utils::has_rtm()
|
|||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_512()
|
||||
{
|
||||
// Check AVX512F, AVX512CD, AVX512DQ, AVX512BW, AVX512VL extensions (Skylake-X level support)
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0xd0030000) == 0xd0030000;
|
||||
return g_value;
|
||||
}
|
||||
|
||||
std::string utils::get_system_info()
|
||||
{
|
||||
std::string result;
|
||||
|
@ -68,7 +81,17 @@ std::string utils::get_system_info()
|
|||
|
||||
if (has_avx())
|
||||
{
|
||||
result += " | AVX+";
|
||||
result += " | AVX";
|
||||
|
||||
if (has_avx2())
|
||||
{
|
||||
result += '+';
|
||||
}
|
||||
|
||||
if (has_512())
|
||||
{
|
||||
result += '+';
|
||||
}
|
||||
}
|
||||
|
||||
if (has_rtm())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue