bpf: fix register NEG[32] instructions
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 26 Jul 2023 09:38:04 +0000 (11:38 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 26 Jul 2023 09:38:04 +0000 (11:38 +0200)
commit04896832b2e79c042ea1f510b0458ac342512152
treef1657eebb830604f82dcb4f731afd8143d9cc69d
parent477c9f2ba26ccd77016f2c97941fc8b35e332e35
bpf: fix register NEG[32] instructions

This patch fixes the BPF_INSN_NEGR and BPF_INSN_NEG32R BPF
instructions to not use their source registers.

Tested in bpf-unknown-none.

opcodes/ChangeLog:

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

* bpf-opc.c (bpf_opcodes): Fix BPF_INSN_NEGR to not use a src
register.

gas/ChangeLog:

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

* testsuite/gas/bpf/alu.s: The register neg instruction gets only
one argument.
* testsuite/gas/bpf/alu32-be-pseudoc.d: Likewise.
* testsuite/gas/bpf/alu32-pseudoc.d: Likewise.
* testsuite/gas/bpf/alu32-pseudoc.s: Likewise.
* testsuite/gas/bpf/alu-pseudoc.d: Likewise.
* testsuite/gas/bpf/alu-be-pseudoc.d: Likewise.
* testsuite/gas/bpf/alu-pseudoc.s: Likewise.
* testsuite/gas/bpf/alu-be.d: Likewise.
* testsuite/gas/bpf/alu.d: Likewise.
* testsuite/gas/bpf/alu32-be.d: Likewise.
* testsuite/gas/bpf/alu32.d: Likewise.
* testsuite/gas/bpf/alu32.s: Likewise.
* doc/c-bpf.texi (BPF Instructions): Update accordingly.
16 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
gas/testsuite/gas/bpf/alu32-be-pseudoc.d
gas/testsuite/gas/bpf/alu32-be.d
gas/testsuite/gas/bpf/alu32-pseudoc.d
gas/testsuite/gas/bpf/alu32-pseudoc.s
gas/testsuite/gas/bpf/alu32.d
gas/testsuite/gas/bpf/alu32.s
opcodes/ChangeLog
opcodes/bpf-opc.c