diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-17 16:38:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-17 16:43:46 -0400 |
commit | 584c5e2ad3ada1a5ccfffa68347b79c3681cc36e (patch) | |
tree | 462835521cf30f6ceb29471bc2cb6cf37dd9bc94 /arch/sparc/net/bpf_jit_asm.S | |
parent | 7b56f76edf2da7ab3e356cc0db16f9af4c6a26e2 (diff) |
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_asm.S')
-rw-r--r-- | arch/sparc/net/bpf_jit_asm.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sparc/net/bpf_jit_asm.S b/arch/sparc/net/bpf_jit_asm.S index 46d8f59f14c..9d016c7017f 100644 --- a/arch/sparc/net/bpf_jit_asm.S +++ b/arch/sparc/net/bpf_jit_asm.S @@ -195,5 +195,11 @@ bpf_jit_load_byte_msh_negative_offset: sll r_OFF, 2, r_X bpf_error: + /* Make the JIT program return zero. The JIT epilogue + * stores away the original %o7 into r_saved_O7. The + * normal leaf function return is to use "retl" which + * would evalute to "jmpl %o7 + 8, %g0" but we want to + * use the saved value thus the sequence you see here. + */ jmpl r_saved_O7 + 8, %g0 clr %o0 |