mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-09 07:42:15 +00:00
Add TSX Extension
Add logic for TSX Check
This commit is contained in:
parent
2c92ad5888
commit
49e2a2db6e
@ -224,6 +224,11 @@ void CPUInfo::Detect() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TSX support require check:
|
||||
// -- Is the RTM bit set in CPUID? (>>11)
|
||||
// -- No need to check HLE bit because legacy processors ignore HLE hints
|
||||
// -- See https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family
|
||||
if (max_std_fn >= 7)
|
||||
{
|
||||
do_cpuid(cpu_id, 0x00000007);
|
||||
@ -236,6 +241,8 @@ void CPUInfo::Detect() {
|
||||
bBMI2 = true;
|
||||
if ((cpu_id[1] >> 29) & 1)
|
||||
bSHA = true;
|
||||
if ((cpu_id[1] >> 11) & 1)
|
||||
bRTM = true;
|
||||
}
|
||||
}
|
||||
if (max_ex_fn >= 0x80000004) {
|
||||
@ -419,6 +426,7 @@ std::string CPUInfo::Summarize()
|
||||
if (bAES) sum += ", AES";
|
||||
if (bSHA) sum += ", SHA";
|
||||
if (bXOP) sum += ", XOP";
|
||||
if (bRTM) sum += ", TSX";
|
||||
if (bLongMode) sum += ", 64-bit support";
|
||||
return sum;
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ struct CPUInfo {
|
||||
bool bBMI1;
|
||||
bool bBMI2;
|
||||
bool bXOP;
|
||||
bool bRTM;
|
||||
|
||||
// x86 : SIMD 128 bit
|
||||
bool bSSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user