mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 15:12:30 +02:00
Add AMD ZEN4 Genoa detection (#329)
This commit is contained in:
parent
199d299ce5
commit
248aa1b938
@ -833,6 +833,7 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
|
||||
// https://en.wikichip.org/wiki/amd/microarchitectures/zen_3
|
||||
return AMD_ZEN3;
|
||||
case CPUID(0x19, 0x10):
|
||||
case CPUID(0x19, 0x11):
|
||||
case CPUID(0x19, 0x61):
|
||||
case CPUID(0x19, 0x74):
|
||||
// https://en.wikichip.org/wiki/amd/microarchitectures/zen_4
|
||||
|
@ -959,6 +959,20 @@ TEST_F(CpuidX86Test, AMD_ZEN2_MENDOCINO) {
|
||||
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN2);
|
||||
}
|
||||
|
||||
// http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0A10F11_K19_Genoa_02_CPUID.txt
|
||||
TEST_F(CpuidX86Test, AMD_K19_ZEN4_GENOA) {
|
||||
cpu().SetLeaves({
|
||||
{{0x00000000, 0}, Leaf{0x00000010, 0x68747541, 0x444D4163, 0x69746E65}},
|
||||
{{0x00000001, 0}, Leaf{0x00A10F11, 0x00200800, 0x7EFA320B, 0x178BFBFF}},
|
||||
});
|
||||
const auto info = GetX86Info();
|
||||
|
||||
EXPECT_EQ(info.model, 0x11);
|
||||
EXPECT_EQ(info.family, 0x19);
|
||||
EXPECT_STREQ(info.vendor, CPU_FEATURES_VENDOR_AUTHENTIC_AMD);
|
||||
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN4);
|
||||
}
|
||||
|
||||
// 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