/Linux-v5.4/arch/arm/net/ |
D | bpf_jit_32.h | 161 #define _AL3_I(op, rd, rn, imm) ((op ## _I) | (rd) << 12 | (rn) << 16 | (imm)) argument 167 #define ARM_ADD_I(rd, rn, imm) _AL3_I(ARM_INST_ADD, rd, rn, imm) argument 168 #define ARM_ADDS_I(rd, rn, imm) _AL3_I(ARM_INST_ADDS, rd, rn, imm) argument 170 #define ARM_ADC_I(rd, rn, imm) _AL3_I(ARM_INST_ADC, rd, rn, imm) argument 174 #define ARM_AND_I(rd, rn, imm) _AL3_I(ARM_INST_AND, rd, rn, imm) argument 177 #define ARM_BIC_I(rd, rn, imm) _AL3_I(ARM_INST_BIC, rd, rn, imm) argument 184 #define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm) argument 187 #define ARM_EOR_I(rd, rn, imm) _AL3_I(ARM_INST_EOR, rd, rn, imm) argument 192 #define ARM_LDR_R_SI(rt, rn, rm, type, imm) \ argument 195 | (imm) << 7 | (type) << 5 | (rm)) [all …]
|
/Linux-v5.4/tools/include/linux/ |
D | filter.h | 40 .imm = 0 }) 48 .imm = 0 }) 58 .imm = IMM }) 66 .imm = IMM }) 76 .imm = LEN }) 86 .imm = 0 }) 94 .imm = 0 }) 104 .imm = IMM }) 112 .imm = IMM }) 122 .imm = IMM }) [all …]
|
/Linux-v5.4/arch/nds32/mm/ |
D | alignment.c | 198 int imm, regular, load, len, addr_mode, idx_mode; in do_16() local 204 imm = 1; in do_16() 212 imm = 1; in do_16() 220 imm = 1; in do_16() 228 imm = 0; in do_16() 236 imm = 1; in do_16() 244 imm = 1; in do_16() 252 imm = 1; in do_16() 260 imm = 0; in do_16() 285 if (imm) in do_16() [all …]
|
/Linux-v5.4/samples/bpf/ |
D | bpf_insn.h | 16 .imm = 0 }) 24 .imm = 0 }) 34 .imm = IMM }) 42 .imm = IMM }) 52 .imm = 0 }) 60 .imm = 0 }) 70 .imm = IMM }) 78 .imm = IMM }) 90 .imm = (__u32) (IMM) }), \ 96 .imm = ((__u64) (IMM)) >> 32 }) [all …]
|
/Linux-v5.4/arch/powerpc/net/ |
D | bpf_jit_comp64.c | 308 s32 imm = insn[i].imm; in bpf_jit_build_body() local 354 imm = -imm; in bpf_jit_build_body() 355 if (imm) { in bpf_jit_build_body() 356 if (imm >= -32768 && imm < 32768) in bpf_jit_build_body() 357 PPC_ADDI(dst_reg, dst_reg, IMM_L(imm)); in bpf_jit_build_body() 359 PPC_LI32(b2p[TMP_REG_1], imm); in bpf_jit_build_body() 373 if (imm >= -32768 && imm < 32768) in bpf_jit_build_body() 374 PPC_MULI(dst_reg, dst_reg, IMM_L(imm)); in bpf_jit_build_body() 376 PPC_LI32(b2p[TMP_REG_1], imm); in bpf_jit_build_body() 409 if (imm == 0) in bpf_jit_build_body() [all …]
|
/Linux-v5.4/arch/s390/net/ |
D | bpf_jit_comp.c | 181 #define EMIT4_IMM(op, b1, imm) \ argument 183 unsigned int __imm = (imm) & 0xffff; \ 235 #define EMIT6_PCREL_IMM_LABEL(op1, op2, b1, imm, label, mask) \ argument 239 (rel & 0xffff), op2 | (imm & 0xff) << 8); \ 241 BUILD_BUG_ON(((unsigned long) imm) > 0xff); \ 266 #define _EMIT6_IMM(op, imm) \ argument 268 unsigned int __imm = (imm); \ 272 #define EMIT6_IMM(op, b1, imm) \ argument 274 _EMIT6_IMM(op | reg_high(b1) << 16, imm); \ 513 s32 imm = insn->imm; in bpf_jit_insn() local [all …]
|
/Linux-v5.4/arch/arm/probes/kprobes/ |
D | checkers-common.c | 34 int imm = insn & 0xff; in checker_stack_use_imm_0xx() local 35 asi->stack_space = imm; in checker_stack_use_imm_0xx() 47 int imm = insn & 0xff; in checker_stack_use_t32strd() local 48 asi->stack_space = imm << 2; in checker_stack_use_t32strd() 56 int imm = ((insn & 0xf00) >> 4) + (insn & 0xf); in checker_stack_use_imm_x0x() local 57 asi->stack_space = imm; in checker_stack_use_imm_x0x() 66 int imm = insn & 0xfff; in checker_stack_use_imm_xxx() local 67 asi->stack_space = imm; in checker_stack_use_imm_xxx()
|
/Linux-v5.4/kernel/bpf/ |
D | disasm.c | 23 insn->imm >= 0 && insn->imm < __BPF_FUNC_MAX_ID && in __func_get_name() 24 func_id_str[insn->imm]) in __func_get_name() 25 return func_id_str[insn->imm]; in __func_get_name() 31 snprintf(buff, len, "%+d", insn->imm); in __func_get_name() 114 insn->imm, insn->dst_reg); in print_bpf_end_insn() 147 insn->imm); in print_bpf_insn() 173 insn->off, insn->imm); in print_bpf_insn() 188 insn->imm); in print_bpf_insn() 193 insn->src_reg, insn->imm); in print_bpf_insn() 199 u64 imm = ((u64)(insn + 1)->imm << 32) | (u32)insn->imm; in print_bpf_insn() local [all …]
|
/Linux-v5.4/arch/arm64/kernel/ |
D | insn.c | 318 u32 insn, u64 imm) in aarch64_insn_encode_immediate() argument 329 immlo = (imm & ADR_IMM_LOMASK) << ADR_IMM_LOSHIFT; in aarch64_insn_encode_immediate() 330 imm >>= ADR_IMM_HILOSPLIT; in aarch64_insn_encode_immediate() 331 immhi = (imm & ADR_IMM_HIMASK) << ADR_IMM_HISHIFT; in aarch64_insn_encode_immediate() 332 imm = immlo | immhi; in aarch64_insn_encode_immediate() 346 insn |= (imm & mask) << shift; in aarch64_insn_encode_immediate() 838 int imm, enum aarch64_insn_variant variant, in aarch64_insn_gen_add_sub_imm() argument 873 if (imm & ~(BIT(24) - 1)) in aarch64_insn_gen_add_sub_imm() 877 if (imm & ~(SZ_4K - 1)) { in aarch64_insn_gen_add_sub_imm() 879 if (imm & (SZ_4K - 1)) in aarch64_insn_gen_add_sub_imm() [all …]
|
D | module.c | 155 u64 imm; in reloc_insn_movw() local 160 imm = sval >> lsb; in reloc_insn_movw() 179 imm = ~imm; in reloc_insn_movw() 184 insn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_16, insn, imm); in reloc_insn_movw() 187 if (imm > U16_MAX) in reloc_insn_movw() 196 u64 imm, imm_mask; in reloc_insn_imm() local 206 imm = sval & imm_mask; in reloc_insn_imm() 209 insn = aarch64_insn_encode_immediate(imm_type, insn, imm); in reloc_insn_imm()
|
/Linux-v5.4/arch/arm/kvm/ |
D | trace.h | 59 TP_PROTO(unsigned long vcpu_pc, unsigned long r0, unsigned long imm), 60 TP_ARGS(vcpu_pc, r0, imm), 65 __field( unsigned long, imm ) 71 __entry->imm = imm; 75 __entry->vcpu_pc, __entry->r0, __entry->imm)
|
/Linux-v5.4/arch/arm64/net/ |
D | bpf_jit_comp.c | 352 const s32 imm = insn->imm; in build_insn() local 360 #define check_imm(bits, imm) do { \ in build_insn() argument 361 if ((((imm) > 0) && ((imm) >> (bits))) || \ in build_insn() 362 (((imm) < 0) && (~(imm) >> (bits)))) { \ in build_insn() 364 i, imm, imm); \ in build_insn() 368 #define check_imm19(imm) check_imm(19, imm) in build_insn() argument 369 #define check_imm26(imm) check_imm(26, imm) in build_insn() argument 443 switch (imm) { in build_insn() 459 switch (imm) { in build_insn() 476 emit_a64_mov_i(is64, dst, imm, ctx); in build_insn() [all …]
|
/Linux-v5.4/arch/sparc/net/ |
D | bpf_jit_comp_64.c | 298 static void emit_alu_K(unsigned int opcode, unsigned int dst, unsigned int imm, in emit_alu_K() argument 301 bool small_immed = is_simm13(imm); in emit_alu_K() 306 emit(insn | IMMED | S13(imm), ctx); in emit_alu_K() 312 emit_set_const_sext(imm, tmp, ctx); in emit_alu_K() 317 static void emit_alu3_K(unsigned int opcode, unsigned int src, unsigned int imm, in emit_alu3_K() argument 320 bool small_immed = is_simm13(imm); in emit_alu3_K() 325 emit(insn | IMMED | S13(imm), ctx); in emit_alu3_K() 331 emit_set_const_sext(imm, tmp, ctx); in emit_alu3_K() 636 const u8 dst, s32 imm, struct jit_ctx *ctx) in emit_cbcondi() argument 640 emit(cb_opc | IMMED | WDISP10(off << 2) | RS1(dst) | S5(imm), ctx); in emit_cbcondi() [all …]
|
/Linux-v5.4/drivers/net/ethernet/netronome/nfp/bpf/ |
D | jit.c | 294 emit_immed(struct nfp_prog *nfp_prog, swreg dst, u16 imm, in emit_immed() argument 305 err = swreg_to_unrestricted(dst, dst, reg_imm(imm & 0xff), ®); in emit_immed() 314 reg.breg, imm >> 8, width, invert, shift, in emit_immed() 590 static bool pack_immed(u32 imm, u16 *val, enum immed_shift *shift) in pack_immed() argument 592 if (!(imm & 0xffff0000)) { in pack_immed() 593 *val = imm; in pack_immed() 595 } else if (!(imm & 0xff0000ff)) { in pack_immed() 596 *val = imm >> 8; in pack_immed() 598 } else if (!(imm & 0x0000ffff)) { in pack_immed() 599 *val = imm >> 16; in pack_immed() [all …]
|
/Linux-v5.4/include/linux/ |
D | filter.h | 90 .imm = 0 }) 98 .imm = 0 }) 108 .imm = IMM }) 116 .imm = IMM }) 126 .imm = LEN }) 136 .imm = 0 }) 144 .imm = 0 }) 154 .imm = IMM }) 162 .imm = IMM }) 171 .imm = 1 }) [all …]
|
/Linux-v5.4/arch/sh/kernel/ |
D | disassemble.c | 300 int imm = 0; in print_sh_insn() local 317 imm = (nibs[2] << 4) | (nibs[3]); in print_sh_insn() 318 if (imm & 0x80) in print_sh_insn() 319 imm |= ~0xff; in print_sh_insn() 320 imm = ((char)imm) * 2 + 4 ; in print_sh_insn() 323 imm = ((nibs[1]) << 8) | (nibs[2] << 4) | (nibs[3]); in print_sh_insn() 324 if (imm & 0x800) in print_sh_insn() 325 imm |= ~0xfff; in print_sh_insn() 326 imm = imm * 2 + 4; in print_sh_insn() 329 imm = nibs[3]; in print_sh_insn() [all …]
|
/Linux-v5.4/arch/mips/net/ |
D | ebpf_jit.c | 411 if (insn->imm >= S16_MIN && insn->imm <= S16_MAX) { in gen_imm_to_reg() 412 emit_instr(ctx, addiu, reg, MIPS_R_ZERO, insn->imm); in gen_imm_to_reg() 414 int lower = (s16)(insn->imm & 0xffff); in gen_imm_to_reg() 415 int upper = insn->imm - lower; in gen_imm_to_reg() 473 if (insn->imm >= lower_bound && insn->imm <= upper_bound) { in gen_imm_insn() 477 emit_instr(ctx, daddiu, dst, MIPS_R_ZERO, insn->imm); in gen_imm_insn() 481 emit_instr(ctx, andi, dst, dst, insn->imm); in gen_imm_insn() 485 emit_instr(ctx, ori, dst, dst, insn->imm); in gen_imm_insn() 489 emit_instr(ctx, xori, dst, dst, insn->imm); in gen_imm_insn() 492 emit_instr(ctx, daddiu, dst, dst, insn->imm); in gen_imm_insn() [all …]
|
/Linux-v5.4/arch/riscv/net/ |
D | bpf_jit_comp.c | 198 u32 imm; in rv_uj_insn() local 200 imm = (imm20_1 & 0x80000) | ((imm20_1 & 0x3ff) << 9) | in rv_uj_insn() 203 return (imm << 12) | (rd << 7) | opcode; in rv_uj_insn() 738 s32 imm = insn->imm; in emit_insn() local 746 if (imm == 1) { in emit_insn() 836 int shift = 64 - imm; in emit_insn() 849 if (imm == 16) in emit_insn() 861 if (imm == 32) in emit_insn() 893 emit_imm(rd, imm, ctx); in emit_insn() 901 if (is_12b_int(imm)) { in emit_insn() [all …]
|
/Linux-v5.4/arch/microblaze/kernel/ |
D | ftrace.c | 103 static unsigned int imm; /* saving whole imm instruction */ variable 135 imm = *(unsigned int *)rec->ip; in ftrace_make_nop() 136 pr_debug("%s: imm:0x%x\n", __func__, imm); in ftrace_make_nop() 157 __func__, (unsigned int)addr, (unsigned int)rec->ip, imm); in ftrace_make_call() 158 ret = ftrace_modify_code(rec->ip, imm); in ftrace_make_call()
|
/Linux-v5.4/arch/csky/abiv1/ |
D | alignment.c | 219 uint32_t imm = 0; in csky_alignment() local 254 imm = (opcode >> 4) & 0xf; in csky_alignment() 263 addr = get_ptreg(regs, rx) + (imm << 1); in csky_alignment() 267 addr = get_ptreg(regs, rx) + (imm << 2); in csky_alignment() 271 addr = get_ptreg(regs, rx) + (imm << 1); in csky_alignment() 275 addr = get_ptreg(regs, rx) + (imm << 2); in csky_alignment() 294 __func__, opcode, rz, rx, imm, addr); in csky_alignment()
|
/Linux-v5.4/arch/ia64/kernel/ |
D | unaligned.c | 171 unsigned long imm:7; /* [13:19] */ member 694 unsigned long imm; in emulate_load_updates() local 702 imm = ld.x << 7 | ld.imm; in emulate_load_updates() 707 if (ld.m) imm |= SIGN_EXT9; in emulate_load_updates() 713 ifa += imm; in emulate_load_updates() 717 DPRINT("ld.x=%d ld.m=%d imm=%ld r3=0x%lx\n", ld.x, ld.m, imm, ifa); in emulate_load_updates() 739 getreg(ld.imm, &r2, &nat_r2, regs); in emulate_load_updates() 748 DPRINT("imm=%d r2=%ld r3=0x%lx nat_r2=%d\n",ld.imm, r2, ifa, nat_r2); in emulate_load_updates() 886 getreg(ld.imm, &r2, NULL, regs); in emulate_store_int() 915 unsigned long imm; in emulate_store_int() local [all …]
|
/Linux-v5.4/arch/arm64/kernel/probes/ |
D | simulate-insn.c | 89 long imm, xn, val; in simulate_adr_adrp() local 92 imm = ((opcode >> 3) & 0x1ffffc) | ((opcode >> 29) & 0x3); in simulate_adr_adrp() 93 imm = sign_extend64(imm, 20); in simulate_adr_adrp() 95 val = (imm<<12) + (addr & 0xfffffffffffff000); in simulate_adr_adrp() 97 val = imm + addr; in simulate_adr_adrp()
|
/Linux-v5.4/arch/powerpc/lib/ |
D | code-patching.c | 316 signed long imm; in branch_iform_target() local 318 imm = *instr & 0x3FFFFFC; in branch_iform_target() 321 if (imm & 0x2000000) in branch_iform_target() 322 imm -= 0x4000000; in branch_iform_target() 325 imm += (unsigned long)instr; in branch_iform_target() 327 return (unsigned long)imm; in branch_iform_target() 332 signed long imm; in branch_bform_target() local 334 imm = *instr & 0xFFFC; in branch_bform_target() 337 if (imm & 0x8000) in branch_bform_target() 338 imm -= 0x10000; in branch_bform_target() [all …]
|
D | sstep.c | 1169 unsigned long int imm; in analyse_instr() local 1180 imm = (signed short)(instr & 0xfffc); in analyse_instr() 1182 imm += regs->nip; in analyse_instr() 1183 op->val = truncate_if_32bit(regs->msr, imm); in analyse_instr() 1199 imm = instr & 0x03fffffc; in analyse_instr() 1200 if (imm & 0x02000000) in analyse_instr() 1201 imm -= 0x04000000; in analyse_instr() 1203 imm += regs->nip; in analyse_instr() 1204 op->val = truncate_if_32bit(regs->msr, imm); in analyse_instr() 1223 imm = (instr & 0x400)? regs->ctr: regs->link; in analyse_instr() [all …]
|
/Linux-v5.4/tools/testing/selftests/bpf/ |
D | test_verifier.c | 362 if (fp[len].code != 0 || fp[len].imm != 0) in probe_filter_length() 653 prog[*fixup_map_hash_8b].imm = map_fds[0]; in do_test_fixup() 662 prog[*fixup_map_hash_48b].imm = map_fds[1]; in do_test_fixup() 671 prog[*fixup_map_hash_16b].imm = map_fds[2]; in do_test_fixup() 681 prog[*fixup_map_array_48b].imm = map_fds[3]; in do_test_fixup() 689 prog[*fixup_prog1].imm = map_fds[4]; in do_test_fixup() 697 prog[*fixup_prog2].imm = map_fds[5]; in do_test_fixup() 705 prog[*fixup_map_in_map].imm = map_fds[6]; in do_test_fixup() 713 prog[*fixup_cgroup_storage].imm = map_fds[7]; in do_test_fixup() 721 prog[*fixup_percpu_cgroup_storage].imm = map_fds[8]; in do_test_fixup() [all …]
|