sparc: bpf_jit_comp: add XOR instruction for BPF JIT JIT
authorDaniel Borkmann <dxchgb@gmail.com>
Mon, 24 Sep 2012 11:57:54 +0000 (11:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Sep 2012 22:04:35 +0000 (18:04 -0400)
This patch is a follow-up for patch "filter: add XOR instruction for use
with X/K" that implements BPF SPARC JIT parts for the BPF XOR operation.

Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/net/bpf_jit_comp.c

index e9073e9501b37792e5e6941253b6c13f601102c3..28368701ef796ff5c4268398264cdfb504a0be84 100644 (file)
@@ -464,8 +464,12 @@ void bpf_jit_compile(struct sk_filter *fp)
                                emit_alu_K(OR, K);
                                break;
                        case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */
+                       case BPF_S_ALU_XOR_X:
                                emit_alu_X(XOR);
                                break;
+                       case BPF_S_ALU_XOR_K:   /* A ^= K */
+                               emit_alu_K(XOR, K);
+                               break;
                        case BPF_S_ALU_LSH_X:   /* A <<= X */
                                emit_alu_X(SLL);
                                break;