Skip to content

Commit

Permalink
fix(rpmalloc): spin intrinsic on windows-arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Mar 6, 2021
1 parent bd9557d commit 8a990e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/lwjgl/rpmalloc/src/main/c/rpmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,11 @@ rpmalloc_set_main_thread(void) {
static void
_rpmalloc_spin(void) {
#if defined(_MSC_VER)
_mm_pause();
#if defined(_M_ARM64)
__yield();
#else
_mm_pause();
#endif
#elif defined(__x86_64__) || defined(__i386__)
__asm__ volatile("pause" ::: "memory");
#elif defined(__aarch64__) || (defined(__arm__) && __ARM_ARCH >= 7)
Expand Down

0 comments on commit 8a990e0

Please sign in to comment.