netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc bpf_jit: support BPF_S_ANC_ALU_XOR_X instruction
@ 2012-06-06 17:31 David Miller
  0 siblings, 0 replies; only message in thread
From: David Miller @ 2012-06-06 17:31 UTC (permalink / raw)
  To: netdev; +Cc: sparclinux


Signed-off-by: David S. Miller <davem@davemloft.net>
---

Committed to net-next

 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 1a69244..e9073e9 100644
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -96,6 +96,7 @@ static void bpf_flush_icache(void *start_, void *end_)
 #define AND		F3(2, 0x01)
 #define ANDCC		F3(2, 0x11)
 #define OR		F3(2, 0x02)
+#define XOR		F3(2, 0x03)
 #define SUB		F3(2, 0x04)
 #define SUBCC		F3(2, 0x14)
 #define MUL		F3(2, 0x0a)	/* umul */
@@ -462,6 +463,9 @@ void bpf_jit_compile(struct sk_filter *fp)
 			case BPF_S_ALU_OR_K:	/* A |= K */
 				emit_alu_K(OR, K);
 				break;
+			case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */
+				emit_alu_X(XOR);
+				break;
 			case BPF_S_ALU_LSH_X:	/* A <<= X */
 				emit_alu_X(SLL);
 				break;
-- 
1.7.6.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-06 17:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 17:31 [PATCH] sparc bpf_jit: support BPF_S_ANC_ALU_XOR_X instruction 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).