bpf: gas,include,opcode: add suppor for instructions BSWAP{16,32,64}
authorJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 24 Jul 2023 00:54:06 +0000 (02:54 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 24 Jul 2023 00:54:06 +0000 (02:54 +0200)
commit5cbe549257b0aed1b615714e74bb6a3f066f3253
treee68230c56c241d79ad0061a2589971a9b0d3ee2b
parenta50ead7822bef29a45d6e660e23264d76545981b
bpf: gas,include,opcode: add suppor for instructions BSWAP{16,32,64}

This patch adds support for the BPF V4 ISA byte swap instructions to
opcodes, assembler and disassembler.

Tested in bpf-unknown-none.

include/ChangeLog:

2023-07-24  Jose E. Marchesi  <jose.marchesi@oracle.com>

* opcode/bpf.h (BPF_IMM32_BSWAP16): Define.
(BPF_IMM32_BSWAP32): Likewise.
(BPF_IMM32_BSWAP64): Likewise.
(enum bpf_insn_id): New entries BPF_INSN_BSWAP{16,32,64}.

opcodes/ChangeLog:

2023-07-24  Jose E. Marchesi  <jose.marchesi@oracle.com>

* bpf-opc.c (bpf_opcodes): Add entries for the BSWAP*
instructions.

gas/ChangeLog:

2023-07-24  Jose E. Marchesi  <jose.marchesi@oracle.com>

* doc/c-bpf.texi (BPF Instructions): Document BSWAP* instructions.
* testsuite/gas/bpf/alu.s: Test BSWAP{16,32,64} instructions.
* testsuite/gas/bpf/alu.d: Likewise.
* testsuite/gas/bpf/alu-be.d: Likewise.
* testsuite/gas/bpf/alu-pseudoc.s: Likewise.
* testsuite/gas/bpf/alu-pseudoc.d: Likewise.
* testsuite/gas/bpf/alu-be-pseudoc.d: Likewise.
12 files changed:
gas/ChangeLog
gas/doc/c-bpf.texi
gas/testsuite/gas/bpf/alu-be-pseudoc.d
gas/testsuite/gas/bpf/alu-be.d
gas/testsuite/gas/bpf/alu-pseudoc.d
gas/testsuite/gas/bpf/alu-pseudoc.s
gas/testsuite/gas/bpf/alu.d
gas/testsuite/gas/bpf/alu.s
include/ChangeLog
include/opcode/bpf.h
opcodes/ChangeLog
opcodes/bpf-opc.c