bpf: fix neg and neg32 BPF instructions in simulator
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 26 Jul 2023 09:44:20 +0000 (11:44 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 26 Jul 2023 09:44:20 +0000 (11:44 +0200)
commit4200337219274445a17e16d18d3c113f555cc786
tree2b0111b3400af2513d9d89736d58a1f7e5d9c2c1
parent04896832b2e79c042ea1f510b0458ac342512152
bpf: fix neg and neg32 BPF instructions in simulator

This patch fixes the semantics of the neg and neg32 BPF instructions
in the simulator, and also updates the corresponding tests
accordingly.

Tested in target bpf-unknown-none.
sim/bpf/bpf-sim.c
sim/testsuite/bpf/alu.s
sim/testsuite/bpf/alu32.s