* [PATCH net-next] sparc: bpf_jit_comp: add XOR instruction for BPF JIT JIT
@ 2012-09-24 21:57 Daniel Borkmann
2012-09-27 22:05 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Borkmann @ 2012-09-24 21:57 UTC (permalink / raw)
To: davem; +Cc: netdev
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>
---
I don't own a SPARC machine. This code is untested and uncompiled, but
following the other instructions, this should integrate cleanly. Can
someone confirm that? Thanks.
arch/sparc/net/bpf_jit_comp.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c
index e9073e9..2836870 100644
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] sparc: bpf_jit_comp: add XOR instruction for BPF JIT JIT
2012-09-24 21:57 [PATCH net-next] sparc: bpf_jit_comp: add XOR instruction for BPF JIT JIT Daniel Borkmann
@ 2012-09-27 22:05 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-09-27 22:05 UTC (permalink / raw)
To: dxchgb; +Cc: netdev
From: Daniel Borkmann <dxchgb@gmail.com>
Date: Mon, 24 Sep 2012 23:57:54 +0200
> 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>
Looks good, applied, thanks Daniel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-27 22:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24 21:57 [PATCH net-next] sparc: bpf_jit_comp: add XOR instruction for BPF JIT JIT Daniel Borkmann
2012-09-27 22:05 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).