[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 18 16:54:48 PDT 2024


eddyz87 wrote:

@peilin-ye ,
 
> However, I didn't want to use `lock` because I feel like it's too similar to the x86 `LOCK` prefix (implies a full memory barrier, which could be confusing here). WDYT? Cc: @yonghong-song @4ast

Well, we already confuse people in a way, since existing `lock *(u64 *)(r1 + 0x0) += r2` does not imply full barrier (it is translated to `stadd` by arm jit in kernel, which is documented as "has no memory ordering semantics"). So, `lock ... {acquire,release}` shouldn't make things worse.

https://github.com/llvm/llvm-project/pull/108636


More information about the cfe-commits mailing list