Lines Matching refs:inst

259 #define INC_SIZE(s)			(*inst++ = (s), compiler->size += (s))
261 #define PUSH_REG(r) (*inst++ = (PUSH_r + (r)))
262 #define POP_REG(r) (*inst++ = (POP_r + (r)))
263 #define RET() (*inst++ = (RET_near))
264 #define RET_I16(n) (*inst++ = (RET_i16), *inst++ = n, *inst++ = 0)
266 #define MOV_RM(mod, reg, rm) (*inst++ = (MOV_r_rm), *inst++ = (mod) << 6 | (reg) << 3 | (rm))
584 sljit_ub *inst; in emit_save_flags() local
587 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in emit_save_flags()
588 FAIL_IF(!inst); in emit_save_flags()
591 inst = (sljit_ub*)ensure_buf(compiler, 1 + 6); in emit_save_flags()
592 FAIL_IF(!inst); in emit_save_flags()
594 *inst++ = REX_W; in emit_save_flags()
596 *inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp + sizeof(sljit_sw)] */ in emit_save_flags()
597 *inst++ = 0x64; in emit_save_flags()
598 *inst++ = 0x24; in emit_save_flags()
599 *inst++ = (sljit_ub)sizeof(sljit_sw); in emit_save_flags()
600 *inst++ = PUSHF; in emit_save_flags()
607 sljit_ub *inst; in emit_restore_flags() local
610 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in emit_restore_flags()
611 FAIL_IF(!inst); in emit_restore_flags()
613 *inst++ = POPF; in emit_restore_flags()
615 inst = (sljit_ub*)ensure_buf(compiler, 1 + 6); in emit_restore_flags()
616 FAIL_IF(!inst); in emit_restore_flags()
618 *inst++ = POPF; in emit_restore_flags()
619 *inst++ = REX_W; in emit_restore_flags()
621 *inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp - sizeof(sljit_sw)] */ in emit_restore_flags()
622 *inst++ = 0x64; in emit_restore_flags()
623 *inst++ = 0x24; in emit_restore_flags()
624 *inst++ = (sljit_ub)-(sljit_sb)sizeof(sljit_sw); in emit_restore_flags()
656 sljit_ub* inst; in emit_mov() local
661 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw); in emit_mov()
662 FAIL_IF(!inst); in emit_mov()
663 *inst = MOV_r_rm; in emit_mov()
668 inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw); in emit_mov()
669 FAIL_IF(!inst); in emit_mov()
670 *inst = MOV_rm_r; in emit_mov()
689 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, dst, dstw); in emit_mov()
690 FAIL_IF(!inst); in emit_mov()
691 *inst = MOV_rm_r; in emit_mov()
695 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw); in emit_mov()
696 FAIL_IF(!inst); in emit_mov()
697 *inst = MOV_rm_i32; in emit_mov()
701 inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw); in emit_mov()
702 FAIL_IF(!inst); in emit_mov()
703 *inst = MOV_r_rm; in emit_mov()
708 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw); in emit_mov()
709 FAIL_IF(!inst); in emit_mov()
710 *inst = MOV_r_rm; in emit_mov()
711 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
712 FAIL_IF(!inst); in emit_mov()
713 *inst = MOV_rm_r; in emit_mov()
722 sljit_ub *inst; in sljit_emit_op0() local
732 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
733 FAIL_IF(!inst); in sljit_emit_op0()
735 *inst = INT3; in sljit_emit_op0()
738 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
739 FAIL_IF(!inst); in sljit_emit_op0()
741 *inst = NOP; in sljit_emit_op0()
769 inst = emit_x86_instruction(compiler, 1, SLJIT_R1, 0, SLJIT_R1, 0); in sljit_emit_op0()
771 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0); in sljit_emit_op0()
773 FAIL_IF(!inst); in sljit_emit_op0()
774 *inst = XOR_r_rm; in sljit_emit_op0()
783 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
784 FAIL_IF(!inst); in sljit_emit_op0()
786 *inst = CDQ; in sljit_emit_op0()
789 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
790 FAIL_IF(!inst); in sljit_emit_op0()
792 *inst = CDQ; in sljit_emit_op0()
794 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2); in sljit_emit_op0()
795 FAIL_IF(!inst); in sljit_emit_op0()
797 *inst++ = REX_W; in sljit_emit_op0()
798 *inst = CDQ; in sljit_emit_op0()
804 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2); in sljit_emit_op0()
805 FAIL_IF(!inst); in sljit_emit_op0()
807 *inst++ = GROUP_F7; in sljit_emit_op0()
808 *inst = MOD_REG | ((op >= SLJIT_LUDIV) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]); in sljit_emit_op0()
815 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_op0()
816 FAIL_IF(!inst); in sljit_emit_op0()
820 *inst++ = REX_W | ((op >= SLJIT_LUDIV) ? REX_B : 0); in sljit_emit_op0()
822 *inst++ = REX_B; in sljit_emit_op0()
823 *inst++ = GROUP_F7; in sljit_emit_op0()
824 *inst = MOD_REG | ((op >= SLJIT_LUDIV) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]); in sljit_emit_op0()
827 *inst++ = REX_W; in sljit_emit_op0()
828 *inst++ = GROUP_F7; in sljit_emit_op0()
829 *inst = MOD_REG | reg_map[SLJIT_R1]; in sljit_emit_op0()
834 *inst |= MUL; in sljit_emit_op0()
837 *inst |= IMUL; in sljit_emit_op0()
840 *inst |= DIV; in sljit_emit_op0()
843 *inst |= IDIV; in sljit_emit_op0()
857 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); \
858 FAIL_IF(!inst); \
860 *inst = (prefix); \
867 sljit_ub* inst; in emit_mov_byte() local
885 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_byte()
886 FAIL_IF(!inst); in emit_mov_byte()
887 *inst = MOV_rm_i32; in emit_mov_byte()
891inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw… in emit_mov_byte()
892 FAIL_IF(!inst); in emit_mov_byte()
893 *inst = MOV_rm8_i8; in emit_mov_byte()
917 inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0); in emit_mov_byte()
918 FAIL_IF(!inst); in emit_mov_byte()
919 *inst++ = GROUP_0F; in emit_mov_byte()
920 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8; in emit_mov_byte()
927 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
928 FAIL_IF(!inst); in emit_mov_byte()
929 *inst |= SHL; in emit_mov_byte()
931 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
932 FAIL_IF(!inst); in emit_mov_byte()
933 *inst |= SAR; in emit_mov_byte()
936 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0); in emit_mov_byte()
937 FAIL_IF(!inst); in emit_mov_byte()
938 *(inst + 1) |= AND; in emit_mov_byte()
946 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw); in emit_mov_byte()
947 FAIL_IF(!inst); in emit_mov_byte()
948 *inst++ = GROUP_0F; in emit_mov_byte()
949 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8; in emit_mov_byte()
975 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); in emit_mov_byte()
976 FAIL_IF(!inst); in emit_mov_byte()
977 *inst = XCHG_r_rm; in emit_mov_byte()
980 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw); in emit_mov_byte()
981 FAIL_IF(!inst); in emit_mov_byte()
982 *inst = MOV_rm8_r8; in emit_mov_byte()
988 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); in emit_mov_byte()
989 FAIL_IF(!inst); in emit_mov_byte()
990 *inst = XCHG_r_rm; in emit_mov_byte()
994 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_byte()
995 FAIL_IF(!inst); in emit_mov_byte()
996 *inst = MOV_rm8_r8; in emit_mov_byte()
999 inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw); in emit_mov_byte()
1000 FAIL_IF(!inst); in emit_mov_byte()
1001 *inst = MOV_rm8_r8; in emit_mov_byte()
1012 sljit_ub* inst; in emit_mov_half() local
1027 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_half()
1028 FAIL_IF(!inst); in emit_mov_half()
1029 *inst = MOV_rm_i32; in emit_mov_half()
1033inst = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, … in emit_mov_half()
1034 FAIL_IF(!inst); in emit_mov_half()
1035 *inst = MOV_rm_i32; in emit_mov_half()
1044 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw); in emit_mov_half()
1045 FAIL_IF(!inst); in emit_mov_half()
1046 *inst++ = GROUP_0F; in emit_mov_half()
1047 *inst = sign ? MOVSX_r_rm16 : MOVZX_r_rm16; in emit_mov_half()
1051 inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw); in emit_mov_half()
1052 FAIL_IF(!inst); in emit_mov_half()
1053 *inst = MOV_rm_r; in emit_mov_half()
1063 sljit_ub* inst; in emit_unary() local
1067 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_unary()
1068 FAIL_IF(!inst); in emit_unary()
1069 *inst++ = GROUP_F7; in emit_unary()
1070 *inst |= opcode; in emit_unary()
1075 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_unary()
1076 FAIL_IF(!inst); in emit_unary()
1077 *inst++ = GROUP_F7; in emit_unary()
1078 *inst |= opcode; in emit_unary()
1083 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_unary()
1084 FAIL_IF(!inst); in emit_unary()
1085 *inst++ = GROUP_F7; in emit_unary()
1086 *inst |= opcode; in emit_unary()
1090 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_unary()
1091 FAIL_IF(!inst); in emit_unary()
1092 *inst++ = GROUP_F7; in emit_unary()
1093 *inst |= opcode; in emit_unary()
1102 sljit_ub* inst; in emit_not_with_flags() local
1106 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_not_with_flags()
1107 FAIL_IF(!inst); in emit_not_with_flags()
1108 *inst++ = GROUP_F7; in emit_not_with_flags()
1109 *inst |= NOT_rm; in emit_not_with_flags()
1110 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0); in emit_not_with_flags()
1111 FAIL_IF(!inst); in emit_not_with_flags()
1112 *inst = OR_r_rm; in emit_not_with_flags()
1117 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_not_with_flags()
1118 FAIL_IF(!inst); in emit_not_with_flags()
1119 *inst++ = GROUP_F7; in emit_not_with_flags()
1120 *inst |= NOT_rm; in emit_not_with_flags()
1121 inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0); in emit_not_with_flags()
1122 FAIL_IF(!inst); in emit_not_with_flags()
1123 *inst = OR_r_rm; in emit_not_with_flags()
1127 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_not_with_flags()
1128 FAIL_IF(!inst); in emit_not_with_flags()
1129 *inst++ = GROUP_F7; in emit_not_with_flags()
1130 *inst |= NOT_rm; in emit_not_with_flags()
1131 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0); in emit_not_with_flags()
1132 FAIL_IF(!inst); in emit_not_with_flags()
1133 *inst = OR_r_rm; in emit_not_with_flags()
1142 sljit_ub* inst; in emit_clz() local
1149 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_clz()
1150 FAIL_IF(!inst); in emit_clz()
1151 *inst++ = GROUP_F7; in emit_clz()
1152 *inst |= NOT_rm; in emit_clz()
1154 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 31, TMP_REG1, 0); in emit_clz()
1156inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, !(op_flags & SLJIT_INT_OP) ? … in emit_clz()
1158 FAIL_IF(!inst); in emit_clz()
1159 *inst |= SHR; in emit_clz()
1169 inst = emit_x86_instruction(compiler, 2, TMP_REG1, 0, src, srcw); in emit_clz()
1170 FAIL_IF(!inst); in emit_clz()
1171 *inst++ = GROUP_0F; in emit_clz()
1172 *inst = BSR_r_rm; in emit_clz()
1199 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG1, 0); in emit_clz()
1200 FAIL_IF(!inst); in emit_clz()
1201 *inst++ = GROUP_0F; in emit_clz()
1202 *inst = CMOVNE_r_rm; in emit_clz()
1205 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4); in emit_clz()
1206 FAIL_IF(!inst); in emit_clz()
1209 *inst++ = JE_i8; in emit_clz()
1210 *inst++ = 2; in emit_clz()
1211 *inst++ = MOV_r_rm; in emit_clz()
1212 *inst++ = MOD_REG | (reg_map[dst_r] << 3) | reg_map[TMP_REG1]; in emit_clz()
1214 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in emit_clz()
1215 FAIL_IF(!inst); in emit_clz()
1218 *inst++ = JE_i8; in emit_clz()
1219 *inst++ = 3; in emit_clz()
1220 *inst++ = REX_W | (reg_map[dst_r] >= 8 ? REX_R : 0) | (reg_map[TMP_REG1] >= 8 ? REX_B : 0); in emit_clz()
1221 *inst++ = MOV_r_rm; in emit_clz()
1222 *inst++ = MOD_REG | (reg_lmap[dst_r] << 3) | reg_lmap[TMP_REG1]; in emit_clz()
1227 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0); in emit_clz()
1229inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_INT_OP) ? 63… in emit_clz()
1231 FAIL_IF(!inst); in emit_clz()
1232 *(inst + 1) |= XOR; in emit_clz()
1236 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_clz()
1237 FAIL_IF(!inst); in emit_clz()
1238 *inst = XCHG_r_rm; in emit_clz()
1251 sljit_ub* inst; in sljit_emit_op1() local
1331 inst = emit_x86_instruction(compiler, 1, src & REG_MASK, 0, src, srcw); in sljit_emit_op1()
1332 FAIL_IF(!inst); in sljit_emit_op1()
1333 *inst = LEA_r_m; in sljit_emit_op1()
1382 inst = emit_x86_instruction(compiler, 1, dst & REG_MASK, 0, dst, dstw); in sljit_emit_op1()
1383 FAIL_IF(!inst); in sljit_emit_op1()
1384 *inst = LEA_r_m; in sljit_emit_op1()
1420 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
1421 FAIL_IF(!inst); \
1422 *(inst + 1) |= (op_imm); \
1426 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, arg, argw); \
1427 FAIL_IF(!inst); \
1428 *inst = (op_mr); \
1437 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
1438 FAIL_IF(!inst); \
1439 *(inst + 1) |= (op_imm);
1452 sljit_ub* inst; local
1460 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1461 FAIL_IF(!inst);
1462 *inst = op_rm;
1481 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1482 FAIL_IF(!inst);
1483 *inst = op_rm;
1487 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1488 FAIL_IF(!inst);
1489 *inst = op_mr;
1493 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1494 FAIL_IF(!inst);
1495 *inst = op_mr;
1515 inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
1516 FAIL_IF(!inst);
1517 *inst = op_rm;
1520 inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
1521 FAIL_IF(!inst);
1522 *inst = op_mr;
1526 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1527 FAIL_IF(!inst);
1528 *inst = op_mr;
1540 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1541 FAIL_IF(!inst);
1542 *inst = op_rm;
1552 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1553 FAIL_IF(!inst);
1554 *inst = op_rm;
1568 sljit_ub* inst; local
1576 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1577 FAIL_IF(!inst);
1578 *inst = op_rm;
1597 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1598 FAIL_IF(!inst);
1599 *inst = op_rm;
1602 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1603 FAIL_IF(!inst);
1604 *inst = op_mr;
1608 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1609 FAIL_IF(!inst);
1610 *inst = op_mr;
1622 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1623 FAIL_IF(!inst);
1624 *inst = op_rm;
1634 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1635 FAIL_IF(!inst);
1636 *inst = op_rm;
1649 sljit_ub* inst; local
1656 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1657 FAIL_IF(!inst);
1658 *inst++ = GROUP_0F;
1659 *inst = IMUL_r_rm;
1662 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src1, src1w);
1663 FAIL_IF(!inst);
1664 *inst++ = GROUP_0F;
1665 *inst = IMUL_r_rm;
1675 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1676 FAIL_IF(!inst);
1677 *inst = IMUL_r_rm_i8;
1678 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
1679 FAIL_IF(!inst);
1681 *inst = (sljit_sb)src1w;
1685 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1686 FAIL_IF(!inst);
1687 *inst = IMUL_r_rm_i32;
1688 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1689 FAIL_IF(!inst);
1691 *(sljit_sw*)inst = src1w;
1695 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1696 FAIL_IF(!inst);
1697 *inst = IMUL_r_rm_i32;
1698 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1699 FAIL_IF(!inst);
1701 *(sljit_si*)inst = (sljit_si)src1w;
1707 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1708 FAIL_IF(!inst);
1709 *inst++ = GROUP_0F;
1710 *inst = IMUL_r_rm;
1718 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1719 FAIL_IF(!inst);
1720 *inst = IMUL_r_rm_i8;
1721 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
1722 FAIL_IF(!inst);
1724 *inst = (sljit_sb)src2w;
1728 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1729 FAIL_IF(!inst);
1730 *inst = IMUL_r_rm_i32;
1731 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1732 FAIL_IF(!inst);
1734 *(sljit_sw*)inst = src2w;
1738 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1739 FAIL_IF(!inst);
1740 *inst = IMUL_r_rm_i32;
1741 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1742 FAIL_IF(!inst);
1744 *(sljit_si*)inst = (sljit_si)src2w;
1750 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1751 FAIL_IF(!inst);
1752 *inst++ = GROUP_0F;
1753 *inst = IMUL_r_rm;
1762 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1763 FAIL_IF(!inst);
1764 *inst++ = GROUP_0F;
1765 *inst = IMUL_r_rm;
1779 sljit_ub* inst; local
1794 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM2(src1, src2), 0);
1795 FAIL_IF(!inst);
1796 *inst = LEA_r_m;
1801 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), (sljit_si)src2w);
1804 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), src2w);
1806 FAIL_IF(!inst);
1807 *inst = LEA_r_m;
1814 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), (sljit_si)src1w);
1817 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), src1w);
1819 FAIL_IF(!inst);
1820 *inst = LEA_r_m;
1837 sljit_ub* inst; local
1853 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
1854 FAIL_IF(!inst);
1855 *inst = CMP_r_rm;
1861 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
1862 FAIL_IF(!inst);
1863 *inst = CMP_rm_r;
1877 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1878 FAIL_IF(!inst);
1879 *inst = CMP_r_rm;
1888 sljit_ub* inst; local
1912 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
1913 FAIL_IF(!inst);
1914 *inst = GROUP_F7;
1918 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, 0);
1919 FAIL_IF(!inst);
1920 *inst = TEST_rm_r;
1923 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
1924 FAIL_IF(!inst);
1925 *inst = GROUP_F7;
1929 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
1930 FAIL_IF(!inst);
1931 *inst = TEST_rm_r;
1940 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, 0);
1941 FAIL_IF(!inst);
1942 *inst = GROUP_F7;
1946 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, 0);
1947 FAIL_IF(!inst);
1948 *inst = TEST_rm_r;
1951 inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, 0);
1952 FAIL_IF(!inst);
1953 *inst = GROUP_F7;
1957 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
1958 FAIL_IF(!inst);
1959 *inst = TEST_rm_r;
1968 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
1969 FAIL_IF(!inst);
1970 *inst = GROUP_F7;
1974 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, TMP_REG1, 0);
1975 FAIL_IF(!inst);
1976 *inst = TEST_rm_r;
1979 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
1980 FAIL_IF(!inst);
1981 *inst = GROUP_F7;
1985 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1986 FAIL_IF(!inst);
1987 *inst = TEST_rm_r;
1998 sljit_ub* inst; local
2002 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
2003 FAIL_IF(!inst);
2004 *inst |= mode;
2009 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
2010 FAIL_IF(!inst);
2011 *inst |= mode;
2016 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2017 FAIL_IF(!inst);
2018 *inst |= mode;
2024 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
2025 FAIL_IF(!inst);
2026 *inst |= mode;
2031 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
2032 FAIL_IF(!inst);
2033 *inst |= mode;
2041 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2042 FAIL_IF(!inst);
2043 *inst |= mode;
2051 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
2052 FAIL_IF(!inst);
2053 *inst |= mode;
2067 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2068 FAIL_IF(!inst);
2069 *inst |= mode;
2230 sljit_ub *inst; local
2235 inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
2236 FAIL_IF(!inst);
2238 SLJIT_MEMMOVE(inst, instruction, size);
2279 sljit_ub *inst; local
2281inst = emit_x86_instruction(compiler, 2 | (single ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2, xmm1…
2282 FAIL_IF(!inst);
2283 *inst++ = GROUP_0F;
2284 *inst = opcode;
2291 sljit_ub *inst; local
2293inst = emit_x86_instruction(compiler, 2 | (pref66 ? EX86_PREF_66 : 0) | EX86_SSE2, xmm1, 0, xmm2, …
2294 FAIL_IF(!inst);
2295 *inst++ = GROUP_0F;
2296 *inst = opcode;
2317 sljit_ub *inst; local
2324inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_SINGLE_OP) ? EX86_PREF_F3 : EX86_PREF_F2) |…
2325 FAIL_IF(!inst);
2326 *inst++ = GROUP_0F;
2327 *inst = CVTTSD2SI_r_xm;
2339 sljit_ub *inst; local
2356inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_SINGLE_OP) ? EX86_PREF_F3 : EX86_PREF_F2) |…
2357 FAIL_IF(!inst);
2358 *inst++ = GROUP_0F;
2359 *inst = CVTSI2SD_x_rm;
2514 sljit_ub *inst; local
2532 inst = (sljit_ub*)ensure_buf(compiler, 2);
2533 PTR_FAIL_IF(!inst);
2535 *inst++ = 0;
2536 *inst++ = 0;
2543 sljit_ub *inst; local
2570 inst = (sljit_ub*)ensure_buf(compiler, 2);
2571 PTR_FAIL_IF_NULL(inst);
2573 *inst++ = 0;
2574 *inst++ = type + 4;
2580 sljit_ub *inst; local
2628 inst = (sljit_ub*)ensure_buf(compiler, 2);
2629 FAIL_IF_NULL(inst);
2631 *inst++ = 0;
2632 *inst++ = type + 4;
2639 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
2640 FAIL_IF(!inst);
2641 *inst++ = GROUP_FF;
2642 *inst |= (type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm;
2652 sljit_ub *inst; local
2680 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + 3);
2681 FAIL_IF(!inst);
2684 *inst++ = (reg_map[TMP_REG1] <= 7) ? REX : REX_B;
2685 *inst++ = GROUP_0F;
2686 *inst++ = cond_set;
2687 *inst++ = MOD_REG | reg_lmap[TMP_REG1];
2688 *inst++ = REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B);
2689 *inst++ = OR_rm8_r8;
2690 *inst++ = MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst];
2696 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + 4);
2697 FAIL_IF(!inst);
2700 *inst++ = (reg_map[reg] <= 7) ? REX : REX_B;
2701 *inst++ = GROUP_0F;
2702 *inst++ = cond_set;
2703 *inst++ = MOD_REG | reg_lmap[reg];
2704 *inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : (REX_B | REX_R));
2705 *inst++ = GROUP_0F;
2706 *inst++ = MOVZX_r_rm8;
2707 *inst = MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg];
2725 inst = (sljit_ub*)ensure_buf(compiler, 1 + 3 + 3);
2726 FAIL_IF(!inst);
2729 *inst++ = GROUP_0F;
2730 *inst++ = cond_set;
2731 *inst++ = MOD_REG | reg_map[dst];
2733 *inst++ = GROUP_0F;
2734 *inst++ = MOVZX_r_rm8;
2735 *inst = MOD_REG | (reg_map[dst] << 3) | reg_map[dst];
2748 inst = (sljit_ub*)ensure_buf(compiler, 1 + 3);
2749 FAIL_IF(!inst);
2752 *inst++ = GROUP_0F;
2754 *inst++ = cond_set - 0x50;
2755 *inst++ = MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1];
2759 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2760 FAIL_IF(!inst);
2762 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2764 *inst++ = GROUP_0F;
2765 *inst++ = cond_set;
2766 *inst++ = MOD_REG | 0 /* eax */;
2768 *inst++ = GROUP_0F;
2769 *inst++ = MOVZX_r_rm8;
2770 *inst++ = MOD_REG | (reg_map[dst] << 3) | 0 /* eax */;
2771 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2778 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 2 + 1);
2779 FAIL_IF(!inst);
2782 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2783 *inst++ = GROUP_0F;
2784 *inst++ = cond_set;
2785 *inst++ = MOD_REG | 0 /* eax */;
2786 *inst++ = OR_rm8_r8;
2787 *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
2788 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2791 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + 3 + 2 + 2);
2792 FAIL_IF(!inst);
2795 *inst++ = XCHG_r_rm;
2796 *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
2797 *inst++ = GROUP_0F;
2798 *inst++ = cond_set;
2799 *inst++ = MOD_REG | 1 /* ecx */;
2800 *inst++ = OR_rm8_r8;
2801 *inst++ = MOD_REG | (1 /* ecx */ << 3) | 0 /* eax */;
2802 *inst++ = XCHG_r_rm;
2803 *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
2809 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2810 FAIL_IF(!inst);
2812 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2814 *inst++ = GROUP_0F;
2815 *inst++ = cond_set;
2816 *inst++ = MOD_REG | 0 /* eax */;
2818 *inst++ = GROUP_0F;
2819 *inst++ = MOVZX_r_rm8;
2820 *inst++ = MOD_REG | (0 << 3) /* eax */ | 0 /* eax */;
2822 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2868 sljit_ub *inst; local
2898 inst = (sljit_ub*)ensure_buf(compiler, 2);
2899 PTR_FAIL_IF(!inst);
2901 *inst++ = 0;
2902 *inst++ = 1;