Lines Matching refs:dst
222 static SLJIT_INLINE sljit_s32 emit_imm32_const(struct sljit_compiler *compiler, sljit_s32 dst, slji… in emit_imm32_const() argument
224 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in emit_imm32_const()
226 return push_inst32(compiler, MOVT | RD4(dst) in emit_imm32_const()
232 sljit_s32 dst = inst[1] & 0x0f00; in modify_imm32_const() local
233 …SLJIT_ASSERT(((inst[0] & 0xfbf0) == (MOVW >> 16)) && ((inst[2] & 0xfbf0) == (MOVT >> 16)) && dst =… in modify_imm32_const()
235 inst[1] = dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff); in modify_imm32_const()
237 inst[3] = dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16); in modify_imm32_const()
547 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm) in load_immediate() argument
556 return push_inst32(compiler, MOV_WI | RD4(dst) | tmp); in load_immediate()
559 return push_inst32(compiler, MVN_WI | RD4(dst) | tmp); in load_immediate()
563 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in load_immediate()
568 return push_inst32(compiler, MOVT | RD4(dst) in load_immediate()
579 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
605 return load_immediate(compiler, dst, imm); in emit_op_imm()
608 return load_immediate(compiler, dst, ~imm); in emit_op_imm()
615 if (IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
617 return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
619 return push_inst16(compiler, SUBSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
620 if (reg == dst) { in emit_op_imm()
622 return push_inst16(compiler, ADDSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
624 return push_inst16(compiler, SUBSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
629 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
631 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
635 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
638 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
643 return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
649 if (imm == 0 && IS_2_LO_REGS(reg, dst)) in emit_op_imm()
650 return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg)); in emit_op_imm()
653 return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
667 if (IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
669 return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
671 return push_inst16(compiler, ADDSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
672 if (reg == dst) { in emit_op_imm()
674 return push_inst16(compiler, SUBSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
676 return push_inst16(compiler, ADDSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
681 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
683 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
687 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
690 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
697 return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
702 return push_inst32(compiler, ANDI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
705 return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
710 return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
713 return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
718 return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
728 return push_inst16(compiler, MOV | SET_REGS44(dst, reg)); in emit_op_imm()
729 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
730 return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg)); in emit_op_imm()
731 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg)); in emit_op_imm()
735 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
736 return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
737 return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
739 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
740 return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
741 return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
743 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
744 return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
745 return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
773 if (dst == arg2) in emit_op_imm()
775 return push_inst16(compiler, MOV | SET_REGS44(dst, arg2)); in emit_op_imm()
778 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
779 return push_inst16(compiler, UXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
780 return push_inst32(compiler, UXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
783 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
784 return push_inst16(compiler, SXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
785 return push_inst32(compiler, SXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
788 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
789 return push_inst16(compiler, UXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
790 return push_inst32(compiler, UXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
793 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
794 return push_inst16(compiler, SXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
795 return push_inst32(compiler, SXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
798 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
799 return push_inst16(compiler, MVNS | RD3(dst) | RN3(arg2)); in emit_op_imm()
800 return push_inst32(compiler, MVN_W | (flags & SET_FLAGS) | RD4(dst) | RM4(arg2)); in emit_op_imm()
803 FAIL_IF(push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2))); in emit_op_imm()
807 if (IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
808 return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
809 if (dst == arg1 && !(flags & SET_FLAGS)) in emit_op_imm()
810 return push_inst16(compiler, ADD | SET_REGS44(dst, arg2)); in emit_op_imm()
811 return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
813 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
814 return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
815 return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
823 if (IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
824 return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
825 return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
827 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
828 return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
829 return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
833 return push_inst32(compiler, MUL | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
834 SLJIT_ASSERT(dst != TMP_REG2); in emit_op_imm()
835 FAIL_IF(push_inst32(compiler, SMULL | RT4(dst) | RD4(TMP_REG2) | RN4(arg1) | RM4(arg2))); in emit_op_imm()
837 return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst)); in emit_op_imm()
839 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
840 return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2)); in emit_op_imm()
843 return push_inst32(compiler, AND_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
845 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
846 return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
847 return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
849 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
850 return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2)); in emit_op_imm()
851 return push_inst32(compiler, EOR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
853 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
854 return push_inst16(compiler, LSLS | RD3(dst) | RN3(arg2)); in emit_op_imm()
855 return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
857 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
858 return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
859 return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
861 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
862 return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
863 return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
952 static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, slji… in emit_set_delta() argument
956 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
959 return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
964 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
967 return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
1348 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1355 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1356 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1359 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1406 if (!(dst & SLJIT_MEM)) in sljit_emit_op1()
1409 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1417 return sljit_emit_op2(compiler, SLJIT_SUB | op_flags, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
1429 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_emit_op1()
1430 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1435 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1442 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1443 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1447 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) in sljit_emit_op2()
1450 dst_reg = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1472 if (dst == SLJIT_UNUSED) in sljit_emit_op2()
1477 if (!(dst & SLJIT_MEM)) in sljit_emit_op2()
1479 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG2); in sljit_emit_op2()
1586 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
1598 if (FAST_IS_REG(dst)) in sljit_emit_fop1_conv_sw_from_f64()
1599 return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1)); in sljit_emit_fop1_conv_sw_from_f64()
1602 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_sw_from_f64()
1606 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
1609 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_sw()
1626 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_sw()
1627 return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_f64_from_sw()
1652 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
1660 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1662 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1693 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1694 return emit_fop_mem(compiler, (op & SLJIT_F32_OP), dst_r, dst, dstw); in sljit_emit_fop1()
1699 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
1706 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1707 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1713 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1738 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1740 return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1749 …BUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1752 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1753 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1757 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1758 return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG2)); in sljit_emit_fast_enter()
1761 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, TMP_REG1); in sljit_emit_fast_enter()
2178 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
2185 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2186 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
2190 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
2202 if (!(dst & SLJIT_MEM)) in sljit_emit_op_flags()
2204 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
2207 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2208 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
2220 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2221 FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
2335 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
2341 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2342 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
2348 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
2351 if (dst & SLJIT_MEM) in sljit_emit_const()
2352 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_const()
2356 …ljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_put_label() argument
2362 CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); in sljit_emit_put_label()
2363 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_put_label()
2369 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_put_label()
2372 if (dst & SLJIT_MEM) in sljit_emit_put_label()
2373 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_put_label()