Lines Matching refs:dst
137 static SLJIT_INLINE sljit_s32 emit_imm64_const(struct sljit_compiler *compiler, sljit_s32 dst, slji… in emit_imm64_const() argument
139 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in emit_imm64_const()
140 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 16) & 0xffff) << 5) | (1 << 21))); in emit_imm64_const()
141 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 32) & 0xffff) << 5) | (2 << 21))); in emit_imm64_const()
142 return push_inst(compiler, MOVK | RD(dst) | ((imm >> 48) << 5) | (3 << 21)); in emit_imm64_const()
147 sljit_s32 dst = inst[0] & 0x1f; in modify_imm64_const() local
149 inst[0] = MOVZ | dst | ((new_imm & 0xffff) << 5); in modify_imm64_const()
150 inst[1] = MOVK | dst | (((new_imm >> 16) & 0xffff) << 5) | (1 << 21); in modify_imm64_const()
151 inst[2] = MOVK | dst | (((new_imm >> 32) & 0xffff) << 5) | (2 << 21); in modify_imm64_const()
152 inst[3] = MOVK | dst | ((new_imm >> 48) << 5) | (3 << 21); in modify_imm64_const()
218 sljit_s32 dst; in sljit_generate_code() local
305 dst = buf_ptr[0] & 0x1f; in sljit_generate_code()
306 buf_ptr[0] = MOVZ | dst | ((addr & 0xffff) << 5); in sljit_generate_code()
307 buf_ptr[1] = MOVK | dst | (((addr >> 16) & 0xffff) << 5) | (1 << 21); in sljit_generate_code()
309 buf_ptr[2] = MOVK | dst | (((addr >> 32) & 0xffff) << 5) | (2 << 21); in sljit_generate_code()
311 buf_ptr[3] = MOVK | dst | (((addr >> 48) & 0xffff) << 5) | (3 << 21); in sljit_generate_code()
445 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw simm) in load_immediate() argument
452 return push_inst(compiler, MOVZ | RD(dst) | (imm << 5)); in load_immediate()
455 return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
459 return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
461 …return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21… in load_immediate()
464 return push_inst(compiler, (ORRI ^ W_OP) | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
469 return push_inst(compiler, ORRI | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
473 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in load_immediate()
474 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
478 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5))); in load_immediate()
479 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
506 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
509 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((~simm & 0xffff) << 5) | (i << 21))); in load_immediate()
522 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
525 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
544 dst = TMP_ZERO; \
547 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
584 return load_immediate(compiler, dst, imm); in emit_op_imm()
587 FAIL_IF(load_immediate(compiler, dst, (flags & INT_OP) ? (~imm & 0xffffffff) : ~imm)); in emit_op_imm()
597 return push_inst(compiler, ((op == SLJIT_ADD ? ADDI : SUBI) ^ inv_bits) | RD(dst) | RN(reg)); in emit_op_imm()
601 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (imm << 10)); in emit_op_imm()
606 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (nimm << 10)); in emit_op_imm()
610 …return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22)… in emit_op_imm()
614 …return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22… in emit_op_imm()
617 …FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22… in emit_op_imm()
618 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | ((imm & 0xfff) << 10)); in emit_op_imm()
621 …FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 2… in emit_op_imm()
622 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | ((nimm & 0xfff) << 10)); in emit_op_imm()
630 return push_inst(compiler, (ANDI ^ inv_bits) | RD(dst) | RN(reg) | inst_bits); in emit_op_imm()
640 FAIL_IF(push_inst(compiler, (inst_bits ^ inv_bits) | RD(dst) | RN(reg))); in emit_op_imm()
647 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | ((-imm & 0x1f) << 16) | ((31 … in emit_op_imm()
651 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | ((-imm & 0x3f) <<… in emit_op_imm()
662 FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (imm << 16) | (31 << 10))); in emit_op_imm()
666 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | (imm << 16) | (63… in emit_op_imm()
699 if (dst == arg2) in emit_op_imm()
701 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
705 return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
711 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
715 return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
721 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
725 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
727 return push_inst(compiler, (ORR ^ (1 << 31)) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
731 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
733 return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(arg2) | (31 << 10)); in emit_op_imm()
736 FAIL_IF(push_inst(compiler, (ORN ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2))); in emit_op_imm()
742 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
745 return push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(arg2)); in emit_op_imm()
748 return push_inst(compiler, (ADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
751 return push_inst(compiler, (ADC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
754 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
757 return push_inst(compiler, (SBC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
760 return push_inst(compiler, (MADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO)); in emit_op_imm()
762 FAIL_IF(push_inst(compiler, SMADDL | RD(dst) | RN(arg1) | RM(arg2) | (31 << 10))); in emit_op_imm()
763 FAIL_IF(push_inst(compiler, ADD | RD(TMP_LR) | RN(TMP_ZERO) | RM(dst) | (2 << 22) | (31 << 10))); in emit_op_imm()
764 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
767 FAIL_IF(push_inst(compiler, MADD | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO))); in emit_op_imm()
768 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
771 return push_inst(compiler, (AND ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
773 FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
776 FAIL_IF(push_inst(compiler, (EOR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
779 FAIL_IF(push_inst(compiler, (LSLV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
782 FAIL_IF(push_inst(compiler, (LSRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
785 FAIL_IF(push_inst(compiler, (ASRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
794 return push_inst(compiler, (SUBS ^ inv_bits) | RD(TMP_ZERO) | RN(dst) | RM(TMP_ZERO)); in emit_op_imm()
840 static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, slji… in emit_set_delta() argument
844 return push_inst(compiler, ADDI | RD(dst) | RN(reg) | (value << 10)); in emit_set_delta()
846 return push_inst(compiler, ADDI | (1 << 22) | RD(dst) | RN(reg) | (value >> 2)); in emit_set_delta()
851 return push_inst(compiler, SUBI | RD(dst) | RN(reg) | (value << 10)); in emit_set_delta()
853 return push_inst(compiler, SUBI | (1 << 22) | RD(dst) | RN(reg) | (value >> 2)); in emit_set_delta()
1306 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1313 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1314 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1320 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) { in sljit_emit_op1()
1325 dst = 5; in sljit_emit_op1()
1327 dst = 3; in sljit_emit_op1()
1329 dst = 1; in sljit_emit_op1()
1332 return emit_op_mem(compiler, WORD_SIZE | SIGNED, dst, src, srcw); in sljit_emit_op1()
1337 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1422 FAIL_IF(getput_arg(compiler, flags, dst_r, src, srcw, dst, dstw)); in sljit_emit_op1()
1429 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1430 if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1433 return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1445 if (dst == SLJIT_UNUSED) in sljit_emit_op1()
1452 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src, srcw, dst, dstw)); in sljit_emit_op1()
1465 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1466 if (getput_arg_fast(compiler, mem_flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1469 return getput_arg(compiler, mem_flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1475 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1482 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1483 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1490 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) in sljit_emit_op2()
1493 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1501 if (dst == SLJIT_UNUSED) in sljit_emit_op2()
1504 …if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, mem_flags | STORE | ARG_TEST, TMP_REG1, dst, d… in sljit_emit_op2()
1521 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) { in sljit_emit_op2()
1523 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1527 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1531 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1533 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1551 if (dst & SLJIT_MEM) { in sljit_emit_op2()
1553 getput_arg_fast(compiler, mem_flags | STORE, dst_r, dst, dstw); in sljit_emit_op2()
1556 return getput_arg(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, 0, 0); in sljit_emit_op2()
1641 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
1644 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_fop1_conv_sw_from_f64()
1657 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_sw_from_f64()
1658 …((GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64) ? INT_SIZE : WORD_SIZE) | STORE, TMP_REG1, dst, dstw); in sljit_emit_fop1_conv_sw_from_f64()
1663 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
1666 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_sw()
1686 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_sw()
1687 …emit_fop_mem(compiler, ((op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE) | STORE, TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_f64_from_sw()
1712 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
1723 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1726 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1753 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1754 return emit_fop_mem(compiler, mem_flags | STORE, dst_r, dst, dstw); in sljit_emit_fop1()
1759 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
1767 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1768 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1775 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1800 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1802 return emit_fop_mem(compiler, mem_flags | STORE, TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1809 …BUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1812 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1813 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1815 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1816 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(TMP_LR)); in sljit_emit_fast_enter()
1819 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_LR, dst, dstw); in sljit_emit_fast_enter()
2001 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
2008 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2009 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
2012 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
2018 …p_mem(compiler, (GET_OPCODE(op) == SLJIT_MOV ? WORD_SIZE : INT_SIZE) | STORE, TMP_REG1, dst, dstw); in sljit_emit_op_flags()
2030 src_r = dst; in sljit_emit_op_flags()
2032 if (dst & SLJIT_MEM) { in sljit_emit_op_flags()
2033 FAIL_IF(emit_op_mem2(compiler, mem_flags, TMP_REG1, dst, dstw, dst, dstw)); in sljit_emit_op_flags()
2040 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2041 return emit_op_mem2(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, 0, 0); in sljit_emit_op_flags()
2069 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
2075 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2076 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
2082 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
2085 if (dst & SLJIT_MEM) in sljit_emit_const()
2086 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw)); in sljit_emit_const()