Lines Matching refs:ctx

90 #define __emit(ctx, func, ...)					\
92 if ((ctx)->target != NULL) { \
93 u32 *p = &(ctx)->target[ctx->jit_index]; \
96 (ctx)->jit_index++; \
109 #define LLSC_sync(ctx) emit(ctx, sync, 0)
112 #define LLSC_sync(ctx)
127 static inline void access_reg(struct jit_context *ctx, u8 reg)
129 ctx->accessed |= BIT(reg);
136 static inline void clobber_reg(struct jit_context *ctx, u8 reg)
138 ctx->clobbered |= BIT(reg);
145 int push_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth);
151 int pop_regs(struct jit_context *ctx, u32 mask, u32 excl, int depth);
154 int get_target(struct jit_context *ctx, u32 loc);
157 int get_offset(const struct jit_context *ctx, int off);
160 void emit_mov_i(struct jit_context *ctx, u8 dst, s32 imm);
163 void emit_mov_r(struct jit_context *ctx, u8 dst, u8 src);
172 void emit_alu_i(struct jit_context *ctx, u8 dst, s32 imm, u8 op);
175 void emit_alu_r(struct jit_context *ctx, u8 dst, u8 src, u8 op);
178 void emit_atomic_r(struct jit_context *ctx, u8 dst, u8 src, s16 off, u8 code);
181 void emit_cmpxchg_r(struct jit_context *ctx, u8 dst, u8 src, u8 res, s16 off);
184 void emit_bswap_r(struct jit_context *ctx, u8 dst, u32 width);
190 void setup_jmp_i(struct jit_context *ctx, s32 imm, u8 width,
194 void setup_jmp_r(struct jit_context *ctx, bool same_reg,
198 int finish_jmp(struct jit_context *ctx, u8 jit_op, s16 bpf_off);
201 void emit_jmp_i(struct jit_context *ctx, u8 dst, s32 imm, s32 off, u8 op);
204 void emit_jmp_r(struct jit_context *ctx, u8 dst, u8 src, s32 off, u8 op);
207 int emit_ja(struct jit_context *ctx, s16 off);
210 int emit_exit(struct jit_context *ctx);
216 void build_prologue(struct jit_context *ctx);
222 void build_epilogue(struct jit_context *ctx, int dest_reg);
233 int build_insn(const struct bpf_insn *insn, struct jit_context *ctx);