diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2019-07-15 16:00:28 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2019-07-15 16:00:28 +0200 |
commit | 3719fd55b6f89662653d50d33bb267c5f21127a5 (patch) | |
tree | 7c046c3a10249178af42ff1ab11ba51468b62d6c /opcodes/bpf-desc.c | |
parent | 5b9d7a9a647260ba754fbd2a176d37806f15acc8 (diff) | |
download | fsf-binutils-gdb-3719fd55b6f89662653d50d33bb267c5f21127a5.zip fsf-binutils-gdb-3719fd55b6f89662653d50d33bb267c5f21127a5.tar.gz fsf-binutils-gdb-3719fd55b6f89662653d50d33bb267c5f21127a5.tar.bz2 |
cpu,opcodes,gas: fix explicit arguments to eBPF ldabs instructions
This patch fixes the eBPF CPU description in order to reflect the
right explicit arguments passed to the ldabs{b,h,w,dw} instructions,
updates the corresponding GAS tests, and updates the BPF section of
the GAS manual.
cpu/ChangeLog:
2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf.cpu (dlabs): New pmacro.
(dlind): Likewise.
opcodes/ChangeLog:
2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf-desc.c: Regenerate.
* bpf-opc.c: Likewise.
* bpf-opc.h: Likewise.
gas/ChangeLog:
2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com>
* testsuite/gas/bpf/mem.s: ldabs instructions do not take a `src'
register as an argument.
* testsuite/gas/bpf/mem.d: Updated accordingly.
* testsuite/gas/bpf/mem-be.d: Likewise.
* doc/c-bpf.texi (BPF Opcodes): Update to reflect the correct
explicit arguments to ldabs and ldind instructions.
Diffstat (limited to 'opcodes/bpf-desc.c')
-rw-r--r-- | opcodes/bpf-desc.c | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/opcodes/bpf-desc.c b/opcodes/bpf-desc.c index 3b94335..18ded6e 100644 --- a/opcodes/bpf-desc.c +++ b/opcodes/bpf-desc.c @@ -824,25 +824,25 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] = BPF_INSN_LDDWBE, "lddwbe", "lddw", 128, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } } }, -/* ldabsw $srcle,$imm32 */ +/* ldabsw $imm32 */ { - BPF_INSN_LDABSWLE, "ldabswle", "ldabsw", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } + BPF_INSN_LDABSW, "ldabsw", "ldabsw", 64, + { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xc0" } } } } }, -/* ldabsh $srcle,$imm32 */ +/* ldabsh $imm32 */ { - BPF_INSN_LDABSHLE, "ldabshle", "ldabsh", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } + BPF_INSN_LDABSH, "ldabsh", "ldabsh", 64, + { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xc0" } } } } }, -/* ldabsb $srcle,$imm32 */ +/* ldabsb $imm32 */ { - BPF_INSN_LDABSBLE, "ldabsble", "ldabsb", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } + BPF_INSN_LDABSB, "ldabsb", "ldabsb", 64, + { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xc0" } } } } }, -/* ldabsdw $srcle,$imm32 */ +/* ldabsdw $imm32 */ { - BPF_INSN_LDABSDWLE, "ldabsdwle", "ldabsdw", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } + BPF_INSN_LDABSDW, "ldabsdw", "ldabsdw", 64, + { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xc0" } } } } }, /* ldindw $srcle,$imm32 */ { @@ -864,26 +864,6 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] = BPF_INSN_LDINDDWLE, "ldinddwle", "ldinddw", 64, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } }, -/* ldabsw $srcbe,$imm32 */ - { - BPF_INSN_LDABSWBE, "ldabswbe", "ldabsw", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } } - }, -/* ldabsh $srcbe,$imm32 */ - { - BPF_INSN_LDABSHBE, "ldabshbe", "ldabsh", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } } - }, -/* ldabsb $srcbe,$imm32 */ - { - BPF_INSN_LDABSBBE, "ldabsbbe", "ldabsb", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } } - }, -/* ldabsdw $srcbe,$imm32 */ - { - BPF_INSN_LDABSDWBE, "ldabsdwbe", "ldabsdw", 64, - { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } } - }, /* ldindw $srcbe,$imm32 */ { BPF_INSN_LDINDWBE, "ldindwbe", "ldindw", 64, |