sim: eBPF simulator
authorJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 4 Aug 2020 16:09:16 +0000 (18:09 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 4 Aug 2020 16:09:16 +0000 (18:09 +0200)
commitb26e2ae7d333d84a85daaa9ca699c8bae2bd05bc
tree73db093a038074bb84b9104e5bd1182e062e9546
parent39791af2a2191a2f7765d7809ecedcd0442138bf
sim: eBPF simulator

This patch introduces the basics of an instruction-simulator for eBPF.
The simulator is based on CGEN.

gdb/ChangeLog:

2020-08-04  Jose E. Marchesi  <jose.marchesi@oracle.com>

* configure.tgt: Set gdb_sim for bpf-*-* targets.

sim/ChangeLog:

2020-08-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
    David Faust <david.faust@oracle.com>

* configure.tgt (sim_arch): Add entry for bpf-*-*.
* configure: Regenerate.
* MAINTAINERS: Add maintainer for the BPF simulator.
* bpf/Makefile.in: New file.
* bpf/bpf-helpers.c: Likewise.
* bpf/bpf-helpers.def: Likewise.
* bpf/bpf-helpers.h: Likewise.
* bpf/bpf-sim.h: Likewise.
* bpf/bpf.c: Likewise.
* bpf/config.in: Likewise.
* bpf/configure.ac: Likewise.
* bpf/decode.h: Likewise.
* bpf/eng.h: Likewise.
* bpf/mloop.in: Likewise.
* bpf/sim-if.c: Likewise.
* bpf/sim-main.h: Likewise.
* bpf/traps.c: Likewise.
* bpf/configure: Generate.
* bpf/aclocal.m4: Likewise.

sim/testsuite/ChangeLog:

2020-08-04  David Faust  <david.faust@oracle.com>
    Jose E. Marchesi  <jose.marchesi@oracle.com>

* configure: Regenerate.
* sim/bpf/allinsn.exp: New file.
* sim/bpf/alu.s: Likewise.
* sim/bpf/alu32.s: Likewise.
* sim/bpf/endbe.s: Likewise.
* sim/bpf/endle.s: Likewise.
* sim/bpf/jmp.s: Likewise.
* sim/bpf/jmp32.s: Likewise.
* sim/bpf/ldabs.s: Likewise.
* sim/bpf/mem.s: Likewise.
* sim/bpf/mov.s: Likewise.
* sim/bpf/testutils.inc: Likewise.
* sim/bpf/xadd.s: Likewise.
36 files changed:
gdb/ChangeLog
gdb/configure.tgt
sim/ChangeLog
sim/MAINTAINERS
sim/bpf/Makefile.in [new file with mode: 0644]
sim/bpf/aclocal.m4 [new file with mode: 0644]
sim/bpf/bpf-helpers.c [new file with mode: 0644]
sim/bpf/bpf-helpers.def [new file with mode: 0644]
sim/bpf/bpf-helpers.h [new file with mode: 0644]
sim/bpf/bpf-sim.h [new file with mode: 0644]
sim/bpf/bpf.c [new file with mode: 0644]
sim/bpf/config.in [new file with mode: 0644]
sim/bpf/configure [new file with mode: 0755]
sim/bpf/configure.ac [new file with mode: 0644]
sim/bpf/decode.h [new file with mode: 0644]
sim/bpf/eng.h [new file with mode: 0644]
sim/bpf/mloop.in [new file with mode: 0644]
sim/bpf/sim-if.c [new file with mode: 0644]
sim/bpf/sim-main.h [new file with mode: 0644]
sim/bpf/traps.c [new file with mode: 0644]
sim/configure
sim/configure.tgt
sim/testsuite/ChangeLog
sim/testsuite/configure
sim/testsuite/sim/bpf/allinsn.exp [new file with mode: 0644]
sim/testsuite/sim/bpf/alu.s [new file with mode: 0644]
sim/testsuite/sim/bpf/alu32.s [new file with mode: 0644]
sim/testsuite/sim/bpf/endbe.s [new file with mode: 0644]
sim/testsuite/sim/bpf/endle.s [new file with mode: 0644]
sim/testsuite/sim/bpf/jmp.s [new file with mode: 0644]
sim/testsuite/sim/bpf/jmp32.s [new file with mode: 0644]
sim/testsuite/sim/bpf/ldabs.s [new file with mode: 0644]
sim/testsuite/sim/bpf/mem.s [new file with mode: 0644]
sim/testsuite/sim/bpf/mov.s [new file with mode: 0644]
sim/testsuite/sim/bpf/testutils.inc [new file with mode: 0644]
sim/testsuite/sim/bpf/xadd.s [new file with mode: 0644]