mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
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:
+1
-1
@@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user