Home
last modified time | relevance | path

Searched refs:dst_reg (Results 1 – 25 of 40) sorted by relevance

12

/linux/tools/include/linux/
H A Dfilter.h37 .dst_reg = DST, \
45 .dst_reg = DST, \
55 .dst_reg = DST, \
63 .dst_reg = DST, \
73 .dst_reg = DST, \
83 .dst_reg = DST, \
91 .dst_reg = DST, \
101 .dst_reg = DST, \
109 .dst_reg = DST, \
119 .dst_reg = DST, \
[all …]
/linux/arch/x86/net/
H A Dbpf_jit_comp.c273 static u8 add_1reg(u8 byte, u32 dst_reg) in add_1reg() argument
275 return byte + reg2hex[dst_reg]; in add_1reg()
279 static u8 add_2reg(u8 byte, u32 dst_reg, u32 src_reg) in add_2reg() argument
281 return byte + reg2hex[dst_reg] + (reg2hex[src_reg] << 3); in add_2reg()
888 u32 dst_reg, const u32 imm32) in emit_mov_imm32() argument
899 b1 = add_1mod(0x48, dst_reg); in emit_mov_imm32()
902 EMIT3_off32(b1, b2, add_1reg(b3, dst_reg), imm32); in emit_mov_imm32()
911 if (is_ereg(dst_reg)) in emit_mov_imm32()
912 EMIT1(add_2mod(0x40, dst_reg, dst_reg)); in emit_mov_imm32()
915 EMIT2(b2, add_2reg(b3, dst_reg, dst_reg)); in emit_mov_imm32()
[all …]
/linux/arch/s390/net/
H A Dbpf_jit_comp.c112 static inline u32 reg(u32 dst_reg, u32 src_reg) in reg() argument
114 return reg2hex[dst_reg] << 4 | reg2hex[src_reg]; in reg()
746 probe->reg = reg2hex[insn->dst_reg]; in bpf_jit_probe_load_pre()
771 EMIT4(0xb9080000, REG_W1, insn->dst_reg); in bpf_jit_probe_atomic_pre()
863 u32 dst_reg = insn->dst_reg; in bpf_jit_insn() local
883 EMIT4(0xb9160000, dst_reg, src_reg); in bpf_jit_insn()
889 EMIT4(0xb9260000, dst_reg, src_reg); in bpf_jit_insn()
891 EMIT4(0xb9160000, dst_reg, dst_reg); in bpf_jit_insn()
895 EMIT4(0xb9270000, dst_reg, src_reg); in bpf_jit_insn()
897 EMIT4(0xb9160000, dst_reg, dst_reg); in bpf_jit_insn()
[all …]
/linux/samples/bpf/
H A Dbpf_insn.h13 .dst_reg = DST, \
21 .dst_reg = DST, \
31 .dst_reg = DST, \
39 .dst_reg = DST, \
49 .dst_reg = DST, \
57 .dst_reg = DST, \
67 .dst_reg = DST, \
75 .dst_reg = DST, \
87 .dst_reg = DST, \
93 .dst_reg = 0, \
[all …]
/linux/kernel/bpf/
H A Ddisasm.c143 insn->code, insn->dst_reg, in print_bpf_end_insn()
145 insn->imm, insn->dst_reg); in print_bpf_end_insn()
153 insn->code, insn->dst_reg, in print_bpf_bswap_insn()
154 insn->imm, insn->dst_reg); in print_bpf_bswap_insn()
202 insn->dst_reg, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
203 insn->dst_reg); in print_bpf_insn()
206 insn->code, insn->dst_reg, in print_bpf_insn()
210 insn->code, insn->dst_reg, insn->src_reg); in print_bpf_insn()
214 insn->dst_reg, in print_bpf_insn()
223 insn->dst_reg, in print_bpf_insn()
[all …]
H A Dverifier.c3364 return insn->dst_reg; in insn_def_regno()
3371 int dst_reg = insn_def_regno(insn); in insn_has_def32() local
3373 if (dst_reg == -1) in insn_has_def32()
3376 return !is_reg64(env, insn, dst_reg, NULL, DST_OP); in insn_has_def32()
3862 u32 dreg = insn->dst_reg; in backtrack_insn()
7375 err = check_reg_arg(env, insn->dst_reg, SRC_OP); in check_atomic()
7398 if (is_ctx_reg(env, insn->dst_reg) || in check_atomic()
7399 is_pkt_reg(env, insn->dst_reg) || in check_atomic()
7400 is_flow_key_reg(env, insn->dst_reg) || in check_atomic()
7401 is_sk_reg(env, insn->dst_reg) || in check_atomic()
[all …]
H A Dcgroup.c2250 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in sysctl_convert_ctx_access()
2259 * register is used since neither src_reg nor dst_reg can be in sysctl_convert_ctx_access()
2265 if (si->src_reg == treg || si->dst_reg == treg) in sysctl_convert_ctx_access()
2267 if (si->src_reg == treg || si->dst_reg == treg) in sysctl_convert_ctx_access()
2270 BPF_DW, si->dst_reg, treg, in sysctl_convert_ctx_access()
2274 treg, si->dst_reg, in sysctl_convert_ctx_access()
2283 BPF_DW, treg, si->dst_reg, in sysctl_convert_ctx_access()
2288 si->dst_reg, si->src_reg, in sysctl_convert_ctx_access()
2292 BPF_SIZE(si->code), si->dst_reg, si->dst_reg, in sysctl_convert_ctx_access()
[all...]
H A Dcore.c59 #define DST regs[insn->dst_reg]
324 dst[i].dst_reg == 0 && in bpf_prog_calc_tag()
1322 if (from->dst_reg == BPF_REG_AX || from->src_reg == BPF_REG_AX) in bpf_jit_blind_insn()
1328 *to++ = BPF_ALU64_REG(BPF_XOR, from->dst_reg, from->dst_reg); in bpf_jit_blind_insn()
1344 *to++ = BPF_ALU32_REG_OFF(from->code, from->dst_reg, BPF_REG_AX, from->off); in bpf_jit_blind_insn()
1358 *to++ = BPF_ALU64_REG_OFF(from->code, from->dst_reg, BPF_REG_AX, from->off); in bpf_jit_blind_insn()
1378 *to++ = BPF_JMP_REG(from->code, from->dst_reg, BPF_REG_AX, off); in bpf_jit_blind_insn()
1398 *to++ = BPF_JMP32_REG(from->code, from->dst_reg, BPF_REG_AX, in bpf_jit_blind_insn()
1406 *to++ = BPF_ALU64_REG(BPF_MOV, aux[0].dst_reg, BPF_REG_AX); in bpf_jit_blind_insn()
1413 *to++ = BPF_ALU64_REG(BPF_OR, aux[0].dst_reg, BPF_REG_AX); in bpf_jit_blind_insn()
[all …]
/linux/tools/testing/selftests/bpf/
H A Ddisasm.c143 insn->code, insn->dst_reg, in print_bpf_end_insn()
145 insn->imm, insn->dst_reg); in print_bpf_end_insn()
153 insn->code, insn->dst_reg, in print_bpf_bswap_insn()
154 insn->imm, insn->dst_reg); in print_bpf_bswap_insn()
202 insn->dst_reg, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
203 insn->dst_reg); in print_bpf_insn()
206 insn->code, insn->dst_reg, in print_bpf_insn()
210 insn->code, insn->dst_reg, insn->src_reg); in print_bpf_insn()
214 insn->dst_reg, in print_bpf_insn()
223 insn->dst_reg, in print_bpf_insn()
[all …]
/linux/net/core/
H A Dfilter.c302 static u32 convert_skb_access(int skb_field, int dst_reg, int src_reg, in convert_skb_access() argument
311 *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg, in convert_skb_access()
316 *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_TYPE_OFFSET); in convert_skb_access()
317 *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, PKT_TYPE_MAX); in convert_skb_access()
319 *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, 5); in convert_skb_access()
326 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access()
334 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access()
339 *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg, in convert_skb_access()
341 *insn++ = BPF_JMP_IMM(BPF_JEQ, dst_reg, 0, 1); in convert_skb_access()
342 *insn++ = BPF_ALU32_IMM(BPF_MOV, dst_reg, 1); in convert_skb_access()
[all …]
/linux/include/linux/
H A Dfilter.h105 .dst_reg = DST, \
116 .dst_reg = DST, \
129 .dst_reg = DST, \
139 .dst_reg = DST, \
151 .dst_reg = DST, \
161 .dst_reg = DST, \
171 .dst_reg = DST, \
179 .dst_reg = DST, \
193 .dst_reg = DST, \
208 .dst_reg = DST, \
[all …]
/linux/drivers/net/ethernet/netronome/nfp/bpf/
H A Djit.c770 reg_a(meta->paired_st->dst_reg * 2), off, len - 1, in nfp_cpp_memcpy()
775 reg_a(meta->paired_st->dst_reg * 2), off, xfer_num - 1, in nfp_cpp_memcpy()
782 reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy()
789 reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy()
796 reg_a(meta->paired_st->dst_reg * 2), off, 7, in nfp_cpp_memcpy()
802 reg_a(meta->paired_st->dst_reg * 2), off, len - 33, in nfp_cpp_memcpy()
813 reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy()
818 xfer_num - 1, reg_a(meta->paired_st->dst_reg * 2), off, in nfp_cpp_memcpy()
841 wrp_reg_subpart(nfp_prog, reg_both(meta->insn.dst_reg * 2), in nfp_cpp_memcpy()
846 wrp_reg_subpart(nfp_prog, reg_both(meta->insn.dst_reg * 2), in nfp_cpp_memcpy()
[all …]
H A Dverifier.c505 const struct bpf_reg_state *reg = cur_regs(env) + meta->insn.dst_reg; in nfp_bpf_check_store()
522 return nfp_bpf_check_ptr(nfp_prog, meta, env, meta->insn.dst_reg); in nfp_bpf_check_store()
530 const struct bpf_reg_state *dreg = cur_regs(env) + meta->insn.dst_reg; in nfp_bpf_check_atomic()
552 return nfp_bpf_check_ptr(nfp_prog, meta, env, meta->insn.dst_reg); in nfp_bpf_check_atomic()
562 cur_regs(env) + meta->insn.dst_reg; in nfp_bpf_check_alu()
647 meta->insn.dst_reg >= MAX_BPF_REG) { in nfp_verify_insn()
684 if (meta->insn.dst_reg >= BPF_REG_6 && in nfp_assign_subprog_idx_and_regs()
685 meta->insn.dst_reg <= BPF_REG_9) in nfp_assign_subprog_idx_and_regs()
/linux/tools/testing/selftests/bpf/verifier/
H A Datomic_fetch.c95 #define __ATOMIC_FETCH_OP_TEST(src_reg, dst_reg, operand1, op, operand2, expect) \ argument
97 "atomic fetch " #op ", src=" #dst_reg " dst=" #dst_reg, \
102 BPF_MOV64_REG(dst_reg, BPF_REG_10), \
105 dst_reg, src_reg, -8), \
H A Dbasic_instr.c184 .dst_reg = BPF_REG_0,
/linux/arch/x86/crypto/
H A Dcrct10dif-pcl-asm_64.S83 # Fold src_reg into dst_reg.
84 .macro fold_16_bytes src_reg, dst_reg argument
88 pxor %xmm8, \dst_reg
89 xorps \src_reg, \dst_reg
/linux/drivers/scsi/
H A Dscript_asm.pl553 $dst_reg = "\U$1\E";
581 print STDERR "source = $src_reg, data = $data8 , destination = $dst_reg\n"
585 if (($src_reg eq undef) || ($src_reg eq $dst_reg)) {
587 ($registers{$dst_reg} << 16);
588 } elsif ($dst_reg =~ /SFBR/i) {
593 ($registers{$dst_reg} << 16);
/linux/tools/testing/selftests/bpf/progs/
H A Dnetif_receive_skb.c241 {.code = (__u8)1,.dst_reg = (__u8)0x2,.src_reg = (__u8)0x3,.off = (__s16)4,.imm = (__s32)5,}); in BPF_PROG()
243 {.code = 1, .dst_reg = 0x2, .src_reg = 0x3, .off = 4, in BPF_PROG()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbtf_dump.c724 {.code = (__u8)1,.dst_reg = (__u8)0x2,.src_reg = (__u8)0x3,.off = (__s16)4,.imm = (__s32)5,}); in test_btf_dump_struct_data()
728 { .code = 1, .dst_reg = 0x2, .src_reg = 0x3, .off = 4, in test_btf_dump_struct_data()
738 {.code = 1, .dst_reg = 2, .src_reg = 3, .off = 4, .imm = 5}); in test_btf_dump_struct_data()
743 { .code = 0, .dst_reg = 1}); in test_btf_dump_struct_data()
/linux/Documentation/bpf/
H A Dclassic_vs_extended.rst212 op:16, jt:8, jf:8, k:32 ==> op:8, dst_reg:4, src_reg:4, off:16, imm:32
325 In eBPF it means dst_reg = (u32) dst_reg + (u32) src_reg; similarly,
334 dst_reg = dst_reg + src_reg
/linux/arch/loongarch/net/
H A Dbpf_jit.c289 const u8 dst = regmap[insn->dst_reg]; in emit_atomic()
401 int dst_reg = FIELD_GET(BPF_FIXUP_REG_MASK, ex->fixup); in ex_handler_bpf() local
404 regs->regs[dst_reg] = 0; in ex_handler_bpf()
413 int dst_reg) in add_exception_handler() argument
451 ex->fixup = FIELD_PREP(BPF_FIXUP_OFFSET_MASK, offset) | FIELD_PREP(BPF_FIXUP_REG_MASK, dst_reg); in add_exception_handler()
470 const u8 dst = regmap[insn->dst_reg]; in build_insn()
/linux/Documentation/bpf/standardization/
H A Dinstruction-set.rst187 |src_reg|dst_reg|
193 |dst_reg|src_reg|
200 **dst_reg**
219 src_reg dst_reg
221 dst_reg src_reg
233 with 'opcode', 'dst_reg', 'src_reg', and 'offset' all set to zero.
779 mode modifier of ``ABS`` or ``IND``. The 'dst_reg' and 'offset' fields were
/linux/Documentation/dev-tools/
H A Dcheckuapi.rst87 __u8 dst_reg:4; /* dest register */
138 - __u8 dst_reg:4; /* dest register */
140 + __u8 dst_reg:4; /* dest register */
157 '__u8 dst_reg' offset changed from 8 to 12 (in bits) (by +4 bits)
195 '__u8 dst_reg' offset changed from 8 to 12 (in bits) (by +4 bits)
/linux/kernel/trace/
H A Dbpf_trace.c2158 data), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access()
2160 *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access()
2166 data), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access()
2168 *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access()
2174 regs), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access()
2176 *insn++ = BPF_LDX_MEM(BPF_SIZEOF(long), si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access()
/linux/arch/sparc/net/
H A Dbpf_jit_comp_64.c898 const u8 dst = bpf2sparc[insn->dst_reg]; in build_insn()
1302 if (insn->dst_reg == BPF_REG_FP) in build_insn()
1343 if (insn->dst_reg == BPF_REG_FP) in build_insn()
1384 if (insn->dst_reg == BPF_REG_FP) in build_insn()
1412 if (insn->dst_reg == BPF_REG_FP) in build_insn()

12