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

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 19:53:55 PDT 2024


================
@@ -48,6 +48,13 @@ def BPF_END  : BPFArithOp<0xd>;
 def BPF_XCHG    : BPFArithOp<0xe>;
 def BPF_CMPXCHG : BPFArithOp<0xf>;
 
+class BPFAtomicLoadStoreOp<bits<4> val> {
+  bits<4> Value = val;
+}
+
+def BPF_LOAD_ACQ : BPFAtomicLoadStoreOp<0x1>;
+def BPF_STORE_REL : BPFAtomicLoadStoreOp<0xb>;
----------------
yonghong-song wrote:

I may miss some context. Any particular reason to pick 0xb here for imm field?

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


More information about the llvm-commits mailing list