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()
235 sljit_s32 dst; in sljit_generate_code() local
337 dst = buf_ptr[0] & 0x1f; in sljit_generate_code()
338 buf_ptr[0] = MOVZ | dst | ((addr & 0xffff) << 5); in sljit_generate_code()
339 buf_ptr[1] = MOVK | dst | (((addr >> 16) & 0xffff) << 5) | (1 << 21); in sljit_generate_code()
341 buf_ptr[2] = MOVK | dst | (((addr >> 32) & 0xffff) << 5) | (2 << 21); in sljit_generate_code()
343 buf_ptr[3] = MOVK | dst | (((addr >> 48) & 0xffff) << 5) | (3 << 21); in sljit_generate_code()
497 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw simm) in load_immediate() argument
505 return push_inst(compiler, MOVZ | RD(dst) | (imm << 5)); in load_immediate()
508 return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
512 return push_inst(compiler, MOVZ | RD(dst) | ((imm >> 16) << 5) | (1 << 21)); in load_immediate()
514 return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
516 …return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21… in load_immediate()
520 return push_inst(compiler, (ORRI ^ W_OP) | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
522 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in load_immediate()
523 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
528 return push_inst(compiler, ORRI | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
532 return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
534 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5))); in load_immediate()
535 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
561 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
564 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((~simm & 0xffff) << 5) | (i << 21))); in load_immediate()
577 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
580 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
596 dst = TMP_ZERO; \
599 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
636 return load_immediate(compiler, dst, imm); in emit_op_imm()
639 FAIL_IF(load_immediate(compiler, dst, (flags & INT_OP) ? (~imm & 0xffffffff) : ~imm)); in emit_op_imm()
650 return push_inst(compiler, ((op == SLJIT_ADD ? ADDI : SUBI) ^ inv_bits) | RD(dst) | RN(reg)); in emit_op_imm()
654 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (imm << 10)); in emit_op_imm()
659 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (nimm << 10)); in emit_op_imm()
663 …return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22)… in emit_op_imm()
667 …return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22… in emit_op_imm()
670 …FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22… in emit_op_imm()
671 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | ((imm & 0xfff) << 10)); in emit_op_imm()
674 …FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 2… in emit_op_imm()
675 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | ((nimm & 0xfff) << 10)); in emit_op_imm()
683 return push_inst(compiler, (ANDI ^ inv_bits) | RD(dst) | RN(reg) | inst_bits); in emit_op_imm()
693 FAIL_IF(push_inst(compiler, (inst_bits ^ inv_bits) | RD(dst) | RN(reg))); in emit_op_imm()
700 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | ((-imm & 0x1f) << 16) | ((31 … in emit_op_imm()
704 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | ((-imm & 0x3f) <<… in emit_op_imm()
715 FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (imm << 16) | (31 << 10))); in emit_op_imm()
719 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | (imm << 16) | (63… in emit_op_imm()
750 if (dst == arg2) in emit_op_imm()
752 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
755 return push_inst(compiler, (UBFM ^ W_OP) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
760 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
763 return push_inst(compiler, (UBFM ^ W_OP) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
768 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
771 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
773 return push_inst(compiler, (ORR ^ W_OP) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
776 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
778 return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(arg2) | (31 << 10)); in emit_op_imm()
781 FAIL_IF(push_inst(compiler, (ORN ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2))); in emit_op_imm()
788 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
791 return push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(arg2)); in emit_op_imm()
795 return push_inst(compiler, (ADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
798 return push_inst(compiler, (ADC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
802 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
805 return push_inst(compiler, (SBC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
809 return push_inst(compiler, (MADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO)); in emit_op_imm()
811 FAIL_IF(push_inst(compiler, SMADDL | RD(dst) | RN(arg1) | RM(arg2) | (31 << 10))); in emit_op_imm()
812 FAIL_IF(push_inst(compiler, ADD | RD(TMP_LR) | RN(TMP_ZERO) | RM(dst) | (2 << 22) | (31 << 10))); in emit_op_imm()
813 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
816 FAIL_IF(push_inst(compiler, MADD | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO))); in emit_op_imm()
817 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
820 return push_inst(compiler, (AND ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
822 FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
825 FAIL_IF(push_inst(compiler, (EOR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
828 FAIL_IF(push_inst(compiler, (LSLV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
831 FAIL_IF(push_inst(compiler, (LSRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
834 FAIL_IF(push_inst(compiler, (ASRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
843 return push_inst(compiler, (SUBS ^ inv_bits) | RD(TMP_ZERO) | RN(dst) | RM(TMP_ZERO)); in emit_op_imm()
1163 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1170 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1171 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1174 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1230 if (dst & SLJIT_MEM) in sljit_emit_op1()
1231 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1243 if (dst == SLJIT_UNUSED) in sljit_emit_op1()
1253 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_emit_op1()
1254 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1259 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1266 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1267 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1271 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) in sljit_emit_op2()
1274 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1283 if (dst == SLJIT_UNUSED) in sljit_emit_op2()
1308 if (dst & SLJIT_MEM) in sljit_emit_op2()
1309 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op2()
1428 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
1431 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_fop1_conv_sw_from_f64()
1444 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_sw_from_f64()
1445 …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()
1450 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
1453 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_sw()
1473 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_sw()
1474 …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()
1499 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
1508 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1511 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1538 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1539 return emit_fop_mem(compiler, mem_flags | STORE, dst_r, dst, dstw); in sljit_emit_fop1()
1544 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
1552 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1553 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1557 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1582 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1584 return emit_fop_mem(compiler, mem_flags | STORE, TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1591 …BUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1594 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1595 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1597 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1598 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(TMP_LR)); in sljit_emit_fast_enter()
1601 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_LR, dst, dstw, TMP_REG1); in sljit_emit_fast_enter()
1801 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
1808 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
1809 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
1812 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
1819 return emit_op_mem(compiler, mem_flags, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
1833 src_r = dst; in sljit_emit_op_flags()
1835 if (dst & SLJIT_MEM) { in sljit_emit_op_flags()
1836 FAIL_IF(emit_op_mem(compiler, mem_flags, TMP_REG1, dst, dstw, TMP_REG1)); in sljit_emit_op_flags()
1843 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
1844 return emit_op_mem(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
1951 … sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_get_local_base() argument
1957 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset)); in sljit_get_local_base()
1961 dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_get_local_base()
1986 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_get_local_base()
1987 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG1); in sljit_get_local_base()
1991 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
1997 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
1998 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
2004 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
2007 if (dst & SLJIT_MEM) in sljit_emit_const()
2008 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_const()
2012 …ljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_put_label() argument
2018 CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); in sljit_emit_put_label()
2019 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_put_label()
2021 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_put_label()
2028 if (dst & SLJIT_MEM) in sljit_emit_put_label()
2029 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_put_label()
2037 sljit_s32 dst; in sljit_set_jump_addr() local
2042 dst = inst[0] & 0x1f; in sljit_set_jump_addr()
2044 inst[0] = MOVZ | dst | ((new_target & 0xffff) << 5); in sljit_set_jump_addr()
2045 inst[1] = MOVK | dst | (((new_target >> 16) & 0xffff) << 5) | (1 << 21); in sljit_set_jump_addr()
2046 inst[2] = MOVK | dst | (((new_target >> 32) & 0xffff) << 5) | (2 << 21); in sljit_set_jump_addr()
2047 inst[3] = MOVK | dst | ((new_target >> 48) << 5) | (3 << 21); in sljit_set_jump_addr()