#include <linux/moduleloader.h>
#include <asm/cacheflush.h>
#include <linux/netdevice.h>
#include <linux/filter.h>
Go to the source code of this file.
|
#define | EMIT(bytes, len) do { prog = emit_code(prog, bytes, len); } while (0) |
|
#define | EMIT1(b1) EMIT(b1, 1) |
|
#define | EMIT2(b1, b2) EMIT((b1) + ((b2) << 8), 2) |
|
#define | EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3) |
|
#define | EMIT4(b1, b2, b3, b4) EMIT((b1) + ((b2) << 8) + ((b3) << 16) + ((b4) << 24), 4) |
|
#define | EMIT1_off32(b1, off) do { EMIT1(b1); EMIT(off, 4);} while (0) |
|
#define | CLEAR_A() EMIT2(0x31, 0xc0) /* xor %eax,%eax */ |
|
#define | CLEAR_X() EMIT2(0x31, 0xdb) /* xor %ebx,%ebx */ |
|
#define | EMIT_JMP(offset) |
|
#define | X86_JB 0x72 |
|
#define | X86_JAE 0x73 |
|
#define | X86_JE 0x74 |
|
#define | X86_JNE 0x75 |
|
#define | X86_JBE 0x76 |
|
#define | X86_JA 0x77 |
|
#define | EMIT_COND_JMP(op, offset) |
|
#define | COND_SEL(CODE, TOP, FOP) |
|
#define | SEEN_DATAREF 1 /* might call external helpers */ |
|
#define | SEEN_XREG 2 /* ebx is used */ |
|
#define | SEEN_MEM 4 /* use mem[] for temporary storage */ |
|
#define | CHOOSE_LOAD_FUNC(K, func) ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset) |
|
#define CLEAR_A |
( |
| ) |
EMIT2(0x31, 0xc0) /* xor %eax,%eax */ |
#define CLEAR_X |
( |
| ) |
EMIT2(0x31, 0xdb) /* xor %ebx,%ebx */ |
#define COND_SEL |
( |
|
CODE, |
|
|
|
TOP, |
|
|
|
FOP |
|
) |
| |
Value:case CODE: \
t_op = TOP; \
f_op = FOP; \
goto cond_branch
Definition at line 102 of file bpf_jit_comp.c.
#define EMIT1 |
( |
|
b1 | ) |
EMIT(b1, 1) |
#define EMIT1_off32 |
( |
|
b1, |
|
|
|
off |
|
) |
| do { EMIT1(b1); EMIT(off, 4);} while (0) |
#define EMIT2 |
( |
|
b1, |
|
|
|
b2 |
|
) |
| EMIT((b1) + ((b2) << 8), 2) |
#define EMIT3 |
( |
|
b1, |
|
|
|
b2, |
|
|
|
b3 |
|
) |
| EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3) |
#define EMIT4 |
( |
|
b1, |
|
|
|
b2, |
|
|
|
b3, |
|
|
|
b4 |
|
) |
| EMIT((b1) + ((b2) << 8) + ((b3) << 16) + ((b4) << 24), 4) |
Value:do { \
else { \
EMIT2(0x0f,
op + 0x10); \
} \
} while (0)
Definition at line 92 of file bpf_jit_comp.c.
#define SEEN_DATAREF 1 /* might call external helpers */ |
#define SEEN_MEM 4 /* use mem[] for temporary storage */ |
u8 sk_load_byte_msh_negative_offset[] |
u8 sk_load_byte_msh_positive_offset[] |
u8 sk_load_byte_negative_offset[] |
u8 sk_load_byte_positive_offset[] |
u8 sk_load_half_negative_offset[] |
u8 sk_load_half_positive_offset[] |
u8 sk_load_word_negative_offset[] |
u8 sk_load_word_positive_offset[] |