mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
LLVM: Add workaround for znver2
This commit is contained in:
parent
8e39c778a1
commit
fcc841eaa1
@ -965,6 +965,12 @@ std::string jit_compiler::cpu(const std::string& _cpu)
|
||||
m_cpu = "skylake";
|
||||
}
|
||||
}
|
||||
|
||||
if (m_cpu == "znver1" && utils::has_clwb())
|
||||
{
|
||||
// Upgrade
|
||||
m_cpu = "znver2";
|
||||
}
|
||||
}
|
||||
|
||||
return m_cpu;
|
||||
|
@ -69,6 +69,12 @@ bool utils::has_xop()
|
||||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_clwb()
|
||||
{
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0x1000000) == 0x1000000;
|
||||
return g_value;
|
||||
}
|
||||
|
||||
std::string utils::get_system_info()
|
||||
{
|
||||
std::string result;
|
||||
|
@ -45,6 +45,8 @@ namespace utils
|
||||
|
||||
bool has_xop();
|
||||
|
||||
bool has_clwb();
|
||||
|
||||
std::string get_system_info();
|
||||
|
||||
std::string get_firmware_version();
|
||||
|
Loading…
Reference in New Issue
Block a user