aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/net
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2012-09-24 08:31:35 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 15:45:28 +0200
commitc59eed111bff70bbb8c85abc73374d4da0848c79 (patch)
treed34c887f56e99caccc7c99649e8a6afa3156800f /arch/s390/net
parent022912575ce3135517ec1cbfb8d4b240e0821feb (diff)
downloadlinux-c59eed111bff70bbb8c85abc73374d4da0848c79.tar.gz
s390/bpf,jit: add support for BPF_S_ANC_ALU_XOR_X instruction
Add support for new BPF_S_ANC_ALU_XOR_X instruction which got added with ffe06c17 "filter: add XOR operation". s390 version of 4bfaddf1 "x86 bpf_jit: support BPF_S_ANC_ALU_XOR_X instruction". Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/net')
-rw-r--r--arch/s390/net/bpf_jit_comp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index f57f0c335b1d..9b355b406afa 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -367,6 +367,11 @@ static int bpf_jit_insn(struct bpf_jit *jit, struct sock_filter *filter,
/* o %r5,<d(K)>(%r13) */
EMIT4_DISP(0x5650d000, EMIT_CONST(K));
break;
+ case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */
+ jit->seen |= SEEN_XREG;
+ /* xr %r5,%r12 */
+ EMIT2(0x175c);
+ break;
case BPF_S_ALU_LSH_X: /* A <<= X; */
jit->seen |= SEEN_XREG;
/* sll %r5,0(%r12) */