Lines Matching refs:dst

639 	sljit_s32 dst, sljit_sw dstw,
645 sljit_s32 dst, sljit_sw dstw,
650 sljit_s32 dst, sljit_sw dstw,
653 #define EMIT_MOV(compiler, dst, dstw, src, srcw) \ argument
654 FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
680 sljit_s32 dst, sljit_sw dstw, in emit_mov() argument
685 SLJIT_ASSERT(dst != SLJIT_UNUSED); in emit_mov()
688 inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw); in emit_mov()
694 if (FAST_IS_REG(dst)) { in emit_mov()
696 return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw); in emit_mov()
700 return emit_load_imm64(compiler, dst, srcw); in emit_mov()
703 … return emit_do_imm32(compiler, (reg_map[dst] >= 8) ? REX_B : 0, MOV_r_i32 + reg_lmap[dst], srcw); in emit_mov()
711 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
717 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw); in emit_mov()
722 if (FAST_IS_REG(dst)) { in emit_mov()
723 inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw); in emit_mov()
734 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
890 sljit_s32 dst, sljit_sw dstw, in emit_mov_byte() argument
904 if (FAST_IS_REG(dst)) { in emit_mov_byte()
906 return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw); in emit_mov_byte()
908 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_byte()
914 …inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw… in emit_mov_byte()
920 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in emit_mov_byte()
922 if ((dst & SLJIT_MEM) && FAST_IS_REG(src)) { in emit_mov_byte()
936 SLJIT_ASSERT(SLOW_IS_REG(dst)); in emit_mov_byte()
937 if (reg_map[dst] < 4) { in emit_mov_byte()
938 if (dst != src) in emit_mov_byte()
939 EMIT_MOV(compiler, dst, 0, src, 0); in emit_mov_byte()
940 inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0); in emit_mov_byte()
946 if (dst != src) in emit_mov_byte()
947 EMIT_MOV(compiler, dst, 0, src, 0); in emit_mov_byte()
950 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
954 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
959 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0); in emit_mov_byte()
975 if (dst & SLJIT_MEM) { in emit_mov_byte()
979 if ((dst & REG_MASK) == SLJIT_R0) { in emit_mov_byte()
980 if ((dst & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_R1)) in emit_mov_byte()
986 if ((dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_R0)) in emit_mov_byte()
988 else if ((dst & REG_MASK) == SLJIT_R1) in emit_mov_byte()
1003 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw); in emit_mov_byte()
1017 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_byte()
1022 inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw); in emit_mov_byte()
1056 sljit_s32 dst, sljit_sw dstw, in emit_mov_half() argument
1067 if (FAST_IS_REG(dst)) { in emit_mov_half()
1069 return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw); in emit_mov_half()
1071 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_half()
1077 …instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, srcw, dst, dstw); in emit_mov_half()
1083 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in emit_mov_half()
1085 if ((dst & SLJIT_MEM) && FAST_IS_REG(src)) in emit_mov_half()
1094 if (dst & SLJIT_MEM) { in emit_mov_half()
1095 inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw); in emit_mov_half()
1104 sljit_s32 dst, sljit_sw dstw, in emit_unary() argument
1109 if (dst == src && dstw == srcw) { in emit_unary()
1111 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_unary()
1118 if (dst == SLJIT_UNUSED) in emit_unary()
1119 dst = TMP_REG1; in emit_unary()
1121 if (FAST_IS_REG(dst)) { in emit_unary()
1122 EMIT_MOV(compiler, dst, 0, src, srcw); in emit_unary()
1123 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); in emit_unary()
1135 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0); in emit_unary()
1140 sljit_s32 dst, sljit_sw dstw, in emit_not_with_flags() argument
1145 if (dst == SLJIT_UNUSED) in emit_not_with_flags()
1146 dst = TMP_REG1; in emit_not_with_flags()
1148 if (FAST_IS_REG(dst)) { in emit_not_with_flags()
1149 EMIT_MOV(compiler, dst, 0, src, srcw); in emit_not_with_flags()
1150 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); in emit_not_with_flags()
1154 inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0); in emit_not_with_flags()
1168 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0); in emit_not_with_flags()
1177 sljit_s32 dst, sljit_sw dstw, in emit_clz() argument
1194 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; in emit_clz()
1236 if (dst & SLJIT_MEM) in emit_clz()
1237 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0); in emit_clz()
1242 sljit_s32 dst, sljit_sw dstw, in sljit_emit_op1() argument
1255 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1256 ADJUST_LOCAL_OFFSET(dst, dstw); in sljit_emit_op1()
1259 CHECK_EXTRA_REGS(dst, dstw, dst_is_ereg = 1); in sljit_emit_op1()
1265 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) { in sljit_emit_op1()
1279 if (FAST_IS_REG(src) && src == dst) { in sljit_emit_op1()
1326 return emit_mov(compiler, dst, dstw, src, srcw); in sljit_emit_op1()
1332 SLJIT_ASSERT(dst == SLJIT_MEM1(SLJIT_SP)); in sljit_emit_op1()
1333 dst = TMP_REG1; in sljit_emit_op1()
1344 FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw)); in sljit_emit_op1()
1347 FAIL_IF(emit_mov_byte(compiler, 0, dst, dstw, src, srcw)); in sljit_emit_op1()
1350 FAIL_IF(emit_mov_byte(compiler, 1, dst, dstw, src, srcw)); in sljit_emit_op1()
1353 FAIL_IF(emit_mov_half(compiler, 0, dst, dstw, src, srcw)); in sljit_emit_op1()
1356 FAIL_IF(emit_mov_half(compiler, 1, dst, dstw, src, srcw)); in sljit_emit_op1()
1360 FAIL_IF(emit_mov_int(compiler, 0, dst, dstw, src, srcw)); in sljit_emit_op1()
1363 FAIL_IF(emit_mov_int(compiler, 1, dst, dstw, src, srcw)); in sljit_emit_op1()
1369 if (SLJIT_UNLIKELY(dst_is_ereg) && dst == TMP_REG1) in sljit_emit_op1()
1376 (src & REG_MASK), 0, (src & REG_MASK), 0, OFFS_REG(dst), 0)); in sljit_emit_op1()
1384 if (SLJIT_UNLIKELY(update) && (dst & SLJIT_MEM) && (dst & REG_MASK)) { in sljit_emit_op1()
1385 if ((dst & OFFS_REG_MASK) != 0) { in sljit_emit_op1()
1387 (dst & REG_MASK), 0, (dst & REG_MASK), 0, OFFS_REG(dst), 0)); in sljit_emit_op1()
1391 (dst & REG_MASK), 0, (dst & REG_MASK), 0, SLJIT_IMM, dstw)); in sljit_emit_op1()
1400 return emit_not_with_flags(compiler, dst, dstw, src, srcw); in sljit_emit_op1()
1401 return emit_unary(compiler, NOT_rm, dst, dstw, src, srcw); in sljit_emit_op1()
1404 return emit_unary(compiler, NEG_rm, dst, dstw, src, srcw); in sljit_emit_op1()
1407 return emit_clz(compiler, op_flags, dst, dstw, src, srcw); in sljit_emit_op1()
1449 sljit_s32 dst, sljit_sw dstw, argument
1455 if (dst == SLJIT_UNUSED) {
1468 if (dst == src1 && dstw == src1w) {
1471 …if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))…
1473 if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128)) {
1478 BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
1481 else if (FAST_IS_REG(dst)) {
1482 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1488 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1494 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1502 if (dst == src2 && dstw == src2w) {
1505 …if ((dst == SLJIT_R0) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))…
1507 if ((dst == SLJIT_R0) && (src1w > 127 || src1w < -128)) {
1512 BINARY_IMM(op_imm, op_mr, src1w, dst, dstw);
1515 else if (FAST_IS_REG(dst)) {
1516 inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
1521 inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
1527 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1535 if (FAST_IS_REG(dst)) {
1536 EMIT_MOV(compiler, dst, 0, src1, src1w);
1538 BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
1541 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1557 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
1565 sljit_s32 dst, sljit_sw dstw, argument
1571 if (dst == SLJIT_UNUSED) {
1584 if (dst == src1 && dstw == src1w) {
1587 …if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))…
1589 if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128)) {
1594 BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
1597 else if (FAST_IS_REG(dst)) {
1598 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1603 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1609 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1617 if (FAST_IS_REG(dst) && dst != src2) {
1618 EMIT_MOV(compiler, dst, 0, src1, src1w);
1620 BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
1623 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1639 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
1646 sljit_s32 dst, sljit_sw dstw, argument
1653 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
1769 if (dst & SLJIT_MEM)
1770 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
1776 sljit_s32 dst, sljit_sw dstw, argument
1784 if (dst == src1 && dstw == src1w)
1786 if (dst == src2 && dstw == src2w)
1789 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
1826 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
1995 sljit_s32 dst, sljit_sw dstw, argument
2002 if (dst == src1 && dstw == src1w) {
2003 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
2008 if (dst == SLJIT_UNUSED) {
2015 if (dst == SLJIT_PREF_SHIFT_REG && src2 == SLJIT_PREF_SHIFT_REG) {
2023 if (FAST_IS_REG(dst)) {
2024 EMIT_MOV(compiler, dst, 0, src1, src1w);
2025 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
2035 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
2039 if (dst == SLJIT_PREF_SHIFT_REG) {
2047 else if (FAST_IS_REG(dst) && dst != src2 && !ADDRESSING_DEPENDS_ON(src2, dst)) {
2048 if (src1 != dst)
2049 EMIT_MOV(compiler, dst, 0, src1, src1w);
2052 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
2068 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
2079 EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
2088 sljit_s32 dst, sljit_sw dstw, argument
2096 return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
2099 return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
2102 return emit_mov(compiler, dst, dstw, src1, src1w);
2105 dst, dstw, src1, src1w, SLJIT_IMM, 0);
2109 return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
2111 if (!FAST_IS_REG(dst))
2114 FAIL_IF(emit_shift(compiler,mode, dst, dstw, src1, src1w, src2, src2w));
2116 if (FAST_IS_REG(dst))
2117 return emit_cmp_binary(compiler, dst, dstw, SLJIT_IMM, 0);
2122 sljit_s32 dst, sljit_sw dstw, argument
2127 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
2128 ADJUST_LOCAL_OFFSET(dst, dstw);
2132 CHECK_EXTRA_REGS(dst, dstw, (void)0);
2139 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op))
2145 if (emit_lea_binary(compiler, dst, dstw, src1, src1w, src2, src2w) != SLJIT_ERR_UNSUPPORTED)
2149 dst, dstw, src1, src1w, src2, src2w);
2152 dst, dstw, src1, src1w, src2, src2w);
2155 …if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, dst, dstw, src1, src1w, SLJIT_IMM, -src2w) != …
2159 if (dst == SLJIT_UNUSED)
2162 dst, dstw, src1, src1w, src2, src2w);
2165 dst, dstw, src1, src1w, src2, src2w);
2167 return emit_mul(compiler, dst, dstw, src1, src1w, src2, src2w);
2169 if (dst == SLJIT_UNUSED)
2172 dst, dstw, src1, src1w, src2, src2w);
2175 dst, dstw, src1, src1w, src2, src2w);
2178 dst, dstw, src1, src1w, src2, src2w);
2181 dst, dstw, src1, src1w, src2, src2w);
2184 dst, dstw, src1, src1w, src2, src2w);
2187 dst, dstw, src1, src1w, src2, src2w);
2272 sljit_s32 single, sljit_s32 dst, sljit_s32 src, sljit_sw srcw) argument
2274 return emit_sse2(compiler, MOVSD_x_xm, single, dst, src, srcw);
2278 sljit_s32 single, sljit_s32 dst, sljit_sw dstw, sljit_s32 src) argument
2280 return emit_sse2(compiler, MOVSD_xm_x, single, src, dst, dstw);
2284 sljit_s32 dst, sljit_sw dstw, argument
2287 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
2300 if (dst & SLJIT_MEM)
2301 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
2306 sljit_s32 dst, sljit_sw dstw, argument
2309 sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
2336 return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
2352 sljit_s32 dst, sljit_sw dstw, argument
2362 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
2365 if (FAST_IS_REG(dst))
2366 return emit_sse2_load(compiler, op & SLJIT_F32_OP, dst, src, srcw);
2368 return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, src);
2370 return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
2374 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
2388 return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
2392 if (FAST_IS_REG(dst)) {
2393 dst_r = dst;
2394 if (dst != src)
2413 return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
2418 sljit_s32 dst, sljit_sw dstw, argument
2425 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
2426 ADJUST_LOCAL_OFFSET(dst, dstw);
2434 if (FAST_IS_REG(dst)) {
2435 dst_r = dst;
2436 if (dst == src1)
2438 else if (dst == src2 && (op == SLJIT_ADD_F64 || op == SLJIT_MUL_F64)) {
2443 else if (dst != src2)
2474 return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
2608 sljit_s32 dst, sljit_sw dstw, argument
2617 sljit_s32 dst_save = dst;
2621 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type));
2623 ADJUST_LOCAL_OFFSET(dst, dstw);
2624 CHECK_EXTRA_REGS(dst, dstw, (void)0);
2631 if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst)) {
2640 *inst++ = REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B);
2642 *inst++ = MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst];
2646 reg = (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG1;
2667 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
2678 if (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) {
2679 if (reg_map[dst] <= 4) {
2687 *inst++ = MOD_REG | reg_map[dst];
2691 *inst = MOD_REG | (reg_map[dst] << 3) | reg_map[dst];
2702 EMIT_MOV(compiler, dst, 0, SLJIT_IMM, 0);
2711 *inst++ = MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1];
2726 *inst++ = MOD_REG | (reg_map[dst] << 3) | 0 /* eax */;
2731 if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && reg_map[dst] <= 4) {
2734 if (dst != SLJIT_R0) {
2744 *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
2782 return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
2832 … sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… argument
2835 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
2836 ADJUST_LOCAL_OFFSET(dst, dstw);
2838 CHECK_EXTRA_REGS(dst, dstw, (void)0);
2850 …SLJIT_ASSERT(emit_lea_binary(compiler, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0) != SLJIT_ERR_UNSUPPORT…
2853 return emit_lea_binary(compiler, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0);
2859 return emit_lea_binary(compiler, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset);
2860 return emit_mov(compiler, dst, dstw, SLJIT_SP, 0);
2863 …t sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, slj… argument
2872 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
2873 ADJUST_LOCAL_OFFSET(dst, dstw);
2875 CHECK_EXTRA_REGS(dst, dstw, (void)0);
2883 reg = FAST_IS_REG(dst) ? dst : TMP_REG1;
2888 if (emit_mov(compiler, dst, dstw, SLJIT_IMM, init_value))
2899 if (dst & SLJIT_MEM)
2900 if (emit_mov(compiler, dst, dstw, TMP_REG1, 0))