mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01: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
fde958c35e
commit
24a060d455
@ -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…
Reference in New Issue
Block a user