Home | History | Annotate | Download | only in sljit_src

Lines Matching refs:inst

264 #define INC_SIZE(s)			(*inst++ = (s), compiler->size += (s))
266 #define PUSH_REG(r) (*inst++ = (PUSH_r + (r)))
267 #define POP_REG(r) (*inst++ = (POP_r + (r)))
268 #define RET() (*inst++ = (RET_near))
269 #define RET_I16(n) (*inst++ = (RET_i16), *inst++ = n, *inst++ = 0)
271 #define MOV_RM(mod, reg, rm) (*inst++ = (MOV_r_rm), *inst++ = (mod) << 6 | (reg) << 3 | (rm))
643 sljit_u8* inst;
648 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw);
649 FAIL_IF(!inst);
650 *inst = MOV_r_rm;
655 inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw);
656 FAIL_IF(!inst);
657 *inst = MOV_rm_r;
676 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, dst, dstw);
677 FAIL_IF(!inst);
678 *inst = MOV_rm_r;
682 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw);
683 FAIL_IF(!inst);
684 *inst = MOV_rm_i32;
688 inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw);
689 FAIL_IF(!inst);
690 *inst = MOV_r_rm;
695 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw);
696 FAIL_IF(!inst);
697 *inst = MOV_r_rm;
698 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
699 FAIL_IF(!inst);
700 *inst = MOV_rm_r;
706 sljit_u8 *inst;
716 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
717 FAIL_IF(!inst);
719 *inst = INT3;
722 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
723 FAIL_IF(!inst);
725 *inst = NOP;
753 inst = emit_x86_instruction(compiler, 1, SLJIT_R1, 0, SLJIT_R1, 0);
755 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
757 FAIL_IF(!inst);
758 *inst = XOR_r_rm;
767 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
768 FAIL_IF(!inst);
770 *inst = CDQ;
773 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
774 FAIL_IF(!inst);
776 *inst = CDQ;
778 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2);
779 FAIL_IF(!inst);
781 *inst++ = REX_W;
782 *inst = CDQ;
788 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2);
789 FAIL_IF(!inst);
791 *inst++ = GROUP_F7;
792 *inst = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]);
799 inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
800 FAIL_IF(!inst);
804 *inst++ = REX_W | ((op >= SLJIT_DIVMOD_UW) ? REX_B : 0);
806 *inst++ = REX_B;
807 *inst++ = GROUP_F7;
808 *inst = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]);
811 *inst++ = REX_W;
812 *inst++ = GROUP_F7;
813 *inst = MOD_REG | reg_map[SLJIT_R1];
818 *inst |= MUL;
821 *inst |= IMUL;
825 *inst |= DIV;
829 *inst |= IDIV;
847 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); \
848 FAIL_IF(!inst); \
850 *inst = (prefix); \
857 sljit_u8* inst;
875 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0);
876 FAIL_IF(!inst);
877 *inst = MOV_rm_i32;
881 inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw);
882 FAIL_IF(!inst);
883 *inst = MOV_rm8_i8;
907 inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0);
908 FAIL_IF(!inst);
909 *inst++ = GROUP_0F;
910 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8;
917 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
918 FAIL_IF(!inst);
919 *inst |= SHL;
921 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
922 FAIL_IF(!inst);
923 *inst |= SAR;
926 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0);
927 FAIL_IF(!inst);
928 *(inst + 1) |= AND;
936 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
937 FAIL_IF(!inst);
938 *inst++ = GROUP_0F;
939 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8;
965 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
966 FAIL_IF(!inst);
967 *inst = XCHG_r_rm;
970 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw);
971 FAIL_IF(!inst);
972 *inst = MOV_rm8_r8;
978 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
979 FAIL_IF(!inst);
980 *inst = XCHG_r_rm;
984 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
985 FAIL_IF(!inst);
986 *inst = MOV_rm8_r8;
989 inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw);
990 FAIL_IF(!inst);
991 *inst = MOV_rm8_r8;
1002 sljit_u8* inst;
1017 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0);
1018 FAIL_IF(!inst);
1019 *inst = MOV_rm_i32;
1023 inst = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, srcw, dst, dstw);
1024 FAIL_IF(!inst);
1025 *inst = MOV_rm_i32;
1034 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
1035 FAIL_IF(!inst);
1036 *inst++ = GROUP_0F;
1037 *inst = sign ? MOVSX_r_rm16 : MOVZX_r_rm16;
1041 inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw);
1042 FAIL_IF(!inst);
1043 *inst = MOV_rm_r;
1053 sljit_u8* inst;
1057 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
1058 FAIL_IF(!inst);
1059 *inst++ = GROUP_F7;
1060 *inst |= opcode;
1065 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
1066 FAIL_IF(!inst);
1067 *inst++ = GROUP_F7;
1068 *inst |= opcode;
1073 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
1074 FAIL_IF(!inst);
1075 *inst++ = GROUP_F7;
1076 *inst |= opcode;
1080 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
1081 FAIL_IF(!inst);
1082 *inst++ = GROUP_F7;
1083 *inst |= opcode;
1092 sljit_u8* inst;
1096 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
1097 FAIL_IF(!inst);
1098 *inst++ = GROUP_F7;
1099 *inst |= NOT_rm;
1100 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
1101 FAIL_IF(!inst);
1102 *inst = OR_r_rm;
1107 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
1108 FAIL_IF(!inst);
1109 *inst++ = GROUP_F7;
1110 *inst |= NOT_rm;
1111 inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0);
1112 FAIL_IF(!inst);
1113 *inst = OR_r_rm;
1117 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
1118 FAIL_IF(!inst);
1119 *inst++ = GROUP_F7;
1120 *inst |= NOT_rm;
1121 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
1122 FAIL_IF(!inst);
1123 *inst = OR_r_rm;
1132 sljit_u8* inst;
1139 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
1140 FAIL_IF(!inst);
1141 *inst++ = GROUP_F7;
1142 *inst |= NOT_rm;
1144 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 31, TMP_REG1, 0);
1146 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? 63 : 31, TMP_REG1, 0);
1148 FAIL_IF(!inst);
1149 *inst |= SHR;
1159 inst = emit_x86_instruction(compiler, 2, TMP_REG1, 0, src, srcw);
1160 FAIL_IF(!inst);
1161 *inst++ = GROUP_0F;
1162 *inst = BSR_r_rm;
1189 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG1, 0);
1190 FAIL_IF(!inst);
1191 *inst++ = GROUP_0F;
1192 *inst = CMOVNE_r_rm;
1195 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
1196 FAIL_IF(!inst);
1199 *inst++ = JE_i8;
1200 *inst++ = 2;
1201 *inst++ = MOV_r_rm;
1202 *inst++ = MOD_REG | (reg_map[dst_r] << 3) | reg_map[TMP_REG1];
1204 inst = (sljit_u8*)ensure_buf(compiler, 1 + 5);
1205 FAIL_IF(!inst);
1208 *inst++ = JE_i8;
1209 *inst++ = 3;
1210 *inst++ = REX_W | (reg_map[dst_r] >= 8 ? REX_R : 0) | (reg_map[TMP_REG1] >= 8 ? REX_B : 0);
1211 *inst++ = MOV_r_rm;
1212 *inst++ = MOD_REG | (reg_lmap[dst_r] << 3) | reg_lmap[TMP_REG1];
1217 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0);
1219 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? 63 : 31, dst_r, 0);
1221 FAIL_IF(!inst);
1222 *(inst + 1) |= XOR;
1226 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
1227 FAIL_IF(!inst);
1228 *inst = XCHG_r_rm;
1410 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
1411 FAIL_IF(!inst); \
1412 *(inst + 1) |= (op_imm); \
1416 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, arg, argw); \
1417 FAIL_IF(!inst); \
1418 *inst = (op_mr); \
1427 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
1428 FAIL_IF(!inst); \
1429 *(inst + 1) |= (op_imm);
1442 sljit_u8* inst;
1450 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1451 FAIL_IF(!inst);
1452 *inst = op_rm;
1471 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1472 FAIL_IF(!inst);
1473 *inst = op_rm;
1477 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1478 FAIL_IF(!inst);
1479 *inst = op_mr;
1483 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1484 FAIL_IF(!inst);
1485 *inst = op_mr;
1505 inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
1506 FAIL_IF(!inst);
1507 *inst = op_rm;
1510 inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
1511 FAIL_IF(!inst);
1512 *inst = op_mr;
1516 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1517 FAIL_IF(!inst);
1518 *inst = op_mr;
1530 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1531 FAIL_IF(!inst);
1532 *inst = op_rm;
1542 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1543 FAIL_IF(!inst);
1544 *inst = op_rm;
1558 sljit_u8* inst;
1566 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1567 FAIL_IF(!inst);
1568 *inst = op_rm;
1587 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1588 FAIL_IF(!inst);
1589 *inst = op_rm;
1592 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1593 FAIL_IF(!inst);
1594 *inst = op_mr;
1598 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1599 FAIL_IF(!inst);
1600 *inst = op_mr;
1612 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1613 FAIL_IF(!inst);
1614 *inst = op_rm;
1624 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1625 FAIL_IF(!inst);
1626 *inst = op_rm;
1639 sljit_u8* inst;
1646 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1647 FAIL_IF(!inst);
1648 *inst++ = GROUP_0F;
1649 *inst = IMUL_r_rm;
1652 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src1, src1w);
1653 FAIL_IF(!inst);
1654 *inst++ = GROUP_0F;
1655 *inst = IMUL_r_rm;
1665 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1666 FAIL_IF(!inst);
1667 *inst = IMUL_r_rm_i8;
1668 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
1669 FAIL_IF(!inst);
1671 *inst = (sljit_s8)src1w;
1675 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1676 FAIL_IF(!inst);
1677 *inst = IMUL_r_rm_i32;
1678 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
1679 FAIL_IF(!inst);
1681 sljit_unaligned_store_sw(inst, 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_u8*)ensure_buf(compiler, 1 + 4);
1689 FAIL_IF(!inst);
1691 sljit_unaligned_store_s32(inst, (sljit_s32)src1w);
1697 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1698 FAIL_IF(!inst);
1699 *inst++ = GROUP_0F;
1700 *inst = IMUL_r_rm;
1708 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1709 FAIL_IF(!inst);
1710 *inst = IMUL_r_rm_i8;
1711 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
1712 FAIL_IF(!inst);
1714 *inst = (sljit_s8)src2w;
1718 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1719 FAIL_IF(!inst);
1720 *inst = IMUL_r_rm_i32;
1721 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
1722 FAIL_IF(!inst);
1724 sljit_unaligned_store_sw(inst, 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_u8*)ensure_buf(compiler, 1 + 4);
1732 FAIL_IF(!inst);
1734 sljit_unaligned_store_s32(inst, (sljit_s32)src2w);
1740 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1741 FAIL_IF(!inst);
1742 *inst++ = GROUP_0F;
1743 *inst = IMUL_r_rm;
1752 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1753 FAIL_IF(!inst);
1754 *inst++ = GROUP_0F;
1755 *inst = IMUL_r_rm;
1769 sljit_u8* inst;
1782 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM2(src1, src2), 0);
1783 FAIL_IF(!inst);
1784 *inst = LEA_r_m;
1789 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), (sljit_s32)src2w);
1792 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), src2w);
1794 FAIL_IF(!inst);
1795 *inst = LEA_r_m;
1802 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), (sljit_s32)src1w);
1805 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), src1w);
1807 FAIL_IF(!inst);
1808 *inst = LEA_r_m;
1825 sljit_u8* inst;
1841 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
1842 FAIL_IF(!inst);
1843 *inst = CMP_r_rm;
1849 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
1850 FAIL_IF(!inst);
1851 *inst = CMP_rm_r;
1865 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1866 FAIL_IF(!inst);
1867 *inst = CMP_r_rm;
1876 sljit_u8* inst;
1900 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
1901 FAIL_IF(!inst);
1902 *inst = GROUP_F7;
1906 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, src1w);
1907 FAIL_IF(!inst);
1908 *inst = TEST_rm_r;
1911 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
1912 FAIL_IF(!inst);
1913 *inst = GROUP_F7;
1918 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
1919 FAIL_IF(!inst);
1920 *inst = TEST_rm_r;
1929 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, src2w);
1930 FAIL_IF(!inst);
1931 *inst = GROUP_F7;
1935 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, src2w);
1936 FAIL_IF(!inst);
1937 *inst = TEST_rm_r;
1940 inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, src2w);
1941 FAIL_IF(!inst);
1942 *inst = GROUP_F7;
1947 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
1948 FAIL_IF(!inst);
1949 *inst = TEST_rm_r;
1958 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
1959 FAIL_IF(!inst);
1960 *inst = GROUP_F7;
1964 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, TMP_REG1, 0);
1965 FAIL_IF(!inst);
1966 *inst = TEST_rm_r;
1969 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
1970 FAIL_IF(!inst);
1971 *inst = GROUP_F7;
1975 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1976 FAIL_IF(!inst);
1977 *inst = TEST_rm_r;
1988 sljit_u8* inst;
1992 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
1993 FAIL_IF(!inst);
1994 *inst |= mode;
1999 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
2000 FAIL_IF(!inst);
2001 *inst |= mode;
2006 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2007 FAIL_IF(!inst);
2008 *inst |= mode;
2014 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
2015 FAIL_IF(!inst);
2016 *inst |= mode;
2021 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
2022 FAIL_IF(!inst);
2023 *inst |= mode;
2031 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, 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, dst, 0);
2042 FAIL_IF(!inst);
2043 *inst |= mode;
2056 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2057 FAIL_IF(!inst);
2058 *inst |= mode;
2193 sljit_u8 *inst;
2198 inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
2199 FAIL_IF(!inst);
2201 SLJIT_MEMCPY(inst, instruction, size);
2242 sljit_u8 *inst;
2244 inst = emit_x86_instruction(compiler, 2 | (single ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
2245 FAIL_IF(!inst);
2246 *inst++ = GROUP_0F;
2247 *inst = opcode;
2254 sljit_u8 *inst;
2256 inst = emit_x86_instruction(compiler, 2 | (pref66 ? EX86_PREF_66 : 0) | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
2257 FAIL_IF(!inst);
2258 *inst++ = GROUP_0F;
2259 *inst = opcode;
2280 sljit_u8 *inst;
2287 inst
2288 FAIL_IF(!inst);
2289 *inst++ = GROUP_0F;
2290 *inst = CVTTSD2SI_r_xm;
2302 sljit_u8 *inst;
2319 inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_F32_OP) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP1, dst_r, 0, src, srcw);
2320 FAIL_IF(!inst);
2321 *inst++ = GROUP_0F;
2322 *inst = CVTSI2SD_x_rm;
2476 sljit_u8 *inst;
2489 inst = (sljit_u8*)ensure_buf(compiler, 2);
2490 PTR_FAIL_IF(!inst);
2492 *inst++ = 0;
2493 *inst++ = 0;
2500 sljit_u8 *inst;
2521 inst = (sljit_u8*)ensure_buf(compiler, 2);
2522 PTR_FAIL_IF_NULL(inst);
2524 *inst++ = 0;
2525 *inst++ = type + 2;
2531 sljit_u8 *inst;
2573 inst = (sljit_u8*)ensure_buf(compiler, 2);
2574 FAIL_IF_NULL(inst);
2576 *inst++ = 0;
2577 *inst++ = type + 2;
2584 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
2585 FAIL_IF(!inst);
2586 *inst++ = GROUP_FF;
2587 *inst |= (type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm;
2597 sljit_u8 *inst;
2622 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + 3);
2623 FAIL_IF(!inst);
2626 *inst++ = (reg_map[TMP_REG1] <= 7) ? REX : REX_B;
2627 *inst++ = GROUP_0F;
2628 *inst++ = cond_set;
2629 *inst++ = MOD_REG | reg_lmap[TMP_REG1];
2630 *inst++ = REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B);
2631 *inst++ = OR_rm8_r8;
2632 *inst++ = MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst];
2638 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + 4);
2639 FAIL_IF(!inst);
2642 *inst++ = (reg_map[reg] <= 7) ? REX : REX_B;
2643 *inst++ = GROUP_0F;
2644 *inst++ = cond_set;
2645 *inst++ = MOD_REG | reg_lmap[reg];
2646 *inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : (REX_B | REX_R));
2648 *inst++ = GROUP_0F;
2649 *inst++ = MOVZX_r_rm8;
2650 *inst = MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg];
2670 inst = (sljit_u8*)ensure_buf(compiler, 1 + 3 + 3);
2671 FAIL_IF(!inst);
2674 *inst++ = GROUP_0F;
2675 *inst++ = cond_set;
2676 *inst++ = MOD_REG | reg_map[dst];
2678 *inst++ = GROUP_0F;
2679 *inst++ = MOVZX_r_rm8;
2680 *inst = MOD_REG | (reg_map[dst] << 3) | reg_map[dst];
2693 inst = (sljit_u8*)ensure_buf(compiler, 1 + 3);
2694 FAIL_IF(!inst);
2697 *inst++ = GROUP_0F;
2699 *inst++ = cond_set - 0x50;
2700 *inst++ = MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1];
2704 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2705 FAIL_IF(!inst);
2707 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2709 *inst++ = GROUP_0F;
2710 *inst++ = cond_set;
2711 *inst++ = MOD_REG | 0 /* eax */;
2713 *inst++ = GROUP_0F;
2714 *inst++ = MOVZX_r_rm8;
2715 *inst++ = MOD_REG | (reg_map[dst] << 3) | 0 /* eax */;
2716 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2724 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 2 + 1);
2725 FAIL_IF(!inst);
2728 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2729 *inst++ = GROUP_0F;
2730 *inst++ = cond_set;
2731 *inst++ = MOD_REG | 0 /* eax */;
2732 *inst++ = OR_rm8_r8;
2733 *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
2734 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2737 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + 3 + 2 + 2);
2738 FAIL_IF(!inst);
2741 *inst++ = XCHG_r_rm;
2742 *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
2743 *inst++ = GROUP_0F;
2744 *inst++ = cond_set;
2745 *inst++ = MOD_REG | 1 /* ecx */;
2746 *inst++ = OR_rm8_r8;
2747 *inst++ = MOD_REG | (1 /* ecx */ << 3) | 0 /* eax */;
2748 *inst++ = XCHG_r_rm;
2749 *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
2755 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2756 FAIL_IF(!inst);
2758 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2760 *inst++ = GROUP_0F;
2761 *inst++ = cond_set;
2762 *inst++ = MOD_REG | 0 /* eax */;
2764 *inst++ = GROUP_0F;
2765 *inst++ = MOVZX_r_rm8;
2766 *inst++ = MOD_REG | (0 << 3) /* eax */ | 0 /* eax */;
2768 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2814 sljit_u8 *inst;
2844 inst = (sljit_u8*)ensure_buf(compiler, 2);
2845 PTR_FAIL_IF(!inst);
2847 *inst++ = 0;
2848 *inst++ = 1;
2898 sljit_u8* inst;
2939 inst = emit_x86_instruction(compiler, 2, dst_reg, 0, src, srcw);
2940 FAIL_IF(!inst);
2941 *inst++ = GROUP_0F;
2942 *inst = get_jump_code(type & 0xff) - 0x40;