Missing atomic instruction tests with BPF_FETCH
dthaler opened this issue · 2 comments
dthaler commented
Currently only about half of the atomic instructions have tests. It is missing ones with BPF_FETCH.
https://github.com/dthaler/ebpf-docs/blob/update/isa/kernel.org/instruction-set.rst#atomic-operations
Alan-Jowett commented
Proposal is to extend the lock mnemonic with an optional fetch keyword:
lock [fetch] add register_and_offset, target_register
With the fetch keyword being optional.
If this is agreeable, I will extend the BPF assembler to support these mnemonics.
dthaler commented
That is ok, but you also need to support BPF_XCHG and BPF_CMPXCHG, which are new instructions that only work with BPF_FETCH.