boostorg / fiber

userland threads
464 stars 108 forks source link

cpu_relax: fixup MIPS check for 64-bit #276

Closed neheb closed 3 years ago

neheb commented 3 years ago

It turns out that this is also broken on mips64el. Further testing reveals that

-mips32r2 -mtune=mips32r2 -mabi=32

compiles the PAUSE instruction just fine whereas

-mips64r2 -mtune=mips64r2 -mabi=64

does not. The PAUSE instruction was introduced in version 2.6 of the MIPS ISA and GCC for some reason does not allow usage of it with MIPS64. Modify the macro to fix the situation instead of just matching on octeon, which is not quite correct.

olk commented 3 years ago

ty