mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 15:12:30 +02:00
Add Mendocino ZEN2 detection (#305)
This commit is contained in:
parent
75ec988188
commit
0e9da93fac
@ -813,6 +813,7 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
|
||||
case CPUID(0x17, 0x71):
|
||||
case CPUID(0x17, 0x90):
|
||||
case CPUID(0x17, 0x98):
|
||||
case CPUID(0x17, 0xA0):
|
||||
// https://en.wikichip.org/wiki/amd/microarchitectures/zen_2
|
||||
return AMD_ZEN2;
|
||||
case CPUID(0x19, 0x00):
|
||||
|
@ -926,6 +926,20 @@ TEST_F(CpuidX86Test, AMD_K18_ZEN_DHYANA_OCTAL_CORE_C86_3250) {
|
||||
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN);
|
||||
}
|
||||
|
||||
// http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD08A0F00_K17_Mendocino_01_CPUID.txt
|
||||
TEST_F(CpuidX86Test, AMD_ZEN2_MENDOCINO) {
|
||||
cpu().SetLeaves({
|
||||
{{0x00000000, 0}, Leaf{0x00000010, 0x68747541, 0x444D4163, 0x69746E65}},
|
||||
{{0x00000001, 0}, Leaf{0x008A0F00, 0x00080800, 0x7EF8320B, 0x178BFBFF}},
|
||||
});
|
||||
const auto info = GetX86Info();
|
||||
|
||||
EXPECT_EQ(info.model, 0xA0);
|
||||
EXPECT_EQ(info.family, 0x17);
|
||||
EXPECT_STREQ(info.vendor, CPU_FEATURES_VENDOR_AUTHENTIC_AMD);
|
||||
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN2);
|
||||
}
|
||||
|
||||
// http://users.atw.hu/instlatx64/GenuineIntel/GenuineIntel00906A4_AlderLakeP_00_CPUID.txt
|
||||
TEST_F(CpuidX86Test, INTEL_ALDER_LAKE_AVX_VNNI) {
|
||||
cpu().SetOsBackupsExtendedRegisters(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user