s390/bpf: Fix ALU_NEG (A = -A)
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Thu, 8 Jan 2015 13:36:21 +0000 (14:36 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 9 Jan 2015 09:10:30 +0000 (10:10 +0100)
commitdf3eed3d282f2fe1ffb73d3545fcde4e9b80a0d3
tree26b328857f004c83f45eb3a5af446ead0dbc973c
parentfbc89c952f004fb9191c23605a1428df6dd39a90
s390/bpf: Fix ALU_NEG (A = -A)

Currently the LOAD NEGATIVE (lnr) instruction is used for ALU_NEG. This
instruction always loads the negative value. Therefore, if A is already
negative, it remains unchanged. To fix this use LOAD COMPLEMENT (lcr)
instead.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/net/bpf_jit_comp.c