Lines Matching refs:imm

158 static void emit_alu_i64(struct jit_context *ctx, u8 dst, s32 imm, u8 op)  in emit_alu_i64()  argument
163 emit(ctx, ori, dst, dst, (u16)imm); in emit_alu_i64()
167 emit(ctx, xori, dst, dst, (u16)imm); in emit_alu_i64()
175 emit(ctx, dsll_safe, dst, dst, imm); in emit_alu_i64()
179 emit(ctx, dsrl_safe, dst, dst, imm); in emit_alu_i64()
183 emit(ctx, dsra_safe, dst, dst, imm); in emit_alu_i64()
187 emit(ctx, daddiu, dst, dst, imm); in emit_alu_i64()
191 emit(ctx, daddiu, dst, dst, -imm); in emit_alu_i64()
195 emit_alu_i(ctx, dst, imm, op); in emit_alu_i64()
642 s32 imm = insn->imm; in build_insn() local
650 emit_mov_i(ctx, dst, imm); in build_insn()
655 if (imm == 1) { in build_insn()
677 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn()
678 emit_mov_i(ctx, MIPS_R_T4, imm); in build_insn()
680 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn()
699 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn()
701 emit_mov_i(ctx, MIPS_R_T4, imm); in build_insn()
703 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn()
741 emit_mov_i(ctx, dst, imm); in build_insn()
773 if (!valid_alu_i(BPF_OP(code), imm)) { in build_insn()
774 emit_mov_i(ctx, MIPS_R_T4, imm); in build_insn()
776 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) { in build_insn()
815 emit_bswap_r64(ctx, dst, imm); in build_insn()
817 emit_trunc_r64(ctx, dst, imm); in build_insn()
821 emit_mov_i64(ctx, dst, (u32)imm | ((u64)insn[1].imm << 32)); in build_insn()
835 emit_mov_i(ctx, MIPS_R_T4, imm); in build_insn()
851 switch (imm) { in build_insn()
862 emit_atomic_r64(ctx, dst, src, off, imm); in build_insn()
863 } else if (imm & BPF_FETCH) { in build_insn()
871 emit_atomic_r(ctx, tmp, src, off, imm); in build_insn()
875 emit_atomic_r(ctx, dst, MIPS_R_T4, off, imm); in build_insn()
953 setup_jmp_i(ctx, imm, 32, BPF_OP(code), off, &jmp, &rel); in build_insn()
955 if (valid_jmp_i(jmp, imm)) { in build_insn()
956 emit_jmp_i(ctx, MIPS_R_T4, imm, rel, jmp); in build_insn()
959 emit_mov_i(ctx, MIPS_R_T5, imm); in build_insn()
1018 setup_jmp_i(ctx, imm, 64, BPF_OP(code), off, &jmp, &rel); in build_insn()
1019 if (valid_jmp_i(jmp, imm)) { in build_insn()
1020 emit_jmp_i(ctx, dst, imm, rel, jmp); in build_insn()
1023 emit_mov_i(ctx, MIPS_R_T4, imm); in build_insn()