aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTomahawkd <20868632+Tomahawkd@users.noreply.github.com>2023-08-28 22:25:24 +0800
committerGitHub <noreply@github.com>2023-08-28 16:25:24 +0200
commitb5cb91b35c7b498ee44e870c077c5325acc30c11 (patch)
tree1d04176f0cac48d07b7f5ecfb7d4532cb4809c03 /test
parenta89e3b55697d567502de0c549fc9f6703cd7e25e (diff)
downloadcpu_features-b5cb91b35c7b498ee44e870c077c5325acc30c11.tar.gz
Add Intel LAM/AMD UAI feature detection in X86_64 (#315)
* Add Intel LAM/AMD UAI features in X86 * Add AMD UAI test for AMD_K19_ZEN4_RAPHAEL * Add separate UAI for AMD
Diffstat (limited to 'test')
-rw-r--r--test/cpuinfo_x86_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/cpuinfo_x86_test.cc b/test/cpuinfo_x86_test.cc
index de271cc..c9469a7 100644
--- a/test/cpuinfo_x86_test.cc
+++ b/test/cpuinfo_x86_test.cc
@@ -184,6 +184,8 @@ TEST_F(CpuidX86Test, SandyBridge) {
EXPECT_FALSE(features.movbe);
EXPECT_FALSE(features.rdrnd);
EXPECT_FALSE(features.adx);
+ EXPECT_FALSE(features.lam);
+ EXPECT_FALSE(features.uai);
}
const int UNDEF = -1;
@@ -894,6 +896,7 @@ TEST_F(CpuidX86Test, AMD_K19_ZEN4_RAPHAEL) {
{{0x80000002, 0}, Leaf{0x20444D41, 0x657A7952, 0x2035206E, 0x30303637}},
{{0x80000003, 0}, Leaf{0x2D362058, 0x65726F43, 0x6F725020, 0x73736563}},
{{0x80000004, 0}, Leaf{0x2020726F, 0x20202020, 0x20202020, 0x00202020}},
+ {{0x80000021, 0}, Leaf{0x00062FCF, 0x0000015C, 0x00000000, 0x00000000}},
});
const auto info = GetX86Info();
@@ -902,6 +905,7 @@ TEST_F(CpuidX86Test, AMD_K19_ZEN4_RAPHAEL) {
EXPECT_EQ(info.model, 0x61);
EXPECT_STREQ(info.brand_string,
"AMD Ryzen 5 7600X 6-Core Processor ");
+ EXPECT_TRUE(info.features.uai);
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN4);
}