mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-04 14:08:30 +00:00
implement "Enable TSX" combobox
This commit is contained in:
parent
2bc4cb4e58
commit
af71cf0922
8 changed files with 98 additions and 6 deletions
|
|
@ -33,8 +33,13 @@ bool utils::has_avx2()
|
|||
|
||||
bool utils::has_rtm()
|
||||
{
|
||||
// Check RTM and MPX extensions in order to filter out TSX on Haswell CPUs
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0x4800) == 0x4800;
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0x800) == 0x800;
|
||||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_mpx()
|
||||
{
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0x4000) == 0x4000;
|
||||
return g_value;
|
||||
}
|
||||
|
||||
|
|
@ -114,6 +119,10 @@ std::string utils::get_system_info()
|
|||
if (has_rtm())
|
||||
{
|
||||
result += " | TSX";
|
||||
if (!has_mpx())
|
||||
{
|
||||
result += " disabled by default";
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ namespace utils
|
|||
|
||||
bool has_rtm();
|
||||
|
||||
bool has_mpx();
|
||||
|
||||
bool has_512();
|
||||
|
||||
bool has_xop();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue