Lines Matching refs:dst

199 static SLJIT_INLINE sljit_s32 emit_imm64_const(struct sljit_compiler *compiler, sljit_s32 dst, slji…  in emit_imm64_const()  argument
201 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((sljit_ins)(imm & 0xffff) << 5))); in emit_imm64_const()
202 …FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)(imm >> 16) & 0xffff) << 5) | (1 << 21))… in emit_imm64_const()
203 …FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)(imm >> 32) & 0xffff) << 5) | (2 << 21))… in emit_imm64_const()
204 return push_inst(compiler, MOVK | RD(dst) | ((sljit_ins)(imm >> 48) << 5) | (3 << 21)); in emit_imm64_const()
316 sljit_u32 dst; in generate_jump_or_mov_addr() local
334 dst = (buf_ptr[0] >> 5) & 0x1f; in generate_jump_or_mov_addr()
339 … ADRP | (((sljit_ins)(addr >> 12) & 0x3) << 29) | (((sljit_ins)(addr >> 14) & 0x7ffff) << 5) | dst; in generate_jump_or_mov_addr()
340 buf_ptr[1] = ADDI | dst | (dst << 5) | ((sljit_ins)(addr & 0xfff) << 10); in generate_jump_or_mov_addr()
344 dst = *buf_ptr; in generate_jump_or_mov_addr()
349 …f_ptr[0] = ADR | (((sljit_ins)addr & 0x3) << 29) | (((sljit_ins)(addr >> 2) & 0x7ffff) << 5) | dst; in generate_jump_or_mov_addr()
356 … ADRP | (((sljit_ins)(addr >> 12) & 0x3) << 29) | (((sljit_ins)(addr >> 14) & 0x7ffff) << 5) | dst; in generate_jump_or_mov_addr()
357 buf_ptr[1] = ADDI | dst | (dst << 5) | ((sljit_ins)(addr & 0xfff) << 10); in generate_jump_or_mov_addr()
365 buf_ptr[0] = MOVZ | (((sljit_ins)addr & 0xffff) << 5) | dst; in generate_jump_or_mov_addr()
366 buf_ptr[1] = MOVK | (((sljit_ins)(addr >> 16) & 0xffff) << 5) | (1 << 21) | dst; in generate_jump_or_mov_addr()
368 buf_ptr[2] = MOVK | (((sljit_ins)(addr >> 32) & 0xffff) << 5) | (2 << 21) | dst; in generate_jump_or_mov_addr()
371 buf_ptr[3] = MOVK | ((sljit_ins)((sljit_uw)addr >> 48) << 5) | (3 << 21) | dst; in generate_jump_or_mov_addr()
714 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw simm) in load_immediate() argument
722 return push_inst(compiler, MOVZ | RD(dst) | ((sljit_ins)imm << 5)); in load_immediate()
725 return push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)~imm & 0xffff) << 5)); in load_immediate()
729 return push_inst(compiler, MOVZ | RD(dst) | ((sljit_ins)(imm >> 16) << 5) | (1 << 21)); in load_immediate()
731 return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | (((sljit_ins)~imm & 0xffff) << 5)); in load_immediate()
733 …return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | (((sljit_ins)~imm & 0xffff0000u) >> (16 - 5))… in load_immediate()
737 return push_inst(compiler, (ORRI ^ W_OP) | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
739 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | (((sljit_ins)imm & 0xffff) << 5))); in load_immediate()
740 …return push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)imm & 0xffff0000u) >> (16 - 5)) | (1 << 2… in load_immediate()
745 return push_inst(compiler, ORRI | RD(dst) | RN(TMP_ZERO) | bitmask); in load_immediate()
749 …return push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)~imm & 0xffff0000u) >> (16 - 5)) | (1 << … in load_immediate()
751 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)~imm & 0xffff) << 5))); in load_immediate()
752 …return push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)imm & 0xffff0000u) >> (16 - 5)) | (1 << 2… in load_immediate()
778 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | (((sljit_ins)simm & 0xffff) << 5) | (i << 21))); in load_immediate()
781 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)~simm & 0xffff) << 5) | (i << 21))); in load_immediate()
794 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | (((sljit_ins)simm & 0xffff) << 5) | (i << 21))); in load_immediate()
797 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((sljit_ins)simm & 0xffff) << 5) | (i << 21))); in load_immediate()
813 dst = TMP_ZERO; \
816 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
859 return load_immediate(compiler, dst, imm); in emit_op_imm()
872 return push_inst(compiler, ((op == SLJIT_ADD ? ADDI : SUBI) ^ inv_bits) | RD(dst) | RN(reg)); in emit_op_imm()
876 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((sljit_ins)imm << 10)); in emit_op_imm()
881 return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((sljit_ins)nimm << 10)); in emit_op_imm()
885 …return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)imm >> 12) << 10) … in emit_op_imm()
889 …return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)nimm >> 12) << 10)… in emit_op_imm()
892 …FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)imm >> 12) << 10)… in emit_op_imm()
893 …return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | (((sljit_ins)imm & 0xfff) << 10… in emit_op_imm()
896 …FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (((sljit_ins)nimm >> 12) << 10… in emit_op_imm()
897 …return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | (((sljit_ins)nimm & 0xfff) << 1… in emit_op_imm()
905 return push_inst(compiler, (ANDI ^ inv_bits) | RD(dst) | RN(reg) | inst_bits); in emit_op_imm()
908 FAIL_IF(push_inst(compiler, (ORN ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(reg))); in emit_op_imm()
920 FAIL_IF(push_inst(compiler, (inst_bits ^ inv_bits) | RD(dst) | RN(reg))); in emit_op_imm()
936 FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | inst_bits)); in emit_op_imm()
957 FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | inst_bits)); in emit_op_imm()
968 …return push_inst(compiler, (EXTR ^ (inv_bits | (inv_bits >> 9))) | RD(dst) | RN(arg1) | RM(arg1) |… in emit_op_imm()
997 if (dst == arg2) in emit_op_imm()
999 return push_inst(compiler, MOV | RD(dst) | RM(arg2)); in emit_op_imm()
1003 return push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
1007 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10)); in emit_op_imm()
1011 return push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
1015 return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10)); in emit_op_imm()
1018 if (dst == arg2) in emit_op_imm()
1023 return push_inst(compiler, (MOV ^ W_OP) | RD(dst) | RM(arg2)); in emit_op_imm()
1026 return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(arg2) | (31 << 10)); in emit_op_imm()
1029 return push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(arg2)); in emit_op_imm()
1032 FAIL_IF(push_inst(compiler, (RBIT ^ inv_bits) | RD(dst) | RN(arg2))); in emit_op_imm()
1033 return push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(dst)); in emit_op_imm()
1037 return push_inst(compiler, (REV ^ inv_bits) | RD(dst) | RN(arg2)); in emit_op_imm()
1040 SLJIT_ASSERT(arg1 == TMP_REG1 && dst != TMP_REG2); in emit_op_imm()
1041 FAIL_IF(push_inst(compiler, (REV16 ^ (sljit_ins)0x80000000) | RD(dst) | RN(arg2))); in emit_op_imm()
1042 if (dst == TMP_REG1 || (arg2 == TMP_REG2 && op == SLJIT_REV_U16)) in emit_op_imm()
1045 …return push_inst(compiler, ((op == SLJIT_REV_U16 ? UBFM : SBFM) ^ inv_bits) | RD(dst) | RN(dst) | … in emit_op_imm()
1048 SLJIT_ASSERT(arg1 == TMP_REG1 && dst != TMP_REG2); in emit_op_imm()
1049 FAIL_IF(push_inst(compiler, (REV ^ (sljit_ins)0x80000400) | RD(dst) | RN(arg2))); in emit_op_imm()
1050 if (op == SLJIT_REV_U32 || dst == TMP_REG1) in emit_op_imm()
1052 return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(dst) | (31 << 10)); in emit_op_imm()
1056 return push_inst(compiler, (ADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
1060 return push_inst(compiler, (ADC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
1064 return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
1068 return push_inst(compiler, (SBC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
1072 return push_inst(compiler, (MADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO)); in emit_op_imm()
1074 FAIL_IF(push_inst(compiler, SMADDL | RD(dst) | RN(arg1) | RM(arg2) | (31 << 10))); in emit_op_imm()
1075 FAIL_IF(push_inst(compiler, ADD | RD(TMP_LR) | RN(TMP_ZERO) | RM(dst) | (2 << 22) | (31 << 10))); in emit_op_imm()
1076 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
1079 FAIL_IF(push_inst(compiler, MADD | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO))); in emit_op_imm()
1080 return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10)); in emit_op_imm()
1083 return push_inst(compiler, (AND ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
1085 FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
1088 FAIL_IF(push_inst(compiler, (EOR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
1092 FAIL_IF(push_inst(compiler, (LSLV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
1096 FAIL_IF(push_inst(compiler, (LSRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
1100 FAIL_IF(push_inst(compiler, (ASRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2))); in emit_op_imm()
1107 return push_inst(compiler, (RORV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)); in emit_op_imm()
1110 return push_inst(compiler, (MADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2) | RT2(dst)); in emit_op_imm()
1118 return push_inst(compiler, (SUBS ^ inv_bits) | RD(TMP_ZERO) | RN(dst) | RM(TMP_ZERO)); in emit_op_imm()
1566 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1573 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1574 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1577 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op1()
1582 if (FAST_IS_REG(dst) && FAST_IS_REG(src)) in sljit_emit_op1()
1634 if (dst & SLJIT_MEM) in sljit_emit_op1()
1635 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1667 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_emit_op1()
1668 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1673 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1680 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1681 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1685 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op2()
1694 if (dst == TMP_REG2) in sljit_emit_op2()
1719 if (dst & SLJIT_MEM) in sljit_emit_op2()
1720 return emit_op_mem(compiler, mem_flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op2()
1862 sljit_s32 dst, sljit_sw dstw) in sljit_emit_op_dst() argument
1867 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw)); in sljit_emit_op_dst()
1868 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_dst()
1872 if (FAST_IS_REG(dst)) in sljit_emit_op_dst()
1873 return push_inst(compiler, MOV | RD(dst) | RM(TMP_LR)); in sljit_emit_op_dst()
1876 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_dst()
1881 if (dst & SLJIT_MEM) in sljit_emit_op_dst()
1882 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op_dst()
1964 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
1967 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_fop1_conv_sw_from_f64()
1980 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_sw_from_f64()
1981 …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()
1986 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_w() argument
1989 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_w()
2001 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_w()
2002 …return emit_fop_mem(compiler, ((ins & (1 << 22)) ? WORD_SIZE : INT_SIZE) | STORE, TMP_FREG1, dst, … in sljit_emit_fop1_conv_f64_from_w()
2007 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
2019 return sljit_emit_fop1_conv_f64_from_w(compiler, SCVTF ^ inv_bits, dst, dstw, src, srcw); in sljit_emit_fop1_conv_f64_from_sw()
2023 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_uw() argument
2035 return sljit_emit_fop1_conv_f64_from_w(compiler, UCVTF ^ inv_bits, dst, dstw, src, srcw); in sljit_emit_fop1_conv_f64_from_uw()
2065 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
2074 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2077 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
2087 if (!(dst & SLJIT_MEM)) in sljit_emit_fop1()
2104 if (dst & SLJIT_MEM) in sljit_emit_fop1()
2105 return emit_fop_mem(compiler, mem_flags | STORE, dst_r, dst, dstw); in sljit_emit_fop1()
2110 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
2118 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2119 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
2123 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop2()
2153 if (!(dst & SLJIT_MEM)) in sljit_emit_fop2()
2155 return emit_fop_mem(compiler, mem_flags | STORE, TMP_FREG1, dst, dstw); in sljit_emit_fop2()
2478 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
2485 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2486 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
2489 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_op_flags()
2494 if (dst & SLJIT_MEM) { in sljit_emit_op_flags()
2496 return emit_op_mem(compiler, mem_flags, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
2510 src_r = dst; in sljit_emit_op_flags()
2512 if (dst & SLJIT_MEM) { in sljit_emit_op_flags()
2513 FAIL_IF(emit_op_mem(compiler, mem_flags, TMP_REG1, dst, dstw, TMP_REG1)); in sljit_emit_op_flags()
2520 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2521 return emit_op_mem(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
3151 sljit_s32 dst, sljit_sw dstw) in sljit_emit_simd_sign() argument
3159 CHECK(check_sljit_emit_simd_sign(compiler, type, freg, dst, dstw)); in sljit_emit_simd_sign()
3161 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_simd_sign()
3210 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; in sljit_emit_simd_sign()
3221 …return emit_op_mem(compiler, STORE | ((type & SLJIT_32) ? INT_SIZE : WORD_SIZE), TMP_REG2, dst, ds… in sljit_emit_simd_sign()
3383 … sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_get_local_base() argument
3389 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset)); in sljit_get_local_base()
3392 dst_reg = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_get_local_base()
3418 if (SLJIT_UNLIKELY(dst & SLJIT_MEM)) in sljit_get_local_base()
3419 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG1); in sljit_get_local_base()
3423 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
3429 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
3430 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
3436 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_const()
3439 if (dst & SLJIT_MEM) in sljit_emit_const()
3440 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_const()
3444 …ruct sljit_jump* sljit_emit_mov_addr(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_mov_addr() argument
3450 CHECK_PTR(check_sljit_emit_mov_addr(compiler, dst, dstw)); in sljit_emit_mov_addr()
3451 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_mov_addr()
3453 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in sljit_emit_mov_addr()
3462 if (dst & SLJIT_MEM) in sljit_emit_mov_addr()
3463 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_mov_addr()
3471 sljit_u32 dst; in sljit_set_jump_addr() local
3476 dst = inst[0] & 0x1f; in sljit_set_jump_addr()
3478 inst[0] = MOVZ | dst | (((sljit_u32)new_target & 0xffff) << 5); in sljit_set_jump_addr()
3479 inst[1] = MOVK | dst | (((sljit_u32)(new_target >> 16) & 0xffff) << 5) | (1 << 21); in sljit_set_jump_addr()
3480 inst[2] = MOVK | dst | (((sljit_u32)(new_target >> 32) & 0xffff) << 5) | (2 << 21); in sljit_set_jump_addr()
3481 inst[3] = MOVK | dst | ((sljit_u32)(new_target >> 48) << 5) | (3 << 21); in sljit_set_jump_addr()