cpu,opcodes,gas: fix neg and neg32 instructions in BPF
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 30 Jan 2020 12:59:04 +0000 (13:59 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 30 Jan 2020 12:59:04 +0000 (13:59 +0100)
commitbd434cc4d94ec3d2f9fc1e7c00c27b074f962bc1
treee540d06b08147d050683984b1d5438a4d3af1f42
parentaeab2b26dbea33221db4debaf31c97277cfaea5e
cpu,opcodes,gas: fix neg and neg32 instructions in BPF

This patch fixes the neg/neg32 BPF instructions, which have K (=0)
instead of X (=1) in their header source bit, despite operating on
registes.

cpu/ChangeLog:

2020-01-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

* bpf.cpu (define-alu-insn-un): The unary BPF instructions
(neg and neg32) use OP_SRC_K even if they operate only in
registers.

opcodes/ChangeLog:

2020-01-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

* bpf-opc.c: Regenerate.

gas/ChangeLog:

2020-01-30  Jose E. Marchesi  <jose.marchesi@oracle.com>

* testsuite/gas/bpf/alu.d: Update expected opcode for `neg'.
* testsuite/gas/bpf/alu-be.d: Likewise.
* testsuite/gas/bpf/alu32.d: Likewise for `neg32'.
* testsuite/gas/bpf/alu32-be.d: Likewise.
cpu/ChangeLog
cpu/bpf.cpu
gas/ChangeLog
gas/testsuite/gas/bpf/alu-be.d
gas/testsuite/gas/bpf/alu.d
gas/testsuite/gas/bpf/alu32-be.d
gas/testsuite/gas/bpf/alu32.d
opcodes/ChangeLog
opcodes/bpf-opc.c