/linux-6.1.9/arch/loongarch/net/ |
D | bpf_jit.h | 181 enum loongarch_gpr rd, int jmp_offset) in cond_jmp_offset() argument 186 emit_insn(ctx, beq, rj, rd, jmp_offset); in cond_jmp_offset() 191 emit_insn(ctx, bne, rj, rd, jmp_offset); in cond_jmp_offset() 195 emit_insn(ctx, bltu, rd, rj, jmp_offset); in cond_jmp_offset() 199 emit_insn(ctx, bltu, rj, rd, jmp_offset); in cond_jmp_offset() 203 emit_insn(ctx, bgeu, rj, rd, jmp_offset); in cond_jmp_offset() 207 emit_insn(ctx, bgeu, rd, rj, jmp_offset); in cond_jmp_offset() 211 emit_insn(ctx, blt, rd, rj, jmp_offset); in cond_jmp_offset() 215 emit_insn(ctx, blt, rj, rd, jmp_offset); in cond_jmp_offset() 219 emit_insn(ctx, bge, rj, rd, jmp_offset); in cond_jmp_offset() [all …]
|
D | bpf_jit.c | 218 #define jmp_offset (out_offset - (cur_offset)) in emit_bpf_tail_call() macro 231 if (emit_tailcall_jmp(ctx, BPF_JGE, a2, t1, jmp_offset) < 0) in emit_bpf_tail_call() 239 if (emit_tailcall_jmp(ctx, BPF_JSLT, REG_TCC, LOONGARCH_GPR_ZERO, jmp_offset) < 0) in emit_bpf_tail_call() 251 if (emit_tailcall_jmp(ctx, BPF_JEQ, t2, LOONGARCH_GPR_ZERO, jmp_offset) < 0) in emit_bpf_tail_call() 274 #undef jmp_offset in emit_bpf_tail_call() 396 int ret, jmp_offset; in build_insn() local 694 jmp_offset = bpf2la_offset(i, off, ctx); in build_insn() 704 if (emit_cond_jmp(ctx, cond, t1, t2, jmp_offset) < 0) in build_insn() 729 jmp_offset = bpf2la_offset(i, off, ctx); in build_insn() 745 if (emit_cond_jmp(ctx, cond, t2, tm, jmp_offset) < 0) in build_insn() [all …]
|
/linux-6.1.9/arch/x86/net/ |
D | bpf_jit_comp32.c | 1579 s64 jmp_offset; in emit_kfunc_call() local 1631 jmp_offset = (u8 *)__bpf_call_base + insn->imm - end_addr; in emit_kfunc_call() 1632 if (!is_simm32(jmp_offset)) { in emit_kfunc_call() 1634 jmp_offset); in emit_kfunc_call() 1638 EMIT1_off32(0xE8, jmp_offset); in emit_kfunc_call() 1681 s64 jmp_offset; in do_jit() local 2107 jmp_offset = func - (image + addrs[i]); in do_jit() 2109 if (!imm32 || !is_simm32(jmp_offset)) { in do_jit() 2127 EMIT1_off32(0xE8, jmp_offset + 9); in do_jit() 2365 jmp_offset = addrs[i + insn->off] - addrs[i]; in do_jit() [all …]
|
D | bpf_jit_comp.c | 935 s64 jmp_offset; in do_jit() local 1589 jmp_offset = addrs[i + insn->off] - addrs[i]; in do_jit() 1590 if (is_imm8(jmp_offset)) { in do_jit() 1615 EMIT2(jmp_cond, jmp_offset); in do_jit() 1616 } else if (is_simm32(jmp_offset)) { in do_jit() 1617 EMIT2_off32(0x0F, jmp_cond + 0x10, jmp_offset); in do_jit() 1619 pr_err("cond_jmp gen bug %llx\n", jmp_offset); in do_jit() 1633 jmp_offset = -2; in do_jit() 1635 jmp_offset = addrs[i + insn->off] - addrs[i]; in do_jit() 1637 if (!jmp_offset) { in do_jit() [all …]
|
/linux-6.1.9/arch/arm64/net/ |
D | bpf_jit_comp.c | 384 #define jmp_offset (out_offset - (cur_offset)) in emit_bpf_tail_call() macro 395 emit(A64_B_(A64_COND_CS, jmp_offset), ctx); in emit_bpf_tail_call() 404 emit(A64_B_(A64_COND_CS, jmp_offset), ctx); in emit_bpf_tail_call() 416 emit(A64_CBZ(1, prg, jmp_offset), ctx); in emit_bpf_tail_call() 436 #undef jmp_offset in emit_bpf_tail_call() 523 s32 jmp_offset; in emit_ll_sc_atomic() local 546 jmp_offset = -3; in emit_ll_sc_atomic() 547 check_imm19(jmp_offset); in emit_ll_sc_atomic() 548 emit(A64_CBNZ(0, tmp3, jmp_offset), ctx); in emit_ll_sc_atomic() 567 jmp_offset = -3; in emit_ll_sc_atomic() [all …]
|
/linux-6.1.9/arch/arm/net/ |
D | bpf_jit_32.c | 1164 #define jmp_offset (out_offset - (cur_offset) - 2) in emit_bpf_tail_call() macro 1182 _emit(ARM_COND_CS, ARM_B(jmp_offset), ctx); in emit_bpf_tail_call() 1196 _emit(ARM_COND_CS, ARM_B(jmp_offset), ctx); in emit_bpf_tail_call() 1210 _emit(ARM_COND_EQ, ARM_B(jmp_offset), ctx); in emit_bpf_tail_call() 1230 #undef jmp_offset in emit_bpf_tail_call() 1361 s32 jmp_offset; in build_insn() local 1727 jmp_offset = bpf2a32_offset(i+off, i, ctx); in build_insn() 1731 _emit(ARM_COND_NE, ARM_B(jmp_offset), ctx); in build_insn() 1734 _emit(ARM_COND_EQ, ARM_B(jmp_offset), ctx); in build_insn() 1737 _emit(ARM_COND_HI, ARM_B(jmp_offset), ctx); in build_insn() [all …]
|
/linux-6.1.9/arch/x86/kernel/ |
D | ftrace.c | 316 unsigned long jmp_offset; in create_trampoline() local 334 jmp_offset = (unsigned long)ftrace_regs_caller_jmp; in create_trampoline() 340 jmp_offset = 0; in create_trampoline() 371 ip = trampoline + (jmp_offset - start_offset); in create_trampoline()
|
/linux-6.1.9/arch/riscv/net/ |
D | bpf_jit_comp64.c | 481 int jmp_offset; in emit_atomic() local 550 jmp_offset = ninsns_rvoff(8); in emit_atomic() 551 emit(rv_bne(RV_REG_T2, r0, jmp_offset >> 1), ctx); in emit_atomic() 554 jmp_offset = ninsns_rvoff(-6); in emit_atomic() 555 emit(rv_bne(RV_REG_T3, 0, jmp_offset >> 1), ctx); in emit_atomic()
|