| /Linux-v5.15/arch/powerpc/net/ |
| D | bpf_jit_comp32.c | 282 u32 dst_reg = bpf_to_ppc(ctx, insn[i].dst_reg); in bpf_jit_build_body() local 283 u32 dst_reg_h = dst_reg - 1; in bpf_jit_build_body() 310 if (dst_reg >= 3 && dst_reg < 32) { in bpf_jit_build_body() 311 bpf_set_seen_register(ctx, dst_reg); in bpf_jit_build_body() 325 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() 328 EMIT(PPC_RAW_ADDC(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() 332 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() 335 EMIT(PPC_RAW_SUBFC(dst_reg, src_reg, dst_reg)); in bpf_jit_build_body() 343 EMIT(PPC_RAW_ADDIS(dst_reg, dst_reg, IMM_HA(imm))); in bpf_jit_build_body() 345 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body() [all …]
|
| D | bpf_jit_comp64.c | 312 u32 dst_reg = b2p[insn[i].dst_reg]; in bpf_jit_build_body() local 339 if (dst_reg >= BPF_PPC_NVR_MIN && dst_reg < 32) in bpf_jit_build_body() 340 bpf_set_seen_register(ctx, dst_reg); in bpf_jit_build_body() 350 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() 354 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() 361 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body() 364 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, b2p[TMP_REG_1])); in bpf_jit_build_body() 372 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(-imm))); in bpf_jit_build_body() 375 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, b2p[TMP_REG_1])); in bpf_jit_build_body() 381 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body() [all …]
|
| /Linux-v5.15/arch/s390/net/ |
| D | bpf_jit_comp.c | 101 static inline u32 reg(u32 dst_reg, u32 src_reg) in reg() argument 103 return reg2hex[dst_reg] << 4 | reg2hex[src_reg]; in reg() 697 u32 dst_reg = insn->dst_reg; in bpf_jit_insn() local 718 EMIT4(0xb9160000, dst_reg, src_reg); in bpf_jit_insn() 724 EMIT4(0xb9040000, dst_reg, src_reg); in bpf_jit_insn() 728 EMIT6_IMM(0xc00f0000, dst_reg, imm); in bpf_jit_insn() 734 EMIT6_IMM(0xc0010000, dst_reg, imm); in bpf_jit_insn() 746 EMIT6_PCREL_RILB(0xc4080000, dst_reg, _EMIT_CONST_U64(imm64)); in bpf_jit_insn() 755 EMIT2(0x1a00, dst_reg, src_reg); in bpf_jit_insn() 756 EMIT_ZERO(dst_reg); in bpf_jit_insn() [all …]
|
| /Linux-v5.15/tools/include/linux/ |
| D | filter.h | 37 .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-v5.15/arch/x86/net/ |
| D | bpf_jit_comp.c | 197 static u8 add_1reg(u8 byte, u32 dst_reg) in add_1reg() argument 199 return byte + reg2hex[dst_reg]; in add_1reg() 203 static u8 add_2reg(u8 byte, u32 dst_reg, u32 src_reg) in add_2reg() argument 205 return byte + reg2hex[dst_reg] + (reg2hex[src_reg] << 3); in add_2reg() 611 u32 dst_reg, const u32 imm32) in emit_mov_imm32() argument 622 b1 = add_1mod(0x48, dst_reg); in emit_mov_imm32() 625 EMIT3_off32(b1, b2, add_1reg(b3, dst_reg), imm32); in emit_mov_imm32() 634 if (is_ereg(dst_reg)) in emit_mov_imm32() 635 EMIT1(add_2mod(0x40, dst_reg, dst_reg)); in emit_mov_imm32() 638 EMIT2(b2, add_2reg(b3, dst_reg, dst_reg)); in emit_mov_imm32() [all …]
|
| /Linux-v5.15/samples/bpf/ |
| D | bpf_insn.h | 13 .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-v5.15/kernel/bpf/ |
| D | verifier.c | 2044 return insn->dst_reg; in insn_def_regno() 2051 int dst_reg = insn_def_regno(insn); in insn_has_def32() local 2053 if (dst_reg == -1) in insn_has_def32() 2056 return !is_reg64(env, insn, dst_reg, NULL, DST_OP); in insn_has_def32() 2179 u32 dreg = 1u << insn->dst_reg; in backtrack_insn() 2257 if (insn->dst_reg != BPF_REG_FP) in backtrack_insn() 2651 u32 dst_reg = env->prog->insnsi[insn_idx].dst_reg; in check_stack_write_fixed_off() local 2686 if (dst_reg != BPF_REG_FP) { in check_stack_write_fixed_off() 4361 err = check_reg_arg(env, insn->dst_reg, SRC_OP); in check_atomic() 4377 if (is_ctx_reg(env, insn->dst_reg) || in check_atomic() [all …]
|
| D | disasm.c | 126 insn->code, insn->dst_reg, in print_bpf_end_insn() 128 insn->imm, insn->dst_reg); in print_bpf_end_insn() 147 insn->dst_reg, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn() 148 insn->dst_reg); in print_bpf_insn() 152 insn->dst_reg, in print_bpf_insn() 159 insn->dst_reg, in print_bpf_insn() 168 insn->dst_reg, in print_bpf_insn() 176 insn->dst_reg, insn->off, in print_bpf_insn() 189 insn->dst_reg, insn->off, insn->src_reg); in print_bpf_insn() 196 insn->dst_reg, insn->off, in print_bpf_insn() [all …]
|
| D | cgroup.c | 1819 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in sysctl_convert_ctx_access() 1834 if (si->src_reg == treg || si->dst_reg == treg) in sysctl_convert_ctx_access() 1836 if (si->src_reg == treg || si->dst_reg == treg) in sysctl_convert_ctx_access() 1839 BPF_DW, si->dst_reg, treg, in sysctl_convert_ctx_access() 1843 treg, si->dst_reg, in sysctl_convert_ctx_access() 1850 BPF_DW, treg, si->dst_reg, in sysctl_convert_ctx_access() 1855 si->dst_reg, si->src_reg, in sysctl_convert_ctx_access() 1859 BPF_SIZE(si->code), si->dst_reg, si->dst_reg, in sysctl_convert_ctx_access() 1988 si->dst_reg, si->src_reg, \
|
| D | core.c | 53 #define DST regs[insn->dst_reg] 299 dst[i].dst_reg == 0 && in bpf_prog_calc_tag() 984 if (from->dst_reg == BPF_REG_AX || from->src_reg == BPF_REG_AX) in bpf_jit_blind_insn() 990 *to++ = BPF_ALU64_REG(BPF_XOR, from->dst_reg, from->dst_reg); in bpf_jit_blind_insn() 1006 *to++ = BPF_ALU32_REG(from->code, from->dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() 1020 *to++ = BPF_ALU64_REG(from->code, from->dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() 1040 *to++ = BPF_JMP_REG(from->code, from->dst_reg, BPF_REG_AX, off); in bpf_jit_blind_insn() 1060 *to++ = BPF_JMP32_REG(from->code, from->dst_reg, BPF_REG_AX, in bpf_jit_blind_insn() 1068 *to++ = BPF_ALU64_REG(BPF_MOV, aux[0].dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() 1075 *to++ = BPF_ALU64_REG(BPF_OR, aux[0].dst_reg, BPF_REG_AX); in bpf_jit_blind_insn() [all …]
|
| /Linux-v5.15/net/core/ |
| D | filter.c | 290 static u32 convert_skb_access(int skb_field, int dst_reg, int src_reg, in convert_skb_access() argument 299 *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg, in convert_skb_access() 304 *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_TYPE_OFFSET()); in convert_skb_access() 305 *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, PKT_TYPE_MAX); in convert_skb_access() 307 *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, 5); in convert_skb_access() 314 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access() 322 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access() 326 *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_VLAN_PRESENT_OFFSET()); in convert_skb_access() 328 *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, PKT_VLAN_PRESENT_BIT); in convert_skb_access() 330 *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, 1); in convert_skb_access() [all …]
|
| /Linux-v5.15/arch/mips/net/ |
| D | ebpf_jit.c | 183 dst_reg, enumerator 198 insn->src_reg : insn->dst_reg; in ebpf_to_mips_reg() 226 if (w == dst_reg || w == src_reg_no_fp) in ebpf_to_mips_reg() 426 int dst = ebpf_to_mips_reg(ctx, insn, dst_reg); in gen_imm_insn() 464 get_reg_val_type(ctx, idx, insn->dst_reg) == REG_32BIT) in gen_imm_insn() 470 get_reg_val_type(ctx, idx, insn->dst_reg) != REG_32BIT) in gen_imm_insn() 697 dst = ebpf_to_mips_reg(ctx, insn, dst_reg); in build_one_insn() 700 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) in build_one_insn() 713 dst = ebpf_to_mips_reg(ctx, insn, dst_reg); in build_one_insn() 716 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT) in build_one_insn() [all …]
|
| /Linux-v5.15/drivers/net/ethernet/netronome/nfp/bpf/ |
| D | jit.c | 770 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 …]
|
| D | verifier.c | 505 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-v5.15/include/linux/ |
| D | filter.h | 95 .dst_reg = DST, \ 103 .dst_reg = DST, \ 113 .dst_reg = DST, \ 121 .dst_reg = DST, \ 131 .dst_reg = DST, \ 141 .dst_reg = DST, \ 149 .dst_reg = DST, \ 159 .dst_reg = DST, \ 167 .dst_reg = DST, \ 176 .dst_reg = DST, \ [all …]
|
| /Linux-v5.15/arch/arm/crypto/ |
| D | crct10dif-ce-core.S | 137 .macro fold_16_bytes, src_reg, dst_reg, load_next_consts 143 veor.8 \dst_reg, \dst_reg, q8 144 veor.8 \dst_reg, \dst_reg, \src_reg
|
| /Linux-v5.15/arch/x86/crypto/ |
| D | crct10dif-pcl-asm_64.S | 83 # Fold src_reg into dst_reg. 84 .macro fold_16_bytes src_reg, dst_reg 88 pxor %xmm8, \dst_reg 89 xorps \src_reg, \dst_reg
|
| /Linux-v5.15/drivers/scsi/ |
| D | script_asm.pl | 553 $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-v5.15/arch/arm64/crypto/ |
| D | crct10dif-ce-core.S | 240 .macro fold_16_bytes, p, src_reg, dst_reg, load_next_consts 247 eor \dst_reg\().16b, \dst_reg\().16b, v8.16b 248 eor \dst_reg\().16b, \dst_reg\().16b, \src_reg\().16b
|
| /Linux-v5.15/tools/testing/selftests/bpf/progs/ |
| D | netif_receive_skb.c | 245 {.code = (__u8)1,.dst_reg = (__u8)0x2,.src_reg = (__u8)0x3,.off = (__s16)4,.imm = (__s32)5,}); in BPF_PROG() 247 {.code = 1, .dst_reg = 0x2, .src_reg = 0x3, .off = 4, in BPF_PROG()
|
| /Linux-v5.15/drivers/gpu/drm/i915/gem/ |
| D | i915_gem_ttm.c | 496 struct intel_memory_region *dst_reg, *src_reg; in i915_ttm_move() local 505 dst_reg = i915_ttm_region(bo->bdev, dst_mem->mem_type); in i915_ttm_move() 507 GEM_BUG_ON(!dst_reg || !src_reg); in i915_ttm_move() 541 ttm_kmap_iter_iomap_init(&_dst_iter.io, &dst_reg->iomap, in i915_ttm_move() 542 dst_st, dst_reg->region.start); in i915_ttm_move()
|
| /Linux-v5.15/kernel/trace/ |
| D | bpf_trace.c | 1688 data), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access() 1690 *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access() 1696 data), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access() 1698 *insn++ = BPF_LDX_MEM(BPF_DW, si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access() 1704 regs), si->dst_reg, si->src_reg, in pe_prog_convert_ctx_access() 1706 *insn++ = BPF_LDX_MEM(BPF_SIZEOF(long), si->dst_reg, si->dst_reg, in pe_prog_convert_ctx_access()
|
| /Linux-v5.15/tools/testing/selftests/bpf/prog_tests/ |
| D | btf_dump.c | 686 {.code = (__u8)1,.dst_reg = (__u8)0x2,.src_reg = (__u8)0x3,.off = (__s16)4,.imm = (__s32)5,}); in test_btf_dump_struct_data() 690 { .code = 1, .dst_reg = 0x2, .src_reg = 0x3, .off = 4, in test_btf_dump_struct_data() 700 {.code = 1, .dst_reg = 2, .src_reg = 3, .off = 4, .imm = 5}); in test_btf_dump_struct_data() 705 { .code = 0, .dst_reg = 1}); in test_btf_dump_struct_data()
|
| /Linux-v5.15/arch/arm64/net/ |
| D | bpf_jit_comp.c | 365 int dst_reg = FIELD_GET(BPF_FIXUP_REG_MASK, ex->fixup); in arm64_bpf_fixup_exception() local 367 regs->regs[dst_reg] = 0; in arm64_bpf_fixup_exception() 375 int dst_reg) in add_exception_handler() argument 413 FIELD_PREP(BPF_FIXUP_REG_MASK, dst_reg); in add_exception_handler() 429 const u8 dst = bpf2a64[insn->dst_reg]; in build_insn()
|
| /Linux-v5.15/tools/testing/selftests/bpf/verifier/ |
| D | basic_instr.c | 184 .dst_reg = BPF_REG_0,
|