Lines Matching refs:dst

454 static SLJIT_INLINE void load_addr_to_reg(void *dst, sljit_u32 reg)  in load_addr_to_reg()  argument
463 jump = (struct sljit_jump*)dst; in load_addr_to_reg()
468 put_label = (struct sljit_put_label*)dst; in load_addr_to_reg()
1144 if (dst == src1) { \
1146 FAIL_IF(push_inst(compiler, op_reg | RD(dst) | RJ(src1) | RK(TMP_REG1))); \
1148 FAIL_IF(push_inst(compiler, ADDI_D | RD(dst) | RJ(TMP_ZERO) | IMM_I12(src2))); \
1149 FAIL_IF(push_inst(compiler, op_reg | RD(dst) | RJ(src1) | RK(dst))); \
1157 FAIL_IF(push_inst(compiler, op_reg | RD(dst) | RJ(src1) | RK(src2))); \
1166 sljit_s32 dst, sljit_s32 src1, sljit_sw src2) in emit_single_op() argument
1175 if (dst != src2) in emit_single_op()
1176 return push_inst(compiler, INST(ADD, op) | RD(dst) | RJ(src2) | IMM_I12(0)); in emit_single_op()
1182 return push_inst(compiler, ANDI | RD(dst) | RJ(src2) | IMM_I12(0xff)); in emit_single_op()
1183 SLJIT_ASSERT(dst == src2); in emit_single_op()
1189 return push_inst(compiler, EXT_W_B | RD(dst) | RJ(src2)); in emit_single_op()
1190 SLJIT_ASSERT(dst == src2); in emit_single_op()
1196 return push_inst(compiler, INST(BSTRPICK, op) | RD(dst) | RJ(src2) | (15 << 16)); in emit_single_op()
1197 SLJIT_ASSERT(dst == src2); in emit_single_op()
1203 return push_inst(compiler, EXT_W_H | RD(dst) | RJ(src2)); in emit_single_op()
1204 SLJIT_ASSERT(dst == src2); in emit_single_op()
1210 return push_inst(compiler, BSTRPICK_D | RD(dst) | RJ(src2) | (31 << 16)); in emit_single_op()
1211 SLJIT_ASSERT(dst == src2); in emit_single_op()
1217 return push_inst(compiler, SLLI_W | RD(dst) | RJ(src2) | IMM_I12(0)); in emit_single_op()
1218 SLJIT_ASSERT(dst == src2); in emit_single_op()
1223 return push_inst(compiler, INST(CLZ, op) | RD(dst) | RJ(src2)); in emit_single_op()
1227 return push_inst(compiler, INST(CTZ, op) | RD(dst) | RJ(src2)); in emit_single_op()
1231 return push_inst(compiler, ((op & SLJIT_32) ? REVB_2W : REVB_D) | RD(dst) | RJ(src2)); in emit_single_op()
1235 FAIL_IF(push_inst(compiler, REVB_2H | RD(dst) | RJ(src2))); in emit_single_op()
1236 return push_inst(compiler, EXT_W_H | RD(dst) | RJ(dst)); in emit_single_op()
1240 FAIL_IF(push_inst(compiler, REVB_2H | RD(dst) | RJ(src2))); in emit_single_op()
1241 return push_inst(compiler, INST(BSTRPICK, op) | RD(dst) | RJ(dst) | (15 << 16)); in emit_single_op()
1244 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM) && dst != TMP_REG1); in emit_single_op()
1245 FAIL_IF(push_inst(compiler, REVB_2W | RD(dst) | RJ(src2))); in emit_single_op()
1246 return push_inst(compiler, SLLI_W | RD(dst) | RJ(dst) | IMM_I12(0)); in emit_single_op()
1249 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM) && dst != TMP_REG1); in emit_single_op()
1250 FAIL_IF(push_inst(compiler, REVB_2W | RD(dst) | RJ(src2))); in emit_single_op()
1251 return push_inst(compiler, BSTRPICK_D | RD(dst) | RJ(dst) | (31 << 16)); in emit_single_op()
1272 FAIL_IF(push_inst(compiler, INST(ADDI, op) | RD(dst) | RJ(src1) | IMM_I12(src2))); in emit_single_op()
1281 if (src1 != dst) in emit_single_op()
1283 else if (src2 != dst) in emit_single_op()
1293 FAIL_IF(push_inst(compiler, INST(ADD, op) | RD(dst) | RJ(src1) | RK(src2))); in emit_single_op()
1299 FAIL_IF(push_inst(compiler, SLTUI | RD(OTHER_FLAG) | RJ(dst) | IMM_I12(src2))); in emit_single_op()
1301 FAIL_IF(push_inst(compiler, SLTU | RD(OTHER_FLAG) | RJ(dst) | RK(carry_src_r))); in emit_single_op()
1307 FAIL_IF(push_inst(compiler, XOR | RD(TMP_REG1) | RJ(dst) | RK(EQUAL_FLAG))); in emit_single_op()
1309 FAIL_IF(push_inst(compiler, INST(ADD, op) | RD(EQUAL_FLAG) | RJ(dst) | IMM_I12(0))); in emit_single_op()
1317 FAIL_IF(push_inst(compiler, ADDI_D | RD(dst) | RJ(src1) | IMM_I12(src2))); in emit_single_op()
1320 if (src1 != dst) in emit_single_op()
1322 else if (src2 != dst) in emit_single_op()
1330 FAIL_IF(push_inst(compiler, ADD_D | RD(dst) | RJ(src1) | RK(src2))); in emit_single_op()
1336 FAIL_IF(push_inst(compiler, SLTUI | RD(EQUAL_FLAG) | RJ(dst) | IMM_I12(src2))); in emit_single_op()
1338 FAIL_IF(push_inst(compiler, SLTU | RD(EQUAL_FLAG) | RJ(dst) | RK(carry_src_r))); in emit_single_op()
1341 FAIL_IF(push_inst(compiler, ADD_D | RD(dst) | RJ(dst) | RK(OTHER_FLAG))); in emit_single_op()
1347 FAIL_IF(push_inst(compiler, SLTU | RD(OTHER_FLAG) | RJ(dst) | RK(OTHER_FLAG))); in emit_single_op()
1401 return push_inst(compiler, INST(ADDI, op) | RD(dst) | RJ(src1) | IMM_I12(-src2)); in emit_single_op()
1407 return push_inst(compiler, INST(SUB, op) | RD(dst) | RJ(src1) | RK(src2)); in emit_single_op()
1432 FAIL_IF(push_inst(compiler, INST(ADDI, op) | RD(dst) | RJ(src1) | IMM_I12(-src2))); in emit_single_op()
1445 FAIL_IF(push_inst(compiler, INST(SUB, op) | RD(dst) | RJ(src1) | RK(src2))); in emit_single_op()
1451 FAIL_IF(push_inst(compiler, XOR | RD(TMP_REG1) | RJ(dst) | RK(EQUAL_FLAG))); in emit_single_op()
1453 FAIL_IF(push_inst(compiler, INST(ADDI, op) | RD(EQUAL_FLAG) | RJ(dst) | IMM_I12(0))); in emit_single_op()
1470 FAIL_IF(push_inst(compiler, INST(ADDI, op) | RD(dst) | RJ(src1) | IMM_I12(-src2))); in emit_single_op()
1476 FAIL_IF(push_inst(compiler, INST(SUB, op) | RD(dst) | RJ(src1) | RK(src2))); in emit_single_op()
1480 FAIL_IF(push_inst(compiler, SLTU | RD(TMP_REG1) | RJ(dst) | RK(OTHER_FLAG))); in emit_single_op()
1482 FAIL_IF(push_inst(compiler, INST(SUB, op) | RD(dst) | RJ(dst) | RK(OTHER_FLAG))); in emit_single_op()
1493 return push_inst(compiler, INST(MUL, op) | RD(dst) | RJ(src1) | RK(src2)); in emit_single_op()
1497 FAIL_IF(push_inst(compiler, MUL_W | RD(dst) | RJ(src1) | RK(src2))); in emit_single_op()
1498 return push_inst(compiler, SUB_D | RD(OTHER_FLAG) | RJ(dst) | RK(OTHER_FLAG)); in emit_single_op()
1502 FAIL_IF(push_inst(compiler, MUL_D | RD(dst) | RJ(src1) | RK(src2))); in emit_single_op()
1503 FAIL_IF(push_inst(compiler, SRAI_D | RD(OTHER_FLAG) | RJ(dst) | IMM_I12((63)))); in emit_single_op()
1552 return push_inst(compiler, INST(ROTRI, op) | RD(dst) | RJ(src1) | IMM_I12(src2)); in emit_single_op()
1557 if (dst != src1) in emit_single_op()
1558 return push_inst(compiler, INST(ADDI, op) | RD(dst) | RJ(src1) | IMM_I12(0)); in emit_single_op()
1566 return push_inst(compiler, INST(ROTR, op) | RD(dst) | RJ(src1) | RK(src2)); in emit_single_op()
1579 return push_inst(compiler, op_imm | RD(dst) | RJ(src1) | IMM_I12(src2)); in emit_single_op()
1587 return push_inst(compiler, op_reg | RD(dst) | RJ(src1) | RK(src2)); in emit_single_op()
1593 sljit_s32 dst, sljit_sw dstw, in emit_op() argument
1611 if (dst == 0) { in emit_op()
1614 dst = TMP_REG2; in emit_op()
1616 else if (FAST_IS_REG(dst)) { in emit_op()
1617 dst_r = dst; in emit_op()
1622 else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw)) in emit_op()
1679 if (dst & SLJIT_MEM) in emit_op()
1698 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) { in emit_op()
1700 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
1704 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw)); in emit_op()
1708 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
1710 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw)); in emit_op()
1714 if (dst & SLJIT_MEM) { in emit_op()
1716 getput_arg_fast(compiler, flags, dst_r, dst, dstw); in emit_op()
1719 return getput_arg(compiler, flags, dst_r, dst, dstw, 0, 0); in emit_op()
1765 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1771 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1772 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1781 return emit_op(compiler, SLJIT_MOV, WORD_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1784 …return emit_op(compiler, SLJIT_MOV_U32, INT_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src == S… in sljit_emit_op1()
1789 …return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, … in sljit_emit_op1()
1792 …return emit_op(compiler, op, BYTE_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src == SLJIT_IMM) … in sljit_emit_op1()
1795 …return emit_op(compiler, op, BYTE_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src … in sljit_emit_op1()
1798 …return emit_op(compiler, op, HALF_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src == SLJIT_IMM) … in sljit_emit_op1()
1801 …return emit_op(compiler, op, HALF_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src … in sljit_emit_op1()
1806 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1810 return emit_op(compiler, op, HALF_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1814 return emit_op(compiler, op | SLJIT_32, INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1822 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op2() argument
1829 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1830 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op2()
1847 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1852 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1856 return emit_op(compiler, op, flags | CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1861 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1878 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
2014 sljit_s32 dst, sljit_sw dstw) in sljit_emit_op_dst() argument
2019 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw)); in sljit_emit_op_dst()
2020 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_dst()
2024 if (FAST_IS_REG(dst)) in sljit_emit_op_dst()
2025 return push_inst(compiler, ADDI_D | RD(dst) | RJ(RETURN_ADDR_REG) | IMM_I12(0)); in sljit_emit_op_dst()
2030 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; in sljit_emit_op_dst()
2035 if (dst & SLJIT_MEM) in sljit_emit_op_dst()
2036 return emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw); in sljit_emit_op_dst()
2090 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_sw_from_f64() argument
2095 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; in sljit_emit_fop1_conv_sw_from_f64()
2112 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_conv_sw_from_f64()
2119 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_sw_from_f64()
2120 return emit_op_mem2(compiler, word_data ? WORD_DATA : INT_DATA, TMP_REG2, dst, dstw, 0, 0); in sljit_emit_fop1_conv_sw_from_f64()
2125 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_w() argument
2130 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_w()
2147 …op_mem2(compiler, (word_data ? WORD_DATA : INT_DATA) | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_fop1_conv_f64_from_w()
2159 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_w()
2160 return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_conv_f64_from_w()
2165 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_sw() argument
2168 return sljit_emit_fop1_conv_f64_from_w(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1_conv_f64_from_sw()
2172 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1_conv_f64_from_uw() argument
2177 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1_conv_f64_from_uw()
2194 …op_mem2(compiler, (word_data ? WORD_DATA : INT_DATA) | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_fop1_conv_f64_from_uw()
2220 if (dst & SLJIT_MEM) in sljit_emit_fop1_conv_f64_from_uw()
2221 return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_conv_f64_from_uw()
2270 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop1() argument
2280 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2285 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1; in sljit_emit_fop1()
2288 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw)); in sljit_emit_fop1()
2314 if (dst & SLJIT_MEM) in sljit_emit_fop1()
2315 return emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0); in sljit_emit_fop1()
2320 sljit_s32 dst, sljit_sw dstw, in sljit_emit_fop2() argument
2327 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2328 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_fop2()
2335 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG2; in sljit_emit_fop2()
2354 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) { in sljit_emit_fop2()
2356 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
2360 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
2364 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
2366 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
2389 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0)); in sljit_emit_fop2()
2755 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op_flags() argument
2763 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2764 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op_flags()
2767 dst_r = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2; in sljit_emit_op_flags()
2772 if (op >= SLJIT_ADD && (dst & SLJIT_MEM)) in sljit_emit_op_flags()
2773 FAIL_IF(emit_op_mem2(compiler, mem_type | LOAD_DATA, TMP_REG1, dst, dstw, dst, dstw)); in sljit_emit_op_flags()
2828 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2829 return emit_op_mem(compiler, mem_type, src_r, dst, dstw); in sljit_emit_op_flags()
2838 if (dst & SLJIT_MEM) in sljit_emit_op_flags()
2839 return emit_op(compiler, saved_op, mem_type, dst, dstw, TMP_REG1, 0, src_r, 0); in sljit_emit_op_flags()
2840 return emit_op(compiler, saved_op, mem_type, dst, dstw, dst, dstw, src_r, 0); in sljit_emit_op_flags()
3071 static SLJIT_INLINE sljit_s32 emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw i… in emit_const() argument
3075 …FAIL_IF(push_inst(compiler, LU12I_W | RD(dst) | (sljit_ins)(((init_value & 0xffffffff) >> 12) << 5… in emit_const()
3076 FAIL_IF(push_inst(compiler, LU32I_D | RD(dst) | (sljit_ins)(((init_value >> 32) & 0xfffff) << 5))); in emit_const()
3077 FAIL_IF(push_inst(compiler, LU52I_D | RD(dst) | RJ(dst) | (sljit_ins)(IMM_I12(init_value >> 52)))); in emit_const()
3078 return push_inst(compiler, ORI | RD(dst) | RJ(dst) | IMM_I12(init_value)); in emit_const()
3109 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… in sljit_emit_const() argument
3115 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
3116 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_const()
3122 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; in sljit_emit_const()
3125 if (dst & SLJIT_MEM) in sljit_emit_const()
3126 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_const()
3131 …ljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) in sljit_emit_put_label() argument
3137 CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); in sljit_emit_put_label()
3138 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_put_label()
3144 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2; in sljit_emit_put_label()
3149 if (dst & SLJIT_MEM) in sljit_emit_put_label()
3150 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_put_label()