Commit 29c17fcb authored by David Reid's avatar David Reid

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.
parent 5a9c322c
...@@ -12001,7 +12001,7 @@ static MA_INLINE void ma_yield(void) ...@@ -12001,7 +12001,7 @@ static MA_INLINE void ma_yield(void)
#endif #endif
#endif #endif
#else #else
__asm__ __volatile__ ("pause"); __asm__ __volatile__ ("rep; nop");
#endif #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__) #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 */ /* ARM */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment