The BPF virtual machine does not support neg instructions operating on
immediates, and these erroneous instructions were recently removed from
gas. Remove them from the simulator as well.
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.
The BPF port in binutils has been rewritten (commit
d218e7fedc74d67837d2134120917f4ac877454c) in order to not be longer
based on CGEN. Please see that commit log for more information.
This patch updates the BPF simulator accordingly. The new
implementation is much simpler and it is based on the new BPF opcodes.
Tested with target bpf-unknown-none with both 64-bit little-endian
host and 32-bit little-endian host.
Note that I have not tested in a big-endian host yet. I will do so
once this lands upstream so I can use the GCC compiler farm.