Lines Matching refs:dst

845 	sljit_s32 dst, sljit_sw dstw,
848 #define EMIT_MOV(compiler, dst, dstw, src, srcw) \ argument
849 FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
852 sljit_s32 single, sljit_s32 dst, sljit_sw dstw, sljit_s32 src);
855 sljit_s32 single, sljit_s32 dst, sljit_s32 src, sljit_sw srcw);
1016 sljit_s32 dst, sljit_sw dstw, in emit_mov() argument
1022 inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw); in emit_mov()
1028 if (FAST_IS_REG(dst)) { in emit_mov()
1030 return emit_do_imm(compiler, MOV_r_i32 | reg_map[dst], srcw); in emit_mov()
1034 return emit_load_imm64(compiler, dst, srcw); in emit_mov()
1037 …return emit_do_imm32(compiler, (reg_map[dst] >= 8) ? REX_B : 0, U8(MOV_r_i32 | reg_lmap[dst]), src… in emit_mov()
1045 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
1051 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw); in emit_mov()
1056 if (FAST_IS_REG(dst)) { in emit_mov()
1057 inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw); in emit_mov()
1068 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
1228 sljit_s32 dst, sljit_sw dstw, in emit_mov_byte() argument
1242 if (FAST_IS_REG(dst)) { in emit_mov_byte()
1244 return emit_do_imm(compiler, MOV_r_i32 | reg_map[dst], srcw); in emit_mov_byte()
1246 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_byte()
1252 …inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw… in emit_mov_byte()
1258 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in emit_mov_byte()
1260 if ((dst & SLJIT_MEM) && FAST_IS_REG(src)) { in emit_mov_byte()
1274 SLJIT_ASSERT(FAST_IS_REG(dst)); in emit_mov_byte()
1275 if (reg_map[dst] < 4) { in emit_mov_byte()
1276 if (dst != src) in emit_mov_byte()
1277 EMIT_MOV(compiler, dst, 0, src, 0); in emit_mov_byte()
1278 inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0); in emit_mov_byte()
1284 if (dst != src) in emit_mov_byte()
1285 EMIT_MOV(compiler, dst, 0, src, 0); in emit_mov_byte()
1288 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
1292 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
1297 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0); in emit_mov_byte()
1313 if (dst & SLJIT_MEM) { in emit_mov_byte()
1317 if ((dst & REG_MASK) == SLJIT_R0) { in emit_mov_byte()
1318 if ((dst & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_R1)) in emit_mov_byte()
1324 if ((dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_R0)) in emit_mov_byte()
1326 else if ((dst & REG_MASK) == SLJIT_R1) in emit_mov_byte()
1341 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw); in emit_mov_byte()
1355 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_byte()
1360 inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw); in emit_mov_byte()
1394 sljit_s32 dst, sljit_sw dstw, in emit_mov_half() argument
1405 if (FAST_IS_REG(dst)) { in emit_mov_half()
1407 return emit_do_imm(compiler, MOV_r_i32 | reg_map[dst], srcw); in emit_mov_half()
1409 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_half()
1415 …instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, srcw, dst, dstw); in emit_mov_half()
1421 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in emit_mov_half()
1423 if ((dst & SLJIT_MEM) && FAST_IS_REG(src)) in emit_mov_half()
1432 if (dst & SLJIT_MEM) { in emit_mov_half()
1433 inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw); in emit_mov_half()
1442 sljit_s32 dst, sljit_sw dstw, in emit_unary() argument
1447 if (dst == src && dstw == srcw) { in emit_unary()
1449 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_unary()
1456 if (FAST_IS_REG(dst)) { in emit_unary()
1457 EMIT_MOV(compiler, dst, 0, src, srcw); in emit_unary()
1458 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); in emit_unary()
1470 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0); in emit_unary()
1475 sljit_s32 dst, sljit_sw dstw, in emit_not_with_flags() argument
1480 if (FAST_IS_REG(dst)) { in emit_not_with_flags()
1481 EMIT_MOV(compiler, dst, 0, src, srcw); in emit_not_with_flags()
1482 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); in emit_not_with_flags()
1486 inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0); in emit_not_with_flags()
1500 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0); in emit_not_with_flags()
1510 sljit_s32 dst, sljit_sw dstw, in emit_clz_ctz() argument
1520 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in emit_clz_ctz()
1534 if (dst & SLJIT_MEM) in emit_clz_ctz()
1535 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0); in emit_clz_ctz()
1591 if (dst & SLJIT_MEM) in emit_clz_ctz()
1592 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0); in emit_clz_ctz()
1597 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1606 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1607 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1610 CHECK_EXTRA_REGS(dst, dstw, dst_is_ereg = 1); in sljit_emit_op1()
1623 if (FAST_IS_REG(src) && src == dst) { in sljit_emit_op1()
1666 return emit_mov(compiler, dst, dstw, src, srcw); in sljit_emit_op1()
1672 SLJIT_ASSERT(dst == SLJIT_MEM1(SLJIT_SP)); in sljit_emit_op1()
1673 dst = TMP_REG1; in sljit_emit_op1()
1685 EMIT_MOV(compiler, dst, dstw, src, srcw); in sljit_emit_op1()
1688 FAIL_IF(emit_mov_byte(compiler, 0, dst, dstw, src, srcw)); in sljit_emit_op1()
1691 FAIL_IF(emit_mov_byte(compiler, 1, dst, dstw, src, srcw)); in sljit_emit_op1()
1694 FAIL_IF(emit_mov_half(compiler, 0, dst, dstw, src, srcw)); in sljit_emit_op1()
1697 FAIL_IF(emit_mov_half(compiler, 1, dst, dstw, src, srcw)); in sljit_emit_op1()
1701 FAIL_IF(emit_mov_int(compiler, 0, dst, dstw, src, srcw)); in sljit_emit_op1()
1704 FAIL_IF(emit_mov_int(compiler, 1, dst, dstw, src, srcw)); in sljit_emit_op1()
1708 EMIT_MOV(compiler, dst, dstw, src, srcw); in sljit_emit_op1()
1715 if (SLJIT_UNLIKELY(dst_is_ereg) && dst == TMP_REG1) in sljit_emit_op1()
1724 return emit_not_with_flags(compiler, dst, dstw, src, srcw); in sljit_emit_op1()
1725 return emit_unary(compiler, NOT_rm, dst, dstw, src, srcw); in sljit_emit_op1()
1729 return emit_clz_ctz(compiler, (op == SLJIT_CLZ), dst, dstw, src, srcw); in sljit_emit_op1()
1737 sljit_s32 dst, sljit_sw dstw, argument
1747 if (dst == src1 && dstw == src1w) {
1750 …if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))…
1752 if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128)) {
1757 BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
1760 else if (FAST_IS_REG(dst)) {
1761 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1767 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1773 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1781 if (dst == src2 && dstw == src2w) {
1784 …if ((dst == SLJIT_R0) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))…
1786 if ((dst == SLJIT_R0) && (src1w > 127 || src1w < -128)) {
1791 BINARY_IMM(op_imm, op_mr, src1w, dst, dstw);
1794 else if (FAST_IS_REG(dst)) {
1795 inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
1800 inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
1806 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1814 if (FAST_IS_REG(dst)) {
1815 EMIT_MOV(compiler, dst, 0, src1, src1w);
1817 BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
1820 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1836 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
1844 sljit_s32 dst, sljit_sw dstw, argument
1854 if (dst == src1 && dstw == src1w) {
1857 …if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))…
1859 if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128)) {
1864 BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
1867 else if (FAST_IS_REG(dst)) {
1868 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1873 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1879 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1887 if (FAST_IS_REG(dst) && dst != src2) {
1888 EMIT_MOV(compiler, dst, 0, src1, src1w);
1890 BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
1893 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1909 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
1916 sljit_s32 dst, sljit_sw dstw, argument
1921 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
2037 if (dst & SLJIT_MEM)
2038 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
2044 sljit_s32 dst, sljit_sw dstw, argument
2052 if (dst == src1 && dstw == src1w)
2054 if (dst == src2 && dstw == src2w)
2057 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
2094 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
2263 sljit_s32 dst, sljit_sw dstw, argument
2273 if (dst == src1 && dstw == src1w) {
2274 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
2279 if (dst == SLJIT_PREF_SHIFT_REG && src2 == SLJIT_PREF_SHIFT_REG) {
2287 if (FAST_IS_REG(dst)) {
2288 EMIT_MOV(compiler, dst, 0, src1, src1w);
2289 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
2299 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
2303 if (dst == SLJIT_PREF_SHIFT_REG) {
2312 if (FAST_IS_REG(dst) && dst != src2 && dst != TMP_REG1 && !ADDRESSING_DEPENDS_ON(src2, dst)) {
2313 if (src1 != dst)
2314 EMIT_MOV(compiler, dst, 0, src1, src1w);
2324 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
2362 if (dst != TMP_REG1)
2363 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
2370 sljit_s32 dst, sljit_sw dstw, argument
2382 return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
2385 return emit_mov(compiler, dst, dstw, src1, src1w);
2388 dst, dstw, src1, src1w, SLJIT_IMM, 0);
2392 return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
2394 if (!FAST_IS_REG(dst))
2397 FAIL_IF(emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w));
2399 if (FAST_IS_REG(dst))
2400 return emit_cmp_binary(compiler, dst, dstw, SLJIT_IMM, 0);
2405 sljit_s32 dst, sljit_sw dstw, argument
2410 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w));
2411 ADJUST_LOCAL_OFFSET(dst, dstw);
2415 CHECK_EXTRA_REGS(dst, dstw, (void)0);
2422 SLJIT_ASSERT(dst != TMP_REG1 || HAS_FLAGS(op));
2427 if (emit_lea_binary(compiler, dst, dstw, src1, src1w, src2, src2w) != SLJIT_ERR_UNSUPPORTED)
2431 dst, dstw, src1, src1w, src2, src2w);
2434 dst, dstw, src1, src1w, src2, src2w);
2437 return emit_unary(compiler, NEG_rm, dst, dstw, src2, src2w);
2440 …if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, dst, dstw, src1, src1w, SLJIT_IMM, -src2w) != …
2442 if (FAST_IS_REG(dst) && src2 == dst) {
2443 FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), dst, 0, dst, 0, src1, src1w));
2444 return emit_unary(compiler, NEG_rm, dst, 0, dst, 0);
2449 dst, dstw, src1, src1w, src2, src2w);
2452 dst, dstw, src1, src1w, src2, src2w);
2454 return emit_mul(compiler, dst, dstw, src1, src1w, src2, src2w);
2457 dst, dstw, src1, src1w, src2, src2w);
2460 dst, dstw, src1, src1w, src2, src2w);
2463 dst, dstw, src1, src1w, src2, src2w);
2467 dst, dstw, src1, src1w, src2, src2w);
2471 dst, dstw, src1, src1w, src2, src2w);
2475 dst, dstw, src1, src1w, src2, src2w);
2478 dst, dstw, src1, src1w, src2, src2w);
2481 dst, dstw, src1, src1w, src2, src2w);
2742 sljit_s32 single, sljit_s32 dst, sljit_s32 src, sljit_sw srcw) argument
2744 return emit_sse2(compiler, MOVSD_x_xm, single, dst, src, srcw);
2748 sljit_s32 single, sljit_s32 dst, sljit_sw dstw, sljit_s32 src) argument
2750 return emit_sse2(compiler, MOVSD_xm_x, single, src, dst, dstw);
2754 sljit_s32 dst, sljit_sw dstw, argument
2757 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
2770 if (dst & SLJIT_MEM)
2771 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
2776 sljit_s32 dst, sljit_sw dstw, argument
2779 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
2806 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
2836 sljit_s32 dst, sljit_sw dstw, argument
2846 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
2849 if (FAST_IS_REG(dst))
2850 return emit_sse2_load(compiler, op & SLJIT_32, dst, src, srcw);
2852 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, src);
2854 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
2858 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
2872 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
2876 if (FAST_IS_REG(dst)) {
2877 dst_r = dst;
2878 if (dst != src)
2897 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
2902 sljit_s32 dst, sljit_sw dstw, argument
2909 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
2910 ADJUST_LOCAL_OFFSET(dst, dstw);
2918 if (FAST_IS_REG(dst)) {
2919 dst_r = dst;
2920 if (dst == src1)
2922 else if (dst == src2 && (op == SLJIT_ADD_F64 || op == SLJIT_MUL_F64)) {
2927 else if (dst != src2)
2958 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
3062 sljit_s32 dst, sljit_sw dstw, argument
3071 sljit_s32 dst_save = dst;
3075 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type));
3077 ADJUST_LOCAL_OFFSET(dst, dstw);
3078 CHECK_EXTRA_REGS(dst, dstw, (void)0);
3084 if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst)) {
3093 *inst++ = U8(REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B));
3095 *inst++ = U8(MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst]);
3099 reg = (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG1;
3120 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
3128 if (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) {
3129 if (reg_map[dst] <= 4) {
3137 *inst++ = U8(MOD_REG | reg_map[dst]);
3141 *inst = U8(MOD_REG | (reg_map[dst] << 3) | reg_map[dst]);
3152 EMIT_MOV(compiler, dst, 0, SLJIT_IMM, 0);
3161 *inst++ = U8(MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1]);
3176 *inst++ = U8(MOD_REG | (reg_map[dst] << 3) | 0 /* eax */);
3181 if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && reg_map[dst] <= 4) {
3184 if (dst != SLJIT_R0) {
3194 *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
3232 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
3279 … sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… argument
3282 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
3283 ADJUST_LOCAL_OFFSET(dst, dstw);
3285 CHECK_EXTRA_REGS(dst, dstw, (void)0);
3297 …SLJIT_ASSERT(emit_lea_binary(compiler, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0) != SLJIT_ERR_UNSUPPORT…
3300 return emit_lea_binary(compiler, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0);
3306 return emit_lea_binary(compiler, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset);
3307 return emit_mov(compiler, dst, dstw, SLJIT_SP, 0);
3310 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… argument
3319 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
3320 ADJUST_LOCAL_OFFSET(dst, dstw);
3322 CHECK_EXTRA_REGS(dst, dstw, (void)0);
3330 reg = FAST_IS_REG(dst) ? dst : TMP_REG1;
3335 if (emit_mov(compiler, dst, dstw, SLJIT_IMM, init_value))
3346 if (dst & SLJIT_MEM)
3347 if (emit_mov(compiler, dst, dstw, TMP_REG1, 0))
3354 …ljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw) argument
3364 CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw));
3365 ADJUST_LOCAL_OFFSET(dst, dstw);
3367 CHECK_EXTRA_REGS(dst, dstw, (void)0);
3375 reg = FAST_IS_REG(dst) ? dst : TMP_REG1;
3380 if (emit_mov(compiler, dst, dstw, SLJIT_IMM, 0))
3385 if (dst & SLJIT_MEM) {
3387 if (emit_mov(compiler, dst, dstw, TMP_REG1, 0))