diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2024-01-29 19:22:41 +0100 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2024-01-29 19:22:41 +0100 |
commit | 0c45feb159a14ca4cb50cfbf45eacaf5a6cecf2b (patch) | |
tree | dc9870f232ec68a88d4d315b133f2bcbe619d555 /opcodes | |
parent | f3911963c51c11c70007287c91948328f1eea1db (diff) | |
download | binutils-0c45feb159a14ca4cb50cfbf45eacaf5a6cecf2b.zip binutils-0c45feb159a14ca4cb50cfbf45eacaf5a6cecf2b.tar.gz binutils-0c45feb159a14ca4cb50cfbf45eacaf5a6cecf2b.tar.bz2 |
bpf: there is no ldinddw nor ldabsdw instructions
There are no legacy ldind nor ldabs BPF instructions with BPF_SIZE_DW.
For some reason we were (incorrectly) supporting these. This patch
updates the opcodes so the instructions get removed and modifies the
GAS manual and testsuite accordingly.
See discussion at
https://lore.kernel.org/bpf/110aad7a-f8a3-46ed-9fda-2f8ee54dcb89@linux.dev
Tested in bpf-uknonwn-none target, x86-64-linux-gnu host.
include/ChangeLog:
2024-01-29 Jose E. Marchesi <jose.marchesi@oracle.com>
* opcode/bpf.h (enum bpf_insn_id): Remove BPF_INSN_LDINDDW and
BPF_INSN_LDABSDW instructions.
opcodes/ChangeLog:
2024-01-29 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf-opc.c (bpf_opcodes): Remove BPF_INSN_LDINDDW and
BPF_INSN_LDABSDW instructions.
gas/ChangeLog:
2024-01-29 Jose E. Marchesi <jose.marchesi@oracle.com>
* doc/c-bpf.texi (BPF Instructions): There is no indirect 64-bit
load instruction.
(BPF Instructions): There is no absolute 64-bit load instruction.
* testsuite/gas/bpf/mem.s: Update test accordingly.
* testsuite/gas/bpf/mem-be-pseudoc.d: Likewise.
* testsuite/gas/bpf/mem-be.d: Likewise.
* testsuite/gas/bpf/mem-pseudoc.d: Likewise.
* testsuite/gas/bpf/mem-pseudoc.s: Likewise.
* testsuite/gas/bpf/mem.d: Likewise.
* testsuite/gas/bpf/mem.s: Likewise.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/bpf-opc.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index a83b68e..4bc8157 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2024-01-29 Jose E. Marchesi <jose.marchesi@oracle.com> + + * bpf-opc.c (bpf_opcodes): Remove BPF_INSN_LDINDDW and + BPF_INSN_LDABSDW instructions. + 2024-01-15 Nick Clifton <nickc@redhat.com> * configure: Regenerate. diff --git a/opcodes/bpf-opc.c b/opcodes/bpf-opc.c index 750d048..19e0965 100644 --- a/opcodes/bpf-opc.c +++ b/opcodes/bpf-opc.c @@ -198,8 +198,6 @@ const struct bpf_opcode bpf_opcodes[] = BPF_V1, BPF_CODE, BPF_CLASS_LD|BPF_SIZE_H|BPF_MODE_IND}, {BPF_INSN_LDINDW, "ldindw%W%sr , %i32", "r0 = * ( u32 * ) skb [ %sr %I32 ]", BPF_V1, BPF_CODE, BPF_CLASS_LD|BPF_SIZE_W|BPF_MODE_IND}, - {BPF_INSN_LDINDDW, "ldinddw%W%sr , %i32", "r0 = * ( u64 * ) skb [ %sr %I32 ]", - BPF_V1, BPF_CODE, BPF_CLASS_LD|BPF_SIZE_DW|BPF_MODE_IND}, /* Absolute load instructions, designed to be used in socket filters. */ {BPF_INSN_LDABSB, "ldabsb%W%i32", "r0 = * ( u8 * ) skb [ %i32 ]", @@ -208,8 +206,6 @@ const struct bpf_opcode bpf_opcodes[] = BPF_V1, BPF_CODE, BPF_CLASS_LD|BPF_SIZE_H|BPF_MODE_ABS}, {BPF_INSN_LDABSW, "ldabsw%W%i32", "r0 = * ( u32 * ) skb [ %i32 ]", BPF_V1, BPF_CODE, BPF_CLASS_LD|BPF_SIZE_W|BPF_MODE_ABS}, - {BPF_INSN_LDABSDW, "ldabsdw%W%i32", "r0 = * ( u64 * ) skb [ %i32 ]", - BPF_V1, BPF_CODE, BPF_CLASS_LD|BPF_SIZE_DW|BPF_MODE_ABS}, /* Generic load instructions (to register.) */ {BPF_INSN_LDXB, "ldxb%W%dr , [ %sr %o16 ]", "%dr = * ( u8 * ) ( %sr %o16 )", |