mirror of
https://github.com/boostorg/atomic.git
synced 2026-01-19 04:02:09 +00:00
thread_pause: use correct assembler syntax on powerpc*-apple-darwin
Fixes: https://github.com/boostorg/atomic/issues/79
This commit is contained in:
committed by
Andrey Semashev
parent
23b53aebe6
commit
3840be856e
@@ -75,7 +75,11 @@ BOOST_FORCEINLINE void thread_pause() noexcept
|
||||
#elif (defined(__ARM_ARCH) && __ARM_ARCH >= 8) || defined(__ARM_ARCH_8A__)
|
||||
__asm__ __volatile__("yield" : : : "memory");
|
||||
#elif (defined(__POWERPC__) || defined(__PPC__))
|
||||
#if defined(__APPLE__)
|
||||
__asm__ __volatile__("or r27,r27,r27" : : : "memory"); // yield pseudo-instruction
|
||||
#else
|
||||
__asm__ __volatile__("or 27,27,27" : : : "memory"); // yield pseudo-instruction
|
||||
#endif
|
||||
#elif defined(__riscv) && (__riscv_xlen == 64)
|
||||
#if defined(__riscv_zihintpause)
|
||||
__asm__ __volatile__("pause" : : : "memory");
|
||||
|
||||
Reference in New Issue
Block a user