Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/cpu_features.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Kurushin <ajax16384@gmail.com>2022-07-21 22:57:38 +0300
committerGitHub <noreply@github.com>2022-07-21 22:57:38 +0300
commitc1620a979e751387a440a6d7bdcd96dc025d39ce (patch)
tree41a59f55f55fdd556d7dca25ae800e1a5beee7d7
parent38ae5d095ceab32298aa10cb4b05e019a77dd02c (diff)
add comet lake unit test #248 (#250)
-rw-r--r--test/cpuinfo_x86_test.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/cpuinfo_x86_test.cc b/test/cpuinfo_x86_test.cc
index 140ecce..3306333 100644
--- a/test/cpuinfo_x86_test.cc
+++ b/test/cpuinfo_x86_test.cc
@@ -1153,6 +1153,37 @@ TEST_F(CpuidX86Test, INTEL_KNIGHTS_LANDING) {
X86Microarchitecture::INTEL_KNIGHTS_L);
}
+// http://users.atw.hu/instlatx64/GenuineIntel/GenuineIntel00806EC_CometLake_CPUID2.txt
+TEST_F(CpuidX86Test, INTEL_CML_U) {
+ cpu().SetLeaves({
+ {{0x00000000, 0}, Leaf{0x00000016, 0x756E6547, 0x6C65746E, 0x49656E69}},
+ {{0x00000001, 0}, Leaf{0x000806EC, 0x00100800, 0x7FFAFBBF, 0xBFEBFBFF}},
+ });
+ const auto info = GetX86Info();
+
+ EXPECT_STREQ(info.vendor, "GenuineIntel");
+ EXPECT_EQ(info.family, 0x06);
+ EXPECT_EQ(info.model, 0x8E);
+ EXPECT_EQ(info.stepping, 0x0C);
+ EXPECT_EQ(GetX86Microarchitecture(&info),
+ X86Microarchitecture::INTEL_CML);
+}
+
+// http://users.atw.hu/instlatx64/GenuineIntel/GenuineIntel00A0652_CometLake_CPUID1.txt
+TEST_F(CpuidX86Test, INTEL_CML_H) {
+ cpu().SetLeaves({
+ {{0x00000000, 0}, Leaf{0x00000016, 0x756E6547, 0x6C65746E, 0x49656E69}},
+ {{0x00000001, 0}, Leaf{0x000A0652, 0x00100800, 0x7FFAFBBF, 0xBFEBFBFF}},
+ });
+ const auto info = GetX86Info();
+
+ EXPECT_STREQ(info.vendor, "GenuineIntel");
+ EXPECT_EQ(info.family, 0x06);
+ EXPECT_EQ(info.model, 0xA5);
+ EXPECT_EQ(GetX86Microarchitecture(&info),
+ X86Microarchitecture::INTEL_CML);
+}
+
// https://github.com/google/cpu_features/issues/200
// http://users.atw.hu/instlatx64/GenuineIntel/GenuineIntel00206F2_Eagleton_CPUID.txt
#if defined(CPU_FEATURES_OS_WINDOWS)