Try improving compatibility of ma_yield().

My understanding is that "pause" was introduced with the Pentium 4 and
assembles to opcode F390 which is the same as "rep; nop". I believe this
should be backwards compatible.

Using "pause" here introduces an compilation error when targeting
architectures older than Pentium 4.
This commit is contained in:
David Reid
2025-04-27 21:01:59 +10:00
parent 5a9c322c83
commit 29c17fcb22
+1 -1
View File
@@ -12001,7 +12001,7 @@ static MA_INLINE void ma_yield(void)
#endif
#endif
#else
__asm__ __volatile__ ("pause");
__asm__ __volatile__ ("rep; nop");
#endif
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(_M_ARM64) || (defined(_M_ARM) && _M_ARM >= 7) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__)
/* ARM */