Lines Matching refs:dst
136 static SLJIT_INLINE sljit_si emit_imm64_const(struct sljit_compiler *compiler, sljit_si dst, sljit_… in emit_imm64_const() argument
138 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in emit_imm64_const()
139 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 16) & 0xffff) << 5) | (1 << 21))); in emit_imm64_const()
140 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 32) & 0xffff) << 5) | (2 << 21))); in emit_imm64_const()
141 return push_inst(compiler, MOVK | RD(dst) | ((imm >> 48) << 5) | (3 << 21)); in emit_imm64_const()
146 sljit_si dst = inst[0] & 0x1f; in modify_imm64_const() local
148 inst[0] = MOVZ | dst | ((new_imm & 0xffff) << 5); in modify_imm64_const()
149 inst[1] = MOVK | dst | (((new_imm >> 16) & 0xffff) << 5) | (1 << 21); in modify_imm64_const()
150 inst[2] = MOVK | dst | (((new_imm >> 32) & 0xffff) << 5) | (2 << 21); in modify_imm64_const()
151 inst[3] = MOVK | dst | ((new_imm >> 48) << 5) | (3 << 21); in modify_imm64_const()
215 sljit_si dst; in sljit_generate_code() local
299 dst = buf_ptr[0] & 0x1f; in sljit_generate_code()
300 buf_ptr[0] = MOVZ | dst | ((addr & 0xffff) << 5); in sljit_generate_code()
301 buf_ptr[1] = MOVK | dst | (((addr >> 16) & 0xffff) << 5) | (1 << 21); in sljit_generate_code()
303 buf_ptr[2] = MOVK | dst | (((addr >> 32) & 0xffff) << 5) | (2 << 21); in sljit_generate_code()
305 buf_ptr[3] = MOVK | dst | (((addr >> 48) & 0xffff) << 5) | (3 << 21); in sljit_generate_code()
413 static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si dst, sljit_sw simm) in load_immediate() argument
420 return push_inst(compiler, MOVZ | RD(dst) | (imm << 5)); in load_immediate()
423 return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
427 return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
429 …return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21… in load_immediate()
432 return push_inst(compiler, (ORRI ^ W_OP) | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
437 return push_inst(compiler, ORRI | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
441 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in load_immediate()
442 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
446 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5))); in load_immediate()
447 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
474 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
477 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((~simm & 0xffff) << 5) | (i << 21))); in load_immediate()
490 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
493 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((simm & 0xffff) << 5) | (i << 21))); in load_immediate()
512 dst = TMP_ZERO; \
515 static sljit_si emit_op_imm(struct sljit_compiler *compiler, sljit_si flags, sljit_si dst, sljit_sw… in emit_op_imm() argument
552 return load_immediate(compiler, dst, imm); in emit_op_imm()
555 FAIL_IF(load_immediate(compiler, dst, (flags & INT_OP) ? (~imm & 0xffffffff) : ~imm)); in emit_op_imm()
565 return push_inst(compiler, ((op == SLJIT_ADD ? ADDI : SUBI) ^ inv_bits) | RD(dst) | RN(reg)); in emit_op_imm()
569 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (imm << 10)); in emit_op_imm()
574 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (nimm << 10)); in emit_op_imm()
578 …return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22)… in emit_op_imm()
582 …return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22… in emit_op_imm()
585 …FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22… in emit_op_imm()
586 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | ((imm & 0xfff) << 10)); in emit_op_imm()
589 …FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 2… in emit_op_imm()
590 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | ((nimm & 0xfff) << 10)); in emit_op_imm()
598 return push_inst(compiler, (ANDI ^ inv_bits) | RD(dst) | RN(reg) | inst_bits); in emit_op_imm()
608 FAIL_IF(push_inst(compiler, (inst_bits ^ inv_bits) | RD(dst) | RN(reg))); in emit_op_imm()
615 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | ((-imm & 0x1f) << 16) | ((31 … in emit_op_imm()
619 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | ((-imm & 0x3f) <<… in emit_op_imm()
630 FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (imm << 16) | (31 << 10))); in emit_op_imm()
634 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | (imm << 16) | (63… in emit_op_imm()
667 if (dst == arg2) in emit_op_imm()
669 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
673 return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
679 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
683 return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
689 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
693 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
695 return push_inst(compiler, (ORR ^ (1 << 31)) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
699 if ((flags & INT_OP) && dst == arg2) in emit_op_imm()
701 return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(arg2) | (31 << 10)); in emit_op_imm()
704 FAIL_IF(push_inst(compiler, (ORN ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2))); in emit_op_imm()
710 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2)); in emit_op_imm()
713 FAIL_IF(push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(arg2))); in emit_op_imm()
717 return push_inst(compiler, (ADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
720 return push_inst(compiler, (ADC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
723 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
726 return push_inst(compiler, (SBC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
729 return push_inst(compiler, (MADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO)); in emit_op_imm()
731 FAIL_IF(push_inst(compiler, SMADDL | RD(dst) | RN(arg1) | RM(arg2) | (31 << 10))); in emit_op_imm()
732 FAIL_IF(push_inst(compiler, ADD | RD(TMP_LR) | RN(TMP_ZERO) | RM(dst) | (2 << 22) | (31 << 10))); in emit_op_imm()
733 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
736 FAIL_IF(push_inst(compiler, MADD | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO))); in emit_op_imm()
737 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
740 return push_inst(compiler, (AND ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
742 FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
745 FAIL_IF(push_inst(compiler, (EOR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
748 FAIL_IF(push_inst(compiler, (LSLV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
751 FAIL_IF(push_inst(compiler, (LSRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
754 FAIL_IF(push_inst(compiler, (ASRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
763 return push_inst(compiler, (SUBS ^ inv_bits) | RD(TMP_ZERO) | RN(dst) | RM(TMP_ZERO)); in emit_op_imm()
809 static sljit_si emit_set_delta(struct sljit_compiler *compiler, sljit_si dst, sljit_si reg, sljit_s… in emit_set_delta() argument
813 return push_inst(compiler, ADDI | RD(dst) | RN(reg) | (value << 10)); in emit_set_delta()
815 return push_inst(compiler, ADDI | (1 << 22) | RD(dst) | RN(reg) | (value >> 2)); in emit_set_delta()
820 return push_inst(compiler, SUBI | RD(dst) | RN(reg) | (value << 10)); in emit_set_delta()
822 return push_inst(compiler, SUBI | (1 << 22) | RD(dst) | RN(reg) | (value >> 2)); in emit_set_delta()
1279 sljit_si dst, sljit_sw dstw, in sljit_emit_op1() argument
1286 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1287 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1293 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1378 FAIL_IF(getput_arg(compiler, flags, dst_r, src, srcw, dst, dstw)); in sljit_emit_op1()
1385 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1386 if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1389 return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1401 if (dst == SLJIT_UNUSED) in sljit_emit_op1()
1408 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src, srcw, dst, dstw)); in sljit_emit_op1()
1421 if (dst & SLJIT_MEM) { in sljit_emit_op1()
1422 if (getput_arg_fast(compiler, mem_flags | STORE, dst_r, dst, dstw)) in sljit_emit_op1()
1425 return getput_arg(compiler, mem_flags | STORE, dst_r, dst, dstw, 0, 0); in sljit_emit_op1()
1431 sljit_si dst, sljit_sw dstw, in sljit_emit_op2() argument
1438 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1439 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1446 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1454 if (dst == SLJIT_UNUSED) in sljit_emit_op2()
1457 …if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, mem_flags | STORE | ARG_TEST, TMP_REG1, dst, d… in sljit_emit_op2()
1474 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) { in sljit_emit_op2()
1476 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1480 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1484 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG1, src1, src1w, dst, dstw)); in sljit_emit_op2()
1486 FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src2, src2w, dst, dstw)); in sljit_emit_op2()
1504 if (dst & SLJIT_MEM) { in sljit_emit_op2()
1506 getput_arg_fast(compiler, mem_flags | STORE, dst_r, dst, dstw); in sljit_emit_op2()
1509 return getput_arg(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, 0, 0); in sljit_emit_op2()
1604 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1_convw_fromd() argument
1607 sljit_si dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_fop1_convw_fromd()
1620 if (dst_r == TMP_REG1 && dst != SLJIT_UNUSED) in sljit_emit_fop1_convw_fromd()
1621 …iler, ((GET_OPCODE(op) == SLJIT_CONVI_FROMD) ? INT_SIZE : WORD_SIZE) | STORE, TMP_REG1, dst, dstw); in sljit_emit_fop1_convw_fromd()
1626 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1_convd_fromw() argument
1629 sljit_si dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_convd_fromw()
1649 if (dst & SLJIT_MEM) in sljit_emit_fop1_convd_fromw()
1650 …t_fop_mem(compiler, ((op & SLJIT_SINGLE_OP) ? INT_SIZE : WORD_SIZE) | STORE, TMP_FREG1, dst, dstw); in sljit_emit_fop1_convd_fromw()
1675 sljit_si dst, sljit_sw dstw, in sljit_emit_fop1() argument
1686 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1689 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
1716 if (dst & SLJIT_MEM) in sljit_emit_fop1()
1717 return emit_fop_mem(compiler, mem_flags | STORE, dst_r, dst, dstw); in sljit_emit_fop1()
1722 sljit_si dst, sljit_sw dstw, in sljit_emit_fop2() argument
1730 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1731 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
1738 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
1763 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
1765 return emit_fop_mem(compiler, mem_flags | STORE, TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1772 …RIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw) in sljit_emit_fast_enter() argument
1775 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1776 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fast_enter()
1779 if (dst == SLJIT_UNUSED) in sljit_emit_fast_enter()
1782 if (FAST_IS_REG(dst)) in sljit_emit_fast_enter()
1783 return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(TMP_LR)); in sljit_emit_fast_enter()
1786 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_LR, dst, dstw); in sljit_emit_fast_enter()
1968 sljit_si dst, sljit_sw dstw, in sljit_emit_op_flags() argument
1976 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type)); in sljit_emit_op_flags()
1977 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
1980 if (dst == SLJIT_UNUSED) in sljit_emit_op_flags()
1984 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
1990 …p_mem(compiler, (GET_OPCODE(op) == SLJIT_MOV ? WORD_SIZE : INT_SIZE) | STORE, TMP_REG1, dst, dstw); in sljit_emit_op_flags()
2003 FAIL_IF(emit_op_mem2(compiler, mem_flags, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_op_flags()
2014 return emit_op_mem2(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, 0, 0); in sljit_emit_op_flags()
2017 …ct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, slj… in sljit_emit_const() argument
2023 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2024 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
2030 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
2033 if (dst & SLJIT_MEM) in sljit_emit_const()
2034 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw)); in sljit_emit_const()