1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-21 18:22:53 +01:00

Quick hack for Zen 4, more Zen 3 detection

This commit is contained in:
xddxd 2022-09-26 17:06:43 +03:00 committed by kd-11
parent e8f2aa0ae4
commit bc7b2ed172

View File

@ -1038,9 +1038,15 @@ getAMDProcessorTypeAndSubtype(unsigned Family, unsigned Model,
} }
break; break;
case 25: case 25:
if (testFeature(X86::FEATURE_AVX512VBMI2)) {
CPU = "icelake-client";
*Type = X86::INTEL_COREI7;
*Subtype = X86::INTEL_COREI7_ICELAKE_CLIENT;
break; // Treat Zen 4 as Ice Lake for AVX512
}
CPU = "znver3"; CPU = "znver3";
*Type = X86::AMDFAM19H; *Type = X86::AMDFAM19H;
if (Model <= 0x0f) { if (Model <= 0x0f || Model == 0x21) {
*Subtype = X86::AMDFAM19H_ZNVER3; *Subtype = X86::AMDFAM19H_ZNVER3;
break; // 00h-0Fh: Zen3 break; // 00h-0Fh: Zen3
} }