1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-28 15:33:37 +02:00

Differentiate between different Lake uarch

This commit is contained in:
Moxeja 2020-01-05 13:15:12 +00:00 committed by Guillaume Chatelet
parent 96552a8ed5
commit 73a121b1ae
2 changed files with 21 additions and 2 deletions

View File

@ -116,7 +116,9 @@ typedef enum {
INTEL_ATOM_GMT, // GOLDMONT INTEL_ATOM_GMT, // GOLDMONT
INTEL_KBL, // KABY LAKE INTEL_KBL, // KABY LAKE
INTEL_CFL, // COFFEE LAKE INTEL_CFL, // COFFEE LAKE
INTEL_WHL, // WHISKEY LAKE
INTEL_CNL, // CANNON LAKE INTEL_CNL, // CANNON LAKE
INTEL_ICL, // ICE LAKE
AMD_HAMMER, // K8 AMD_HAMMER, // K8
AMD_K10, // K10 AMD_K10, // K10
AMD_BOBCAT, // K14 AMD_BOBCAT, // K14

View File

@ -689,10 +689,27 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
case CPUID(0x06, 0x5E): case CPUID(0x06, 0x5E):
// https://en.wikipedia.org/wiki/Skylake_(microarchitecture) // https://en.wikipedia.org/wiki/Skylake_(microarchitecture)
return INTEL_SKL; return INTEL_SKL;
case CPUID(0x06, 0x66):
// https://en.wikipedia.org/wiki/Cannon_Lake_(microarchitecture)
return INTEL_CNL;
case CPUID(0x06, 0x7E):
// https://en.wikipedia.org/wiki/Ice_Lake_(microprocessor)
return INTEL_ICL;
case CPUID(0x06, 0x8E): case CPUID(0x06, 0x8E):
switch (info->stepping) {
case 9: return INTEL_KBL; // https://en.wikipedia.org/wiki/Kaby_Lake
case 10: return INTEL_CFL; // https://en.wikipedia.org/wiki/Coffee_Lake
case 11: return INTEL_WHL; // https://en.wikipedia.org/wiki/Whiskey_Lake_(microarchitecture)
default: return X86_UNKNOWN;
}
case CPUID(0x06, 0x9E): case CPUID(0x06, 0x9E):
// https://en.wikipedia.org/wiki/Kaby_Lake if (info->stepping > 9) {
return INTEL_KBL; // https://en.wikipedia.org/wiki/Coffee_Lake
return INTEL_CFL;
} else {
// https://en.wikipedia.org/wiki/Kaby_Lake
return INTEL_KBL;
}
default: default:
return X86_UNKNOWN; return X86_UNKNOWN;
} }