1 #ifndef _BPF_JIT_H 2 #define _BPF_JIT_H 3 4 #ifndef __ASSEMBLER__ 5 #define G0 0x00 6 #define G1 0x01 7 #define G2 0x02 8 #define G3 0x03 9 #define G6 0x06 10 #define G7 0x07 11 #define O0 0x08 12 #define O1 0x09 13 #define O2 0x0a 14 #define O3 0x0b 15 #define O4 0x0c 16 #define O5 0x0d 17 #define SP 0x0e 18 #define O7 0x0f 19 #define L0 0x10 20 #define L1 0x11 21 #define L2 0x12 22 #define L3 0x13 23 #define L4 0x14 24 #define L5 0x15 25 #define L6 0x16 26 #define L7 0x17 27 #define I0 0x18 28 #define I1 0x19 29 #define I2 0x1a 30 #define I3 0x1b 31 #define I4 0x1c 32 #define I5 0x1d 33 #define FP 0x1e 34 #define I7 0x1f 35 36 #define r_SKB L0 37 #define r_HEADLEN L4 38 #define r_SKB_DATA L5 39 #define r_TMP G1 40 #define r_TMP2 G3 41 42 /* assembly code in arch/sparc/net/bpf_jit_asm_64.S */ 43 extern u32 bpf_jit_load_word[]; 44 extern u32 bpf_jit_load_half[]; 45 extern u32 bpf_jit_load_byte[]; 46 extern u32 bpf_jit_load_byte_msh[]; 47 extern u32 bpf_jit_load_word_positive_offset[]; 48 extern u32 bpf_jit_load_half_positive_offset[]; 49 extern u32 bpf_jit_load_byte_positive_offset[]; 50 extern u32 bpf_jit_load_byte_msh_positive_offset[]; 51 extern u32 bpf_jit_load_word_negative_offset[]; 52 extern u32 bpf_jit_load_half_negative_offset[]; 53 extern u32 bpf_jit_load_byte_negative_offset[]; 54 extern u32 bpf_jit_load_byte_msh_negative_offset[]; 55 56 #else 57 #define r_RESULT %o0 58 #define r_SKB %o0 59 #define r_OFF %o1 60 #define r_HEADLEN %l4 61 #define r_SKB_DATA %l5 62 #define r_TMP %g1 63 #define r_TMP2 %g3 64 #endif 65 66 #endif /* _BPF_JIT_H */ 67