mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 23:22:31 +02:00
Add ZEN4 Phoenix detection (#328)
This commit is contained in:
parent
fd4ffc1632
commit
199d299ce5
@ -834,6 +834,7 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
|
|||||||
return AMD_ZEN3;
|
return AMD_ZEN3;
|
||||||
case CPUID(0x19, 0x10):
|
case CPUID(0x19, 0x10):
|
||||||
case CPUID(0x19, 0x61):
|
case CPUID(0x19, 0x61):
|
||||||
|
case CPUID(0x19, 0x74):
|
||||||
// https://en.wikichip.org/wiki/amd/microarchitectures/zen_4
|
// https://en.wikichip.org/wiki/amd/microarchitectures/zen_4
|
||||||
return AMD_ZEN4;
|
return AMD_ZEN4;
|
||||||
default:
|
default:
|
||||||
|
@ -909,6 +909,21 @@ TEST_F(CpuidX86Test, AMD_K19_ZEN4_RAPHAEL) {
|
|||||||
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN4);
|
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0A70F41_K19_Phoenix_03_CPUID.txt
|
||||||
|
TEST_F(CpuidX86Test, AMD_K19_ZEN4_PHOENIX) {
|
||||||
|
cpu().SetLeaves({
|
||||||
|
{{0x00000000, 0}, Leaf{0x00000010, 0x68747541, 0x444D4163, 0x69746E65}},
|
||||||
|
{{0x00000001, 0}, Leaf{0x00A70F41, 0x00100800, 0x7EF8320B, 0x178BFBFF}},
|
||||||
|
{{0x80000000, 0}, Leaf{0x80000028, 0x68747541, 0x444D4163, 0x69746E65}},
|
||||||
|
{{0x80000001, 0}, Leaf{0x00A70F41, 0x50000000, 0x75C237FF, 0x2FD3FBFF}},
|
||||||
|
});
|
||||||
|
const auto info = GetX86Info();
|
||||||
|
|
||||||
|
EXPECT_STREQ(info.vendor, CPU_FEATURES_VENDOR_AUTHENTIC_AMD);
|
||||||
|
EXPECT_EQ(info.family, 0x19);
|
||||||
|
EXPECT_EQ(info.model, 0x74);
|
||||||
|
}
|
||||||
|
|
||||||
// http://users.atw.hu/instlatx64/HygonGenuine/HygonGenuine0900F11_Hygon_01_CPUID.txt
|
// http://users.atw.hu/instlatx64/HygonGenuine/HygonGenuine0900F11_Hygon_01_CPUID.txt
|
||||||
TEST_F(CpuidX86Test, AMD_K18_ZEN_DHYANA_OCTAL_CORE_C86_3250) {
|
TEST_F(CpuidX86Test, AMD_K18_ZEN_DHYANA_OCTAL_CORE_C86_3250) {
|
||||||
cpu().SetLeaves({
|
cpu().SetLeaves({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user