History

Using and operation when detecting Loongson mmi instructions

The Loongson 64-bit simd optimizations has used LEXT1(LoongISA general EXTensions 1), so we must make sure loongson-mmi and loongson-ext exist at the same time.

gxw committed 6 years ago

Commit ee596d61 parent cf5a1121 file · +1 −1Browse files

Showing the changes to codec/common/src/cpu.cpp (1 of 1 file). Show all

Unified · Split

codec/common/src/cpu.cpp+1−1
@@ -331,7 +331,7 @@ static uint32_t get_cpu_flags_from_cpuinfo(void) · 330 unmodified lines
331331 }
332332 while (fgets(buf, sizeof(buf), fp)) {
333333 if(!strncmp(buf, "ASEs implemented", strlen("ASEs implemented"))) {
334− if (strstr(buf, "loongson-mmi") || strstr(buf, "loongson-ext")) {
334+ if (strstr(buf, "loongson-mmi") && strstr(buf, "loongson-ext")) {
335335 flags |= WELS_CPU_MMI;
336336 }
337337 if (strstr(buf, "msa")) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t