[libc-commits] [PATCH] D156566: [libc] Add PAUSE instruction for the RPC spin loop

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 28 16:09:17 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG9ffde19d112e: [libc] Add PAUSE instruction for the RPC spin loop (authored by jhuber6).

Changed prior to commit:
  https://reviews.llvm.org/D156566?vs=545270&id=545302#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156566/new/

https://reviews.llvm.org/D156566

Files:
  libc/src/__support/RPC/rpc_util.h


Index: libc/src/__support/RPC/rpc_util.h
===================================================================
--- libc/src/__support/RPC/rpc_util.h
+++ libc/src/__support/RPC/rpc_util.h
@@ -26,6 +26,8 @@
   LIBC_INLINE_ASM("nanosleep.u32 64;" ::: "memory");
 #elif defined(LIBC_TARGET_ARCH_IS_AMDGPU)
   __builtin_amdgcn_s_sleep(2);
+#elif defined(LIBC_TARGET_ARCH_IS_X86)
+  __builtin_ia32_pause();
 #else
   // Simply do nothing if sleeping isn't supported on this platform.
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156566.545302.patch
Type: text/x-patch
Size: 484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230728/864c0ea9/attachment-0001.bin>


More information about the libc-commits mailing list