Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
bpf_jit_32.c File Reference
#include <linux/bitops.h>
#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/filter.h>
#include <linux/moduleloader.h>
#include <linux/netdevice.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <asm/cacheflush.h>
#include <asm/hwcap.h>
#include "bpf_jit_32.h"

Go to the source code of this file.

Data Structures

struct  jit_ctx
 

Macros

#define r_scratch   ARM_R0
 
#define r_off   ARM_R1
 
#define r_A   ARM_R4
 
#define r_X   ARM_R5
 
#define r_skb   ARM_R6
 
#define r_skb_data   ARM_R7
 
#define r_skb_hl   ARM_R8
 
#define SCRATCH_SP_OFFSET   0
 
#define SCRATCH_OFF(k)   (SCRATCH_SP_OFFSET + (k))
 
#define SEEN_MEM   ((1 << BPF_MEMWORDS) - 1)
 
#define SEEN_MEM_WORD(k)   (1 << (k))
 
#define SEEN_X   (1 << BPF_MEMWORDS)
 
#define SEEN_CALL   (1 << (BPF_MEMWORDS + 1))
 
#define SEEN_SKB   (1 << (BPF_MEMWORDS + 2))
 
#define SEEN_DATA   (1 << (BPF_MEMWORDS + 3))
 
#define FLAG_NEED_X_RESET   (1 << 0)
 
#define OP_IMM3(op, r1, r2, imm_val, ctx)
 

Functions

void bpf_jit_compile (struct sk_filter *fp)
 
void bpf_jit_free (struct sk_filter *fp)
 

Variables

int bpf_jit_enable __read_mostly
 

Macro Definition Documentation

#define FLAG_NEED_X_RESET   (1 << 0)

Definition at line 54 of file bpf_jit_32.c.

#define OP_IMM3 (   op,
  r1,
  r2,
  imm_val,
  ctx 
)
Value:
do { \
imm12 = imm8m(imm_val); \
if (imm12 < 0) { \
emit_mov_i_no8m(r_scratch, imm_val, ctx); \
emit(op ## _R((r1), (r2), r_scratch), ctx); \
} else { \
emit(op ## _I((r1), (r2), imm12), ctx); \
} \
} while (0)

Definition at line 393 of file bpf_jit_32.c.

#define r_A   ARM_R4

Definition at line 38 of file bpf_jit_32.c.

#define r_off   ARM_R1

Definition at line 37 of file bpf_jit_32.c.

#define r_scratch   ARM_R0

Definition at line 35 of file bpf_jit_32.c.

#define r_skb   ARM_R6

Definition at line 40 of file bpf_jit_32.c.

#define r_skb_data   ARM_R7

Definition at line 41 of file bpf_jit_32.c.

#define r_skb_hl   ARM_R8

Definition at line 42 of file bpf_jit_32.c.

#define r_X   ARM_R5

Definition at line 39 of file bpf_jit_32.c.

#define SCRATCH_OFF (   k)    (SCRATCH_SP_OFFSET + (k))

Definition at line 45 of file bpf_jit_32.c.

#define SCRATCH_SP_OFFSET   0

Definition at line 44 of file bpf_jit_32.c.

#define SEEN_CALL   (1 << (BPF_MEMWORDS + 1))

Definition at line 50 of file bpf_jit_32.c.

#define SEEN_DATA   (1 << (BPF_MEMWORDS + 3))

Definition at line 52 of file bpf_jit_32.c.

#define SEEN_MEM   ((1 << BPF_MEMWORDS) - 1)

Definition at line 47 of file bpf_jit_32.c.

#define SEEN_MEM_WORD (   k)    (1 << (k))

Definition at line 48 of file bpf_jit_32.c.

#define SEEN_SKB   (1 << (BPF_MEMWORDS + 2))

Definition at line 51 of file bpf_jit_32.c.

#define SEEN_X   (1 << BPF_MEMWORDS)

Definition at line 49 of file bpf_jit_32.c.

Function Documentation

void bpf_jit_compile ( struct sk_filter fp)

Definition at line 835 of file bpf_jit_32.c.

void bpf_jit_free ( struct sk_filter fp)

Definition at line 910 of file bpf_jit_32.c.

Variable Documentation

int bpf_jit_enable __read_mostly

Definition at line 72 of file bpf_jit_32.c.