Skip to content

Commit 43d7873

Browse files
committed
[LoongArch] Fix the procossor series mask
Refer PRID_SERIES_MASK definition in linux kernel: arch/loongarch/include/asm/cpu.h. (cherry picked from commit 7e186d3) Change-Id: I32a641e85329b0dec7d538af6471f4c40775e0a5
1 parent 92f1e37 commit 43d7873

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/TargetParser/Host.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,8 @@ StringRef sys::getHostCPUName() {
14621462
// Use processor id to detect cpu name.
14631463
uint32_t processor_id;
14641464
__asm__("cpucfg %[prid], $zero\n\t" : [prid] "=r"(processor_id));
1465-
switch (processor_id & 0xff00) {
1465+
// Refer PRID_SERIES_MASK in linux kernel: arch/loongarch/include/asm/cpu.h.
1466+
switch (processor_id & 0xf000) {
14661467
case 0xc000: // Loongson 64bit, 4-issue
14671468
return "la464";
14681469
// TODO: Others.

0 commit comments

Comments
 (0)