bpf: xBPF SDIV, SMOD instructions
authorDavid Faust <david.faust@oracle.com>
Fri, 18 Sep 2020 16:56:43 +0000 (09:56 -0700)
committerDavid Faust <david.faust@oracle.com>
Fri, 18 Sep 2020 17:04:23 +0000 (10:04 -0700)
commit6e25f88828f500fc649aa6eac8b567c7b1e96c59
treef2ee690ca5ba7bb36cb1c887a33daf76677311d7
parente163628395d40485c3b379fa39bdc211ee19d40b
bpf: xBPF SDIV, SMOD instructions

Add gas and opcodes support for two xBPF-exclusive ALU operations:
SDIV (signed division) and SMOD (signed modulo), and add tests for
them in gas.

cpu/
* bpf.cpu (insn-op-code-alu): Add SDIV and SMOD.
(define-alu-insn-bin, daib): Take ISAs as an argument.
(define-alu-instructions): Update calls to daib pmacro with
ISAs; add sdiv and smod.

gas/
* testsuite/gas/bpf/alu-xbpf.d: New file.
* testsuite/gas/bpf/alu-xbpf.s: Likewise.
* testsuite/gas/bpf/alu32-xbpf.d: Likewise.
* testsuite/gas/bpf/alu32-xbpf.d: Likewise.
* testuiste/gas/bpf/bpf.exp: Run new tests.

opcodes/
* bpf-desc.c: Regenerate.
* bpf-desc.h: Likewise.
* bpf-opc.c: Likewise.
* bpf-opc.h: Likewise.
13 files changed:
cpu/ChangeLog
cpu/bpf.cpu
gas/ChangeLog
gas/testsuite/gas/bpf/alu-xbpf.d [new file with mode: 0644]
gas/testsuite/gas/bpf/alu-xbpf.s [new file with mode: 0644]
gas/testsuite/gas/bpf/alu32-xbpf.d [new file with mode: 0644]
gas/testsuite/gas/bpf/alu32-xbpf.s [new file with mode: 0644]
gas/testsuite/gas/bpf/bpf.exp
opcodes/ChangeLog
opcodes/bpf-desc.c
opcodes/bpf-desc.h
opcodes/bpf-opc.c
opcodes/bpf-opc.h