Lines Matching refs:ctx

22 #define CTX_NIA(ctx) ((unsigned long)ctx->idx * 4)
26 #define EMIT(instr) PLANT_INSTR(image, ctx->idx, instr)
31 long offset = (long)(dest) - CTX_NIA(ctx); \
33 pr_err_ratelimited("Branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
40 #define PPC_BL(dest) EMIT(PPC_RAW_BL((dest) - (unsigned long)(image + ctx->idx)))
45 long offset = (long)(dest) - CTX_NIA(ctx); \
47 pr_err_ratelimited("Conditional branch offset 0x%lx (@%u) out of range\n", offset, ctx->idx); \
97 if (is_offset_in_cond_branch_range((long)(dest) - CTX_NIA(ctx))) { \
102 PPC_BCC_SHORT(cond ^ COND_CMP_TRUE, CTX_NIA(ctx) + 2*4); \
142 #define bpf_to_ppc(r) (ctx->b2p[r])
156 static inline bool bpf_is_seen_register(struct codegen_context *ctx, int i)
158 return ctx->seen & (1 << (31 - i));
161 static inline void bpf_set_seen_register(struct codegen_context *ctx, int i)
163 ctx->seen |= 1 << (31 - i);
166 static inline void bpf_clear_seen_register(struct codegen_context *ctx, int i)
168 ctx->seen &= ~(1 << (31 - i));
171 void bpf_jit_init_reg_mapping(struct codegen_context *ctx);
172 int bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func);
173 int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context *ctx,
175 void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx);
176 void bpf_jit_build_epilogue(u32 *image, struct codegen_context *ctx);
177 void bpf_jit_realloc_regs(struct codegen_context *ctx);
178 int bpf_jit_emit_exit_insn(u32 *image, struct codegen_context *ctx, int tmp_reg, long exit_addr);
180 int bpf_add_extable_entry(struct bpf_prog *fp, u32 *image, int pass, struct codegen_context *ctx,