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()
1283 sljit_si dst, sljit_sw dstw, in sljit_emit_op1() argument
1290 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1291 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1297 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1366 FAIL_IF(getput_arg(compiler, flags, dst_r, src, srcw, dst, dstw)); in sljit_emit_op1()
1373 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1374 if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1377 return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1387 return sljit_emit_op2(compiler, SLJIT_SUB | op_flags, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
1395 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src, srcw, dst, dstw)); in sljit_emit_op1()
1406 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1407 if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1410 return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1416 sljit_si dst, sljit_sw dstw, in sljit_emit_op2() argument
1423 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1424 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1431 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1434 …if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, WORD_SIZE | STORE | ARG_TEST, TMP_REG1, dst, d… in sljit_emit_op2()
1451 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) { in sljit_emit_op2()
1453 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1457 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1461 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1463 FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1479 if (dst == SLJIT_UNUSED) in sljit_emit_op2()
1484 if (dst & SLJIT_MEM) { in sljit_emit_op2()
1486 getput_arg_fast(compiler, WORD_SIZE | STORE, dst_r, dst, dstw); in sljit_emit_op2()
1489 return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, 0, 0); in sljit_emit_op2()
1598 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1_convw_fromd() argument
1608 if (dst == SLJIT_UNUSED) in sljit_emit_fop1_convw_fromd()
1611 if (FAST_IS_REG(dst)) in sljit_emit_fop1_convw_fromd()
1612 return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1)); in sljit_emit_fop1_convw_fromd()
1615 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_convw_fromd()
1619 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1_convd_fromw() argument
1622 sljit_si dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_convd_fromw()
1637 if (dst & SLJIT_MEM) in sljit_emit_fop1_convd_fromw()
1638 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop1_convd_fromw()
1661 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1() argument
1673 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1675 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1703 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1704 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), dst_r, dst, dstw); in sljit_emit_fop1()
1709 sljit_si dst, sljit_sw dstw, in sljit_emit_fop2() argument
1716 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1717 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1725 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1750 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1752 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1761 …RIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1764 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1765 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1768 if (dst == SLJIT_UNUSED) in sljit_emit_fast_enter()
1771 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1772 return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG3)); in sljit_emit_fast_enter()
1775 if (getput_arg_fast(compiler, WORD_SIZE | STORE, TMP_REG3, dst, dstw)) in sljit_emit_fast_enter()
1781 return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, 0, 0); in sljit_emit_fast_enter()
1944 sljit_si dst, sljit_sw dstw, in sljit_emit_op_flags() argument
1952 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type)); in sljit_emit_op_flags()
1953 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
1956 if (dst == SLJIT_UNUSED) in sljit_emit_op_flags()
1961 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; in sljit_emit_op_flags()
1974 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw); in sljit_emit_op_flags()
1978 if ((op == SLJIT_OR || op == SLJIT_XOR) && FAST_IS_REG(dst) && dst == src) { in sljit_emit_op_flags()
1981 FAIL_IF(push_inst32(compiler, ins | RN4(src) | RD4(dst) | 1)); in sljit_emit_op_flags()
1984 if (reg_map[dst] <= 7) in sljit_emit_op_flags()
1985 return push_inst16(compiler, MOVS | RD3(TMP_REG1) | RN3(dst)); in sljit_emit_op_flags()
1986 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(TMP_REG1) | RM4(dst)); in sljit_emit_op_flags()
1994 FAIL_IF(emit_op_mem2(compiler, WORD_SIZE, TMP_REG2, src, srcw, dst, dstw)); in sljit_emit_op_flags()
2014 FAIL_IF(emit_op_mem2(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, 0, 0)); in sljit_emit_op_flags()
2025 …ct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, slj… in sljit_emit_const() argument
2031 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2032 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
2038 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
2041 if (dst & SLJIT_MEM) in sljit_emit_const()
2042 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw)); in sljit_emit_const()