bpf: opcodes, gas: support for signed load V4 instructions
authorJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 21 Jul 2023 17:47:49 +0000 (19:47 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 21 Jul 2023 18:00:30 +0000 (20:00 +0200)
commitc24fd9547fb6836af022c99470dfdb13fa9f90fe
tree7267743504eb02a63dc11928aa08d80936a203c4
parent2f3dbc5fb5e781fc17d8f68f9c960a993f06d801
bpf: opcodes, gas: support for signed load V4 instructions

This commit adds the signed load to register (ldxs*) instructions
introduced in the BPF ISA version 4, including opcodes and assembler
tests.

Tested in bpf-unknown-none.

include/ChangeLog:

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

* opcode/bpf.h (enum bpf_insn_id): Add entries for signed load
instructions.
(BPF_MODE_SMEM): Define.

opcodes/ChangeLog:

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

* bpf-opc.c (bpf_opcodes): Add entries for LDXS{B,W,H,DW}
instructions.

gas/ChangeLog:

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

* testsuite/gas/bpf/mem.s: Add signed load instructions.
* testsuite/gas/bpf/mem-pseudoc.s: Likewise.
* testsuite/gas/bpf/mem.d: Likewise.
* testsuite/gas/bpf/mem-pseudoc.d: Likewise.
* testsuite/gas/bpf/mem-be.d: Likewise.
* doc/c-bpf.texi (BPF Instructions): Document the signed load
instructions.
12 files changed:
gas/ChangeLog
gas/doc/c-bpf.texi
gas/testsuite/gas/bpf/mem-be-pseudoc.d
gas/testsuite/gas/bpf/mem-be.d
gas/testsuite/gas/bpf/mem-pseudoc.d
gas/testsuite/gas/bpf/mem-pseudoc.s
gas/testsuite/gas/bpf/mem.d
gas/testsuite/gas/bpf/mem.s
include/ChangeLog
include/opcode/bpf.h
opcodes/ChangeLog
opcodes/bpf-opc.c