Skip to content

Commit 7e186d3

Browse files
committed
[LoongArch] Fix the procossor series mask
Refer PRID_SERIES_MASK definition in linux kernel: arch/loongarch/include/asm/cpu.h.
1 parent bbd57e1 commit 7e186d3

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
@@ -1524,7 +1524,8 @@ StringRef sys::getHostCPUName() {
15241524
// Use processor id to detect cpu name.
15251525
uint32_t processor_id;
15261526
__asm__("cpucfg %[prid], $zero\n\t" : [prid] "=r"(processor_id));
1527-
switch (processor_id & 0xff00) {
1527+
// Refer PRID_SERIES_MASK in linux kernel: arch/loongarch/include/asm/cpu.h.
1528+
switch (processor_id & 0xf000) {
15281529
case 0xc000: // Loongson 64bit, 4-issue
15291530
return "la464";
15301531
// TODO: Others.

0 commit comments

Comments
 (0)