Lines Matching refs:dst

232 static SLJIT_INLINE sljit_s32 emit_imm32_const(struct sljit_compiler *compiler, sljit_s32 dst, slji…  in emit_imm32_const()  argument
234 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in emit_imm32_const()
236 return push_inst32(compiler, MOVT | RD4(dst) in emit_imm32_const()
242 sljit_ins dst = inst[1] & 0x0f00; in modify_imm32_const() local
243 …SLJIT_ASSERT(((inst[0] & 0xfbf0) == (MOVW >> 16)) && ((inst[2] & 0xfbf0) == (MOVT >> 16)) && dst =… in modify_imm32_const()
245 inst[1] = (sljit_u16)(dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff)); in modify_imm32_const()
247 inst[3] = (sljit_u16)(dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16)); in modify_imm32_const()
557 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm) in load_immediate() argument
566 return push_inst32(compiler, MOV_WI | RD4(dst) | tmp); in load_immediate()
569 return push_inst32(compiler, MVN_WI | RD4(dst) | tmp); in load_immediate()
573 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in load_immediate()
578 return push_inst32(compiler, MOVT | RD4(dst) in load_immediate()
589 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
615 return load_immediate(compiler, dst, imm); in emit_op_imm()
618 return load_immediate(compiler, dst, ~imm); in emit_op_imm()
625 if (IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
627 return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
629 return push_inst16(compiler, SUBSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
630 if (reg == dst) { in emit_op_imm()
632 return push_inst16(compiler, ADDSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
634 return push_inst16(compiler, SUBSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
639 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
641 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
645 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
648 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
654 return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
659 if (imm == 0 && IS_2_LO_REGS(reg, dst)) in emit_op_imm()
660 return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg)); in emit_op_imm()
663 return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
678 if (IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
680 return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
682 return push_inst16(compiler, ADDSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
683 if (reg == dst) { in emit_op_imm()
685 return push_inst16(compiler, SUBSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
687 return push_inst16(compiler, ADDSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
692 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
694 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
698 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
701 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
709 return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
714 …piler, ((flags & UNUSED_RETURN) ? TSTI : ANDI) | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
717 return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
722 return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
725 return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
730 return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
740 return push_inst16(compiler, MOV | SET_REGS44(dst, reg)); in emit_op_imm()
741 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
742 return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg)); in emit_op_imm()
743 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg)); in emit_op_imm()
747 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
748 return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
749 return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
751 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
752 return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
753 return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
755 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
756 return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
757 return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
786 if (dst == (sljit_s32)arg2) in emit_op_imm()
788 return push_inst16(compiler, MOV | SET_REGS44(dst, arg2)); in emit_op_imm()
791 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
792 return push_inst16(compiler, UXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
793 return push_inst32(compiler, UXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
796 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
797 return push_inst16(compiler, SXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
798 return push_inst32(compiler, SXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
801 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
802 return push_inst16(compiler, UXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
803 return push_inst32(compiler, UXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
806 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
807 return push_inst16(compiler, SXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
808 return push_inst32(compiler, SXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
811 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
812 return push_inst16(compiler, MVNS | RD3(dst) | RN3(arg2)); in emit_op_imm()
813 return push_inst32(compiler, MVN_W | (flags & SET_FLAGS) | RD4(dst) | RM4(arg2)); in emit_op_imm()
816 FAIL_IF(push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2))); in emit_op_imm()
820 if (IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
821 return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
822 if (dst == (sljit_s32)arg1 && !(flags & SET_FLAGS)) in emit_op_imm()
823 return push_inst16(compiler, ADD | SET_REGS44(dst, arg2)); in emit_op_imm()
824 return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
827 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
828 return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
829 return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
837 if (IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
838 return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
839 return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
842 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
843 return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
844 return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
848 return push_inst32(compiler, MUL | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
849 SLJIT_ASSERT(dst != TMP_REG2); in emit_op_imm()
850 FAIL_IF(push_inst32(compiler, SMULL | RT4(dst) | RD4(TMP_REG2) | RN4(arg1) | RM4(arg2))); in emit_op_imm()
852 return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst)); in emit_op_imm()
854 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
855 return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2)); in emit_op_imm()
858 …ler, ((flags & UNUSED_RETURN) ? TST_W : AND_W) | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(… in emit_op_imm()
860 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
861 return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
862 return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
864 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
865 return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2)); in emit_op_imm()
866 return push_inst32(compiler, EOR_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, LSLS | RD3(dst) | RN3(arg2)); in emit_op_imm()
870 return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
872 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
873 return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
874 return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
876 if (dst == (sljit_s32)arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
877 return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
878 return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
967 static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, slji… in emit_set_delta() argument
973 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
976 return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | imm); in emit_set_delta()
981 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
984 return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | imm); in emit_set_delta()
1557 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1564 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1565 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1568 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1616 if (!(dst & SLJIT_MEM)) in sljit_emit_op1()
1619 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1631 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_emit_op1()
1632 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1637 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1644 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1645 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1649 dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1652 if (dst == TMP_REG1) in sljit_emit_op2()
1676 if (!(dst & SLJIT_MEM)) in sljit_emit_op2()
1678 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG2); in sljit_emit_op2()
1801 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
1813 if (FAST_IS_REG(dst)) in sljit_emit_fop1_conv_sw_from_f64()
1814 return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1)); in sljit_emit_fop1_conv_sw_from_f64()
1817 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_sw_from_f64()
1821 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
1824 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_sw()
1841 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_sw()
1842 return emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_f64_from_sw()
1867 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
1875 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1877 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1908 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1909 return emit_fop_mem(compiler, (op & SLJIT_32), dst_r, dst, dstw); in sljit_emit_fop1()
1914 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
1921 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1922 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1928 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1953 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1955 return emit_fop_mem(compiler, (op & SLJIT_32), TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1964 …BUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1967 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1968 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1972 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1973 return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG2)); in sljit_emit_fast_enter()
1976 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, TMP_REG1); in sljit_emit_fast_enter()
2439 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
2446 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2447 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
2451 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
2463 if (!(dst & SLJIT_MEM)) in sljit_emit_op_flags()
2465 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
2468 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2469 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
2481 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2482 FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
2597 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
2603 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2604 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
2610 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
2613 if (dst & SLJIT_MEM) in sljit_emit_const()
2614 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_const()
2618 …ljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_put_label() argument
2624 CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); in sljit_emit_put_label()
2625 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_put_label()
2631 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_put_label()
2634 if (dst & SLJIT_MEM) in sljit_emit_put_label()
2635 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_put_label()