mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-16 13:08:42 +00:00
[AArch64] Add native CPU detection for Neoverse N1
Map the CPU ID value 0xd0c to "neoverse-n1". Patch by James Greenhalgh. Differential Revision: https://reviews.llvm.org/D80736
This commit is contained in:
parent
6c824c81a9
commit
5ecf85a5fc
@ -204,6 +204,7 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) {
|
||||
.Case("0xd09", "cortex-a73")
|
||||
.Case("0xd0a", "cortex-a75")
|
||||
.Case("0xd0b", "cortex-a76")
|
||||
.Case("0xd0c", "neoverse-n1")
|
||||
.Default("generic");
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,10 @@ TEST(getLinuxHostCPUName, AArch64) {
|
||||
EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
|
||||
"CPU part : 0xd03"),
|
||||
"cortex-a53");
|
||||
|
||||
EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x41\n"
|
||||
"CPU part : 0xd0c"),
|
||||
"neoverse-n1");
|
||||
// Verify that both CPU implementer and CPU part are checked:
|
||||
EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x40\n"
|
||||
"CPU part : 0xd03"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user