OSDN Git Service

s390/bpf: Fix JMP_JGE_K (A >= K) and JMP_JGT_K (A > K)
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Wed, 14 Jan 2015 10:25:07 +0000 (11:25 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 15 Jan 2015 07:17:42 +0000 (08:17 +0100)
commit5a80244246d503df688341a10e1d244d15bb8ce5
treee4e39440f18e35b8710b7c515daaba11cbbacabf
parentf800c25b7a762d445ba1439a2428c8362157eba6
s390/bpf: Fix JMP_JGE_K (A >= K) and JMP_JGT_K (A > K)

Currently the signed COMPARE HALFWORD IMMEDIATE (chi) and COMPARE (c)
instructions are used to compare "A" with "K". This is not correct
because "A" and "K" are both unsigned. To fix this remove the
chi instruction (no unsigned analogon available) and use the
unsigned COMPARE LOGICAL (cl) instruction instead of COMPARE (c).

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