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-10-19 12:35:19 +0300
committerGitHub <noreply@github.com>2022-10-19 12:35:19 +0300
commit4760834428a2efbae712382f3de1cca289ca6e45 (patch)
tree99ea1fc0b3e3c32336b68fe888d574db17b8c248
parent438a66e41807cd73e0c403966041b358f5eafc68 (diff)
add mobile core flavor (#266)
-rw-r--r--src/impl_x86__base_implementation.inl1
-rw-r--r--test/cpuinfo_x86_test.cc14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/impl_x86__base_implementation.inl b/src/impl_x86__base_implementation.inl
index 5b50e88..a1e8722 100644
--- a/src/impl_x86__base_implementation.inl
+++ b/src/impl_x86__base_implementation.inl
@@ -474,6 +474,7 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
case CPUID(0x06, 0x9C):
// https://en.wikichip.org/wiki/intel/microarchitectures/tremont
return INTEL_ATOM_TMT;
+ case CPUID(0x06, 0x0E):
case CPUID(0x06, 0x0F):
case CPUID(0x06, 0x16):
// https://en.wikipedia.org/wiki/Intel_Core_(microarchitecture)
diff --git a/test/cpuinfo_x86_test.cc b/test/cpuinfo_x86_test.cc
index e65be50..5db3f4b 100644
--- a/test/cpuinfo_x86_test.cc
+++ b/test/cpuinfo_x86_test.cc
@@ -1332,6 +1332,20 @@ TEST_F(CpuidX86Test, INTEL_LAKEMONT) {
X86Microarchitecture::INTEL_LAKEMONT);
}
+// https://github.com/InstLatx64/InstLatx64/blob/master/GenuineIntel/GenuineIntel00006E8_PM_Yonah_CPUID.txt
+TEST_F(CpuidX86Test, INTEL_CORE_YONAH) {
+ cpu().SetLeaves({
+ {{0x00000000, 0}, Leaf{0x0000000A, 0x756E6547, 0x6C65746E, 0x49656E69}},
+ {{0x00000001, 0}, Leaf{0x000006E8, 0x00010800, 0x0000C109, 0xAFE9FBFF}},
+ });
+ const auto info = GetX86Info();
+
+ EXPECT_STREQ(info.vendor, CPU_FEATURES_VENDOR_GENUINE_INTEL);
+ EXPECT_EQ(info.family, 0x06);
+ EXPECT_EQ(info.model, 0x0E);
+ EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::INTEL_CORE);
+}
+
// https://github.com/InstLatx64/InstLatx64/blob/master/GenuineIntel/GenuineIntel00706A8_GoldmontPlus_CPUID.txt
TEST_F(CpuidX86Test, INTEL_GOLDMONT_PLUS) {
cpu().SetLeaves({