From eed66366834f7f2263b7726b3b4596af12e790e1 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 29 Jul 2026 07:42:45 +0000 Subject: [PATCH 07/13] folly/portability/Asm: pause on 32-bit PPC too, with Apple asm syntax Extend the PPC yield hint (or 27,27,27) to ppc32 and use named registers on Apple, whose assembler rejects bare register numbers. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_013G8CDpEyDCCgV4jaMM9WME --- folly/portability/Asm.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/folly/portability/Asm.h b/folly/portability/Asm.h index 5f850163e..437c0e778 100644 --- a/folly/portability/Asm.h +++ b/folly/portability/Asm.h @@ -47,8 +47,13 @@ inline void asm_volatile_pause() { #endif #elif (defined(__arm__) && !(__ARM_ARCH < 7)) asm volatile("yield"); -#elif FOLLY_PPC64 +#elif FOLLY_PPC || FOLLY_PPC64 +#if defined(__APPLE__) + // Apple's assembler requires named registers. + asm volatile("or r27,r27,r27"); +#else asm volatile("or 27,27,27"); #endif +#endif } } // namespace folly -- 2.43.0