Home
last modified time | relevance | path

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

12

/openbmc/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()
177 if (BPF_OP(insn->code) == BPF_END) { in print_bpf_insn()
182 } else if (BPF_OP(insn->code) == BPF_NEG) { in print_bpf_insn()
192 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
201 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
218 bpf_alu_string[BPF_OP(insn->imm) >> 4], in print_bpf_insn()
228 bpf_atomic_alu_string[BPF_OP(insn->imm) >> 4], in print_bpf_insn()
305 u8 opcode = BPF_OP(insn->code); in print_bpf_insn()
335 bpf_jmp_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
[all …]
/openbmc/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()
177 if (BPF_OP(insn->code) == BPF_END) { in print_bpf_insn()
182 } else if (BPF_OP(insn->code) == BPF_NEG) { in print_bpf_insn()
192 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
201 : bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
218 bpf_alu_string[BPF_OP(insn->imm) >> 4], in print_bpf_insn()
228 bpf_atomic_alu_string[BPF_OP(insn->imm) >> 4], in print_bpf_insn()
305 u8 opcode = BPF_OP(insn->code); in print_bpf_insn()
335 bpf_jmp_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
[all …]
/openbmc/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, \
/openbmc/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, \
212 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
222 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
232 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
242 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
/openbmc/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()
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()
717 emit_alu_r(ctx, dst, src, BPF_OP(code)); in build_insn()
736 emit_alu_r(ctx, dst, MIPS_R_T4, BPF_OP(code)); in build_insn()
773 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn()
775 emit_alu_r64(ctx, dst, MIPS_R_T4, BPF_OP(code)); 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()
1567 emit_alu_i64(ctx, dst, imm, BPF_OP(code)); in build_insn()
1578 emit_alu_i64(ctx, dst, imm, BPF_OP(code)); in build_insn()
1587 emit_shift_i64(ctx, dst, imm, BPF_OP(code)); in build_insn()
1602 emit_divmod_r64(ctx, dst, tmp, BPF_OP(code)); in build_insn()
1614 emit_alu_r64(ctx, dst, src, BPF_OP(code)); in build_insn()
[all …]
H A Dbpf_jit_comp.c213 switch (BPF_OP(op)) { in valid_alu_i()
251 switch (BPF_OP(op)) { in rewrite_alu_i()
300 switch (BPF_OP(op)) { in emit_alu_i()
344 switch (BPF_OP(op)) { in emit_alu_r()
/openbmc/linux/tools/include/uapi/linux/
H A Dbpf_common.h31 #define BPF_OP(code) ((code) & 0xf0) macro
/openbmc/linux/include/uapi/linux/
H A Dbpf_common.h31 #define BPF_OP(code) ((code) & 0xf0) macro
/openbmc/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(code)); in bpf_jit_emit_insn()
1214 emit_alu_r32(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1230 emit_alu_i32(dst, imm, ctx, BPF_OP(code)); 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()
/openbmc/linux/include/linux/
H A Dfilter.h98 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
109 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
122 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
130 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
317 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
327 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
337 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
347 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
/openbmc/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_EXIT) { in func_add_bb_edges()
310 } else if (BPF_OP(insn->code) == BPF_JA) { in func_add_bb_edges()
/openbmc/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()
2411 jmp_cond = get_cond_jmp_opcode(BPF_OP(code), true); in do_jit()
[all …]
H A Dbpf_jit_comp.c1134 b2 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
1175 switch (BPF_OP(insn->code)) { in do_jit()
1272 if (BPF_OP(insn->code) == BPF_MOD && in do_jit()
1276 else if (BPF_OP(insn->code) == BPF_DIV && in do_jit()
1323 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
1342 switch (BPF_OP(insn->code)) { in do_jit()
1376 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
1640 EMIT2(simple_alu_opcodes[BPF_OP(insn->imm)], in do_jit()
1783 switch (BPF_OP(insn->code)) { in do_jit()
/openbmc/linux/arch/riscv/net/
H A Dbpf_jit_comp32.c992 emit_alu_r64(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
996 emit_alu_r64(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1012 emit_alu_i64(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1045 emit_alu_r32(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1061 emit_alu_i32(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1069 emit_alu_r32(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1219 emit_branch_r64(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1221 emit_branch_r32(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
H A Dbpf_jit_comp64.c1422 if (is_signed_bpf_cond(BPF_OP(code))) in bpf_jit_emit_insn()
1432 if (BPF_OP(code) == BPF_JSET) { in bpf_jit_emit_insn()
1439 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
1474 if (is_signed_bpf_cond(BPF_OP(code))) in bpf_jit_emit_insn()
1483 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
/openbmc/linux/arch/powerpc/net/
H A Dbpf_jit_comp64.c469 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
478 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
492 if (BPF_OP(code) == BPF_DIV) { in bpf_jit_build_body()
503 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
511 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
H A Dbpf_jit_comp32.c314 BPF_OP(prevcode) == BPF_MOV && BPF_SRC(prevcode) == BPF_X && in bpf_jit_build_body()
394 if (imm >= 0 || (BPF_OP(code) == BPF_SUB && imm == 0x80000000)) in bpf_jit_build_body()
1305 !insn_is_zext(&insn[i + 1]) && !(BPF_OP(code) == BPF_END && imm == 64)) in bpf_jit_build_body()
/openbmc/linux/arch/arm/net/
H A Dbpf_jit_32.c675 switch (BPF_OP(op)) { in emit_alu_r()
1431 emit_a32_alu_r64(is64, dst, src, ctx, BPF_OP(code)); in build_insn()
1441 emit_a32_alu_r64(is64, dst, tmp2, ctx, BPF_OP(code)); in build_insn()
1464 emit_udivmod(rd_lo, rd_lo, rt, ctx, BPF_OP(code)); in build_insn()
1483 emit_a32_alu_i(dst_lo, imm, ctx, BPF_OP(code)); in build_insn()
1519 emit_a32_alu_i(dst_lo, 0, ctx, BPF_OP(code)); in build_insn()
1723 emit_ar_r(rd[0], rd[1], rm, rn, ctx, BPF_OP(code), in build_insn()
1728 switch (BPF_OP(code)) { in build_insn()
/openbmc/linux/arch/s390/net/
H A Dbpf_jit_comp.c918 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
935 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
950 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
953 if (BPF_OP(insn->code) == BPF_MOD) in bpf_jit_insn()
985 int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0; in bpf_jit_insn()
988 if (BPF_OP(insn->code) == BPF_MOD) in bpf_jit_insn()
/openbmc/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Dmain.h363 return BPF_OP(meta->insn.code); in mbpf_op()
/openbmc/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()
/openbmc/linux/arch/loongarch/net/
H A Dbpf_jit.c457 const u8 cond = BPF_OP(code); in build_insn()
755 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()
796 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()
/openbmc/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::

12