Lines Matching refs:imm
135 static void emit_imm32(u8 rd, s32 imm, struct hppa_jit_context *ctx) in emit_imm32() argument
137 u32 lower = im11(imm); in emit_imm32()
140 if (OPTIMIZE_HPPA && relative_bits_ok(imm, 14)) { in emit_imm32()
141 emit(hppa_ldi(imm, rd), ctx); in emit_imm32()
144 if (OPTIMIZE_HPPA && lower == imm) { in emit_imm32()
148 emit(hppa_ldil(imm, rd), ctx); in emit_imm32()
160 static void emit_imm(u8 rd, s64 imm, u8 tmpreg, struct hppa_jit_context *ctx) in emit_imm() argument
165 emit_imm32(rd, imm, ctx); in emit_imm()
168 if (OPTIMIZE_HPPA && is_32b_int(imm)) in emit_imm()
172 upper32 = imm >> 32; in emit_imm()
602 s32 imm = insn->imm; in bpf_jit_emit_insn() local
610 if (imm == 1) { in bpf_jit_emit_insn()
654 emit_imm(HPPA_REG_T1, is64 ? (s64)(s32)imm : (u32)imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
665 emit_imm(HPPA_REG_T1, is64 ? (s64)(s32)imm : (u32)imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
676 emit_imm(HPPA_REG_T1, is64 ? (s64)(s32)imm : (u32)imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
729 switch (imm) { in bpf_jit_emit_insn()
745 switch (imm) { in bpf_jit_emit_insn()
765 pr_err("bpf-jit: BPF_END imm %d invalid\n", imm); in bpf_jit_emit_insn()
773 emit_imm(rd, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
781 if (relative_bits_ok(imm, 14)) { in bpf_jit_emit_insn()
782 emit(hppa_ldo(imm, rd, rd), ctx); in bpf_jit_emit_insn()
784 emit_imm(HPPA_REG_T1, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
792 if (relative_bits_ok(-imm, 14)) { in bpf_jit_emit_insn()
793 emit(hppa_ldo(-imm, rd, rd), ctx); in bpf_jit_emit_insn()
795 emit_imm(HPPA_REG_T1, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
803 emit_imm(HPPA_REG_T1, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
810 emit_imm(HPPA_REG_T1, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
817 emit_imm(HPPA_REG_T1, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
824 if (imm != 0) { in bpf_jit_emit_insn()
825 emit_hppa64_shld(rd, imm, rd, ctx); in bpf_jit_emit_insn()
833 if (imm != 0) { in bpf_jit_emit_insn()
835 emit_hppa64_shrd(rd, imm, rd, false, ctx); in bpf_jit_emit_insn()
837 emit_hppa64_shrw(rd, imm, rd, false, ctx); in bpf_jit_emit_insn()
845 if (imm != 0) { in bpf_jit_emit_insn()
847 emit_hppa64_shrd(rd, imm, rd, true, ctx); in bpf_jit_emit_insn()
849 emit_hppa64_shrw(rd, imm, rd, true, ctx); in bpf_jit_emit_insn()
933 if (imm) { in bpf_jit_emit_insn()
934 emit_imm(HPPA_REG_T1, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
955 emit_imm(HPPA_REG_T1, imm, HPPA_REG_T2, ctx); in bpf_jit_emit_insn()
961 if (!is64 && imm < 0) in bpf_jit_emit_insn()
1002 u64 imm64 = (u64)insn1.imm << 32 | (u32)imm; in bpf_jit_emit_insn()
1078 emit_imm(HPPA_REG_T2, imm, HPPA_REG_T1, ctx); in bpf_jit_emit_insn()
1089 insn->imm); in bpf_jit_emit_insn()