File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,12 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) {
296
296
}
297
297
}
298
298
299
+ if (Implementer == " 0xc0" ) { // Ampere Computing
300
+ return StringSwitch<const char *>(Part)
301
+ .Case (" 0xac3" , " ampere1" )
302
+ .Default (" generic" );
303
+ }
304
+
299
305
return " generic" ;
300
306
}
301
307
Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ TEST(getLinuxHostCPUName, AArch64) {
133
133
" CPU part : 0xc01" ),
134
134
" saphira" );
135
135
136
+ EXPECT_EQ (sys::detail::getHostCPUNameForARM (" CPU implementer : 0xc0\n "
137
+ " CPU part : 0xac3" ),
138
+ " ampere1" );
139
+
136
140
// MSM8992/4 weirdness
137
141
StringRef MSM8992ProcCpuInfo = R"(
138
142
Processor : AArch64 Processor rev 3 (aarch64)
You can’t perform that action at this time.
0 commit comments