binutils-gdb/sim/bpf
David Faust 3ad6c19423 bpf: simulator: correct div, mod insn semantics
The div and mod eBPF instructions are unsigned, but the semantic
specification for the simulator incorrectly used signed operators.
Correct them to unsigned versions, and correct the ALU tests in
the simulator (which incorrectly assumed signed semantics).

Tested in bpf-unknown-none.

cpu/ChangeLog:
2020-09-08  David Faust  <david.faust@oracle.com>

	* bpf.cpu (define-alu-instructions): Correct semantic operators
	for div, mod to unsigned versions.

sim/ChangeLog:
2020-09-08  David Faust  <david.faust@oracle.com>

	* bpf/sem-be.c: Regenerate.
	* bpf/sem-le.c: Likewise.

sim/testsuite/ChangeLog:
2020-09-08  David Faust  <david.faust@oracle.com>

	* sim/bpf/alu.s: Correct div and mod tests.
	* sim/bpf/alu32.s: Likewise.
2020-09-08 11:39:07 -07:00
..
aclocal.m4
arch.c
arch.h
bpf-helpers.c
bpf-helpers.def
bpf-helpers.h bpf: several small fixes in the simulator 2020-09-03 18:22:08 +02:00
bpf-sim.h
bpf.c bpf: several small fixes in the simulator 2020-09-03 18:22:08 +02:00
config.in
configure bpf: several small fixes in the simulator 2020-09-03 18:22:08 +02:00
configure.ac bpf: several small fixes in the simulator 2020-09-03 18:22:08 +02:00
cpu.c
cpu.h
cpuall.h
decode-be.c
decode-be.h
decode-le.c
decode-le.h
decode.h
defs-be.h
defs-le.h
eng.h
Makefile.in
mloop.in
sem-be.c bpf: simulator: correct div, mod insn semantics 2020-09-08 11:39:07 -07:00
sem-le.c bpf: simulator: correct div, mod insn semantics 2020-09-08 11:39:07 -07:00
sim-if.c bpf: several small fixes in the simulator 2020-09-03 18:22:08 +02:00
sim-main.h
traps.c bpf: several small fixes in the simulator 2020-09-03 18:22:08 +02:00