Home
last modified time | relevance | path

Searched refs:imm (Results 1 – 25 of 117) sorted by relevance

12345

/kernel/linux/linux-5.10/arch/arm/net/
Dbpf_jit_32.h164 #define _AL3_I(op, rd, rn, imm) ((op ## _I) | (rd) << 12 | (rn) << 16 | (imm)) argument
170 #define ARM_ADD_I(rd, rn, imm) _AL3_I(ARM_INST_ADD, rd, rn, imm) argument
171 #define ARM_ADDS_I(rd, rn, imm) _AL3_I(ARM_INST_ADDS, rd, rn, imm) argument
173 #define ARM_ADC_I(rd, rn, imm) _AL3_I(ARM_INST_ADC, rd, rn, imm) argument
177 #define ARM_AND_I(rd, rn, imm) _AL3_I(ARM_INST_AND, rd, rn, imm) argument
180 #define ARM_BIC_I(rd, rn, imm) _AL3_I(ARM_INST_BIC, rd, rn, imm) argument
187 #define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm) argument
190 #define ARM_EOR_I(rd, rn, imm) _AL3_I(ARM_INST_EOR, rd, rn, imm) argument
195 #define ARM_LDR_R_SI(rt, rn, rm, type, imm) \ argument
198 | (imm) << 7 | (type) << 5 | (rm))
[all …]
/kernel/linux/linux-5.10/tools/include/linux/
Dfilter.h40 .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 …]
/kernel/linux/linux-5.10/arch/nds32/mm/
Dalignment.c198 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 …]
/kernel/linux/linux-5.10/samples/bpf/
Dbpf_insn.h16 .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 …]
/kernel/linux/linux-5.10/arch/riscv/net/
Dbpf_jit.h261 u32 imm; in rv_j_insn() local
263 imm = (imm20_1 & 0x80000) | ((imm20_1 & 0x3ff) << 9) | in rv_j_insn()
266 return (imm << 12) | (rd << 7) | opcode; in rv_j_insn()
286 u32 imm; in rv_ci_insn() local
288 imm = ((imm6 & 0x20) << 7) | ((imm6 & 0x1f) << 2); in rv_ci_insn()
289 return (funct3 << 13) | (rd << 7) | op | imm; in rv_ci_insn()
324 u32 imm; in rv_cb_insn() local
326 imm = ((imm6 & 0x20) << 7) | ((imm6 & 0x1f) << 2); in rv_cb_insn()
327 return (funct3 << 13) | (funct2 << 10) | ((rd & 0x7) << 7) | op | imm; in rv_cb_insn()
541 u32 imm; in rvc_addi4spn() local
[all …]
Dbpf_jit_comp32.c111 static void emit_imm(const s8 rd, s32 imm, struct rv_jit_context *ctx) in emit_imm() argument
113 u32 upper = (imm + (1 << 11)) >> 12; in emit_imm()
114 u32 lower = imm & 0xfff; in emit_imm()
124 static void emit_imm32(const s8 *rd, s32 imm, struct rv_jit_context *ctx) in emit_imm32() argument
127 emit_imm(lo(rd), imm, ctx); in emit_imm32()
130 if (imm >= 0) in emit_imm32()
243 static void emit_alu_i64(const s8 *dst, s32 imm, in emit_alu_i64() argument
251 emit_imm32(rd, imm, ctx); in emit_alu_i64()
254 if (is_12b_int(imm)) { in emit_alu_i64()
255 emit(rv_andi(lo(rd), lo(rd), imm), ctx); in emit_alu_i64()
[all …]
Dbpf_jit_comp64.c452 s32 imm = insn->imm; in bpf_jit_emit_insn() local
460 if (imm == 1) { in bpf_jit_emit_insn()
552 switch (imm) { in bpf_jit_emit_insn()
574 if (imm == 16) in bpf_jit_emit_insn()
586 if (imm == 32) in bpf_jit_emit_insn()
618 emit_imm(rd, imm, ctx); in bpf_jit_emit_insn()
626 if (is_12b_int(imm)) { in bpf_jit_emit_insn()
627 emit_addi(rd, rd, imm, ctx); in bpf_jit_emit_insn()
629 emit_imm(RV_REG_T1, imm, ctx); in bpf_jit_emit_insn()
637 if (is_12b_int(-imm)) { in bpf_jit_emit_insn()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/net/
Dbpf_jit_comp64.c334 s32 imm = insn[i].imm; in bpf_jit_build_body() local
377 if (!imm) { in bpf_jit_build_body()
379 } else if (imm >= -32768 && imm < 32768) { in bpf_jit_build_body()
380 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
382 PPC_LI32(b2p[TMP_REG_1], imm); in bpf_jit_build_body()
388 if (!imm) { in bpf_jit_build_body()
390 } else if (imm > -32768 && imm <= 32768) { in bpf_jit_build_body()
391 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(-imm))); in bpf_jit_build_body()
393 PPC_LI32(b2p[TMP_REG_1], imm); in bpf_jit_build_body()
406 if (imm >= -32768 && imm < 32768) in bpf_jit_build_body()
[all …]
/kernel/linux/linux-5.10/arch/arm/probes/kprobes/
Dcheckers-common.c34 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()
/kernel/linux/linux-5.10/kernel/bpf/
Ddisasm.c23 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()
170 insn->off, insn->imm); in print_bpf_insn()
190 insn->imm); in print_bpf_insn()
195 insn->src_reg, insn->imm); in print_bpf_insn()
201 u64 imm = ((u64)(insn + 1)->imm << 32) | (u32)insn->imm; in print_bpf_insn() local
[all …]
/kernel/linux/linux-5.10/arch/s390/net/
Dbpf_jit_comp.c180 #define EMIT4_IMM(op, b1, imm) \ argument
182 unsigned int __imm = (imm) & 0xffff; \
240 #define EMIT6_PCREL_RIEC(op1, op2, b1, imm, mask, target) \ argument
244 (rel & 0xffff), (op2) | ((imm) & 0xff) << 8); \
246 BUILD_BUG_ON(((unsigned long) (imm)) > 0xff); \
275 #define _EMIT6_IMM(op, imm) \ argument
277 unsigned int __imm = (imm); \
281 #define EMIT6_IMM(op, b1, imm) \ argument
283 _EMIT6_IMM((op) | reg_high(b1) << 16, imm); \
701 s32 imm = insn->imm; in bpf_jit_insn() local
[all …]
/kernel/linux/linux-5.10/arch/arm64/net/
Dbpf_jit_comp.c175 static bool is_addsub_imm(u32 imm) in is_addsub_imm() argument
178 return !(imm & ~0xfff) || !(imm & ~0xfff000); in is_addsub_imm()
436 const s32 imm = insn->imm; in build_insn() local
446 #define check_imm(bits, imm) do { \ in build_insn() argument
447 if ((((imm) > 0) && ((imm) >> (bits))) || \ in build_insn()
448 (((imm) < 0) && (~(imm) >> (bits)))) { \ in build_insn()
450 i, imm, imm); \ in build_insn()
454 #define check_imm19(imm) check_imm(19, imm) in build_insn() argument
455 #define check_imm26(imm) check_imm(26, imm) in build_insn() argument
529 switch (imm) { in build_insn()
[all …]
Dbpf_jit.h201 #define A64_LOGIC_IMM(sf, Rd, Rn, imm, type) ({ \ argument
202 u64 imm64 = (sf) ? (u64)imm : (u64)(u32)imm; \
207 #define A64_AND_I(sf, Rd, Rn, imm) A64_LOGIC_IMM(sf, Rd, Rn, imm, AND) argument
208 #define A64_ORR_I(sf, Rd, Rn, imm) A64_LOGIC_IMM(sf, Rd, Rn, imm, ORR) argument
209 #define A64_EOR_I(sf, Rd, Rn, imm) A64_LOGIC_IMM(sf, Rd, Rn, imm, EOR) argument
210 #define A64_ANDS_I(sf, Rd, Rn, imm) A64_LOGIC_IMM(sf, Rd, Rn, imm, AND_SETFLAGS) argument
212 #define A64_TST_I(sf, Rn, imm) A64_ANDS_I(sf, A64_ZR, Rn, imm) argument
/kernel/linux/linux-5.10/arch/arm64/kernel/
Dinsn.c341 u32 insn, u64 imm) in aarch64_insn_encode_immediate() argument
352 immlo = (imm & ADR_IMM_LOMASK) << ADR_IMM_LOSHIFT; in aarch64_insn_encode_immediate()
353 imm >>= ADR_IMM_HILOSPLIT; in aarch64_insn_encode_immediate()
354 immhi = (imm & ADR_IMM_HIMASK) << ADR_IMM_HISHIFT; in aarch64_insn_encode_immediate()
355 imm = immlo | immhi; in aarch64_insn_encode_immediate()
369 insn |= (imm & mask) << shift; in aarch64_insn_encode_immediate()
861 int imm, enum aarch64_insn_variant variant, in aarch64_insn_gen_add_sub_imm() argument
896 if (imm & ~(BIT(24) - 1)) in aarch64_insn_gen_add_sub_imm()
900 if (imm & ~(SZ_4K - 1)) { in aarch64_insn_gen_add_sub_imm()
902 if (imm & (SZ_4K - 1)) in aarch64_insn_gen_add_sub_imm()
[all …]
/kernel/linux/linux-5.10/arch/mips/net/
Dbpf_jit.c144 static inline bool is_range16(s32 imm) in is_range16() argument
146 return !(imm >= SBIT(15) || imm < -SBIT(15)); in is_range16()
161 static inline void emit_load_imm(unsigned int dst, u32 imm, struct jit_ctx *ctx) in emit_load_imm() argument
165 if (!is_range16(imm)) { in emit_load_imm()
167 uasm_i_lui(&p, r_tmp_imm, (s32)imm >> 16); in emit_load_imm()
169 uasm_i_ori(&p, dst, r_tmp_imm, imm & 0xffff); in emit_load_imm()
172 uasm_i_addiu(&p, dst, r_zero, imm); in emit_load_imm()
177 if (!is_range16(imm)) in emit_load_imm()
187 static inline void emit_ori(unsigned int dst, unsigned src, u32 imm, in emit_ori() argument
190 if (imm >= BIT(16)) { in emit_ori()
[all …]
Debpf_jit.c411 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 …]
/kernel/linux/linux-5.10/arch/sparc/net/
Dbpf_jit_comp_64.c298 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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/bpf/
Djit.c294 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), &reg); 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 …]
/kernel/linux/linux-5.10/arch/sh/kernel/
Ddisassemble.c300 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 …]
/kernel/linux/linux-5.10/include/linux/
Dfilter.h99 .imm = 0 })
107 .imm = 0 })
117 .imm = IMM })
125 .imm = IMM })
135 .imm = LEN })
145 .imm = 0 })
153 .imm = 0 })
163 .imm = IMM })
171 .imm = IMM })
180 .imm = 1 })
[all …]
/kernel/linux/linux-5.10/arch/microblaze/kernel/
Dftrace.c103 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()
/kernel/linux/linux-5.10/arch/csky/abiv1/
Dalignment.c219 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()
/kernel/linux/linux-5.10/arch/ia64/kernel/
Dunaligned.c171 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 …]
/kernel/linux/linux-5.10/arch/arm64/kernel/probes/
Dsimulate-insn.c89 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()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
Dtest_verifier.c365 if (fp[len].code != 0 || fp[len].imm != 0) in probe_filter_length()
659 prog[*fixup_map_hash_8b].imm = map_fds[0]; in do_test_fixup()
668 prog[*fixup_map_hash_48b].imm = map_fds[1]; in do_test_fixup()
677 prog[*fixup_map_hash_16b].imm = map_fds[2]; in do_test_fixup()
687 prog[*fixup_map_array_48b].imm = map_fds[3]; in do_test_fixup()
695 prog[*fixup_prog1].imm = map_fds[4]; in do_test_fixup()
703 prog[*fixup_prog2].imm = map_fds[5]; in do_test_fixup()
711 prog[*fixup_map_in_map].imm = map_fds[6]; in do_test_fixup()
719 prog[*fixup_cgroup_storage].imm = map_fds[7]; in do_test_fixup()
727 prog[*fixup_percpu_cgroup_storage].imm = map_fds[8]; in do_test_fixup()
[all …]

12345