mirror of
https://github.com/google/cpu_features.git
synced 2025-07-02 05:33:17 +02:00
Export GetArmCpuId function
This commit is contained in:
@ -82,17 +82,17 @@ TEST(CpuinfoArmTest, InvalidArmv7) {
|
||||
DisableHardwareCapabilities();
|
||||
auto& fs = GetEmptyFilesystem();
|
||||
fs.CreateFile("/proc/cpuinfo",
|
||||
R"(Processor : ARMv6-compatible processor rev 6 (v6l)
|
||||
BogoMIPS : 199.47
|
||||
Features : swp half thumb fastmult vfp edsp java
|
||||
CPU implementer : 0x41
|
||||
CPU architecture: 7
|
||||
CPU variant : 0x0
|
||||
CPU part : 0xb76
|
||||
CPU revision : 6
|
||||
R"(Processor : ARMv6-compatible processor rev 6 (v6l)
|
||||
BogoMIPS : 199.47
|
||||
Features : swp half thumb fastmult vfp edsp java
|
||||
CPU implementer : 0x41
|
||||
CPU architecture: 7
|
||||
CPU variant : 0x0
|
||||
CPU part : 0xb76
|
||||
CPU revision : 6
|
||||
|
||||
Hardware : SPICA
|
||||
Revision : 0020
|
||||
Hardware : SPICA
|
||||
Revision : 0020
|
||||
Serial : 33323613546d00ec )");
|
||||
const auto info = GetArmInfo();
|
||||
EXPECT_EQ(info.architecture, 6);
|
||||
@ -137,6 +137,8 @@ CPU revision : 2)");
|
||||
const auto info = GetArmInfo();
|
||||
EXPECT_TRUE(info.features.idiva);
|
||||
EXPECT_TRUE(info.features.idivt);
|
||||
|
||||
EXPECT_EQ(GetArmCpuId(&info), 0x510006f2);
|
||||
}
|
||||
|
||||
// The Nexus 4 (Qualcomm Krait) kernel configuration forgets to report IDIV
|
||||
@ -153,6 +155,8 @@ CPU revision : 3)");
|
||||
const auto info = GetArmInfo();
|
||||
EXPECT_TRUE(info.features.idiva);
|
||||
EXPECT_TRUE(info.features.idivt);
|
||||
|
||||
EXPECT_EQ(GetArmCpuId(&info), 0x510006f3);
|
||||
}
|
||||
|
||||
// The emulator-specific Android 4.2 kernel fails to report support for the
|
||||
|
Reference in New Issue
Block a user