diff --git a/include/mimalloc-atomic.h b/include/mimalloc-atomic.h index db8853198..29de75326 100644 --- a/include/mimalloc-atomic.h +++ b/include/mimalloc-atomic.h @@ -293,19 +293,15 @@ static inline void mi_atomic_yield(void) { static inline void mi_atomic_yield(void) { __asm__ volatile ("pause" ::: "memory"); } -#elif defined(__aarch64__) +#elif defined(__aarch64__) || (defined(__arm__) && __ARM_ARCH >= 7) static inline void mi_atomic_yield(void) { - asm volatile("wfe"); -} -#elif (defined(__arm__) && __ARM_ARCH__ >= 7) -static inline void mi_atomic_yield(void) { - __asm__ volatile("yield" ::: "memory"); + asm volatile("isb" ::: "memory"); } #elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) static inline void mi_atomic_yield(void) { __asm__ __volatile__ ("or 27,27,27" ::: "memory"); } -#elif defined(__armel__) || defined(__ARMEL__) +#elif defined(__arm__) /* Arm cores prior to Armv7-A */ static inline void mi_atomic_yield(void) { asm volatile ("nop" ::: "memory"); }