Lines Matching refs:dst

206 static SLJIT_INLINE sljit_si emit_imm32_const(struct sljit_compiler *compiler, sljit_si dst, sljit_…  in emit_imm32_const()  argument
208 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) | in emit_imm32_const()
210 return push_inst32(compiler, MOVT | RD4(dst) | in emit_imm32_const()
216 sljit_si dst = inst[1] & 0x0f00; in modify_imm32_const() local
217 …SLJIT_ASSERT(((inst[0] & 0xfbf0) == (MOVW >> 16)) && ((inst[2] & 0xfbf0) == (MOVT >> 16)) && dst =… in modify_imm32_const()
219 inst[1] = dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff); in modify_imm32_const()
221 inst[3] = dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16); in modify_imm32_const()
477 static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si dst, sljit_uw imm) in load_immediate() argument
484 return push_inst32(compiler, MOV_WI | RD4(dst) | tmp); in load_immediate()
487 return push_inst32(compiler, MVN_WI | RD4(dst) | tmp); in load_immediate()
491 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) | in load_immediate()
496 return push_inst32(compiler, MOVT | RD4(dst) | in load_immediate()
511 static sljit_si emit_op_imm(struct sljit_compiler *compiler, sljit_si flags, sljit_si dst, sljit_uw… in emit_op_imm() argument
537 return load_immediate(compiler, dst, imm); in emit_op_imm()
540 return load_immediate(compiler, dst, ~imm); in emit_op_imm()
546 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
548 return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
550 return push_inst16(compiler, SUBSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
551 if (reg == dst) { in emit_op_imm()
553 return push_inst16(compiler, ADDSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
555 return push_inst16(compiler, SUBSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
560 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
562 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
566 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
571 return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
575 if (!(flags & KEEP_FLAGS) && imm == 0 && IS_2_LO_REGS(reg, dst)) in emit_op_imm()
576 return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg)); in emit_op_imm()
579 return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
583 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
585 return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
587 return push_inst16(compiler, ADDSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
588 if (reg == dst) { in emit_op_imm()
590 return push_inst16(compiler, SUBSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
592 return push_inst16(compiler, ADDSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
599 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
601 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
605 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
612 return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
617 return push_inst32(compiler, ANDI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
620 return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
625 return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
628 return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
633 return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
643 return push_inst16(compiler, MOV | SET_REGS44(dst, reg)); in emit_op_imm()
644 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
645 return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg)); in emit_op_imm()
646 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg)); in emit_op_imm()
650 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg)) in emit_op_imm()
651 return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
652 return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
654 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg)) in emit_op_imm()
655 return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
656 return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
658 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg)) in emit_op_imm()
659 return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
660 return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
688 if (dst == arg2) in emit_op_imm()
690 return push_inst16(compiler, MOV | SET_REGS44(dst, arg2)); in emit_op_imm()
694 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
695 return push_inst16(compiler, UXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
696 return push_inst32(compiler, UXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
700 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
701 return push_inst16(compiler, SXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
702 return push_inst32(compiler, SXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
706 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
707 return push_inst16(compiler, UXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
708 return push_inst32(compiler, UXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
712 if (IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
713 return push_inst16(compiler, SXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
714 return push_inst32(compiler, SXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
717 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
718 return push_inst16(compiler, MVNS | RD3(dst) | RN3(arg2)); in emit_op_imm()
719 return push_inst32(compiler, MVN_W | (flags & SET_FLAGS) | RD4(dst) | RM4(arg2)); in emit_op_imm()
722 FAIL_IF(push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2))); in emit_op_imm()
724 if (reg_map[dst] <= 7) in emit_op_imm()
725 return push_inst16(compiler, CMPI | RDN3(dst)); in emit_op_imm()
726 return push_inst32(compiler, ADD_WI | SET_FLAGS | RN4(dst) | RD4(dst)); in emit_op_imm()
730 if (!(flags & KEEP_FLAGS) && IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
731 return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
732 if (dst == arg1 && !(flags & SET_FLAGS)) in emit_op_imm()
733 return push_inst16(compiler, ADD | SET_REGS44(dst, arg2)); in emit_op_imm()
734 return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
736 if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
737 return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
738 return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
740 if (!(flags & KEEP_FLAGS) && IS_3_LO_REGS(dst, arg1, arg2)) in emit_op_imm()
741 return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
742 return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
744 if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
745 return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
746 return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
749 return push_inst32(compiler, MUL | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
750 SLJIT_ASSERT(reg_map[TMP_REG2] <= 7 && dst != TMP_REG2); in emit_op_imm()
751 FAIL_IF(push_inst32(compiler, SMULL | RT4(dst) | RD4(TMP_REG2) | RN4(arg1) | RM4(arg2))); in emit_op_imm()
753 return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst)); in emit_op_imm()
756 if (dst == arg1 && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
757 return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2)); in emit_op_imm()
761 return push_inst32(compiler, AND_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
763 if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
764 return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
765 return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
767 if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
768 return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2)); in emit_op_imm()
769 return push_inst32(compiler, EOR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
771 if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
772 return push_inst16(compiler, LSLS | RD3(dst) | RN3(arg2)); in emit_op_imm()
773 return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
775 if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
776 return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
777 return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
779 if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2)) in emit_op_imm()
780 return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
781 return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
870 static sljit_si emit_set_delta(struct sljit_compiler *compiler, sljit_si dst, sljit_si reg, sljit_s… in emit_set_delta() argument
874 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
877 return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
882 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
885 return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
1315 sljit_si dst, sljit_sw dstw, in sljit_emit_op1() argument
1322 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1323 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1329 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1398 FAIL_IF(getput_arg(compiler, flags, dst_r, src, srcw, dst, dstw)); in sljit_emit_op1()
1405 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1406 if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1409 return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1419 return sljit_emit_op2(compiler, SLJIT_SUB | op_flags, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
1427 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src, srcw, dst, dstw)); in sljit_emit_op1()
1438 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1439 if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1442 return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1448 sljit_si dst, sljit_sw dstw, in sljit_emit_op2() argument
1455 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1456 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1463 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1466 …if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, WORD_SIZE | STORE | ARG_TEST, TMP_REG1, dst, d… in sljit_emit_op2()
1483 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) { in sljit_emit_op2()
1485 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1489 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1493 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1495 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1511 if (dst == SLJIT_UNUSED) in sljit_emit_op2()
1516 if (dst & SLJIT_MEM) { in sljit_emit_op2()
1518 getput_arg_fast(compiler, WORD_SIZE | STORE, dst_r, dst, dstw); in sljit_emit_op2()
1521 return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, 0, 0); in sljit_emit_op2()
1630 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1_convw_fromd() argument
1640 if (dst == SLJIT_UNUSED) in sljit_emit_fop1_convw_fromd()
1643 if (FAST_IS_REG(dst)) in sljit_emit_fop1_convw_fromd()
1644 return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1)); in sljit_emit_fop1_convw_fromd()
1647 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_convw_fromd()
1651 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1_convd_fromw() argument
1654 sljit_si dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_convd_fromw()
1669 if (dst & SLJIT_MEM) in sljit_emit_fop1_convd_fromw()
1670 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop1_convd_fromw()
1693 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1() argument
1705 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1707 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1735 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1736 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), dst_r, dst, dstw); in sljit_emit_fop1()
1741 sljit_si dst, sljit_sw dstw, in sljit_emit_fop2() argument
1748 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1749 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1757 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1782 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1784 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1793 …RIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1796 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1797 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1800 if (dst == SLJIT_UNUSED) in sljit_emit_fast_enter()
1803 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1804 return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG3)); in sljit_emit_fast_enter()
1807 if (getput_arg_fast(compiler, WORD_SIZE | STORE, TMP_REG3, dst, dstw)) in sljit_emit_fast_enter()
1813 return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, 0, 0); in sljit_emit_fast_enter()
1976 sljit_si dst, sljit_sw dstw, in sljit_emit_op_flags() argument
1984 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type)); in sljit_emit_op_flags()
1985 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
1988 if (dst == SLJIT_UNUSED) in sljit_emit_op_flags()
1993 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; in sljit_emit_op_flags()
2006 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw); in sljit_emit_op_flags()
2010 if ((op == SLJIT_OR || op == SLJIT_XOR) && FAST_IS_REG(dst) && dst == src) { in sljit_emit_op_flags()
2013 FAIL_IF(push_inst32(compiler, ins | RN4(src) | RD4(dst) | 1)); in sljit_emit_op_flags()
2016 if (reg_map[dst] <= 7) in sljit_emit_op_flags()
2017 return push_inst16(compiler, MOVS | RD3(TMP_REG1) | RN3(dst)); in sljit_emit_op_flags()
2018 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(TMP_REG1) | RM4(dst)); in sljit_emit_op_flags()
2026 FAIL_IF(emit_op_mem2(compiler, WORD_SIZE, TMP_REG2, src, srcw, dst, dstw)); in sljit_emit_op_flags()
2046 FAIL_IF(emit_op_mem2(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, 0, 0)); in sljit_emit_op_flags()
2057 …ct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, slj… in sljit_emit_const() argument
2063 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2064 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
2070 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
2073 if (dst & SLJIT_MEM) in sljit_emit_const()
2074 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw)); in sljit_emit_const()