Lines Matching refs:dst

237 static SLJIT_INLINE sljit_s32 emit_imm32_const(struct sljit_compiler *compiler, sljit_s32 dst, slji…  in emit_imm32_const()  argument
239 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in emit_imm32_const()
241 return push_inst32(compiler, MOVT | RD4(dst) in emit_imm32_const()
247 sljit_ins dst = inst[1] & 0x0f00; in modify_imm32_const() local
248 …SLJIT_ASSERT(((inst[0] & 0xfbf0) == (MOVW >> 16)) && ((inst[2] & 0xfbf0) == (MOVT >> 16)) && dst =… in modify_imm32_const()
250 inst[1] = (sljit_u16)(dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff)); in modify_imm32_const()
252 inst[3] = (sljit_u16)(dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16)); in modify_imm32_const()
564 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm) in load_immediate() argument
573 return push_inst32(compiler, MOV_WI | RD4(dst) | tmp); in load_immediate()
576 return push_inst32(compiler, MVN_WI | RD4(dst) | tmp); in load_immediate()
580 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in load_immediate()
585 return push_inst32(compiler, MOVT | RD4(dst) in load_immediate()
596 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
623 return load_immediate(compiler, dst, imm); in emit_op_imm()
626 return load_immediate(compiler, dst, ~imm); in emit_op_imm()
633 if (IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
635 return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
637 return push_inst16(compiler, SUBSI3 | IMM3(imm2) | RD3(dst) | RN3(reg)); in emit_op_imm()
638 if (reg == dst) { in emit_op_imm()
640 return push_inst16(compiler, ADDSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
642 return push_inst16(compiler, SUBSI8 | IMM8(imm2) | RDN3(dst)); in emit_op_imm()
647 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
649 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm2)); in emit_op_imm()
653 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm2); in emit_op_imm()
656 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
662 return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
667 if (imm == 0 && IS_2_LO_REGS(reg, dst)) in emit_op_imm()
668 return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg)); in emit_op_imm()
671 return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
686 if (IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
688 return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
690 return push_inst16(compiler, ADDSI3 | IMM3(imm2) | RD3(dst) | RN3(reg)); in emit_op_imm()
691 if (reg == dst) { in emit_op_imm()
693 return push_inst16(compiler, SUBSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
695 return push_inst16(compiler, ADDSI8 | IMM8(imm2) | RDN3(dst)); in emit_op_imm()
700 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
702 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm2)); in emit_op_imm()
706 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm2); in emit_op_imm()
709 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
717 return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
722 …piler, ((flags & UNUSED_RETURN) ? TSTI : ANDI) | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm2); in emit_op_imm()
725 return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
730 return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm2); in emit_op_imm()
733 return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
738 return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
754 return push_inst16(compiler, MOV | SET_REGS44(dst, reg)); in emit_op_imm()
755 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
756 return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg)); in emit_op_imm()
757 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg)); in emit_op_imm()
763 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
764 return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
765 return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
768 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
769 return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
770 return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
773 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
774 return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
775 return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
780 return push_inst32(compiler, ROR_WI | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
809 if (dst == (sljit_s32)arg2) in emit_op_imm()
811 return push_inst16(compiler, MOV | SET_REGS44(dst, arg2)); in emit_op_imm()
814 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
815 return push_inst16(compiler, UXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
816 return push_inst32(compiler, UXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
819 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
820 return push_inst16(compiler, SXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
821 return push_inst32(compiler, SXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
824 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
825 return push_inst16(compiler, UXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
826 return push_inst32(compiler, UXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
829 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
830 return push_inst16(compiler, SXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
831 return push_inst32(compiler, SXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
834 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
835 return push_inst16(compiler, MVNS | RD3(dst) | RN3(arg2)); in emit_op_imm()
836 return push_inst32(compiler, MVN_W | (flags & SET_FLAGS) | RD4(dst) | RM4(arg2)); in emit_op_imm()
839 return push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2)); in emit_op_imm()
842 FAIL_IF(push_inst32(compiler, RBIT | RN4(arg2) | RD4(dst) | RM4(arg2))); in emit_op_imm()
843 return push_inst32(compiler, CLZ | RN4(dst) | RD4(dst) | RM4(dst)); in emit_op_imm()
846 if (IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
847 return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
848 if (dst == (sljit_s32)arg1 && !(flags & SET_FLAGS)) in emit_op_imm()
849 return push_inst16(compiler, ADD | SET_REGS44(dst, arg2)); in emit_op_imm()
850 return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
853 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
854 return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
855 return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
863 if (IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
864 return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
865 return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
868 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
869 return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
870 return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
874 return push_inst32(compiler, MUL | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
875 SLJIT_ASSERT(dst != TMP_REG2); in emit_op_imm()
876 FAIL_IF(push_inst32(compiler, SMULL | RT4(dst) | RD4(TMP_REG2) | RN4(arg1) | RM4(arg2))); in emit_op_imm()
878 return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst)); in emit_op_imm()
880 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
881 return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2)); in emit_op_imm()
884 …ler, ((flags & UNUSED_RETURN) ? TST_W : AND_W) | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(… in emit_op_imm()
886 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
887 return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
888 return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
890 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
891 return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2)); in emit_op_imm()
892 return push_inst32(compiler, EOR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
898 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
899 return push_inst16(compiler, LSLS | RD3(dst) | RN3(arg2)); in emit_op_imm()
900 return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
906 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
907 return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
908 return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
914 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
915 return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
916 return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
922 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
923 return push_inst16(compiler, RORS | RD3(dst) | RN3(arg2)); in emit_op_imm()
924 return push_inst32(compiler, ROR_W | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
1013 static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, slji… in emit_set_delta() argument
1019 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
1022 return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | imm); in emit_set_delta()
1027 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
1030 return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | imm); in emit_set_delta()
1683 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1690 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1691 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1694 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1742 if (!(dst & SLJIT_MEM)) in sljit_emit_op1()
1745 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1757 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_emit_op1()
1758 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1763 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1770 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1771 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1775 dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1778 if (dst == TMP_REG1) in sljit_emit_op2()
1802 if (!(dst & SLJIT_MEM)) in sljit_emit_op2()
1804 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG2); in sljit_emit_op2()
1989 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
2001 if (FAST_IS_REG(dst)) in sljit_emit_fop1_conv_sw_from_f64()
2002 return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1)); in sljit_emit_fop1_conv_sw_from_f64()
2005 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_sw_from_f64()
2009 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
2012 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_sw()
2029 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_sw()
2030 return emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_f64_from_sw()
2055 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
2063 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2065 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
2096 if (dst & SLJIT_MEM) in sljit_emit_fop1()
2097 return emit_fop_mem(compiler, (op & SLJIT_32), dst_r, dst, dstw); in sljit_emit_fop1()
2102 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
2109 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2110 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
2116 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
2141 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
2143 return emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw); in sljit_emit_fop2()
2150 …BUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
2153 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
2154 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
2158 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
2159 return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG2)); in sljit_emit_fast_enter()
2162 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, TMP_REG1); in sljit_emit_fast_enter()
2662 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
2669 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2670 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
2674 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
2686 if (!(dst & SLJIT_MEM)) in sljit_emit_op_flags()
2688 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
2691 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2692 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
2704 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2705 FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
3093 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
3099 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
3100 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
3106 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
3109 if (dst & SLJIT_MEM) in sljit_emit_const()
3110 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_const()
3114 …ljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_put_label() argument
3120 CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); in sljit_emit_put_label()
3121 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_put_label()
3127 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_put_label()
3130 if (dst & SLJIT_MEM) in sljit_emit_put_label()
3131 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_put_label()