Home
last modified time | relevance | path

Searched refs:BPF_OP (Results 1 – 25 of 32) 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/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/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(insn->imm) >> 4], in print_bpf_insn()
252 bpf_atomic_alu_string[BPF_OP(insn->imm) >> 4], in print_bpf_insn()
[all …]
H A Dconst_fold.c58 u8 opcode = BPF_OP(insn->code) | BPF_SRC(insn->code); in const_reg_xfer()
317 switch (BPF_OP(opcode)) { in eval_const_branch()
H A Dfixups.c68 u8 op = BPF_OP(insn->code); in bpf_is_reg64()
354 BPF_OP(code) == BPF_CALL || BPF_OP(code) == BPF_EXIT) in adjust_jmp_off()
554 op = BPF_OP(code); in bpf_insn_is_cond_jump()
1555 insn->code = BPF_ALU | BPF_OP(insn->code) | BPF_SRC(insn->code); in bpf_do_misc_fixups()
1564 bool isdiv = BPF_OP(insn->code) == BPF_DIV; in bpf_do_misc_fixups()
1592 bool isdiv = BPF_OP(insn->code) == BPF_DIV; in bpf_do_misc_fixups()
H A Dbacktrack.c270 u8 opcode = BPF_OP(insn->code); in backtrack_insn()
H A Dliveness.c259 opcode_info = &opcode_info_tbl[BPF_CLASS(insn->code) | BPF_OP(insn->code)]; in bpf_insn_successors()
1098 u8 code = BPF_OP(insn->code); in arg_track_xfer()
2067 const u8 code = BPF_OP(insn->code); in compute_insn_live_regs()
H A Dcfg.c473 switch (BPF_OP(insn->code)) { in visit_insn()
H A Dverifier.c3030 if (BPF_OP(code) == BPF_CALL) in check_subprogs()
3032 if (BPF_OP(code) == BPF_EXIT) { in check_subprogs()
14236 u8 opcode = BPF_OP(insn->code); in sanitize_ptr_alu()
14335 const char *op = BPF_OP(insn->code) == BPF_ADD ? "add" : "sub"; in sanitize_err()
14447 u8 opcode = BPF_OP(insn->code); in adjust_ptr_min_max_vals()
15367 switch (BPF_OP(insn->code)) { in is_safe_to_compute_dst_reg_range()
15437 u8 opcode = BPF_OP(insn->code); in adjust_scalar_min_max_vals()
15598 u8 opcode = BPF_OP(insn->code); in adjust_reg_min_max_vals()
15711 (BPF_OP(insn->code) == BPF_ADD || BPF_OP(insn->code) == BPF_SUB) && in adjust_reg_min_max_vals()
15725 if (BPF_OP(insn->code) == BPF_SUB) { in adjust_reg_min_max_vals()
[all …]
H A Ddiagnostics.c1464 BPF_OP(insn->code) == BPF_MOV && BPF_SRC(insn->code) == BPF_X) { in diag_mod_insn_origin()
1494 switch (BPF_OP(insn->code)) { in diag_mod_keeps_lineage()
/linux/tools/include/linux/
H A Dfilter.h37 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
45 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
55 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
63 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
231 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
241 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
251 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
261 .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(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()
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(code)); 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(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()
/linux/include/uapi/linux/
H A Dbpf_common.h31 #define BPF_OP(code) ((code) & 0xf0) macro
/linux/tools/include/uapi/linux/
H A Dbpf_common.h31 #define BPF_OP(code) ((code) & 0xf0) macro
/linux/include/linux/
H A Dfilter.h108 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
119 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
132 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
142 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
455 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
465 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
475 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
485 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
/linux/arch/riscv/net/
H A Dbpf_jit_comp32.c519 u8 op = BPF_OP(insn->code); in emit_alu_r32()
1058 emit_alu_r64(dst, src, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1062 emit_alu_r64(dst, tmp2, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1078 emit_alu_i64(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1141 emit_alu_i32(dst, imm, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1299 emit_branch_r64(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1301 emit_branch_r32(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
H A Dbpf_jit_comp64.c1694 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn()
1707 if (BPF_OP(code) == BPF_JSET) { in bpf_jit_emit_insn()
1713 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
1744 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn()
1757 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
/linux/arch/x86/net/
H A Dbpf_jit_comp.c1897 b2 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
1981 switch (BPF_OP(insn->code)) { in do_jit()
2078 if (BPF_OP(insn->code) == BPF_MOD && in do_jit()
2082 else if (BPF_OP(insn->code) == BPF_DIV && in do_jit()
2129 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
2148 switch (BPF_OP(insn->code)) { in do_jit()
2182 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
2591 EMIT2(simple_alu_opcodes[BPF_OP(insn->imm)], in do_jit()
2771 switch (BPF_OP(insn->code)) { in do_jit()
/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Dmain.h363 return BPF_OP(meta->insn.code); in mbpf_op()
/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.c702 const u8 cond = BPF_OP(code); in build_insn()
1066 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()
1107 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()

12