Lines Matching refs:dst
146 static SLJIT_INLINE sljit_s32 emit_imm64_const(struct sljit_compiler *compiler, sljit_s32 dst, slji… in emit_imm64_const() argument
148 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in emit_imm64_const()
149 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 16) & 0xffff) << 5) | (1 << 21))); in emit_imm64_const()
150 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 32) & 0xffff) << 5) | (2 << 21))); in emit_imm64_const()
151 return push_inst(compiler, MOVK | RD(dst) | ((imm >> 48) << 5) | (3 << 21)); in emit_imm64_const()
156 sljit_s32 dst = inst[0] & 0x1f; in modify_imm64_const() local
158 inst[0] = MOVZ | dst | ((new_imm & 0xffff) << 5); in modify_imm64_const()
159 inst[1] = MOVK | dst | (((new_imm >> 16) & 0xffff) << 5) | (1 << 21); in modify_imm64_const()
160 inst[2] = MOVK | dst | (((new_imm >> 32) & 0xffff) << 5) | (2 << 21); in modify_imm64_const()
161 inst[3] = MOVK | dst | ((new_imm >> 48) << 5) | (3 << 21); in modify_imm64_const()
228 sljit_s32 dst; in sljit_generate_code() local
315 dst = buf_ptr[0] & 0x1f; in sljit_generate_code()
316 buf_ptr[0] = MOVZ | dst | ((addr & 0xffff) << 5); in sljit_generate_code()
317 buf_ptr[1] = MOVK | dst | (((addr >> 16) & 0xffff) << 5) | (1 << 21); in sljit_generate_code()
319 buf_ptr[2] = MOVK | dst | (((addr >> 32) & 0xffff) << 5) | (2 << 21); in sljit_generate_code()
321 buf_ptr[3] = MOVK | dst | (((addr >> 48) & 0xffff) << 5) | (3 << 21); in sljit_generate_code()
456 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw simm) in load_immediate() argument
464 return push_inst(compiler, MOVZ | RD(dst) | (imm << 5)); in load_immediate()
467 return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
471 return push_inst(compiler, MOVZ | RD(dst) | ((imm >> 16) << 5) | (1 << 21)); in load_immediate()
473 return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
475 …return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21… in load_immediate()
479 return push_inst(compiler, (ORRI ^ W_OP) | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
481 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in load_immediate()
482 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
487 return push_inst(compiler, ORRI | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
491 return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
493 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5))); in load_immediate()
494 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
520 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
523 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((~simm & 0xffff) << 5) | (i << 21))); in load_immediate()
536 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
539 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
555 dst = TMP_ZERO; \
558 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
595 return load_immediate(compiler, dst, imm); in emit_op_imm()
598 FAIL_IF(load_immediate(compiler, dst, (flags & INT_OP) ? (~imm & 0xffffffff) : ~imm)); in emit_op_imm()
608 return push_inst(compiler, ((op == SLJIT_ADD ? ADDI : SUBI) ^ inv_bits) | RD(dst) | RN(reg)); in emit_op_imm()
612 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (imm << 10)); in emit_op_imm()
617 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (nimm << 10)); in emit_op_imm()
621 …return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22)… in emit_op_imm()
625 …return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22… in emit_op_imm()
628 …FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22… in emit_op_imm()
629 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | ((imm & 0xfff) << 10)); in emit_op_imm()
632 …FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 2… in emit_op_imm()
633 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | ((nimm & 0xfff) << 10)); in emit_op_imm()
641 return push_inst(compiler, (ANDI ^ inv_bits) | RD(dst) | RN(reg) | inst_bits); in emit_op_imm()
651 FAIL_IF(push_inst(compiler, (inst_bits ^ inv_bits) | RD(dst) | RN(reg))); in emit_op_imm()
658 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | ((-imm & 0x1f) << 16) | ((31 … in emit_op_imm()
662 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | ((-imm & 0x3f) <<… in emit_op_imm()
673 FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (imm << 16) | (31 << 10))); in emit_op_imm()
677 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | (imm << 16) | (63… in emit_op_imm()
708 if (dst == arg2) in emit_op_imm()
710 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
713 return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
718 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
721 return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
726 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
729 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
731 return push_inst(compiler, (ORR ^ (1 << 31)) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
734 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
736 return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(arg2) | (31 << 10)); in emit_op_imm()
739 FAIL_IF(push_inst(compiler, (ORN ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2))); in emit_op_imm()
745 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
748 return push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(arg2)); in emit_op_imm()
751 return push_inst(compiler, (ADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
754 return push_inst(compiler, (ADC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
757 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
760 return push_inst(compiler, (SBC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
763 return push_inst(compiler, (MADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO)); in emit_op_imm()
765 FAIL_IF(push_inst(compiler, SMADDL | RD(dst) | RN(arg1) | RM(arg2) | (31 << 10))); in emit_op_imm()
766 FAIL_IF(push_inst(compiler, ADD | RD(TMP_LR) | RN(TMP_ZERO) | RM(dst) | (2 << 22) | (31 << 10))); in emit_op_imm()
767 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
770 FAIL_IF(push_inst(compiler, MADD | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO))); in emit_op_imm()
771 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
774 return push_inst(compiler, (AND ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
776 FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
779 FAIL_IF(push_inst(compiler, (EOR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
782 FAIL_IF(push_inst(compiler, (LSLV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
785 FAIL_IF(push_inst(compiler, (LSRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
788 FAIL_IF(push_inst(compiler, (ASRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
797 return push_inst(compiler, (SUBS ^ inv_bits) | RD(TMP_ZERO) | RN(dst) | RM(TMP_ZERO)); in emit_op_imm()
1114 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1121 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1122 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1125 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) { in sljit_emit_op1()
1130 dst = 5; in sljit_emit_op1()
1132 dst = 3; in sljit_emit_op1()
1134 dst = 1; in sljit_emit_op1()
1137 return emit_op_mem(compiler, WORD_SIZE | SIGNED, dst, src, srcw, TMP_REG1); in sljit_emit_op1()
1142 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1198 if (dst & SLJIT_MEM) in sljit_emit_op1()
1199 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1211 if (dst == SLJIT_UNUSED) in sljit_emit_op1()
1221 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_emit_op1()
1222 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1227 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1234 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1235 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1239 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) in sljit_emit_op2()
1242 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1251 if (dst == SLJIT_UNUSED) in sljit_emit_op2()
1276 if (dst & SLJIT_MEM) in sljit_emit_op2()
1277 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op2()
1356 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
1359 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_fop1_conv_sw_from_f64()
1372 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_sw_from_f64()
1373 …DE(op) == SLJIT_CONV_S32_FROM_F64) ? INT_SIZE : WORD_SIZE) | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_fop1_conv_sw_from_f64()
1378 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
1381 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_sw()
1401 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_sw()
1402 …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()
1427 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
1436 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1439 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1466 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1467 return emit_fop_mem(compiler, mem_flags | STORE, dst_r, dst, dstw); in sljit_emit_fop1()
1472 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
1480 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1481 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1485 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1510 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1512 return emit_fop_mem(compiler, mem_flags | STORE, TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1519 …BUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1522 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1523 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1525 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1526 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(TMP_LR)); in sljit_emit_fast_enter()
1529 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_LR, dst, dstw, TMP_REG1); in sljit_emit_fast_enter()
1739 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
1746 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
1747 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
1750 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
1757 return emit_op_mem(compiler, mem_flags, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
1771 src_r = dst; in sljit_emit_op_flags()
1773 if (dst & SLJIT_MEM) { in sljit_emit_op_flags()
1774 FAIL_IF(emit_op_mem(compiler, mem_flags, TMP_REG1, dst, dstw, TMP_REG1)); in sljit_emit_op_flags()
1781 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
1782 return emit_op_mem(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
1889 … sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_get_local_base() argument
1895 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset)); in sljit_get_local_base()
1899 dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_get_local_base()
1924 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_get_local_base()
1925 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG1); in sljit_get_local_base()
1929 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
1935 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
1936 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
1942 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
1945 if (dst & SLJIT_MEM) in sljit_emit_const()
1946 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_const()