ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

BPF_ATOMIC

T1 ebpf atomic insn
eBPF BPF_ATOMIC (MEM)
SourceIETF RFC 9669 Official eBPF Instruction Set Architecture v1.0 (ebpf_rfc9669)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeeBPF ISA v1.0 (IETF RFC 9669)
Linux / Windows / Hardware eBPF VMs
License & VersionIETF Trust Legal Provisions
RFC 9669
Upstreamhttps://www.rfc-editor.org/rfc/rfc9669.txt
Privilegeuser
Extensionsatomic32, atomic64

Summary

Atomic memory read-modify-write, exchange, and compare-exchange.

Syntax / Encoding

BPF_ATOMIC [opcodes: 0xc3, 0xdb] — Atomic RMW on *(u32/u64 *)(dst + offset) [W=0xc3, DW=0xdb]; imm: ADD=0x00, OR=0x40, AND=0x50, XOR=0xa0, FETCH=0x01, XCHG=0xe1, CMPXCHG=0xf1

Binary Encodings (2)

WidthFormatBit PatternMask / Match
64eBPF-MEMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx110000110xff / 0xc3
64eBPF-MEMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx110110110xff / 0xdb

Operands

NameDescription
dst_regDestination register or base address
src_regBase address (LDX) or source value (STX/ATOMIC)
offsetSigned 16-bit address offset
immImmediate value or atomic sub-operation code