Skip to content

Commit

Permalink
s390/bpf,jit: add support for BPF_S_ANC_ALU_XOR_X instruction
Browse files Browse the repository at this point in the history
Add support for new BPF_S_ANC_ALU_XOR_X instruction which got added
with ffe06c1 "filter: add XOR operation".

s390 version of 4bfaddf "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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Sep 26, 2012
1 parent 0229125 commit c59eed1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/s390/net/bpf_jit_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down

0 comments on commit c59eed1

Please sign in to comment.