Home
last modified time | relevance | path

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

12

/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/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/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(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/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/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/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.h107 .code = BPF_ALU64 | BPF_OP(OP) | BPF_X, \
118 .code = BPF_ALU | BPF_OP(OP) | BPF_X, \
131 .code = BPF_ALU64 | BPF_OP(OP) | BPF_K, \
141 .code = BPF_ALU | BPF_OP(OP) | BPF_K, \
399 .code = BPF_JMP | BPF_OP(OP) | BPF_X, \
409 .code = BPF_JMP | BPF_OP(OP) | BPF_K, \
419 .code = BPF_JMP32 | BPF_OP(OP) | BPF_X, \
429 .code = BPF_JMP32 | BPF_OP(OP) | BPF_K, \
H A Dbpf_verifier.h1388 BPF_OP(insn->code) == BPF_JA && in bpf_is_kfunc_sleepable()
/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.c1702 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn()
1715 if (BPF_OP(code) == BPF_JSET) { in bpf_jit_emit_insn()
1721 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
1752 if (is_signed_bpf_cond(BPF_OP(code))) { in bpf_jit_emit_insn()
1765 emit_branch(BPF_OP(code), rd, rs, rvoff, ctx); in bpf_jit_emit_insn()
/linux/arch/x86/net/
H A Dbpf_jit_comp.c1849 b2 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
1933 switch (BPF_OP(insn->code)) { in do_jit()
2030 if (BPF_OP(insn->code) == BPF_MOD && in do_jit()
2034 else if (BPF_OP(insn->code) == BPF_DIV && in do_jit()
2081 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
2100 switch (BPF_OP(insn->code)) { in do_jit()
2134 b3 = simple_alu_opcodes[BPF_OP(insn->code)]; in do_jit()
2523 EMIT2(simple_alu_opcodes[BPF_OP(insn->imm)], in do_jit()
2697 switch (BPF_OP(insn->code)) { in do_jit()
/linux/arch/powerpc/net/
H A Dbpf_jit_comp64.c1072 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
1088 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
1108 if (BPF_OP(code) == BPF_DIV) { in bpf_jit_build_body()
1119 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
1133 if (BPF_OP(code) == BPF_MOD) { in bpf_jit_build_body()
/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Dmain.h363 return BPF_OP(meta->insn.code); in mbpf_op()
/linux/kernel/bpf/
H A Dfixups.c297 BPF_OP(code) == BPF_CALL || BPF_OP(code) == BPF_EXIT) in adjust_jmp_off()
497 op = BPF_OP(code); in bpf_insn_is_cond_jump()
1531 insn->code = BPF_ALU | BPF_OP(insn->code) | BPF_SRC(insn->code); in bpf_do_misc_fixups()
1540 bool isdiv = BPF_OP(insn->code) == BPF_DIV; in bpf_do_misc_fixups()
1568 bool isdiv = BPF_OP(insn->code) == BPF_DIV; in bpf_do_misc_fixups()
H A Dliveness.c259 opcode_info = &opcode_info_tbl[BPF_CLASS(insn->code) | BPF_OP(insn->code)]; in bpf_insn_successors()
1103 u8 code = BPF_OP(insn->code); in arg_track_xfer()
2069 u8 code = BPF_OP(insn->code); in compute_insn_live_regs()
H A Dcfg.c448 switch (BPF_OP(insn->code)) { in visit_insn()
H A Dverifier.c2863 if (BPF_OP(code) == BPF_CALL) in __find_kfunc_desc_btf()
2865 if (BPF_OP(code) == BPF_EXIT) { in __find_kfunc_desc_btf()
3003 op = BPF_OP(code); in bpf_add_kfunc_call()
13443 u8 opcode = BPF_OP(insn->code); in retrieve_ptr_limit()
13545 const char *op = BPF_OP(insn->code) == BPF_ADD ? "add" : "sub"; in sanitize_ptr_alu()
13657 u8 opcode = BPF_OP(insn->code); in sanitize_err()
14506 switch (BPF_OP(insn->code)) { in scalar_min_max_or()
14576 u8 opcode = BPF_OP(insn->code); in scalar_min_max_xor()
14737 u8 opcode = BPF_OP(insn->code); in scalar32_min_max_arsh()
14851 (BPF_OP(ins in is_safe_to_compute_dst_reg_range()
[all...]
H A Dcore.c415 BPF_OP(code) == BPF_EXIT) in bpf_adj_branches()
418 if (BPF_OP(code) == BPF_CALL) { in bpf_adj_branches()
/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.c708 const u8 cond = BPF_OP(code); in build_insn()
1064 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()
1105 if (is_signed_bpf_cond(BPF_OP(code))) { in build_insn()
/linux/tools/bpf/
H A Dbpf_dbg.c431 if ((BPF_CLASS(f.code) == BPF_JMP && BPF_OP(f.code) != BPF_JA)) in bpf_disasm()

12