Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/cpuinfo_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ typedef enum {
INTEL_BDW, // BROADWELL
INTEL_SKL, // SKYLAKE
INTEL_ATOM_GMT, // GOLDMONT
INTEL_ATOM_GMT_PLUS, // GOLDMONT+
INTEL_ATOM_TMT, // TREMONT
INTEL_KBL, // KABY LAKE
INTEL_CFL, // COFFEE LAKE
Expand Down
4 changes: 4 additions & 0 deletions src/impl_x86__base_implementation.inl
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
case CPUID(0x06, 0x5C):
// https://en.wikipedia.org/wiki/Goldmont
return INTEL_ATOM_GMT;
case CPUID(0x06, 0x7A):
// https://en.wikichip.org/wiki/intel/microarchitectures/goldmont_plus
return INTEL_ATOM_GMT_PLUS;
case CPUID(0x06, 0x8A):
case CPUID(0x06, 0x96):
case CPUID(0x06, 0x9C):
Expand Down Expand Up @@ -1792,6 +1795,7 @@ CacheInfo GetX86CacheInfo(void) {
LINE(INTEL_BDW) \
LINE(INTEL_SKL) \
LINE(INTEL_ATOM_GMT) \
LINE(INTEL_ATOM_GMT_PLUS) \
LINE(INTEL_ATOM_TMT) \
LINE(INTEL_KBL) \
LINE(INTEL_CFL) \
Expand Down
15 changes: 15 additions & 0 deletions test/cpuinfo_x86_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,21 @@ TEST_F(CpuidX86Test, INTEL_LAKEMONT) {
X86Microarchitecture::INTEL_LAKEMONT);
}

// https://github.com/InstLatx64/InstLatx64/blob/master/GenuineIntel/GenuineIntel00706A8_GoldmontPlus_CPUID.txt
TEST_F(CpuidX86Test, INTEL_GOLDMONT_PLUS) {
cpu().SetLeaves({
{{0x00000000, 0}, Leaf{0x00000018, 0x756E6547, 0x6c65746E, 0x49656E69}},
{{0x00000001, 0}, Leaf{0x000706A8, 0x00400800, 0x4FF8EBBF, 0xBFEBFBFF}},
});
const auto info = GetX86Info();

EXPECT_STREQ(info.vendor, CPU_FEATURES_VENDOR_GENUINE_INTEL);
EXPECT_EQ(info.family, 0x06);
EXPECT_EQ(info.model, 0x7A);
EXPECT_EQ(GetX86Microarchitecture(&info),
X86Microarchitecture::INTEL_ATOM_GMT_PLUS);
}

// https://github.com/InstLatx64/InstLatx64/blob/master/GenuineIntel/GenuineIntel0050670_KnightsLanding_CPUID.txt
TEST_F(CpuidX86Test, INTEL_KNIGHTS_LANDING) {
cpu().SetLeaves({
Expand Down