[webkit-reviews] review granted: [Bug 234333] [libpas] Implement atomics in inline assembly if compiler is using ARM64 : [Attachment 447222] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 15 10:02:07 PST 2021


Filip Pizlo <fpizlo at apple.com> has granted Yusuke Suzuki <ysuzuki at apple.com>'s
request for review:
Bug 234333: [libpas] Implement atomics in inline assembly if compiler is using
ARM64
https://bugs.webkit.org/show_bug.cgi?id=234333

Attachment 447222: Patch

https://bugs.webkit.org/attachment.cgi?id=447222&action=review




--- Comment #4 from Filip Pizlo <fpizlo at apple.com> ---
Comment on attachment 447222
  --> https://bugs.webkit.org/attachment.cgi?id=447222
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=447222&action=review

I'm not sure how much I care, but it would be nice if store_atomic was a
pas_utils thing.

> Source/bmalloc/libpas/src/libpas/pas_lock.h:116
>  #if PAS_COMPILER(CLANG)
> +#if PAS_COMPILER(CLANG_ARM64_ATOMICS_DEPENDENCY)
> +    asm volatile (
> +	   "stlrb wzr, [%x[ptr]]\t\n"
> +	   /* outputs */  :
> +	   /* inputs  */  : [ptr]"r"(&lock->lock)
> +	   /* clobbers */ : "memory"
> +    );
> +#else
>      __c11_atomic_store((_Atomic bool*)&lock->lock, false, __ATOMIC_SEQ_CST);
> +#endif
>  #else
>      __atomic_store_n((bool*)&lock->lock, false, __ATOMIC_SEQ_CST);
>  #endif

I think it would be way better if this atomic store thing was factored out into
pas_utils.h.


More information about the webkit-reviews mailing list