================ @@ -48,6 +48,24 @@ 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_ATOMIC_LOAD : BPFAtomicLoadStoreOp<0x1>; +def BPF_ATOMIC_STORE : BPFAtomicLoadStoreOp<0x2>; + +class BPFAtomicOrdering<bits<4> val> { + bits<4> Value = val; +} + +def BPF_RELAXED : BPFAtomicOrdering<0x0>; +def BPF_CONSUME : BPFAtomicOrdering<0x1>; ---------------- yonghong-song wrote:
Let use remove BPF_CONSUME? In kernel, we are not using atomic operation with CONSUME. In current BPF implementation, for operations like atomic_load_{add, sub,and,or,xor}, we do not support consume either. https://github.com/llvm/llvm-project/pull/108636 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits