bpf: Update atomic instruction pseudo-C syntax
authorDavid Faust <david.faust@oracle.com>
Tue, 25 Jul 2023 19:51:47 +0000 (12:51 -0700)
committerDavid Faust <david.faust@oracle.com>
Tue, 25 Jul 2023 20:10:15 +0000 (13:10 -0700)
commit055a4c8e0f100bbca2ff7cd6fb423dece561a8cd
tree8a5966b91fb625ce02332c40c833f383e4d0a0be
parent695776dc2f43c56dd2ae2f7036fb7cf74e19b46b
bpf: Update atomic instruction pseudo-C syntax

This patch updates the pseudo-C dialect templates for the BPF v3 atomic
instructions.  The templates match the strings emitted by clang -S for
these instructions.

The tests and documentation are updated accordingly.

gas/
* doc/c-bpf.texi (BPF Instructions): Update entries for atomic
and 32-bit atomic instructions.
* testsuite/gas/bpf/atomic.s: Test AAND, AAND32, AOR, AOR32,
AXOR, AXOR32, AFADD, AFADD32, AFAND, AFAND32, AFOR, AFOR32,
AFXOR and AFXOR32 instructions.
* testsuite/gas/bpf/atomic.d: Likewise.
* testsuite/gas/bpf/atomic-be.d: Likewise.
* testsuite/gas/bpf/atomic-pseudoc.s: Likewise.
* testsuite/gas/bpf/atomic-pseudoc.d: Likewise.
* testsuite/gas/bpf/atomic-be-pseudoc.d: Likewise.
* testsuite/gas/bpf/atomic-v1.s: New test.
* testsuite/gas/bpf/atomic-v1.d: Likewise.
* testuiste/gas/bpf/atomic-v1-be.d: Likewise.
* testuiste/gas/bpf/bpf.exp: Run new tests.

opcodes/
* bpf-opc.c (bpf_opcodes): Update pseudo-C dialect templates for:
BPF_INSN_AADD, BPF_INSN_AOR, BPF_INSN_AAND, BPF_INSN_AXOR,
BPF_INSN_AFADD, BPF_INSN_AFOR, BPF_INSN_AFAND, BPF_INSN_AFXOR,
BPF_INSN_AADD32, BPF_INSN_AOR32, BPF_INSN_AAND32,
BPF_INSN_AXOR32, BPF_INSN_AFADD32, BPF_INSN_AFOR32,
BPF_INSN_AFAND32, and BPF_INSN_AFXOR32 instructions.
12 files changed:
gas/doc/c-bpf.texi
gas/testsuite/gas/bpf/atomic-be-pseudoc.d
gas/testsuite/gas/bpf/atomic-be.d
gas/testsuite/gas/bpf/atomic-pseudoc.d
gas/testsuite/gas/bpf/atomic-pseudoc.s
gas/testsuite/gas/bpf/atomic-v1-be.d [new file with mode: 0644]
gas/testsuite/gas/bpf/atomic-v1.d [new file with mode: 0644]
gas/testsuite/gas/bpf/atomic-v1.s [new file with mode: 0644]
gas/testsuite/gas/bpf/atomic.d
gas/testsuite/gas/bpf/atomic.s
gas/testsuite/gas/bpf/bpf.exp
opcodes/bpf-opc.c