Home
last modified time | relevance | path

Searched refs:BPF_OP (Results 1 – 25 of 34) sorted by relevance

12

/linux/samples/bpf/ !
H A Dbpf_insn.h12 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
20 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
30 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
38 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
177 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
187 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
197 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
207 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
/linux/kernel/bpf/ !
H A Ddisasm.c159 return (BPF_OP(insn->code) == BPF_DIV || BPF_OP(insn->code) == BPF_MOD) && in is_sdiv_smod()
165 return BPF_OP(insn->code) == BPF_MOV && in is_movsx()
194 if (BPF_OP(insn->code) == BPF_END) { in print_bpf_insn()
199 } else if (BPF_OP(insn->code) == BPF_NEG) { in print_bpf_insn()
215 is_sdiv_smod(insn) ? bpf_alu_sign_string[BPF_OP(insn->code) >> 4] in print_bpf_insn()
216 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
224 is_sdiv_smod(insn) ? bpf_alu_sign_string[BPF_OP(insn->code) >> 4] in print_bpf_insn()
225 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
242 bpf_alu_string[BPF_OP(ins in print_bpf_insn()
[all...]
/linux/tools/testing/selftests/bpf/ !
H A Ddisasm.c159 return (BPF_OP(insn->code) == BPF_DIV || BPF_OP(insn->code) == BPF_MOD) && in is_sdiv_smod()
165 return BPF_OP(insn->code) == BPF_MOV && in is_movsx()
194 if (BPF_OP(insn->code) == BPF_END) { in print_bpf_insn()
199 } else if (BPF_OP(insn->code) == BPF_NEG) { in print_bpf_insn()
215 is_sdiv_smod(insn) ? bpf_alu_sign_string[BPF_OP(insn->code) >> 4] in print_bpf_insn()
216 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
224 is_sdiv_smod(insn) ? bpf_alu_sign_string[BPF_OP(insn->code) >> 4] in print_bpf_insn()
225 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
242 bpf_alu_string[BPF_OP(ins in print_bpf_insn()
[all...]
/linux/tools/include/linux/ !
H A Dfilter.h36 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
44 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
54 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
62 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
230 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
240 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
250 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
260 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
/linux/arch/mips/net/ !
H A Dbpf_jit_comp64.c160 switch (BPF_OP(op)) { in emit_alu_i64()
203 switch (BPF_OP(op)) { in emit_alu_r64()
677 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn()
679 emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); in build_insn()
680 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn()
699 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn()
702 emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); in build_insn()
703 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn()
717 emit_alu_r(ctx, dst, src, BPF_OP(code)); in build_insn()
736 emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(cod in build_insn()
[all...]
H A Dbpf_jit_comp32.c270 switch (BPF_OP(op)) { in emit_alu_r64()
324 switch (BPF_OP(op)) { in emit_shift_i64()
376 switch (BPF_OP(op)) { in emit_shift_r64()
546 switch (BPF_OP(op)) { in emit_divmod_r64()
1519 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn()
1521 emit_alu_r(ctx, lo(dst), MIPS_R_T6, BPF_OP(code)); in build_insn()
1522 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn()
1549 emit_alu_r(ctx, lo(dst), lo(src), BPF_OP(code)); in build_insn()
1567 emit_alu_i64(ctx, dst, imm, BPF_OP(code)); in build_insn()
1578 emit_alu_i64(ctx, dst, imm, BPF_OP(cod in build_insn()
[all...]
/linux/tools/bpf/bpftool/ !
H A Dcfg.c179 __u8 opcode = BPF_OP(cur->code); in func_partition_bb_head()
305 BPF_OP(insn->code) == BPF_CALL || in func_add_bb_edges()
306 BPF_OP(insn->code) == BPF_EXIT) { in func_add_bb_edges()
311 } else if (BPF_OP(insn->code) == BPF_JA) { in func_add_bb_edges()
/linux/arch/parisc/net/ !
H A Dbpf_jit_comp32.c340 if (BPF_OP(opcode) == BPF_DIV || BPF_OP(opcode) == BPF_MOD) { in emit_call_millicode()
341 if (BPF_OP(opcode) == BPF_DIV) in emit_call_millicode()
379 if (BPF_OP(opcode) == BPF_DIV || BPF_OP(opcode) == BPF_MOD) { in emit_call_libgcc_ll()
381 if (BPF_OP(opcode) == BPF_DIV) in emit_call_libgcc_ll()
1134 BPF_OP(code), insn->src_reg, insn->dst_reg); in bpf_jit_emit_insn()
1166 emit_alu_r64(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1171 emit_alu_r64(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1181 emit_alu_i64(dst, imm, ctx, BPF_OP(cod in bpf_jit_emit_insn()
[all...]
H A Dbpf_jit_comp64.c533 if (BPF_OP(opcode) == BPF_DIV || BPF_OP(opcode) == BPF_MOD) { in emit_call_libgcc_ll()
534 if (BPF_OP(opcode) == BPF_DIV) in emit_call_libgcc_ll()
890 if (is_signed_bpf_cond(BPF_OP(code))) in bpf_jit_emit_insn()
899 if (BPF_OP(code) == BPF_JSET) { in bpf_jit_emit_insn()
906 emit_branch(BPF_OP(code), rd, rs, paoff, ctx); in bpf_jit_emit_insn()
940 if (is_signed_bpf_cond(BPF_OP(code))) in bpf_jit_emit_insn()
949 emit_branch(BPF_OP(code), rd, rs, paoff, ctx); in bpf_jit_emit_insn()
/linux/tools/include/uapi/linux/ !
H A Dbpf_common.h31 #define BPF_OP(code) ((code) & 0xf0) macro
/linux/include/uapi/linux/ !
H A Dbpf_common.h31 #define BPF_OP(code) ((code) & 0xf0) macro
/linux/arch/x86/net/ !
H A Dbpf_jit_comp32.c540 switch (BPF_OP(op)) { in emit_ia32_alu_r()
1740 emit_ia32_alu_r64(is64, BPF_OP(code), dst, in do_jit()
1745 emit_ia32_alu_i64(is64, BPF_OP(code), dst, in do_jit()
1775 emit_ia32_shift_r(BPF_OP(code), dst_lo, src_lo, in do_jit()
1782 emit_ia32_shift_r(BPF_OP(code), dst_lo, in do_jit()
1798 emit_ia32_div_mod_r(BPF_OP(code), dst_lo, in do_jit()
1805 emit_ia32_div_mod_r(BPF_OP(code), dst_lo, in do_jit()
1826 emit_ia32_shift_r(BPF_OP(code), dst_lo, IA32_ECX, dstk, in do_jit()
1863 emit_ia32_alu_i(is64, false, BPF_OP(code), in do_jit()
2362 emit_cond_jmp: jmp_cond = get_cond_jmp_opcode(BPF_OP(cod in do_jit()
[all...]
H A Dbpf_jit_comp.c1648 b2 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
1732 switch (BPF_OP(insn->code)) { in do_jit()
1829 if (BPF_OP(insn->code) == BPF_MOD && in do_jit()
1833 else if (BPF_OP(insn->code) == BPF_DIV && in do_jit()
1880 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
1899 switch (BPF_OP(insn->code)) { in do_jit()
1933 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
2254 EMIT2(simple_alu_opcodes[BPF_OP(insn->imm)], in do_jit()
2429 switch (BPF_OP(insn->code)) { in do_jit()
/linux/include/linux/ !
H A Dfilter.h104 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
115 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
128 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
138 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
396 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
406 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
416 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
426 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
/linux/arch/riscv/net/ !
H A Dbpf_jit_comp32.c991 emit_alu_r64(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
995 emit_alu_r64(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1011 emit_alu_i64(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1044 emit_alu_r32(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1060 emit_alu_i32(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1068 emit_alu_r32(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1218 emit_branch_r64(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1220 emit_branch_r32(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
H A Dbpf_jit_comp64.c1662 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn()
1675 if (BPF_OP(code) == BPF_JSET) { in bpf_jit_emit_insn()
1681 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
1712 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn()
1725 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
/linux/arch/arm/net/ !
H A Dbpf_jit_32.c802 switch (BPF_OP(op)) { in emit_alu_r()
1675 emit_a32_alu_r64(is64, dst, src, ctx, BPF_OP(code)); in build_insn()
1685 emit_a32_alu_r64(is64, dst, tmp2, ctx, BPF_OP(code)); in build_insn()
1708 emit_udivmod(rd_lo, rd_lo, rt, ctx, BPF_OP(code), off); in build_insn()
1727 emit_udivmod64(rd, rd, rs, ctx, BPF_OP(code), off); in build_insn()
1739 emit_a32_alu_i(dst_lo, imm, ctx, BPF_OP(code)); in build_insn()
1775 emit_a32_alu_i(dst_lo, 0, ctx, BPF_OP(code)); in build_insn()
1988 emit_ar_r(rd[0], rd[1], rm, rn, ctx, BPF_OP(code), in build_insn()
1993 switch (BPF_OP(code)) { in build_insn()
/linux/arch/powerpc/net/ !
H A Dbpf_jit_comp64.c583 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
599 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
619 if (BPF_OP(code) == BPF_DIV) { in bpf_jit_build_body()
630 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
644 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
H A Dbpf_jit_comp32.c319 BPF_OP(prevcode) == BPF_MOV && BPF_SRC(prevcode) == BPF_X && in bpf_jit_build_body()
399 if (imm >= 0 || (BPF_OP(code) == BPF_SUB && imm == 0x80000000)) in bpf_jit_build_body()
1380 !insn_is_zext(&insn[i + 1]) && !(BPF_OP(code) == BPF_END && imm == 64)) in bpf_jit_build_body()
/linux/arch/arc/net/ !
H A Dbpf_jit_core.c345 (BPF_OP(insn->code) == BPF_JA)) in get_offset()
491 const u8 op = BPF_OP(insn->code); in check_bpf_jump()
596 CHECK_RET(bpf_cond_to_arc(BPF_OP(insn->code), &cond)); in handle_jumps()
1043 if (BPF_OP(code) != BPF_END && ctx->do_zext) in handle_insn()
/linux/arch/s390/net/ !
H A Dbpf_jit_comp.c1070 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
1097 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
1122 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
1125 if (BPF_OP(insn->code) == BPF_MOD) in bpf_jit_insn()
1186 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
1189 if (BPF_OP(insn->code) == BPF_MOD) in bpf_jit_insn()
/linux/drivers/net/ethernet/netronome/nfp/bpf/ !
H A Dmain.h363 return BPF_OP(meta->insn.code); in mbpf_op()
/linux/arch/sparc/net/ !
H A Dbpf_jit_comp_64.c668 BPF_OP(code) == BPF_JSET) in emit_compare_and_branch()
691 if (BPF_OP(code) == BPF_JSET) { in emit_compare_and_branch()
702 switch (BPF_OP(code)) { in emit_compare_and_branch()
745 switch (BPF_OP(code)) { in emit_compare_and_branch()
/linux/Documentation/bpf/ !
H A Dclassic_vs_extended.rst289 If BPF_CLASS(code) == BPF_ALU or BPF_ALU64 [ in eBPF ], BPF_OP(code) is one of::
306 If BPF_CLASS(code) == BPF_JMP or BPF_JMP32 [ in eBPF ], BPF_OP(code) is one of::
/linux/arch/loongarch/net/ !
H A Dbpf_jit.c511 const u8 cond = BPF_OP(code); in build_insn()
859 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()
900 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()

12