1 /** Unicorn Emulator Engine */
2 /** By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
3 
4 module unicorn.x86;
5 
6 import unicorn.unicorn;
7 
8 extern(C):
9 
10 /// Memory-Management Register for instructions IDTR, GDTR, LDTR, TR.
11 /// Borrow from SegmentCache in qemu/target-i386/cpu.h
12 struct uc_x86_mmr {
13     ushort selector;  /* not used by GDTR and IDTR */
14     ulong  base;      /* handle 32 or 64 bit CPUs */
15     uint   limit;
16     uint   flags;     /* not used by GDTR and IDTR */
17 }
18 
19 /// Model-Specific Register structure, use this with UC_X86_REG_MSR (as the register ID) in
20 /// call to uc_reg_write/uc_reg_read() to manipulate MSRs.
21 struct uc_x86_msr {
22     uint  rid;   /// MSR id
23     ulong value; /// MSR value
24 }
25 
26 /// Callback function for tracing SYSCALL/SYSENTER (for uc_hook_intr())
27 /// @user_data: user data passed to tracing APIs.
28 alias uc_cb_insn_syscall_t = void function(uc_engine *uc, void *user_data);
29 
30 //> X86 registers
31 enum uc_x86_reg {
32 	INVALID = 0,
33 	AH, AL, AX, BH, BL,
34 	BP, BPL, BX, CH, CL,
35 	CS, CX, DH, DI, DIL,
36 	DL, DS, DX, EAX, EBP,
37 	EBX, ECX, EDI, EDX, EFLAGS,
38 	EIP, EIZ, ES, ESI, ESP,
39 	FPSW, FS, GS, IP, RAX,
40 	RBP, RBX, RCX, RDI, RDX,
41 	RIP, RIZ, RSI, RSP, SI,
42 	SIL, SP, SPL, SS, CR0,
43 	CR1, CR2, CR3, CR4, CR5,
44 	CR6, CR7, CR8, CR9, CR10,
45 	CR11, CR12, CR13, CR14, CR15,
46 	DR0, DR1, DR2, DR3, DR4,
47 	DR5, DR6, DR7, DR8, DR9,
48 	DR10, DR11, DR12, DR13, DR14,
49 	DR15, FP0, FP1, FP2, FP3,
50 	FP4, FP5, FP6, FP7,
51 	K0, K1, K2, K3, K4,
52 	K5, K6, K7, MM0, MM1,
53 	MM2, MM3, MM4, MM5, MM6,
54 	MM7, R8, R9, R10, R11,
55 	R12, R13, R14, R15,
56 	ST0, ST1, ST2, ST3,
57 	ST4, ST5, ST6, ST7,
58 	XMM0, XMM1, XMM2, XMM3, XMM4,
59 	XMM5, XMM6, XMM7, XMM8, XMM9,
60 	XMM10, XMM11, XMM12, XMM13, XMM14,
61 	XMM15, XMM16, XMM17, XMM18, XMM19,
62 	XMM20, XMM21, XMM22, XMM23, XMM24,
63 	XMM25, XMM26, XMM27, XMM28, XMM29,
64 	XMM30, XMM31, YMM0, YMM1, YMM2,
65 	YMM3, YMM4, YMM5, YMM6, YMM7,
66 	YMM8, YMM9, YMM10, YMM11, YMM12,
67 	YMM13, YMM14, YMM15, YMM16, YMM17,
68 	YMM18, YMM19, YMM20, YMM21, YMM22,
69 	YMM23, YMM24, YMM25, YMM26, YMM27,
70 	YMM28, YMM29, YMM30, YMM31, ZMM0,
71 	ZMM1, ZMM2, ZMM3, ZMM4, ZMM5,
72 	ZMM6, ZMM7, ZMM8, ZMM9, ZMM10,
73 	ZMM11, ZMM12, ZMM13, ZMM14, ZMM15,
74 	ZMM16, ZMM17, ZMM18, ZMM19, ZMM20,
75 	ZMM21, ZMM22, ZMM23, ZMM24, ZMM25,
76 	ZMM26, ZMM27, ZMM28, ZMM29, ZMM30,
77 	ZMM31, R8B, R9B, R10B, R11B,
78 	R12B, R13B, R14B, R15B, R8D,
79 	R9D, R10D, R11D, R12D, R13D,
80 	R14D, R15D, R8W, R9W, R10W,
81 	R11W, R12W, R13W, R14W, R15W,
82 	IDTR, GDTR, LDTR, TR, FPCW,
83 	FPTAG,
84     MSR, // Model-Specific Register
85 
86 	ENDING		// <-- mark the end of the list of registers
87 }
88 
89 //> X86 instructions
90 enum uc_x86_insn {
91 	INVALID = 0,
92 
93 	AAA,
94 	AAD,
95 	AAM,
96 	AAS,
97 	FABS,
98 	ADC,
99 	ADCX,
100 	ADD,
101 	ADDPD,
102 	ADDPS,
103 	ADDSD,
104 	ADDSS,
105 	ADDSUBPD,
106 	ADDSUBPS,
107 	FADD,
108 	FIADD,
109 	FADDP,
110 	ADOX,
111 	AESDECLAST,
112 	AESDEC,
113 	AESENCLAST,
114 	AESENC,
115 	AESIMC,
116 	AESKEYGENASSIST,
117 	AND,
118 	ANDN,
119 	ANDNPD,
120 	ANDNPS,
121 	ANDPD,
122 	ANDPS,
123 	ARPL,
124 	BEXTR,
125 	BLCFILL,
126 	BLCI,
127 	BLCIC,
128 	BLCMSK,
129 	BLCS,
130 	BLENDPD,
131 	BLENDPS,
132 	BLENDVPD,
133 	BLENDVPS,
134 	BLSFILL,
135 	BLSI,
136 	BLSIC,
137 	BLSMSK,
138 	BLSR,
139 	BOUND,
140 	BSF,
141 	BSR,
142 	BSWAP,
143 	BT,
144 	BTC,
145 	BTR,
146 	BTS,
147 	BZHI,
148 	CALL,
149 	CBW,
150 	CDQ,
151 	CDQE,
152 	FCHS,
153 	CLAC,
154 	CLC,
155 	CLD,
156 	CLFLUSH,
157 	CLFLUSHOPT,
158 	CLGI,
159 	CLI,
160 	CLTS,
161 	CLWB,
162 	CMC,
163 	CMOVA,
164 	CMOVAE,
165 	CMOVB,
166 	CMOVBE,
167 	FCMOVBE,
168 	FCMOVB,
169 	CMOVE,
170 	FCMOVE,
171 	CMOVG,
172 	CMOVGE,
173 	CMOVL,
174 	CMOVLE,
175 	FCMOVNBE,
176 	FCMOVNB,
177 	CMOVNE,
178 	FCMOVNE,
179 	CMOVNO,
180 	CMOVNP,
181 	FCMOVNU,
182 	CMOVNS,
183 	CMOVO,
184 	CMOVP,
185 	FCMOVU,
186 	CMOVS,
187 	CMP,
188 	CMPPD,
189 	CMPPS,
190 	CMPSB,
191 	CMPSD,
192 	CMPSQ,
193 	CMPSS,
194 	CMPSW,
195 	CMPXCHG16B,
196 	CMPXCHG,
197 	CMPXCHG8B,
198 	COMISD,
199 	COMISS,
200 	FCOMP,
201 	FCOMPI,
202 	FCOMI,
203 	FCOM,
204 	FCOS,
205 	CPUID,
206 	CQO,
207 	CRC32,
208 	CVTDQ2PD,
209 	CVTDQ2PS,
210 	CVTPD2DQ,
211 	CVTPD2PS,
212 	CVTPS2DQ,
213 	CVTPS2PD,
214 	CVTSD2SI,
215 	CVTSD2SS,
216 	CVTSI2SD,
217 	CVTSI2SS,
218 	CVTSS2SD,
219 	CVTSS2SI,
220 	CVTTPD2DQ,
221 	CVTTPS2DQ,
222 	CVTTSD2SI,
223 	CVTTSS2SI,
224 	CWD,
225 	CWDE,
226 	DAA,
227 	DAS,
228 	DATA16,
229 	DEC,
230 	DIV,
231 	DIVPD,
232 	DIVPS,
233 	FDIVR,
234 	FIDIVR,
235 	FDIVRP,
236 	DIVSD,
237 	DIVSS,
238 	FDIV,
239 	FIDIV,
240 	FDIVP,
241 	DPPD,
242 	DPPS,
243 	RET,
244 	ENCLS,
245 	ENCLU,
246 	ENTER,
247 	EXTRACTPS,
248 	EXTRQ,
249 	F2XM1,
250 	LCALL,
251 	LJMP,
252 	FBLD,
253 	FBSTP,
254 	FCOMPP,
255 	FDECSTP,
256 	FEMMS,
257 	FFREE,
258 	FICOM,
259 	FICOMP,
260 	FINCSTP,
261 	FLDCW,
262 	FLDENV,
263 	FLDL2E,
264 	FLDL2T,
265 	FLDLG2,
266 	FLDLN2,
267 	FLDPI,
268 	FNCLEX,
269 	FNINIT,
270 	FNOP,
271 	FNSTCW,
272 	FNSTSW,
273 	FPATAN,
274 	FPREM,
275 	FPREM1,
276 	FPTAN,
277 	FFREEP,
278 	FRNDINT,
279 	FRSTOR,
280 	FNSAVE,
281 	FSCALE,
282 	FSETPM,
283 	FSINCOS,
284 	FNSTENV,
285 	FXAM,
286 	FXRSTOR,
287 	FXRSTOR64,
288 	FXSAVE,
289 	FXSAVE64,
290 	FXTRACT,
291 	FYL2X,
292 	FYL2XP1,
293 	MOVAPD,
294 	MOVAPS,
295 	ORPD,
296 	ORPS,
297 	VMOVAPD,
298 	VMOVAPS,
299 	XORPD,
300 	XORPS,
301 	GETSEC,
302 	HADDPD,
303 	HADDPS,
304 	HLT,
305 	HSUBPD,
306 	HSUBPS,
307 	IDIV,
308 	FILD,
309 	IMUL,
310 	IN,
311 	INC,
312 	INSB,
313 	INSERTPS,
314 	INSERTQ,
315 	INSD,
316 	INSW,
317 	INT,
318 	INT1,
319 	INT3,
320 	INTO,
321 	INVD,
322 	INVEPT,
323 	INVLPG,
324 	INVLPGA,
325 	INVPCID,
326 	INVVPID,
327 	IRET,
328 	IRETD,
329 	IRETQ,
330 	FISTTP,
331 	FIST,
332 	FISTP,
333 	UCOMISD,
334 	UCOMISS,
335 	VCOMISD,
336 	VCOMISS,
337 	VCVTSD2SS,
338 	VCVTSI2SD,
339 	VCVTSI2SS,
340 	VCVTSS2SD,
341 	VCVTTSD2SI,
342 	VCVTTSD2USI,
343 	VCVTTSS2SI,
344 	VCVTTSS2USI,
345 	VCVTUSI2SD,
346 	VCVTUSI2SS,
347 	VUCOMISD,
348 	VUCOMISS,
349 	JAE,
350 	JA,
351 	JBE,
352 	JB,
353 	JCXZ,
354 	JECXZ,
355 	JE,
356 	JGE,
357 	JG,
358 	JLE,
359 	JL,
360 	JMP,
361 	JNE,
362 	JNO,
363 	JNP,
364 	JNS,
365 	JO,
366 	JP,
367 	JRCXZ,
368 	JS,
369 	KANDB,
370 	KANDD,
371 	KANDNB,
372 	KANDND,
373 	KANDNQ,
374 	KANDNW,
375 	KANDQ,
376 	KANDW,
377 	KMOVB,
378 	KMOVD,
379 	KMOVQ,
380 	KMOVW,
381 	KNOTB,
382 	KNOTD,
383 	KNOTQ,
384 	KNOTW,
385 	KORB,
386 	KORD,
387 	KORQ,
388 	KORTESTB,
389 	KORTESTD,
390 	KORTESTQ,
391 	KORTESTW,
392 	KORW,
393 	KSHIFTLB,
394 	KSHIFTLD,
395 	KSHIFTLQ,
396 	KSHIFTLW,
397 	KSHIFTRB,
398 	KSHIFTRD,
399 	KSHIFTRQ,
400 	KSHIFTRW,
401 	KUNPCKBW,
402 	KXNORB,
403 	KXNORD,
404 	KXNORQ,
405 	KXNORW,
406 	KXORB,
407 	KXORD,
408 	KXORQ,
409 	KXORW,
410 	LAHF,
411 	LAR,
412 	LDDQU,
413 	LDMXCSR,
414 	LDS,
415 	FLDZ,
416 	FLD1,
417 	FLD,
418 	LEA,
419 	LEAVE,
420 	LES,
421 	LFENCE,
422 	LFS,
423 	LGDT,
424 	LGS,
425 	LIDT,
426 	LLDT,
427 	LMSW,
428 	OR,
429 	SUB,
430 	XOR,
431 	LODSB,
432 	LODSD,
433 	LODSQ,
434 	LODSW,
435 	LOOP,
436 	LOOPE,
437 	LOOPNE,
438 	RETF,
439 	RETFQ,
440 	LSL,
441 	LSS,
442 	LTR,
443 	XADD,
444 	LZCNT,
445 	MASKMOVDQU,
446 	MAXPD,
447 	MAXPS,
448 	MAXSD,
449 	MAXSS,
450 	MFENCE,
451 	MINPD,
452 	MINPS,
453 	MINSD,
454 	MINSS,
455 	CVTPD2PI,
456 	CVTPI2PD,
457 	CVTPI2PS,
458 	CVTPS2PI,
459 	CVTTPD2PI,
460 	CVTTPS2PI,
461 	EMMS,
462 	MASKMOVQ,
463 	MOVD,
464 	MOVDQ2Q,
465 	MOVNTQ,
466 	MOVQ2DQ,
467 	MOVQ,
468 	PABSB,
469 	PABSD,
470 	PABSW,
471 	PACKSSDW,
472 	PACKSSWB,
473 	PACKUSWB,
474 	PADDB,
475 	PADDD,
476 	PADDQ,
477 	PADDSB,
478 	PADDSW,
479 	PADDUSB,
480 	PADDUSW,
481 	PADDW,
482 	PALIGNR,
483 	PANDN,
484 	PAND,
485 	PAVGB,
486 	PAVGW,
487 	PCMPEQB,
488 	PCMPEQD,
489 	PCMPEQW,
490 	PCMPGTB,
491 	PCMPGTD,
492 	PCMPGTW,
493 	PEXTRW,
494 	PHADDSW,
495 	PHADDW,
496 	PHADDD,
497 	PHSUBD,
498 	PHSUBSW,
499 	PHSUBW,
500 	PINSRW,
501 	PMADDUBSW,
502 	PMADDWD,
503 	PMAXSW,
504 	PMAXUB,
505 	PMINSW,
506 	PMINUB,
507 	PMOVMSKB,
508 	PMULHRSW,
509 	PMULHUW,
510 	PMULHW,
511 	PMULLW,
512 	PMULUDQ,
513 	POR,
514 	PSADBW,
515 	PSHUFB,
516 	PSHUFW,
517 	PSIGNB,
518 	PSIGND,
519 	PSIGNW,
520 	PSLLD,
521 	PSLLQ,
522 	PSLLW,
523 	PSRAD,
524 	PSRAW,
525 	PSRLD,
526 	PSRLQ,
527 	PSRLW,
528 	PSUBB,
529 	PSUBD,
530 	PSUBQ,
531 	PSUBSB,
532 	PSUBSW,
533 	PSUBUSB,
534 	PSUBUSW,
535 	PSUBW,
536 	PUNPCKHBW,
537 	PUNPCKHDQ,
538 	PUNPCKHWD,
539 	PUNPCKLBW,
540 	PUNPCKLDQ,
541 	PUNPCKLWD,
542 	PXOR,
543 	MONITOR,
544 	MONTMUL,
545 	MOV,
546 	MOVABS,
547 	MOVBE,
548 	MOVDDUP,
549 	MOVDQA,
550 	MOVDQU,
551 	MOVHLPS,
552 	MOVHPD,
553 	MOVHPS,
554 	MOVLHPS,
555 	MOVLPD,
556 	MOVLPS,
557 	MOVMSKPD,
558 	MOVMSKPS,
559 	MOVNTDQA,
560 	MOVNTDQ,
561 	MOVNTI,
562 	MOVNTPD,
563 	MOVNTPS,
564 	MOVNTSD,
565 	MOVNTSS,
566 	MOVSB,
567 	MOVSD,
568 	MOVSHDUP,
569 	MOVSLDUP,
570 	MOVSQ,
571 	MOVSS,
572 	MOVSW,
573 	MOVSX,
574 	MOVSXD,
575 	MOVUPD,
576 	MOVUPS,
577 	MOVZX,
578 	MPSADBW,
579 	MUL,
580 	MULPD,
581 	MULPS,
582 	MULSD,
583 	MULSS,
584 	MULX,
585 	FMUL,
586 	FIMUL,
587 	FMULP,
588 	MWAIT,
589 	NEG,
590 	NOP,
591 	NOT,
592 	OUT,
593 	OUTSB,
594 	OUTSD,
595 	OUTSW,
596 	PACKUSDW,
597 	PAUSE,
598 	PAVGUSB,
599 	PBLENDVB,
600 	PBLENDW,
601 	PCLMULQDQ,
602 	PCMPEQQ,
603 	PCMPESTRI,
604 	PCMPESTRM,
605 	PCMPGTQ,
606 	PCMPISTRI,
607 	PCMPISTRM,
608 	PCOMMIT,
609 	PDEP,
610 	PEXT,
611 	PEXTRB,
612 	PEXTRD,
613 	PEXTRQ,
614 	PF2ID,
615 	PF2IW,
616 	PFACC,
617 	PFADD,
618 	PFCMPEQ,
619 	PFCMPGE,
620 	PFCMPGT,
621 	PFMAX,
622 	PFMIN,
623 	PFMUL,
624 	PFNACC,
625 	PFPNACC,
626 	PFRCPIT1,
627 	PFRCPIT2,
628 	PFRCP,
629 	PFRSQIT1,
630 	PFRSQRT,
631 	PFSUBR,
632 	PFSUB,
633 	PHMINPOSUW,
634 	PI2FD,
635 	PI2FW,
636 	PINSRB,
637 	PINSRD,
638 	PINSRQ,
639 	PMAXSB,
640 	PMAXSD,
641 	PMAXUD,
642 	PMAXUW,
643 	PMINSB,
644 	PMINSD,
645 	PMINUD,
646 	PMINUW,
647 	PMOVSXBD,
648 	PMOVSXBQ,
649 	PMOVSXBW,
650 	PMOVSXDQ,
651 	PMOVSXWD,
652 	PMOVSXWQ,
653 	PMOVZXBD,
654 	PMOVZXBQ,
655 	PMOVZXBW,
656 	PMOVZXDQ,
657 	PMOVZXWD,
658 	PMOVZXWQ,
659 	PMULDQ,
660 	PMULHRW,
661 	PMULLD,
662 	POP,
663 	POPAW,
664 	POPAL,
665 	POPCNT,
666 	POPF,
667 	POPFD,
668 	POPFQ,
669 	PREFETCH,
670 	PREFETCHNTA,
671 	PREFETCHT0,
672 	PREFETCHT1,
673 	PREFETCHT2,
674 	PREFETCHW,
675 	PSHUFD,
676 	PSHUFHW,
677 	PSHUFLW,
678 	PSLLDQ,
679 	PSRLDQ,
680 	PSWAPD,
681 	PTEST,
682 	PUNPCKHQDQ,
683 	PUNPCKLQDQ,
684 	PUSH,
685 	PUSHAW,
686 	PUSHAL,
687 	PUSHF,
688 	PUSHFD,
689 	PUSHFQ,
690 	RCL,
691 	RCPPS,
692 	RCPSS,
693 	RCR,
694 	RDFSBASE,
695 	RDGSBASE,
696 	RDMSR,
697 	RDPMC,
698 	RDRAND,
699 	RDSEED,
700 	RDTSC,
701 	RDTSCP,
702 	ROL,
703 	ROR,
704 	RORX,
705 	ROUNDPD,
706 	ROUNDPS,
707 	ROUNDSD,
708 	ROUNDSS,
709 	RSM,
710 	RSQRTPS,
711 	RSQRTSS,
712 	SAHF,
713 	SAL,
714 	SALC,
715 	SAR,
716 	SARX,
717 	SBB,
718 	SCASB,
719 	SCASD,
720 	SCASQ,
721 	SCASW,
722 	SETAE,
723 	SETA,
724 	SETBE,
725 	SETB,
726 	SETE,
727 	SETGE,
728 	SETG,
729 	SETLE,
730 	SETL,
731 	SETNE,
732 	SETNO,
733 	SETNP,
734 	SETNS,
735 	SETO,
736 	SETP,
737 	SETS,
738 	SFENCE,
739 	SGDT,
740 	SHA1MSG1,
741 	SHA1MSG2,
742 	SHA1NEXTE,
743 	SHA1RNDS4,
744 	SHA256MSG1,
745 	SHA256MSG2,
746 	SHA256RNDS2,
747 	SHL,
748 	SHLD,
749 	SHLX,
750 	SHR,
751 	SHRD,
752 	SHRX,
753 	SHUFPD,
754 	SHUFPS,
755 	SIDT,
756 	FSIN,
757 	SKINIT,
758 	SLDT,
759 	SMSW,
760 	SQRTPD,
761 	SQRTPS,
762 	SQRTSD,
763 	SQRTSS,
764 	FSQRT,
765 	STAC,
766 	STC,
767 	STD,
768 	STGI,
769 	STI,
770 	STMXCSR,
771 	STOSB,
772 	STOSD,
773 	STOSQ,
774 	STOSW,
775 	STR,
776 	FST,
777 	FSTP,
778 	FSTPNCE,
779 	FXCH,
780 	SUBPD,
781 	SUBPS,
782 	FSUBR,
783 	FISUBR,
784 	FSUBRP,
785 	SUBSD,
786 	SUBSS,
787 	FSUB,
788 	FISUB,
789 	FSUBP,
790 	SWAPGS,
791 	SYSCALL,
792 	SYSENTER,
793 	SYSEXIT,
794 	SYSRET,
795 	T1MSKC,
796 	TEST,
797 	UD2,
798 	FTST,
799 	TZCNT,
800 	TZMSK,
801 	FUCOMPI,
802 	FUCOMI,
803 	FUCOMPP,
804 	FUCOMP,
805 	FUCOM,
806 	UD2B,
807 	UNPCKHPD,
808 	UNPCKHPS,
809 	UNPCKLPD,
810 	UNPCKLPS,
811 	VADDPD,
812 	VADDPS,
813 	VADDSD,
814 	VADDSS,
815 	VADDSUBPD,
816 	VADDSUBPS,
817 	VAESDECLAST,
818 	VAESDEC,
819 	VAESENCLAST,
820 	VAESENC,
821 	VAESIMC,
822 	VAESKEYGENASSIST,
823 	VALIGND,
824 	VALIGNQ,
825 	VANDNPD,
826 	VANDNPS,
827 	VANDPD,
828 	VANDPS,
829 	VBLENDMPD,
830 	VBLENDMPS,
831 	VBLENDPD,
832 	VBLENDPS,
833 	VBLENDVPD,
834 	VBLENDVPS,
835 	VBROADCASTF128,
836 	VBROADCASTI32X4,
837 	VBROADCASTI64X4,
838 	VBROADCASTSD,
839 	VBROADCASTSS,
840 	VCMPPD,
841 	VCMPPS,
842 	VCMPSD,
843 	VCMPSS,
844 	VCOMPRESSPD,
845 	VCOMPRESSPS,
846 	VCVTDQ2PD,
847 	VCVTDQ2PS,
848 	VCVTPD2DQX,
849 	VCVTPD2DQ,
850 	VCVTPD2PSX,
851 	VCVTPD2PS,
852 	VCVTPD2UDQ,
853 	VCVTPH2PS,
854 	VCVTPS2DQ,
855 	VCVTPS2PD,
856 	VCVTPS2PH,
857 	VCVTPS2UDQ,
858 	VCVTSD2SI,
859 	VCVTSD2USI,
860 	VCVTSS2SI,
861 	VCVTSS2USI,
862 	VCVTTPD2DQX,
863 	VCVTTPD2DQ,
864 	VCVTTPD2UDQ,
865 	VCVTTPS2DQ,
866 	VCVTTPS2UDQ,
867 	VCVTUDQ2PD,
868 	VCVTUDQ2PS,
869 	VDIVPD,
870 	VDIVPS,
871 	VDIVSD,
872 	VDIVSS,
873 	VDPPD,
874 	VDPPS,
875 	VERR,
876 	VERW,
877 	VEXP2PD,
878 	VEXP2PS,
879 	VEXPANDPD,
880 	VEXPANDPS,
881 	VEXTRACTF128,
882 	VEXTRACTF32X4,
883 	VEXTRACTF64X4,
884 	VEXTRACTI128,
885 	VEXTRACTI32X4,
886 	VEXTRACTI64X4,
887 	VEXTRACTPS,
888 	VFMADD132PD,
889 	VFMADD132PS,
890 	VFMADDPD,
891 	VFMADD213PD,
892 	VFMADD231PD,
893 	VFMADDPS,
894 	VFMADD213PS,
895 	VFMADD231PS,
896 	VFMADDSD,
897 	VFMADD213SD,
898 	VFMADD132SD,
899 	VFMADD231SD,
900 	VFMADDSS,
901 	VFMADD213SS,
902 	VFMADD132SS,
903 	VFMADD231SS,
904 	VFMADDSUB132PD,
905 	VFMADDSUB132PS,
906 	VFMADDSUBPD,
907 	VFMADDSUB213PD,
908 	VFMADDSUB231PD,
909 	VFMADDSUBPS,
910 	VFMADDSUB213PS,
911 	VFMADDSUB231PS,
912 	VFMSUB132PD,
913 	VFMSUB132PS,
914 	VFMSUBADD132PD,
915 	VFMSUBADD132PS,
916 	VFMSUBADDPD,
917 	VFMSUBADD213PD,
918 	VFMSUBADD231PD,
919 	VFMSUBADDPS,
920 	VFMSUBADD213PS,
921 	VFMSUBADD231PS,
922 	VFMSUBPD,
923 	VFMSUB213PD,
924 	VFMSUB231PD,
925 	VFMSUBPS,
926 	VFMSUB213PS,
927 	VFMSUB231PS,
928 	VFMSUBSD,
929 	VFMSUB213SD,
930 	VFMSUB132SD,
931 	VFMSUB231SD,
932 	VFMSUBSS,
933 	VFMSUB213SS,
934 	VFMSUB132SS,
935 	VFMSUB231SS,
936 	VFNMADD132PD,
937 	VFNMADD132PS,
938 	VFNMADDPD,
939 	VFNMADD213PD,
940 	VFNMADD231PD,
941 	VFNMADDPS,
942 	VFNMADD213PS,
943 	VFNMADD231PS,
944 	VFNMADDSD,
945 	VFNMADD213SD,
946 	VFNMADD132SD,
947 	VFNMADD231SD,
948 	VFNMADDSS,
949 	VFNMADD213SS,
950 	VFNMADD132SS,
951 	VFNMADD231SS,
952 	VFNMSUB132PD,
953 	VFNMSUB132PS,
954 	VFNMSUBPD,
955 	VFNMSUB213PD,
956 	VFNMSUB231PD,
957 	VFNMSUBPS,
958 	VFNMSUB213PS,
959 	VFNMSUB231PS,
960 	VFNMSUBSD,
961 	VFNMSUB213SD,
962 	VFNMSUB132SD,
963 	VFNMSUB231SD,
964 	VFNMSUBSS,
965 	VFNMSUB213SS,
966 	VFNMSUB132SS,
967 	VFNMSUB231SS,
968 	VFRCZPD,
969 	VFRCZPS,
970 	VFRCZSD,
971 	VFRCZSS,
972 	VORPD,
973 	VORPS,
974 	VXORPD,
975 	VXORPS,
976 	VGATHERDPD,
977 	VGATHERDPS,
978 	VGATHERPF0DPD,
979 	VGATHERPF0DPS,
980 	VGATHERPF0QPD,
981 	VGATHERPF0QPS,
982 	VGATHERPF1DPD,
983 	VGATHERPF1DPS,
984 	VGATHERPF1QPD,
985 	VGATHERPF1QPS,
986 	VGATHERQPD,
987 	VGATHERQPS,
988 	VHADDPD,
989 	VHADDPS,
990 	VHSUBPD,
991 	VHSUBPS,
992 	VINSERTF128,
993 	VINSERTF32X4,
994 	VINSERTF32X8,
995 	VINSERTF64X2,
996 	VINSERTF64X4,
997 	VINSERTI128,
998 	VINSERTI32X4,
999 	VINSERTI32X8,
1000 	VINSERTI64X2,
1001 	VINSERTI64X4,
1002 	VINSERTPS,
1003 	VLDDQU,
1004 	VLDMXCSR,
1005 	VMASKMOVDQU,
1006 	VMASKMOVPD,
1007 	VMASKMOVPS,
1008 	VMAXPD,
1009 	VMAXPS,
1010 	VMAXSD,
1011 	VMAXSS,
1012 	VMCALL,
1013 	VMCLEAR,
1014 	VMFUNC,
1015 	VMINPD,
1016 	VMINPS,
1017 	VMINSD,
1018 	VMINSS,
1019 	VMLAUNCH,
1020 	VMLOAD,
1021 	VMMCALL,
1022 	VMOVQ,
1023 	VMOVDDUP,
1024 	VMOVD,
1025 	VMOVDQA32,
1026 	VMOVDQA64,
1027 	VMOVDQA,
1028 	VMOVDQU16,
1029 	VMOVDQU32,
1030 	VMOVDQU64,
1031 	VMOVDQU8,
1032 	VMOVDQU,
1033 	VMOVHLPS,
1034 	VMOVHPD,
1035 	VMOVHPS,
1036 	VMOVLHPS,
1037 	VMOVLPD,
1038 	VMOVLPS,
1039 	VMOVMSKPD,
1040 	VMOVMSKPS,
1041 	VMOVNTDQA,
1042 	VMOVNTDQ,
1043 	VMOVNTPD,
1044 	VMOVNTPS,
1045 	VMOVSD,
1046 	VMOVSHDUP,
1047 	VMOVSLDUP,
1048 	VMOVSS,
1049 	VMOVUPD,
1050 	VMOVUPS,
1051 	VMPSADBW,
1052 	VMPTRLD,
1053 	VMPTRST,
1054 	VMREAD,
1055 	VMRESUME,
1056 	VMRUN,
1057 	VMSAVE,
1058 	VMULPD,
1059 	VMULPS,
1060 	VMULSD,
1061 	VMULSS,
1062 	VMWRITE,
1063 	VMXOFF,
1064 	VMXON,
1065 	VPABSB,
1066 	VPABSD,
1067 	VPABSQ,
1068 	VPABSW,
1069 	VPACKSSDW,
1070 	VPACKSSWB,
1071 	VPACKUSDW,
1072 	VPACKUSWB,
1073 	VPADDB,
1074 	VPADDD,
1075 	VPADDQ,
1076 	VPADDSB,
1077 	VPADDSW,
1078 	VPADDUSB,
1079 	VPADDUSW,
1080 	VPADDW,
1081 	VPALIGNR,
1082 	VPANDD,
1083 	VPANDND,
1084 	VPANDNQ,
1085 	VPANDN,
1086 	VPANDQ,
1087 	VPAND,
1088 	VPAVGB,
1089 	VPAVGW,
1090 	VPBLENDD,
1091 	VPBLENDMB,
1092 	VPBLENDMD,
1093 	VPBLENDMQ,
1094 	VPBLENDMW,
1095 	VPBLENDVB,
1096 	VPBLENDW,
1097 	VPBROADCASTB,
1098 	VPBROADCASTD,
1099 	VPBROADCASTMB2Q,
1100 	VPBROADCASTMW2D,
1101 	VPBROADCASTQ,
1102 	VPBROADCASTW,
1103 	VPCLMULQDQ,
1104 	VPCMOV,
1105 	VPCMPB,
1106 	VPCMPD,
1107 	VPCMPEQB,
1108 	VPCMPEQD,
1109 	VPCMPEQQ,
1110 	VPCMPEQW,
1111 	VPCMPESTRI,
1112 	VPCMPESTRM,
1113 	VPCMPGTB,
1114 	VPCMPGTD,
1115 	VPCMPGTQ,
1116 	VPCMPGTW,
1117 	VPCMPISTRI,
1118 	VPCMPISTRM,
1119 	VPCMPQ,
1120 	VPCMPUB,
1121 	VPCMPUD,
1122 	VPCMPUQ,
1123 	VPCMPUW,
1124 	VPCMPW,
1125 	VPCOMB,
1126 	VPCOMD,
1127 	VPCOMPRESSD,
1128 	VPCOMPRESSQ,
1129 	VPCOMQ,
1130 	VPCOMUB,
1131 	VPCOMUD,
1132 	VPCOMUQ,
1133 	VPCOMUW,
1134 	VPCOMW,
1135 	VPCONFLICTD,
1136 	VPCONFLICTQ,
1137 	VPERM2F128,
1138 	VPERM2I128,
1139 	VPERMD,
1140 	VPERMI2D,
1141 	VPERMI2PD,
1142 	VPERMI2PS,
1143 	VPERMI2Q,
1144 	VPERMIL2PD,
1145 	VPERMIL2PS,
1146 	VPERMILPD,
1147 	VPERMILPS,
1148 	VPERMPD,
1149 	VPERMPS,
1150 	VPERMQ,
1151 	VPERMT2D,
1152 	VPERMT2PD,
1153 	VPERMT2PS,
1154 	VPERMT2Q,
1155 	VPEXPANDD,
1156 	VPEXPANDQ,
1157 	VPEXTRB,
1158 	VPEXTRD,
1159 	VPEXTRQ,
1160 	VPEXTRW,
1161 	VPGATHERDD,
1162 	VPGATHERDQ,
1163 	VPGATHERQD,
1164 	VPGATHERQQ,
1165 	VPHADDBD,
1166 	VPHADDBQ,
1167 	VPHADDBW,
1168 	VPHADDDQ,
1169 	VPHADDD,
1170 	VPHADDSW,
1171 	VPHADDUBD,
1172 	VPHADDUBQ,
1173 	VPHADDUBW,
1174 	VPHADDUDQ,
1175 	VPHADDUWD,
1176 	VPHADDUWQ,
1177 	VPHADDWD,
1178 	VPHADDWQ,
1179 	VPHADDW,
1180 	VPHMINPOSUW,
1181 	VPHSUBBW,
1182 	VPHSUBDQ,
1183 	VPHSUBD,
1184 	VPHSUBSW,
1185 	VPHSUBWD,
1186 	VPHSUBW,
1187 	VPINSRB,
1188 	VPINSRD,
1189 	VPINSRQ,
1190 	VPINSRW,
1191 	VPLZCNTD,
1192 	VPLZCNTQ,
1193 	VPMACSDD,
1194 	VPMACSDQH,
1195 	VPMACSDQL,
1196 	VPMACSSDD,
1197 	VPMACSSDQH,
1198 	VPMACSSDQL,
1199 	VPMACSSWD,
1200 	VPMACSSWW,
1201 	VPMACSWD,
1202 	VPMACSWW,
1203 	VPMADCSSWD,
1204 	VPMADCSWD,
1205 	VPMADDUBSW,
1206 	VPMADDWD,
1207 	VPMASKMOVD,
1208 	VPMASKMOVQ,
1209 	VPMAXSB,
1210 	VPMAXSD,
1211 	VPMAXSQ,
1212 	VPMAXSW,
1213 	VPMAXUB,
1214 	VPMAXUD,
1215 	VPMAXUQ,
1216 	VPMAXUW,
1217 	VPMINSB,
1218 	VPMINSD,
1219 	VPMINSQ,
1220 	VPMINSW,
1221 	VPMINUB,
1222 	VPMINUD,
1223 	VPMINUQ,
1224 	VPMINUW,
1225 	VPMOVDB,
1226 	VPMOVDW,
1227 	VPMOVM2B,
1228 	VPMOVM2D,
1229 	VPMOVM2Q,
1230 	VPMOVM2W,
1231 	VPMOVMSKB,
1232 	VPMOVQB,
1233 	VPMOVQD,
1234 	VPMOVQW,
1235 	VPMOVSDB,
1236 	VPMOVSDW,
1237 	VPMOVSQB,
1238 	VPMOVSQD,
1239 	VPMOVSQW,
1240 	VPMOVSXBD,
1241 	VPMOVSXBQ,
1242 	VPMOVSXBW,
1243 	VPMOVSXDQ,
1244 	VPMOVSXWD,
1245 	VPMOVSXWQ,
1246 	VPMOVUSDB,
1247 	VPMOVUSDW,
1248 	VPMOVUSQB,
1249 	VPMOVUSQD,
1250 	VPMOVUSQW,
1251 	VPMOVZXBD,
1252 	VPMOVZXBQ,
1253 	VPMOVZXBW,
1254 	VPMOVZXDQ,
1255 	VPMOVZXWD,
1256 	VPMOVZXWQ,
1257 	VPMULDQ,
1258 	VPMULHRSW,
1259 	VPMULHUW,
1260 	VPMULHW,
1261 	VPMULLD,
1262 	VPMULLQ,
1263 	VPMULLW,
1264 	VPMULUDQ,
1265 	VPORD,
1266 	VPORQ,
1267 	VPOR,
1268 	VPPERM,
1269 	VPROTB,
1270 	VPROTD,
1271 	VPROTQ,
1272 	VPROTW,
1273 	VPSADBW,
1274 	VPSCATTERDD,
1275 	VPSCATTERDQ,
1276 	VPSCATTERQD,
1277 	VPSCATTERQQ,
1278 	VPSHAB,
1279 	VPSHAD,
1280 	VPSHAQ,
1281 	VPSHAW,
1282 	VPSHLB,
1283 	VPSHLD,
1284 	VPSHLQ,
1285 	VPSHLW,
1286 	VPSHUFB,
1287 	VPSHUFD,
1288 	VPSHUFHW,
1289 	VPSHUFLW,
1290 	VPSIGNB,
1291 	VPSIGND,
1292 	VPSIGNW,
1293 	VPSLLDQ,
1294 	VPSLLD,
1295 	VPSLLQ,
1296 	VPSLLVD,
1297 	VPSLLVQ,
1298 	VPSLLW,
1299 	VPSRAD,
1300 	VPSRAQ,
1301 	VPSRAVD,
1302 	VPSRAVQ,
1303 	VPSRAW,
1304 	VPSRLDQ,
1305 	VPSRLD,
1306 	VPSRLQ,
1307 	VPSRLVD,
1308 	VPSRLVQ,
1309 	VPSRLW,
1310 	VPSUBB,
1311 	VPSUBD,
1312 	VPSUBQ,
1313 	VPSUBSB,
1314 	VPSUBSW,
1315 	VPSUBUSB,
1316 	VPSUBUSW,
1317 	VPSUBW,
1318 	VPTESTMD,
1319 	VPTESTMQ,
1320 	VPTESTNMD,
1321 	VPTESTNMQ,
1322 	VPTEST,
1323 	VPUNPCKHBW,
1324 	VPUNPCKHDQ,
1325 	VPUNPCKHQDQ,
1326 	VPUNPCKHWD,
1327 	VPUNPCKLBW,
1328 	VPUNPCKLDQ,
1329 	VPUNPCKLQDQ,
1330 	VPUNPCKLWD,
1331 	VPXORD,
1332 	VPXORQ,
1333 	VPXOR,
1334 	VRCP14PD,
1335 	VRCP14PS,
1336 	VRCP14SD,
1337 	VRCP14SS,
1338 	VRCP28PD,
1339 	VRCP28PS,
1340 	VRCP28SD,
1341 	VRCP28SS,
1342 	VRCPPS,
1343 	VRCPSS,
1344 	VRNDSCALEPD,
1345 	VRNDSCALEPS,
1346 	VRNDSCALESD,
1347 	VRNDSCALESS,
1348 	VROUNDPD,
1349 	VROUNDPS,
1350 	VROUNDSD,
1351 	VROUNDSS,
1352 	VRSQRT14PD,
1353 	VRSQRT14PS,
1354 	VRSQRT14SD,
1355 	VRSQRT14SS,
1356 	VRSQRT28PD,
1357 	VRSQRT28PS,
1358 	VRSQRT28SD,
1359 	VRSQRT28SS,
1360 	VRSQRTPS,
1361 	VRSQRTSS,
1362 	VSCATTERDPD,
1363 	VSCATTERDPS,
1364 	VSCATTERPF0DPD,
1365 	VSCATTERPF0DPS,
1366 	VSCATTERPF0QPD,
1367 	VSCATTERPF0QPS,
1368 	VSCATTERPF1DPD,
1369 	VSCATTERPF1DPS,
1370 	VSCATTERPF1QPD,
1371 	VSCATTERPF1QPS,
1372 	VSCATTERQPD,
1373 	VSCATTERQPS,
1374 	VSHUFPD,
1375 	VSHUFPS,
1376 	VSQRTPD,
1377 	VSQRTPS,
1378 	VSQRTSD,
1379 	VSQRTSS,
1380 	VSTMXCSR,
1381 	VSUBPD,
1382 	VSUBPS,
1383 	VSUBSD,
1384 	VSUBSS,
1385 	VTESTPD,
1386 	VTESTPS,
1387 	VUNPCKHPD,
1388 	VUNPCKHPS,
1389 	VUNPCKLPD,
1390 	VUNPCKLPS,
1391 	VZEROALL,
1392 	VZEROUPPER,
1393 	WAIT,
1394 	WBINVD,
1395 	WRFSBASE,
1396 	WRGSBASE,
1397 	WRMSR,
1398 	XABORT,
1399 	XACQUIRE,
1400 	XBEGIN,
1401 	XCHG,
1402 	XCRYPTCBC,
1403 	XCRYPTCFB,
1404 	XCRYPTCTR,
1405 	XCRYPTECB,
1406 	XCRYPTOFB,
1407 	XEND,
1408 	XGETBV,
1409 	XLATB,
1410 	XRELEASE,
1411 	XRSTOR,
1412 	XRSTOR64,
1413 	XRSTORS,
1414 	XRSTORS64,
1415 	XSAVE,
1416 	XSAVE64,
1417 	XSAVEC,
1418 	XSAVEC64,
1419 	XSAVEOPT,
1420 	XSAVEOPT64,
1421 	XSAVES,
1422 	XSAVES64,
1423 	XSETBV,
1424 	XSHA1,
1425 	XSHA256,
1426 	XSTORE,
1427 	XTEST,
1428 	FDISI8087_NOP,
1429 	FENI8087_NOP,
1430 
1431 	ENDING, // mark the end of the list of insn
1432 }