Lines Matching defs:imm
123 /* dst = imm (64-bit) */
158 static void emit_alu_i64(struct jit_context *ctx, u8 dst, s32 imm, u8 op)
161 /* dst = dst | imm */
163 emit(ctx, ori, dst, dst, (u16)imm);
165 /* dst = dst ^ imm */
167 emit(ctx, xori, dst, dst, (u16)imm);
173 /* dst = dst << imm */
175 emit(ctx, dsll_safe, dst, dst, imm);
177 /* dst = dst >> imm */
179 emit(ctx, dsrl_safe, dst, dst, imm);
181 /* dst = dst >> imm (arithmetic) */
183 emit(ctx, dsra_safe, dst, dst, imm);
185 /* dst = dst + imm */
187 emit(ctx, daddiu, dst, dst, imm);
189 /* dst = dst - imm */
191 emit(ctx, daddiu, dst, dst, -imm);
195 emit_alu_i(ctx, dst, imm, op);
642 s32 imm = insn->imm;
648 /* dst = imm */
650 emit_mov_i(ctx, dst, imm);
655 if (imm == 1) {
669 /* dst = dst & imm */
670 /* dst = dst | imm */
671 /* dst = dst ^ imm */
672 /* dst = dst << imm */
677 if (!valid_alu_i(BPF_OP(code), imm)) {
678 emit_mov_i(ctx, MIPS_R_T4, imm);
680 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) {
685 /* dst = dst >> imm */
686 /* dst = dst >> imm (arithmetic) */
687 /* dst = dst + imm */
688 /* dst = dst - imm */
689 /* dst = dst * imm */
690 /* dst = dst / imm */
691 /* dst = dst % imm */
699 if (!valid_alu_i(BPF_OP(code), imm)) {
701 emit_mov_i(ctx, MIPS_R_T4, imm);
703 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) {
739 /* dst = imm (64-bit) */
741 emit_mov_i(ctx, dst, imm);
751 /* dst = dst & imm (64-bit) */
752 /* dst = dst | imm (64-bit) */
753 /* dst = dst ^ imm (64-bit) */
754 /* dst = dst << imm (64-bit) */
755 /* dst = dst >> imm (64-bit) */
756 /* dst = dst >> imm ((64-bit, arithmetic) */
757 /* dst = dst + imm (64-bit) */
758 /* dst = dst - imm (64-bit) */
759 /* dst = dst * imm (64-bit) */
760 /* dst = dst / imm (64-bit) */
761 /* dst = dst % imm (64-bit) */
773 if (!valid_alu_i(BPF_OP(code), imm)) {
774 emit_mov_i(ctx, MIPS_R_T4, imm);
776 } else if (rewrite_alu_i(BPF_OP(code), imm, &alu, &val)) {
815 emit_bswap_r64(ctx, dst, imm);
817 emit_trunc_r64(ctx, dst, imm);
821 emit_mov_i64(ctx, dst, (u32)imm | ((u64)insn[1].imm << 32));
830 /* ST: *(size *)(dst + off) = imm */
835 emit_mov_i(ctx, MIPS_R_T4, imm);
851 switch (imm) {
862 emit_atomic_r64(ctx, dst, src, off, imm);
863 } else if (imm & BPF_FETCH) {
871 emit_atomic_r(ctx, tmp, src, off, imm);
875 emit_atomic_r(ctx, dst, MIPS_R_T4, off, imm);
929 /* PC += off if dst == imm */
930 /* PC += off if dst != imm */
931 /* PC += off if dst & imm */
932 /* PC += off if dst > imm */
933 /* PC += off if dst >= imm */
934 /* PC += off if dst < imm */
935 /* PC += off if dst <= imm */
936 /* PC += off if dst > imm (signed) */
937 /* PC += off if dst >= imm (signed) */
938 /* PC += off if dst < imm (signed) */
939 /* PC += off if dst <= imm (signed) */
953 setup_jmp_i(ctx, imm, 32, BPF_OP(code), off, &jmp, &rel);
955 if (valid_jmp_i(jmp, imm)) {
956 emit_jmp_i(ctx, MIPS_R_T4, imm, rel, jmp);
959 emit_mov_i(ctx, MIPS_R_T5, imm);
994 /* PC += off if dst == imm */
995 /* PC += off if dst != imm */
996 /* PC += off if dst & imm */
997 /* PC += off if dst > imm */
998 /* PC += off if dst >= imm */
999 /* PC += off if dst < imm */
1000 /* PC += off if dst <= imm */
1001 /* PC += off if dst > imm (signed) */
1002 /* PC += off if dst >= imm (signed) */
1003 /* PC += off if dst < imm (signed) */
1004 /* PC += off if dst <= imm (signed) */
1018 setup_jmp_i(ctx, imm, 64, BPF_OP(code), off, &jmp, &rel);
1019 if (valid_jmp_i(jmp, imm)) {
1020 emit_jmp_i(ctx, dst, imm, rel, jmp);
1023 emit_mov_i(ctx, MIPS_R_T4, imm);