Lines Matching refs:inst

283 #define INC_SIZE(s)			(*inst++ = U8(s), compiler->size += (s))
285 #define PUSH_REG(r) (*inst++ = U8(PUSH_r + (r)))
286 #define POP_REG(r) (*inst++ = U8(POP_r + (r)))
287 #define RET() (*inst++ = RET_near)
288 #define RET_I16(n) (*inst++ = RET_i16, *inst++ = U8(n), *inst++ = 0)
693 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
694 FAIL_IF(!inst); \
695 *(inst + 1) |= (op_imm); \
707inst = emit_x86_instruction(compiler, 1, (arg == TMP_REG1) ? TMP_REG2 : TMP_REG1, 0, arg, argw); \
708 FAIL_IF(!inst); \
709 *inst = (op_mr); \
747 sljit_u8 *inst; in emit_endbranch() local
748 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4); in emit_endbranch()
749 FAIL_IF(!inst); in emit_endbranch()
751 *inst++ = 0xf3; in emit_endbranch()
752 *inst++ = 0x0f; in emit_endbranch()
753 *inst++ = 0x1e; in emit_endbranch()
755 *inst = 0xfb; in emit_endbranch()
757 *inst = 0xfa; in emit_endbranch()
769 sljit_u8 *inst; in emit_rdssp() local
778 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in emit_rdssp()
779 FAIL_IF(!inst); in emit_rdssp()
781 *inst++ = 0xf3; in emit_rdssp()
783 *inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : REX_B); in emit_rdssp()
785 *inst++ = 0x0f; in emit_rdssp()
786 *inst++ = 0x1e; in emit_rdssp()
787 *inst = (0x3 << 6) | (0x1 << 3) | (reg_map[reg] & 0x7); in emit_rdssp()
793 sljit_u8 *inst; in emit_incssp() local
802 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in emit_incssp()
803 FAIL_IF(!inst); in emit_incssp()
805 *inst++ = 0xf3; in emit_incssp()
807 *inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : REX_B); in emit_incssp()
809 *inst++ = 0x0f; in emit_incssp()
810 *inst++ = 0xae; in emit_incssp()
811 *inst = (0x3 << 6) | (0x5 << 3) | (reg_map[reg] & 0x7); in emit_incssp()
830 sljit_u8 *inst, *jz_after_cmp_inst; in adjust_shadow_stack() local
843 inst = (sljit_u8*)ensure_buf(compiler, 1 + 3); in adjust_shadow_stack()
844 FAIL_IF(!inst); in adjust_shadow_stack()
846 *inst++ = 0x8b; in adjust_shadow_stack()
847 *inst++ = 0x6d; in adjust_shadow_stack()
848 *inst = 0; in adjust_shadow_stack()
858 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); in adjust_shadow_stack()
859 FAIL_IF(!inst); in adjust_shadow_stack()
861 *inst++ = get_jump_code(SLJIT_EQUAL) - 0x10; in adjust_shadow_stack()
863 jz_after_cmp_inst = inst; in adjust_shadow_stack()
876 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); in adjust_shadow_stack()
877 FAIL_IF(!inst); in adjust_shadow_stack()
879 *inst++ = JMP_i8; in adjust_shadow_stack()
880 *inst = size_before_rdssp_inst - compiler->size; in adjust_shadow_stack()
901 sljit_u8* inst; in emit_mov() local
904 inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw); in emit_mov()
905 FAIL_IF(!inst); in emit_mov()
906 *inst = MOV_rm_r; in emit_mov()
927 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
928 FAIL_IF(!inst); in emit_mov()
929 *inst = MOV_rm_r; in emit_mov()
933 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw); in emit_mov()
934 FAIL_IF(!inst); in emit_mov()
935 *inst = MOV_rm_i32; in emit_mov()
939 inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw); in emit_mov()
940 FAIL_IF(!inst); in emit_mov()
941 *inst = MOV_r_rm; in emit_mov()
947 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw); in emit_mov()
948 FAIL_IF(!inst); in emit_mov()
949 *inst = MOV_r_rm; in emit_mov()
950 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
951 FAIL_IF(!inst); in emit_mov()
952 *inst = MOV_rm_r; in emit_mov()
958 sljit_u8 *inst; in sljit_emit_op0() local
968 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
969 FAIL_IF(!inst); in sljit_emit_op0()
971 *inst = INT3; in sljit_emit_op0()
974 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
975 FAIL_IF(!inst); in sljit_emit_op0()
977 *inst = NOP; in sljit_emit_op0()
1005 inst = emit_x86_instruction(compiler, 1, SLJIT_R1, 0, SLJIT_R1, 0); in sljit_emit_op0()
1007 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0); in sljit_emit_op0()
1009 FAIL_IF(!inst); in sljit_emit_op0()
1010 *inst = XOR_r_rm; in sljit_emit_op0()
1019 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
1020 FAIL_IF(!inst); in sljit_emit_op0()
1022 *inst = CDQ; in sljit_emit_op0()
1025 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
1026 FAIL_IF(!inst); in sljit_emit_op0()
1028 *inst = CDQ; in sljit_emit_op0()
1030 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); in sljit_emit_op0()
1031 FAIL_IF(!inst); in sljit_emit_op0()
1033 *inst++ = REX_W; in sljit_emit_op0()
1034 *inst = CDQ; in sljit_emit_op0()
1040 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); in sljit_emit_op0()
1041 FAIL_IF(!inst); in sljit_emit_op0()
1043 *inst++ = GROUP_F7; in sljit_emit_op0()
1044 *inst = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]); in sljit_emit_op0()
1051 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_op0()
1052 FAIL_IF(!inst); in sljit_emit_op0()
1056 *inst++ = REX_W | ((op >= SLJIT_DIVMOD_UW) ? REX_B : 0); in sljit_emit_op0()
1058 *inst++ = REX_B; in sljit_emit_op0()
1059 *inst++ = GROUP_F7; in sljit_emit_op0()
1060 *inst = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]); in sljit_emit_op0()
1063 *inst++ = REX_W; in sljit_emit_op0()
1064 *inst++ = GROUP_F7; in sljit_emit_op0()
1065 *inst = MOD_REG | reg_map[SLJIT_R1]; in sljit_emit_op0()
1070 *inst |= MUL; in sljit_emit_op0()
1073 *inst |= IMUL; in sljit_emit_op0()
1077 *inst |= DIV; in sljit_emit_op0()
1081 *inst |= IDIV; in sljit_emit_op0()
1103 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); \
1104 FAIL_IF(!inst); \
1106 *inst = U8(prefix); \
1113 sljit_u8* inst; in emit_mov_byte() local
1128 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_byte()
1129 FAIL_IF(!inst); in emit_mov_byte()
1130 *inst = MOV_rm_i32; in emit_mov_byte()
1134inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw… in emit_mov_byte()
1135 FAIL_IF(!inst); in emit_mov_byte()
1136 *inst = MOV_rm8_i8; in emit_mov_byte()
1160 inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0); in emit_mov_byte()
1161 FAIL_IF(!inst); in emit_mov_byte()
1162 *inst++ = GROUP_0F; in emit_mov_byte()
1163 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8; in emit_mov_byte()
1170 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
1171 FAIL_IF(!inst); in emit_mov_byte()
1172 *inst |= SHL; in emit_mov_byte()
1174 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
1175 FAIL_IF(!inst); in emit_mov_byte()
1176 *inst |= SAR; in emit_mov_byte()
1179 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0); in emit_mov_byte()
1180 FAIL_IF(!inst); in emit_mov_byte()
1181 *(inst + 1) |= AND; in emit_mov_byte()
1189 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw); in emit_mov_byte()
1190 FAIL_IF(!inst); in emit_mov_byte()
1191 *inst++ = GROUP_0F; in emit_mov_byte()
1192 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8; in emit_mov_byte()
1218 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); in emit_mov_byte()
1219 FAIL_IF(!inst); in emit_mov_byte()
1220 *inst = XCHG_r_rm; in emit_mov_byte()
1223 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw); in emit_mov_byte()
1224 FAIL_IF(!inst); in emit_mov_byte()
1225 *inst = MOV_rm8_r8; in emit_mov_byte()
1231 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); in emit_mov_byte()
1232 FAIL_IF(!inst); in emit_mov_byte()
1233 *inst = XCHG_r_rm; in emit_mov_byte()
1237 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_byte()
1238 FAIL_IF(!inst); in emit_mov_byte()
1239 *inst = MOV_rm8_r8; in emit_mov_byte()
1242 inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw); in emit_mov_byte()
1243 FAIL_IF(!inst); in emit_mov_byte()
1244 *inst = MOV_rm8_r8; in emit_mov_byte()
1254 sljit_u8* inst; in emit_prefetch() local
1260 inst = emit_x86_instruction(compiler, 2, 0, 0, src, srcw); in emit_prefetch()
1261 FAIL_IF(!inst); in emit_prefetch()
1262 *inst++ = GROUP_0F; in emit_prefetch()
1263 *inst++ = PREFETCH; in emit_prefetch()
1266 *inst |= (1 << 3); in emit_prefetch()
1268 *inst |= (2 << 3); in emit_prefetch()
1270 *inst |= (3 << 3); in emit_prefetch()
1279 sljit_u8* inst; in emit_mov_half() local
1291 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_half()
1292 FAIL_IF(!inst); in emit_mov_half()
1293 *inst = MOV_rm_i32; in emit_mov_half()
1297inst = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, … in emit_mov_half()
1298 FAIL_IF(!inst); in emit_mov_half()
1299 *inst = MOV_rm_i32; in emit_mov_half()
1308 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw); in emit_mov_half()
1309 FAIL_IF(!inst); in emit_mov_half()
1310 *inst++ = GROUP_0F; in emit_mov_half()
1311 *inst = sign ? MOVSX_r_rm16 : MOVZX_r_rm16; in emit_mov_half()
1315 inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw); in emit_mov_half()
1316 FAIL_IF(!inst); in emit_mov_half()
1317 *inst = MOV_rm_r; in emit_mov_half()
1327 sljit_u8* inst; in emit_unary() local
1331 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_unary()
1332 FAIL_IF(!inst); in emit_unary()
1333 *inst++ = GROUP_F7; in emit_unary()
1334 *inst |= opcode; in emit_unary()
1340 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); in emit_unary()
1341 FAIL_IF(!inst); in emit_unary()
1342 *inst++ = GROUP_F7; in emit_unary()
1343 *inst |= opcode; in emit_unary()
1348 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_unary()
1349 FAIL_IF(!inst); in emit_unary()
1350 *inst++ = GROUP_F7; in emit_unary()
1351 *inst |= opcode; in emit_unary()
1360 sljit_u8* inst; in emit_not_with_flags() local
1364 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, 0); in emit_not_with_flags()
1365 FAIL_IF(!inst); in emit_not_with_flags()
1366 *inst++ = GROUP_F7; in emit_not_with_flags()
1367 *inst |= NOT_rm; in emit_not_with_flags()
1368 inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0); in emit_not_with_flags()
1369 FAIL_IF(!inst); in emit_not_with_flags()
1370 *inst = OR_r_rm; in emit_not_with_flags()
1375 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_not_with_flags()
1376 FAIL_IF(!inst); in emit_not_with_flags()
1377 *inst++ = GROUP_F7; in emit_not_with_flags()
1378 *inst |= NOT_rm; in emit_not_with_flags()
1379 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0); in emit_not_with_flags()
1380 FAIL_IF(!inst); in emit_not_with_flags()
1381 *inst = OR_r_rm; in emit_not_with_flags()
1394 sljit_u8* inst; in emit_clz() local
1404 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw); in emit_clz()
1405 FAIL_IF(!inst); in emit_clz()
1406 *inst++ = GROUP_0F; in emit_clz()
1407 *inst = BSR_r_rm; in emit_clz()
1413 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG1, 0); in emit_clz()
1416 inst = emit_x86_instruction(compiler, 2, dst_r, 0, SLJIT_MEM0(), (sljit_sw)&emit_clz_arg); in emit_clz()
1418 FAIL_IF(!inst); in emit_clz()
1419 *inst++ = GROUP_0F; in emit_clz()
1420 *inst = CMOVE_r_rm; in emit_clz()
1425 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0); in emit_clz()
1430 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0); in emit_clz()
1431 FAIL_IF(!inst); in emit_clz()
1432 *inst++ = GROUP_0F; in emit_clz()
1433 *inst = CMOVE_r_rm; in emit_clz()
1438inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_32) ? 63 : 3… in emit_clz()
1441 FAIL_IF(!inst); in emit_clz()
1442 *(inst + 1) |= XOR; in emit_clz()
1593 sljit_u8* inst; local
1613 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1614 FAIL_IF(!inst);
1615 *inst = op_rm;
1619 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1620 FAIL_IF(!inst);
1621 *inst = op_mr;
1625 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1626 FAIL_IF(!inst);
1627 *inst = op_mr;
1647 inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
1648 FAIL_IF(!inst);
1649 *inst = op_rm;
1652 inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
1653 FAIL_IF(!inst);
1654 *inst = op_mr;
1658 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1659 FAIL_IF(!inst);
1660 *inst = op_mr;
1672 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1673 FAIL_IF(!inst);
1674 *inst = op_rm;
1684 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1685 FAIL_IF(!inst);
1686 *inst = op_rm;
1700 sljit_u8* inst; local
1720 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1721 FAIL_IF(!inst);
1722 *inst = op_rm;
1725 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1726 FAIL_IF(!inst);
1727 *inst = op_mr;
1731 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1732 FAIL_IF(!inst);
1733 *inst = op_mr;
1745 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1746 FAIL_IF(!inst);
1747 *inst = op_rm;
1757 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1758 FAIL_IF(!inst);
1759 *inst = op_rm;
1772 sljit_u8* inst; local
1777 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1778 FAIL_IF(!inst);
1779 *inst++ = GROUP_0F;
1780 *inst = IMUL_r_rm;
1783 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src1, src1w);
1784 FAIL_IF(!inst);
1785 *inst++ = GROUP_0F;
1786 *inst = IMUL_r_rm;
1796 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1797 FAIL_IF(!inst);
1798 *inst = IMUL_r_rm_i8;
1799 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
1800 FAIL_IF(!inst);
1802 *inst = U8(src1w);
1806 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1807 FAIL_IF(!inst);
1808 *inst = IMUL_r_rm_i32;
1809 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
1810 FAIL_IF(!inst);
1812 sljit_unaligned_store_sw(inst, src1w);
1816 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1817 FAIL_IF(!inst);
1818 *inst = IMUL_r_rm_i32;
1819 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
1820 FAIL_IF(!inst);
1822 sljit_unaligned_store_s32(inst, (sljit_s32)src1w);
1828 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1829 FAIL_IF(!inst);
1830 *inst++ = GROUP_0F;
1831 *inst = IMUL_r_rm;
1839 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1840 FAIL_IF(!inst);
1841 *inst = IMUL_r_rm_i8;
1842 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
1843 FAIL_IF(!inst);
1845 *inst = U8(src2w);
1849 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1850 FAIL_IF(!inst);
1851 *inst = IMUL_r_rm_i32;
1852 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
1853 FAIL_IF(!inst);
1855 sljit_unaligned_store_sw(inst, src2w);
1859 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1860 FAIL_IF(!inst);
1861 *inst = IMUL_r_rm_i32;
1862 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
1863 FAIL_IF(!inst);
1865 sljit_unaligned_store_s32(inst, (sljit_s32)src2w);
1871 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1872 FAIL_IF(!inst);
1873 *inst++ = GROUP_0F;
1874 *inst = IMUL_r_rm;
1883 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1884 FAIL_IF(!inst);
1885 *inst++ = GROUP_0F;
1886 *inst = IMUL_r_rm;
1900 sljit_u8* inst; local
1913 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM2(src1, src2), 0);
1914 FAIL_IF(!inst);
1915 *inst = LEA_r_m;
1920 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), (sljit_s32)src2w);
1923 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), src2w);
1925 FAIL_IF(!inst);
1926 *inst = LEA_r_m;
1933 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), (sljit_s32)src1w);
1936 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), src1w);
1938 FAIL_IF(!inst);
1939 *inst = LEA_r_m;
1956 sljit_u8* inst; local
1972 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
1973 FAIL_IF(!inst);
1974 *inst = CMP_r_rm;
1980 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
1981 FAIL_IF(!inst);
1982 *inst = CMP_rm_r;
1996 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1997 FAIL_IF(!inst);
1998 *inst = CMP_r_rm;
2007 sljit_u8* inst; local
2031 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
2032 FAIL_IF(!inst);
2033 *inst = GROUP_F7;
2037 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src1, src1w);
2038 FAIL_IF(!inst);
2039 *inst = TEST_rm_r;
2042 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
2043 FAIL_IF(!inst);
2044 *inst = GROUP_F7;
2049 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
2050 FAIL_IF(!inst);
2051 *inst = TEST_rm_r;
2060 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, src2w);
2061 FAIL_IF(!inst);
2062 *inst = GROUP_F7;
2066 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
2067 FAIL_IF(!inst);
2068 *inst = TEST_rm_r;
2071 inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, src2w);
2072 FAIL_IF(!inst);
2073 *inst = GROUP_F7;
2078 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
2079 FAIL_IF(!inst);
2080 *inst = TEST_rm_r;
2089 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
2090 FAIL_IF(!inst);
2091 *inst = GROUP_F7;
2095 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, TMP_REG1, 0);
2096 FAIL_IF(!inst);
2097 *inst = TEST_rm_r;
2100 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
2101 FAIL_IF(!inst);
2102 *inst = GROUP_F7;
2106 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
2107 FAIL_IF(!inst);
2108 *inst = TEST_rm_r;
2119 sljit_u8* inst; local
2123 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
2124 FAIL_IF(!inst);
2125 *inst |= mode;
2130 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2131 FAIL_IF(!inst);
2132 *inst |= mode;
2138 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
2139 FAIL_IF(!inst);
2140 *inst |= mode;
2145 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
2146 FAIL_IF(!inst);
2147 *inst |= mode;
2155 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2156 FAIL_IF(!inst);
2157 *inst |= mode;
2165 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
2166 FAIL_IF(!inst);
2167 *inst |= mode;
2177 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2178 FAIL_IF(!inst);
2179 *inst |= mode;
2184 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2185 FAIL_IF(!inst);
2186 *inst |= mode;
2387 sljit_u8 *inst; local
2392 inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
2393 FAIL_IF(!inst);
2395 SLJIT_MEMCPY(inst, instruction, size);
2425 sljit_u8 *inst; local
2427inst = emit_x86_instruction(compiler, 2 | (single ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2, xmm1…
2428 FAIL_IF(!inst);
2429 *inst++ = GROUP_0F;
2430 *inst = opcode;
2437 sljit_u8 *inst; local
2439inst = emit_x86_instruction(compiler, 2 | (pref66 ? EX86_PREF_66 : 0) | EX86_SSE2, xmm1, 0, xmm2, …
2440 FAIL_IF(!inst);
2441 *inst++ = GROUP_0F;
2442 *inst = opcode;
2463 sljit_u8 *inst; local
2470inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_32) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_S…
2471 FAIL_IF(!inst);
2472 *inst++ = GROUP_0F;
2473 *inst = CVTTSD2SI_r_xm;
2485 sljit_u8 *inst; local
2502inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_32) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_S…
2503 FAIL_IF(!inst);
2504 *inst++ = GROUP_0F;
2505 *inst = CVTSI2SD_x_rm;
2660 sljit_u8 *inst; local
2673 inst = (sljit_u8*)ensure_buf(compiler, 2);
2674 PTR_FAIL_IF(!inst);
2676 *inst++ = 0;
2677 *inst++ = 0;
2684 sljit_u8 *inst; local
2702 inst = (sljit_u8*)ensure_buf(compiler, 2);
2703 PTR_FAIL_IF_NULL(inst);
2705 *inst++ = 0;
2706 *inst++ = 1;
2712 sljit_u8 *inst; local
2734 inst = (sljit_u8*)ensure_buf(compiler, 2);
2735 FAIL_IF_NULL(inst);
2737 *inst++ = 0;
2738 *inst++ = 1;
2745 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
2746 FAIL_IF(!inst);
2747 *inst++ = GROUP_FF;
2748 *inst = U8(*inst | ((type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm));
2757 sljit_u8 *inst; local
2778 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + 3);
2779 FAIL_IF(!inst);
2782 *inst++ = (reg_map[TMP_REG1] <= 7) ? REX : REX_B;
2783 *inst++ = GROUP_0F;
2784 *inst++ = cond_set;
2785 *inst++ = MOD_REG | reg_lmap[TMP_REG1];
2786 *inst++ = U8(REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B));
2787 *inst++ = OR_rm8_r8;
2788 *inst++ = U8(MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst]);
2794 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + 4);
2795 FAIL_IF(!inst);
2798 *inst++ = (reg_map[reg] <= 7) ? REX : REX_B;
2799 *inst++ = GROUP_0F;
2800 *inst++ = cond_set;
2801 *inst++ = MOD_REG | reg_lmap[reg];
2802 *inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : (REX_B | REX_R));
2804 *inst++ = GROUP_0F;
2805 *inst++ = MOVZX_r_rm8;
2806 *inst = U8(MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg]);
2827 inst = (sljit_u8*)ensure_buf(compiler, 1 + 3 + 3);
2828 FAIL_IF(!inst);
2831 *inst++ = GROUP_0F;
2832 *inst++ = cond_set;
2833 *inst++ = U8(MOD_REG | reg_map[dst]);
2835 *inst++ = GROUP_0F;
2836 *inst++ = MOVZX_r_rm8;
2837 *inst = U8(MOD_REG | (reg_map[dst] << 3) | reg_map[dst]);
2850 inst = (sljit_u8*)ensure_buf(compiler, 1 + 3);
2851 FAIL_IF(!inst);
2854 *inst++ = GROUP_0F;
2856 *inst++ = U8(cond_set - 0x50);
2857 *inst++ = U8(MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1]);
2861 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2862 FAIL_IF(!inst);
2864 *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]);
2866 *inst++ = GROUP_0F;
2867 *inst++ = cond_set;
2868 *inst++ = MOD_REG | 0 /* eax */;
2870 *inst++ = GROUP_0F;
2871 *inst++ = MOVZX_r_rm8;
2872 *inst++ = U8(MOD_REG | (reg_map[dst] << 3) | 0 /* eax */);
2873 *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]);
2881 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 2 + 1);
2882 FAIL_IF(!inst);
2885 *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]);
2886 *inst++ = GROUP_0F;
2887 *inst++ = cond_set;
2888 *inst++ = MOD_REG | 0 /* eax */;
2889 *inst++ = OR_rm8_r8;
2890 *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
2891 *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]);
2894 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + 3 + 2 + 2);
2895 FAIL_IF(!inst);
2898 *inst++ = XCHG_r_rm;
2899 *inst++ = U8(MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1]);
2900 *inst++ = GROUP_0F;
2901 *inst++ = cond_set;
2902 *inst++ = MOD_REG | 1 /* ecx */;
2903 *inst++ = OR_rm8_r8;
2904 *inst++ = MOD_REG | (1 /* ecx */ << 3) | 0 /* eax */;
2905 *inst++ = XCHG_r_rm;
2906 *inst++ = U8(MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1]);
2912 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2913 FAIL_IF(!inst);
2915 *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]);
2917 *inst++ = GROUP_0F;
2918 *inst++ = cond_set;
2919 *inst++ = MOD_REG | 0 /* eax */;
2921 *inst++ = GROUP_0F;
2922 *inst++ = MOVZX_r_rm8;
2923 *inst++ = MOD_REG | (0 << 3) /* eax */ | 0 /* eax */;
2925 *inst++ = U8(XCHG_EAX_r | reg_map[TMP_REG1]);
2942 sljit_u8* inst; local
2971 inst = emit_x86_instruction(compiler, 2, dst_reg, 0, src, srcw);
2972 FAIL_IF(!inst);
2973 *inst++ = GROUP_0F;
2974 *inst = U8(get_jump_code(type & 0xff) - 0x40);
3011 sljit_u8 *inst; local
3038 inst = (sljit_u8*)ensure_buf(compiler, 2);
3039 PTR_FAIL_IF(!inst);
3041 *inst++ = 0;
3042 *inst++ = 2;
3056 sljit_u8 *inst; local
3092 inst = (sljit_u8*)ensure_buf(compiler, 2);
3093 PTR_FAIL_IF(!inst);
3095 *inst++ = 0;
3096 *inst++ = 3;