Searched refs:EMIT (Results 1 – 6 of 6) sorted by relevance
| /linux/arch/powerpc/net/ |
| H A D | bpf_jit_comp32.c | 36 #define PPC_EX32(r, i) EMIT(PPC_RAW_LI((r), (i) < 0 ? -1 : 0)) 131 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue() 135 EMIT(PPC_RAW_LI(_R4, 0)); in bpf_jit_build_prologue() 137 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue() 142 EMIT(PPC_RAW_STWU(_R1, _R1, -BPF_PPC_STACKFRAME(ctx))); in bpf_jit_build_prologue() 145 EMIT(PPC_RAW_STW(_R4, _R1, bpf_jit_stack_offsetof(ctx, BPF_PPC_TC))); in bpf_jit_build_prologue() 148 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_1), _R3)); in bpf_jit_build_prologue() 149 EMIT(PPC_RAW_LI(bpf_to_ppc(BPF_REG_1) - 1, 0)); in bpf_jit_build_prologue() 156 EMIT(PPC_RAW_MFLR(_R0)); in bpf_jit_build_prologue() 163 EMIT(PPC_RAW_STW(i, _R1, bpf_jit_stack_offsetof(ctx, i))); in bpf_jit_build_prologue() [all …]
|
| H A D | bpf_jit_comp64.c | 202 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue() 206 EMIT(PPC_RAW_LD(_R2, _R13, offsetof(struct paca_struct, kernel_toc))); in bpf_jit_build_prologue() 219 EMIT(PPC_RAW_LI(bpf_to_ppc(TMP_REG_1), 0)); in bpf_jit_build_prologue() 221 EMIT(PPC_RAW_STD(bpf_to_ppc(TMP_REG_1), _R1, -(BPF_PPC_TAILCALL))); in bpf_jit_build_prologue() 234 EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_2), _R1, 0)); in bpf_jit_build_prologue() 235 EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_2), -(BPF_PPC_TAILCALL))); in bpf_jit_build_prologue() 236 EMIT(PPC_RAW_CMPLWI(bpf_to_ppc(TMP_REG_1), MAX_TAIL_CALL_CNT)); in bpf_jit_build_prologue() 238 EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_2), in bpf_jit_build_prologue() 240 EMIT(PPC_RAW_STD(bpf_to_ppc(TMP_REG_1), _R1, -(BPF_PPC_TAILCALL))); in bpf_jit_build_prologue() 249 EMIT(PPC_RAW_MFLR(_R0)); in bpf_jit_build_prologue() [all …]
|
| H A D | bpf_jit_comp.c | 64 EMIT(PPC_RAW_MFLR(_R0)); in bpf_jit_build_fentry_stubs() 65 EMIT(PPC_RAW_NOP()); in bpf_jit_build_fentry_stubs() 67 EMIT(PPC_RAW_MTLR(_R0)); in bpf_jit_build_fentry_stubs() 69 EMIT(PPC_RAW_BRANCH(4 - (long)ctx->idx * 4)); in bpf_jit_build_fentry_stubs() 86 EMIT(PPC_RAW_MFLR(_R11)); in bpf_jit_build_fentry_stubs() 87 EMIT(PPC_RAW_BCL4()); in bpf_jit_build_fentry_stubs() 88 EMIT(PPC_RAW_MFLR(_R12)); in bpf_jit_build_fentry_stubs() 89 EMIT(PPC_RAW_LL(_R12, _R12, -8-SZL)); in bpf_jit_build_fentry_stubs() 90 EMIT(PPC_RAW_MTCTR(_R12)); in bpf_jit_build_fentry_stubs() 91 EMIT(PPC_RAW_MTLR(_R11)); in bpf_jit_build_fentry_stubs() [all …]
|
| H A D | bpf_jit.h | 31 #define EMIT(instr) PLANT_INSTR(image, ctx->idx, instr) macro 41 EMIT(PPC_RAW_BRANCH(offset)); \ 52 EMIT(PPC_INST_BRANCH_COND | (((cond) & 0x3ff) << 16) | (offset & 0xfffc)); \ 59 EMIT(PPC_INST_BRANCH_COND | (((cond) & 0x3ff) << 16) | (offset & 0xfffc)); \ 74 EMIT(PPC_RAW_LI(d, i)); \ 76 EMIT(PPC_RAW_LIS(d, IMM_H(i))); \ 78 EMIT(PPC_RAW_ORI(d, d, IMM_L(i))); \ 94 EMIT(PPC_RAW_LI(d, ((uintptr_t)(i) >> 32) & \ 97 EMIT(PPC_RAW_LIS(d, ((uintptr_t)(i) >> 48))); \ 99 EMIT(PPC_RAW_ORI(d, d, \ [all …]
|
| /linux/arch/x86/net/ |
| H A D | bpf_jit_comp32.c | 64 #define EMIT(bytes, len) \ macro 67 #define EMIT1(b1) EMIT(b1, 1) 68 #define EMIT2(b1, b2) EMIT((b1) + ((b2) << 8), 2) 69 #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3) 71 EMIT((b1) + ((b2) << 8) + ((b3) << 16) + ((b4) << 24), 4) 74 do { EMIT1(b1); EMIT(off, 4); } while (0) 76 do { EMIT2(b1, b2); EMIT(off, 4); } while (0) 78 do { EMIT3(b1, b2, b3); EMIT(off, 4); } while (0) 80 do { EMIT4(b1, b2, b3, b4); EMIT(off, 4); } while (0) 1926 EMIT(0xC6, 1); break; in do_jit() [all …]
|
| H A D | bpf_jit_comp.c | 38 #define EMIT(bytes, len) \ macro 41 #define EMIT1(b1) EMIT(b1, 1) 42 #define EMIT2(b1, b2) EMIT((b1) + ((b2) << 8), 2) 43 #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3) 44 #define EMIT4(b1, b2, b3, b4) EMIT((b1) + ((b2) << 8) + ((b3) << 16) + ((b4) << 24), 4) 49 do { EMIT1(b1); EMIT(off, 4); } while (0) 51 do { EMIT2(b1, b2); EMIT(off, 4); } while (0) 53 do { EMIT3(b1, b2, b3); EMIT(off, 4); } while (0) 55 do { EMIT4(b1, b2, b3, b4); EMIT(off, 4); } while (0) 58 #define EMIT_ENDBR() EMIT(gen_endbr(), 4) [all …]
|