From 99ab53e9980dc0b2fb31b4615ce754bf1f35826f Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Tue, 24 May 2022 23:04:47 +0800 Subject: [PATCH] darwin: fix atomic-ops.h ppc64 build (#3634) --- src/unix/atomic-ops.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/unix/atomic-ops.h b/src/unix/atomic-ops.h index 664a9426..58043c42 100644 --- a/src/unix/atomic-ops.h +++ b/src/unix/atomic-ops.h @@ -54,7 +54,9 @@ UV_UNUSED(static void cpu_relax(void)) { __asm__ __volatile__ ("rep; nop" ::: "memory"); /* a.k.a. PAUSE */ #elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__) __asm__ __volatile__ ("yield" ::: "memory"); -#elif defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) +#elif (defined(__ppc__) || defined(__ppc64__)) && defined(__APPLE__) + __asm volatile ("" : : : "memory"); +#elif !defined(__APPLE__) && (defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__)) __asm__ __volatile__ ("or 1,1,1; or 2,2,2" ::: "memory"); #endif }