summaryrefslogtreecommitdiffstats
path: root/arch/sparc/net/bpf_jit.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-04-17 16:38:16 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-17 16:43:46 -0400
commit584c5e2ad3ada1a5ccfffa68347b79c3681cc36e (patch)
tree462835521cf30f6ceb29471bc2cb6cf37dd9bc94 /arch/sparc/net/bpf_jit.h
parent7b56f76edf2da7ab3e356cc0db16f9af4c6a26e2 (diff)
downloadblackbird-op-linux-584c5e2ad3ada1a5ccfffa68347b79c3681cc36e.tar.gz
blackbird-op-linux-584c5e2ad3ada1a5ccfffa68347b79c3681cc36e.zip
net: filter: Fix some more small issues in sparc JIT.
Fix mixed space and tabs. Put bpf_jit_load_*[] externs into bpf_jit.h "while(0)" --> "while (0)" "COND (X)" --> "COND(X)" Document branch offset calculations, and bpf_error's return sequence. Document the reason we need to emit three nops between the %y register write and the divide instruction. Remove erroneous trailing semicolons from emit_read_y() and emit_write_y(). Based upon feedback from Sam Ravnborg. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/net/bpf_jit.h')
-rw-r--r--arch/sparc/net/bpf_jit.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sparc/net/bpf_jit.h b/arch/sparc/net/bpf_jit.h
index 05175be442fb..33d6b375ff12 100644
--- a/arch/sparc/net/bpf_jit.h
+++ b/arch/sparc/net/bpf_jit.h
@@ -38,6 +38,21 @@
#define r_TMP G1
#define r_TMP2 G2
#define r_OFF G3
+
+/* assembly code in arch/sparc/net/bpf_jit_asm.S */
+extern u32 bpf_jit_load_word[];
+extern u32 bpf_jit_load_half[];
+extern u32 bpf_jit_load_byte[];
+extern u32 bpf_jit_load_byte_msh[];
+extern u32 bpf_jit_load_word_positive_offset[];
+extern u32 bpf_jit_load_half_positive_offset[];
+extern u32 bpf_jit_load_byte_positive_offset[];
+extern u32 bpf_jit_load_byte_msh_positive_offset[];
+extern u32 bpf_jit_load_word_negative_offset[];
+extern u32 bpf_jit_load_half_negative_offset[];
+extern u32 bpf_jit_load_byte_negative_offset[];
+extern u32 bpf_jit_load_byte_msh_negative_offset[];
+
#else
#define r_SKB %o0
#define r_A %o1
OpenPOWER on IntegriCloud