• Home
  • Raw
  • Download

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))
586 sljit_ub *inst; in emit_save_flags() local
589 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in emit_save_flags()
590 FAIL_IF(!inst); in emit_save_flags()
593 inst = (sljit_ub*)ensure_buf(compiler, 1 + 6); in emit_save_flags()
594 FAIL_IF(!inst); in emit_save_flags()
596 *inst++ = REX_W; in emit_save_flags()
598 *inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp + sizeof(sljit_sw)] */ in emit_save_flags()
599 *inst++ = 0x64; in emit_save_flags()
600 *inst++ = 0x24; in emit_save_flags()
601 *inst++ = (sljit_ub)sizeof(sljit_sw); in emit_save_flags()
602 *inst++ = PUSHF; in emit_save_flags()
609 sljit_ub *inst; in emit_restore_flags() local
612 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in emit_restore_flags()
613 FAIL_IF(!inst); in emit_restore_flags()
615 *inst++ = POPF; in emit_restore_flags()
617 inst = (sljit_ub*)ensure_buf(compiler, 1 + 6); in emit_restore_flags()
618 FAIL_IF(!inst); in emit_restore_flags()
620 *inst++ = POPF; in emit_restore_flags()
621 *inst++ = REX_W; in emit_restore_flags()
623 *inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp - sizeof(sljit_sw)] */ in emit_restore_flags()
624 *inst++ = 0x64; in emit_restore_flags()
625 *inst++ = 0x24; in emit_restore_flags()
626 *inst++ = (sljit_ub)-(sljit_sb)sizeof(sljit_sw); in emit_restore_flags()
658 sljit_ub* inst; in emit_mov() local
663 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw); in emit_mov()
664 FAIL_IF(!inst); in emit_mov()
665 *inst = MOV_r_rm; in emit_mov()
670 inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw); in emit_mov()
671 FAIL_IF(!inst); in emit_mov()
672 *inst = MOV_rm_r; in emit_mov()
691 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, dst, dstw); in emit_mov()
692 FAIL_IF(!inst); in emit_mov()
693 *inst = MOV_rm_r; in emit_mov()
697 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw); in emit_mov()
698 FAIL_IF(!inst); in emit_mov()
699 *inst = MOV_rm_i32; in emit_mov()
703 inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw); in emit_mov()
704 FAIL_IF(!inst); in emit_mov()
705 *inst = MOV_r_rm; in emit_mov()
710 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw); in emit_mov()
711 FAIL_IF(!inst); in emit_mov()
712 *inst = MOV_r_rm; in emit_mov()
713 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw); in emit_mov()
714 FAIL_IF(!inst); in emit_mov()
715 *inst = MOV_rm_r; in emit_mov()
724 sljit_ub *inst; in sljit_emit_op0() local
734 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
735 FAIL_IF(!inst); in sljit_emit_op0()
737 *inst = INT3; in sljit_emit_op0()
740 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
741 FAIL_IF(!inst); in sljit_emit_op0()
743 *inst = NOP; in sljit_emit_op0()
774 inst = emit_x86_instruction(compiler, 1, SLJIT_R1, 0, SLJIT_R1, 0); in sljit_emit_op0()
776 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0); in sljit_emit_op0()
778 FAIL_IF(!inst); in sljit_emit_op0()
779 *inst = XOR_r_rm; in sljit_emit_op0()
788 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
789 FAIL_IF(!inst); in sljit_emit_op0()
791 *inst = CDQ; in sljit_emit_op0()
794 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_op0()
795 FAIL_IF(!inst); in sljit_emit_op0()
797 *inst = CDQ; in sljit_emit_op0()
799 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2); in sljit_emit_op0()
800 FAIL_IF(!inst); in sljit_emit_op0()
802 *inst++ = REX_W; in sljit_emit_op0()
803 *inst = CDQ; in sljit_emit_op0()
809 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2); in sljit_emit_op0()
810 FAIL_IF(!inst); in sljit_emit_op0()
812 *inst++ = GROUP_F7; in sljit_emit_op0()
813 *inst = MOD_REG | ((op >= SLJIT_UDIVMOD) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]); in sljit_emit_op0()
820 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_op0()
821 FAIL_IF(!inst); in sljit_emit_op0()
825 *inst++ = REX_W | ((op >= SLJIT_UDIVMOD) ? REX_B : 0); in sljit_emit_op0()
827 *inst++ = REX_B; in sljit_emit_op0()
828 *inst++ = GROUP_F7; in sljit_emit_op0()
829 *inst = MOD_REG | ((op >= SLJIT_UDIVMOD) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]); in sljit_emit_op0()
832 *inst++ = REX_W; in sljit_emit_op0()
833 *inst++ = GROUP_F7; in sljit_emit_op0()
834 *inst = MOD_REG | reg_map[SLJIT_R1]; in sljit_emit_op0()
839 *inst |= MUL; in sljit_emit_op0()
842 *inst |= IMUL; in sljit_emit_op0()
846 *inst |= DIV; in sljit_emit_op0()
850 *inst |= IDIV; in sljit_emit_op0()
868 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); \
869 FAIL_IF(!inst); \
871 *inst = (prefix); \
878 sljit_ub* inst; in emit_mov_byte() local
896 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_byte()
897 FAIL_IF(!inst); in emit_mov_byte()
898 *inst = MOV_rm_i32; in emit_mov_byte()
902inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw… in emit_mov_byte()
903 FAIL_IF(!inst); in emit_mov_byte()
904 *inst = MOV_rm8_i8; in emit_mov_byte()
928 inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0); in emit_mov_byte()
929 FAIL_IF(!inst); in emit_mov_byte()
930 *inst++ = GROUP_0F; in emit_mov_byte()
931 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8; in emit_mov_byte()
938 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
939 FAIL_IF(!inst); in emit_mov_byte()
940 *inst |= SHL; in emit_mov_byte()
942 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0); in emit_mov_byte()
943 FAIL_IF(!inst); in emit_mov_byte()
944 *inst |= SAR; in emit_mov_byte()
947 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0); in emit_mov_byte()
948 FAIL_IF(!inst); in emit_mov_byte()
949 *(inst + 1) |= AND; in emit_mov_byte()
957 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw); in emit_mov_byte()
958 FAIL_IF(!inst); in emit_mov_byte()
959 *inst++ = GROUP_0F; in emit_mov_byte()
960 *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8; in emit_mov_byte()
986 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); in emit_mov_byte()
987 FAIL_IF(!inst); in emit_mov_byte()
988 *inst = XCHG_r_rm; in emit_mov_byte()
991 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw); in emit_mov_byte()
992 FAIL_IF(!inst); in emit_mov_byte()
993 *inst = MOV_rm8_r8; in emit_mov_byte()
999 inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0); in emit_mov_byte()
1000 FAIL_IF(!inst); in emit_mov_byte()
1001 *inst = XCHG_r_rm; in emit_mov_byte()
1005 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_byte()
1006 FAIL_IF(!inst); in emit_mov_byte()
1007 *inst = MOV_rm8_r8; in emit_mov_byte()
1010 inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw); in emit_mov_byte()
1011 FAIL_IF(!inst); in emit_mov_byte()
1012 *inst = MOV_rm8_r8; in emit_mov_byte()
1023 sljit_ub* inst; in emit_mov_half() local
1038 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0); in emit_mov_half()
1039 FAIL_IF(!inst); in emit_mov_half()
1040 *inst = MOV_rm_i32; in emit_mov_half()
1044inst = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, … in emit_mov_half()
1045 FAIL_IF(!inst); in emit_mov_half()
1046 *inst = MOV_rm_i32; in emit_mov_half()
1055 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw); in emit_mov_half()
1056 FAIL_IF(!inst); in emit_mov_half()
1057 *inst++ = GROUP_0F; in emit_mov_half()
1058 *inst = sign ? MOVSX_r_rm16 : MOVZX_r_rm16; in emit_mov_half()
1062 inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw); in emit_mov_half()
1063 FAIL_IF(!inst); in emit_mov_half()
1064 *inst = MOV_rm_r; in emit_mov_half()
1074 sljit_ub* inst; in emit_unary() local
1078 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_unary()
1079 FAIL_IF(!inst); in emit_unary()
1080 *inst++ = GROUP_F7; in emit_unary()
1081 *inst |= opcode; in emit_unary()
1086 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_unary()
1087 FAIL_IF(!inst); in emit_unary()
1088 *inst++ = GROUP_F7; in emit_unary()
1089 *inst |= opcode; in emit_unary()
1094 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_unary()
1095 FAIL_IF(!inst); in emit_unary()
1096 *inst++ = GROUP_F7; in emit_unary()
1097 *inst |= opcode; in emit_unary()
1101 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_unary()
1102 FAIL_IF(!inst); in emit_unary()
1103 *inst++ = GROUP_F7; in emit_unary()
1104 *inst |= opcode; in emit_unary()
1113 sljit_ub* inst; in emit_not_with_flags() local
1117 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); 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, TMP_REG1, 0, TMP_REG1, 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()
1128 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in emit_not_with_flags()
1129 FAIL_IF(!inst); in emit_not_with_flags()
1130 *inst++ = GROUP_F7; in emit_not_with_flags()
1131 *inst |= NOT_rm; in emit_not_with_flags()
1132 inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0); in emit_not_with_flags()
1133 FAIL_IF(!inst); in emit_not_with_flags()
1134 *inst = OR_r_rm; in emit_not_with_flags()
1138 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_not_with_flags()
1139 FAIL_IF(!inst); in emit_not_with_flags()
1140 *inst++ = GROUP_F7; in emit_not_with_flags()
1141 *inst |= NOT_rm; in emit_not_with_flags()
1142 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0); in emit_not_with_flags()
1143 FAIL_IF(!inst); in emit_not_with_flags()
1144 *inst = OR_r_rm; in emit_not_with_flags()
1153 sljit_ub* inst; in emit_clz() local
1160 inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0); in emit_clz()
1161 FAIL_IF(!inst); in emit_clz()
1162 *inst++ = GROUP_F7; in emit_clz()
1163 *inst |= NOT_rm; in emit_clz()
1165 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 31, TMP_REG1, 0); in emit_clz()
1167inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, !(op_flags & SLJIT_INT_OP) ? … in emit_clz()
1169 FAIL_IF(!inst); in emit_clz()
1170 *inst |= SHR; in emit_clz()
1180 inst = emit_x86_instruction(compiler, 2, TMP_REG1, 0, src, srcw); in emit_clz()
1181 FAIL_IF(!inst); in emit_clz()
1182 *inst++ = GROUP_0F; in emit_clz()
1183 *inst = BSR_r_rm; in emit_clz()
1210 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG1, 0); in emit_clz()
1211 FAIL_IF(!inst); in emit_clz()
1212 *inst++ = GROUP_0F; in emit_clz()
1213 *inst = CMOVNE_r_rm; in emit_clz()
1216 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4); in emit_clz()
1217 FAIL_IF(!inst); in emit_clz()
1220 *inst++ = JE_i8; in emit_clz()
1221 *inst++ = 2; in emit_clz()
1222 *inst++ = MOV_r_rm; in emit_clz()
1223 *inst++ = MOD_REG | (reg_map[dst_r] << 3) | reg_map[TMP_REG1]; in emit_clz()
1225 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in emit_clz()
1226 FAIL_IF(!inst); in emit_clz()
1229 *inst++ = JE_i8; in emit_clz()
1230 *inst++ = 3; in emit_clz()
1231 *inst++ = REX_W | (reg_map[dst_r] >= 8 ? REX_R : 0) | (reg_map[TMP_REG1] >= 8 ? REX_B : 0); in emit_clz()
1232 *inst++ = MOV_r_rm; in emit_clz()
1233 *inst++ = MOD_REG | (reg_lmap[dst_r] << 3) | reg_lmap[TMP_REG1]; in emit_clz()
1238 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0); in emit_clz()
1240inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_INT_OP) ? 63… in emit_clz()
1242 FAIL_IF(!inst); in emit_clz()
1243 *(inst + 1) |= XOR; in emit_clz()
1247 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_clz()
1248 FAIL_IF(!inst); in emit_clz()
1249 *inst = XCHG_r_rm; in emit_clz()
1262 sljit_ub* inst; in sljit_emit_op1() local
1342 inst = emit_x86_instruction(compiler, 1, src & REG_MASK, 0, src, srcw); in sljit_emit_op1()
1343 FAIL_IF(!inst); in sljit_emit_op1()
1344 *inst = LEA_r_m; in sljit_emit_op1()
1393 inst = emit_x86_instruction(compiler, 1, dst & REG_MASK, 0, dst, dstw); in sljit_emit_op1()
1394 FAIL_IF(!inst); in sljit_emit_op1()
1395 *inst = LEA_r_m; in sljit_emit_op1()
1431 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
1432 FAIL_IF(!inst); \
1433 *(inst + 1) |= (op_imm); \
1437 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, arg, argw); \
1438 FAIL_IF(!inst); \
1439 *inst = (op_mr); \
1448 inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
1449 FAIL_IF(!inst); \
1450 *(inst + 1) |= (op_imm);
1463 sljit_ub* inst; local
1471 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1472 FAIL_IF(!inst);
1473 *inst = op_rm;
1492 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1493 FAIL_IF(!inst);
1494 *inst = op_rm;
1498 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1499 FAIL_IF(!inst);
1500 *inst = op_mr;
1504 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1505 FAIL_IF(!inst);
1506 *inst = op_mr;
1526 inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
1527 FAIL_IF(!inst);
1528 *inst = op_rm;
1531 inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
1532 FAIL_IF(!inst);
1533 *inst = op_mr;
1537 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1538 FAIL_IF(!inst);
1539 *inst = op_mr;
1551 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1552 FAIL_IF(!inst);
1553 *inst = op_rm;
1563 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1564 FAIL_IF(!inst);
1565 *inst = op_rm;
1579 sljit_ub* inst; local
1587 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1588 FAIL_IF(!inst);
1589 *inst = op_rm;
1608 inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
1609 FAIL_IF(!inst);
1610 *inst = op_rm;
1613 inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
1614 FAIL_IF(!inst);
1615 *inst = op_mr;
1619 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
1620 FAIL_IF(!inst);
1621 *inst = op_mr;
1633 inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
1634 FAIL_IF(!inst);
1635 *inst = op_rm;
1645 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1646 FAIL_IF(!inst);
1647 *inst = op_rm;
1660 sljit_ub* inst; local
1667 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1668 FAIL_IF(!inst);
1669 *inst++ = GROUP_0F;
1670 *inst = IMUL_r_rm;
1673 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src1, src1w);
1674 FAIL_IF(!inst);
1675 *inst++ = GROUP_0F;
1676 *inst = IMUL_r_rm;
1686 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1687 FAIL_IF(!inst);
1688 *inst = IMUL_r_rm_i8;
1689 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
1690 FAIL_IF(!inst);
1692 *inst = (sljit_sb)src1w;
1696 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1697 FAIL_IF(!inst);
1698 *inst = IMUL_r_rm_i32;
1699 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1700 FAIL_IF(!inst);
1702 *(sljit_sw*)inst = src1w;
1706 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
1707 FAIL_IF(!inst);
1708 *inst = IMUL_r_rm_i32;
1709 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1710 FAIL_IF(!inst);
1712 *(sljit_si*)inst = (sljit_si)src1w;
1718 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1719 FAIL_IF(!inst);
1720 *inst++ = GROUP_0F;
1721 *inst = IMUL_r_rm;
1729 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1730 FAIL_IF(!inst);
1731 *inst = IMUL_r_rm_i8;
1732 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
1733 FAIL_IF(!inst);
1735 *inst = (sljit_sb)src2w;
1739 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1740 FAIL_IF(!inst);
1741 *inst = IMUL_r_rm_i32;
1742 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1743 FAIL_IF(!inst);
1745 *(sljit_sw*)inst = src2w;
1749 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
1750 FAIL_IF(!inst);
1751 *inst = IMUL_r_rm_i32;
1752 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
1753 FAIL_IF(!inst);
1755 *(sljit_si*)inst = (sljit_si)src2w;
1761 inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
1762 FAIL_IF(!inst);
1763 *inst++ = GROUP_0F;
1764 *inst = IMUL_r_rm;
1773 inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
1774 FAIL_IF(!inst);
1775 *inst++ = GROUP_0F;
1776 *inst = IMUL_r_rm;
1790 sljit_ub* inst; local
1805 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM2(src1, src2), 0);
1806 FAIL_IF(!inst);
1807 *inst = LEA_r_m;
1812 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), (sljit_si)src2w);
1815 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), src2w);
1817 FAIL_IF(!inst);
1818 *inst = LEA_r_m;
1825 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), (sljit_si)src1w);
1828 inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), src1w);
1830 FAIL_IF(!inst);
1831 *inst = LEA_r_m;
1848 sljit_ub* inst; local
1864 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
1865 FAIL_IF(!inst);
1866 *inst = CMP_r_rm;
1872 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
1873 FAIL_IF(!inst);
1874 *inst = CMP_rm_r;
1888 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1889 FAIL_IF(!inst);
1890 *inst = CMP_r_rm;
1899 sljit_ub* inst; local
1923 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
1924 FAIL_IF(!inst);
1925 *inst = GROUP_F7;
1929 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, src1w);
1930 FAIL_IF(!inst);
1931 *inst = TEST_rm_r;
1934 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
1935 FAIL_IF(!inst);
1936 *inst = GROUP_F7;
1941 inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
1942 FAIL_IF(!inst);
1943 *inst = TEST_rm_r;
1952 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, src2w);
1953 FAIL_IF(!inst);
1954 *inst = GROUP_F7;
1958 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, src2w);
1959 FAIL_IF(!inst);
1960 *inst = TEST_rm_r;
1963 inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, src2w);
1964 FAIL_IF(!inst);
1965 *inst = GROUP_F7;
1970 inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
1971 FAIL_IF(!inst);
1972 *inst = TEST_rm_r;
1981 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
1982 FAIL_IF(!inst);
1983 *inst = GROUP_F7;
1987 inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, TMP_REG1, 0);
1988 FAIL_IF(!inst);
1989 *inst = TEST_rm_r;
1992 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
1993 FAIL_IF(!inst);
1994 *inst = GROUP_F7;
1998 inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
1999 FAIL_IF(!inst);
2000 *inst = TEST_rm_r;
2011 sljit_ub* inst; local
2015 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
2016 FAIL_IF(!inst);
2017 *inst |= mode;
2022 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
2023 FAIL_IF(!inst);
2024 *inst |= mode;
2029 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2030 FAIL_IF(!inst);
2031 *inst |= mode;
2037 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
2038 FAIL_IF(!inst);
2039 *inst |= mode;
2044 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
2045 FAIL_IF(!inst);
2046 *inst |= mode;
2054 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2055 FAIL_IF(!inst);
2056 *inst |= mode;
2064 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
2065 FAIL_IF(!inst);
2066 *inst |= mode;
2080 inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
2081 FAIL_IF(!inst);
2082 *inst |= mode;
2243 sljit_ub *inst; local
2248 inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
2249 FAIL_IF(!inst);
2251 SLJIT_MEMMOVE(inst, instruction, size);
2292 sljit_ub *inst; local
2294inst = emit_x86_instruction(compiler, 2 | (single ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2, xmm1…
2295 FAIL_IF(!inst);
2296 *inst++ = GROUP_0F;
2297 *inst = opcode;
2304 sljit_ub *inst; local
2306inst = emit_x86_instruction(compiler, 2 | (pref66 ? EX86_PREF_66 : 0) | EX86_SSE2, xmm1, 0, xmm2, …
2307 FAIL_IF(!inst);
2308 *inst++ = GROUP_0F;
2309 *inst = opcode;
2330 sljit_ub *inst; local
2337inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_SINGLE_OP) ? EX86_PREF_F3 : EX86_PREF_F2) |…
2338 FAIL_IF(!inst);
2339 *inst++ = GROUP_0F;
2340 *inst = CVTTSD2SI_r_xm;
2352 sljit_ub *inst; local
2369inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_SINGLE_OP) ? EX86_PREF_F3 : EX86_PREF_F2) |…
2370 FAIL_IF(!inst);
2371 *inst++ = GROUP_0F;
2372 *inst = CVTSI2SD_x_rm;
2527 sljit_ub *inst; local
2545 inst = (sljit_ub*)ensure_buf(compiler, 2);
2546 PTR_FAIL_IF(!inst);
2548 *inst++ = 0;
2549 *inst++ = 0;
2556 sljit_ub *inst; local
2583 inst = (sljit_ub*)ensure_buf(compiler, 2);
2584 PTR_FAIL_IF_NULL(inst);
2586 *inst++ = 0;
2587 *inst++ = type + 4;
2593 sljit_ub *inst; local
2641 inst = (sljit_ub*)ensure_buf(compiler, 2);
2642 FAIL_IF_NULL(inst);
2644 *inst++ = 0;
2645 *inst++ = type + 4;
2652 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
2653 FAIL_IF(!inst);
2654 *inst++ = GROUP_FF;
2655 *inst |= (type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm;
2665 sljit_ub *inst; local
2693 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + 3);
2694 FAIL_IF(!inst);
2697 *inst++ = (reg_map[TMP_REG1] <= 7) ? REX : REX_B;
2698 *inst++ = GROUP_0F;
2699 *inst++ = cond_set;
2700 *inst++ = MOD_REG | reg_lmap[TMP_REG1];
2701 *inst++ = REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B);
2702 *inst++ = OR_rm8_r8;
2703 *inst++ = MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst];
2709 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + 4);
2710 FAIL_IF(!inst);
2713 *inst++ = (reg_map[reg] <= 7) ? REX : REX_B;
2714 *inst++ = GROUP_0F;
2715 *inst++ = cond_set;
2716 *inst++ = MOD_REG | reg_lmap[reg];
2717 *inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : (REX_B | REX_R));
2718 *inst++ = GROUP_0F;
2719 *inst++ = MOVZX_r_rm8;
2720 *inst = MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg];
2738 inst = (sljit_ub*)ensure_buf(compiler, 1 + 3 + 3);
2739 FAIL_IF(!inst);
2742 *inst++ = GROUP_0F;
2743 *inst++ = cond_set;
2744 *inst++ = MOD_REG | reg_map[dst];
2746 *inst++ = GROUP_0F;
2747 *inst++ = MOVZX_r_rm8;
2748 *inst = MOD_REG | (reg_map[dst] << 3) | reg_map[dst];
2761 inst = (sljit_ub*)ensure_buf(compiler, 1 + 3);
2762 FAIL_IF(!inst);
2765 *inst++ = GROUP_0F;
2767 *inst++ = cond_set - 0x50;
2768 *inst++ = MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1];
2772 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2773 FAIL_IF(!inst);
2775 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2777 *inst++ = GROUP_0F;
2778 *inst++ = cond_set;
2779 *inst++ = MOD_REG | 0 /* eax */;
2781 *inst++ = GROUP_0F;
2782 *inst++ = MOVZX_r_rm8;
2783 *inst++ = MOD_REG | (reg_map[dst] << 3) | 0 /* eax */;
2784 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2791 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 2 + 1);
2792 FAIL_IF(!inst);
2795 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2796 *inst++ = GROUP_0F;
2797 *inst++ = cond_set;
2798 *inst++ = MOD_REG | 0 /* eax */;
2799 *inst++ = OR_rm8_r8;
2800 *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
2801 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2804 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + 3 + 2 + 2);
2805 FAIL_IF(!inst);
2808 *inst++ = XCHG_r_rm;
2809 *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
2810 *inst++ = GROUP_0F;
2811 *inst++ = cond_set;
2812 *inst++ = MOD_REG | 1 /* ecx */;
2813 *inst++ = OR_rm8_r8;
2814 *inst++ = MOD_REG | (1 /* ecx */ << 3) | 0 /* eax */;
2815 *inst++ = XCHG_r_rm;
2816 *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
2822 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
2823 FAIL_IF(!inst);
2825 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2827 *inst++ = GROUP_0F;
2828 *inst++ = cond_set;
2829 *inst++ = MOD_REG | 0 /* eax */;
2831 *inst++ = GROUP_0F;
2832 *inst++ = MOVZX_r_rm8;
2833 *inst++ = MOD_REG | (0 << 3) /* eax */ | 0 /* eax */;
2835 *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
2881 sljit_ub *inst; local
2911 inst = (sljit_ub*)ensure_buf(compiler, 2);
2912 PTR_FAIL_IF(!inst);
2914 *inst++ = 0;
2915 *inst++ = 1;
2963 sljit_ub* inst; local
2999 inst = emit_x86_instruction(compiler, 2, dst_reg, 0, src, srcw);
3000 FAIL_IF(!inst);
3001 *inst++ = GROUP_0F;
3002 *inst = get_jump_code(type & 0xff) - 0x40;