VirtualBox

source: vbox/trunk/include/VBox/disopcode.h@ 86716

Last change on this file since 86716 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 28.6 KB
Line 
1/** @file
2 * Disassembler - Opcodes
3 */
4
5/*
6 * Copyright (C) 2006-2020 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef VBOX_INCLUDED_disopcode_h
27#define VBOX_INCLUDED_disopcode_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <iprt/assert.h>
33
34#define MODRM_MOD(a) (a>>6)
35#define MODRM_REG(a) ((a>>3)&0x7)
36#define MODRM_RM(a) (a&0x7)
37#define MAKE_MODRM(mod, reg, rm) (((mod&3) << 6) | ((reg&7) << 3) | (rm&7))
38
39#define SIB_SCALE(a) (a>>6)
40#define SIB_INDEX(a) ((a>>3)&0x7)
41#define SIB_BASE(a) (a&0x7)
42
43
44/** @defgroup grp_dis_opcodes Opcodes (DISOPCODE::uOpCode)
45 * @ingroup grp_dis
46 * @{
47 */
48enum OPCODES
49{
50/** @name Full Intel X86 opcode list
51 * @{ */
52 OP_INVALID = 0,
53 OP_OPSIZE,
54 OP_ADDRSIZE,
55 OP_SEG,
56 OP_REPNE,
57 OP_REPE,
58 OP_REX,
59 OP_LOCK,
60#ifndef IN_SLICKEDIT
61 OP_LAST_PREFIX = OP_LOCK, /**< Last prefix for disassembler. */
62#else
63 OP_LAST_PREFIX = 7, /**< Last prefix for disassembler. */
64#endif
65 OP_AND,
66 OP_OR,
67 OP_DAA,
68 OP_SUB,
69 OP_DAS,
70 OP_XOR,
71 OP_AAA,
72 OP_CMP,
73 OP_IMM_GRP1,
74 OP_AAS,
75 OP_INC,
76 OP_DEC,
77 OP_PUSHA,
78 OP_POPA,
79 OP_BOUND,
80 OP_ARPL,
81 OP_PUSH,
82 OP_POP,
83 OP_IMUL,
84 OP_INSB,
85 OP_INSWD,
86 OP_OUTSB,
87 OP_OUTSWD,
88 OP_JO,
89 OP_JNO,
90 OP_JC,
91 OP_JNC,
92 OP_JE,
93 OP_JNE,
94 OP_JBE,
95 OP_JNBE,
96 OP_JS,
97 OP_JNS,
98 OP_JP,
99 OP_JNP,
100 OP_JL,
101 OP_JNL,
102 OP_JLE,
103 OP_JNLE,
104 OP_ADD,
105 OP_TEST,
106 OP_XCHG,
107 OP_MOV,
108 OP_LEA,
109 OP_NOP,
110 OP_CBW,
111 OP_CWD,
112 OP_CALL,
113 OP_WAIT,
114 OP_PUSHF,
115 OP_POPF,
116 OP_SAHF,
117 OP_LAHF,
118 OP_MOVSB,
119 OP_MOVSWD,
120 OP_CMPSB,
121 OP_CMPWD,
122 OP_STOSB,
123 OP_STOSWD,
124 OP_LODSB,
125 OP_LODSWD,
126 OP_SCASB,
127 OP_SCASWD,
128 OP_SHIFT_GRP2,
129 OP_RETN,
130 OP_LES,
131 OP_LDS,
132 OP_ENTER,
133 OP_LEAVE,
134 OP_RETF,
135 OP_INT3,
136 OP_INT,
137 OP_INTO,
138 OP_IRET,
139 OP_AAM,
140 OP_AAD,
141 OP_XLAT,
142 OP_ESCF0,
143 OP_ESCF1,
144 OP_ESCF2,
145 OP_ESCF3,
146 OP_ESCF4,
147 OP_ESCF5,
148 OP_ESCF6,
149 OP_ESCF7,
150 OP_LOOPNE,
151 OP_LOOPE,
152 OP_LOOP,
153 OP_JECXZ,
154 OP_IN,
155 OP_OUT,
156 OP_JMP,
157 OP_2B_ESC,
158 OP_ADC,
159 OP_SBB,
160 OP_HLT,
161 OP_CMC,
162 OP_UNARY_GRP3,
163 OP_CLC,
164 OP_STC,
165 OP_CLI,
166 OP_STI,
167 OP_CLD,
168 OP_STD,
169 OP_INC_GRP4,
170 OP_IND_GRP5,
171 OP_GRP6,
172 OP_GRP7,
173 OP_LAR,
174 OP_LSL,
175 OP_SYSCALL,
176 OP_CLTS,
177 OP_SYSRET,
178 OP_INVD,
179 OP_WBINVD,
180 OP_ILLUD2,
181 OP_FEMMS,
182 OP_3DNOW,
183 OP_MOVUPS,
184 OP_MOVLPS,
185 OP_MOVHLPS = OP_MOVLPS, /**< @todo OP_MOVHLPS */
186 OP_UNPCKLPS,
187 OP_MOVHPS,
188 OP_MOVLHPS = OP_MOVHPS, /**< @todo OP_MOVLHPS */
189 OP_UNPCKHPS,
190 OP_PREFETCH_GRP16,
191 OP_MOV_CR,
192 OP_MOVAPS,
193 OP_CVTPI2PS,
194 OP_MOVNTPS,
195 OP_CVTTPS2PI,
196 OP_CVTPS2PI,
197 OP_UCOMISS,
198 OP_COMISS,
199 OP_WRMSR,
200 OP_RDTSC,
201 OP_RDMSR,
202 OP_RDPMC,
203 OP_SYSENTER,
204 OP_SYSEXIT,
205 OP_GETSEC,
206 OP_PAUSE,
207 OP_CMOVO,
208 OP_CMOVNO,
209 OP_CMOVC,
210 OP_CMOVNC,
211 OP_CMOVZ,
212 OP_CMOVNZ,
213 OP_CMOVBE,
214 OP_CMOVNBE,
215 OP_CMOVS,
216 OP_CMOVNS,
217 OP_CMOVP,
218 OP_CMOVNP,
219 OP_CMOVL,
220 OP_CMOVNL,
221 OP_CMOVLE,
222 OP_CMOVNLE,
223 OP_MOVMSKPS,
224 OP_SQRTPS,
225 OP_RSQRTPS,
226 OP_RCPPS,
227 OP_ANDPS,
228 OP_ANDNPS,
229 OP_ORPS,
230 OP_XORPS,
231 OP_ADDPS,
232 OP_MULPS,
233 OP_CVTPS2PD,
234 OP_CVTDQ2PS,
235 OP_SUBPS,
236 OP_MINPS,
237 OP_DIVPS,
238 OP_MAXPS,
239 OP_PUNPCKLBW,
240 OP_PUNPCKLWD,
241 OP_PUNPCKLDQ,
242 OP_PACKSSWB,
243 OP_PCMPGTB,
244 OP_PCMPGTW,
245 OP_PCMPGTD,
246 OP_PCMPGTQ,
247 OP_PACKUSWB,
248 OP_PUNPCKHBW,
249 OP_PUNPCKHWD,
250 OP_PUNPCKHDQ,
251 OP_PACKSSDW,
252 OP_MOVD,
253 OP_MOVQ,
254 OP_PSHUFW,
255 OP_3B_ESC4,
256 OP_3B_ESC5,
257 OP_PCMPEQB,
258 OP_PCMPEQW,
259 OP_PCMPEQD,
260 OP_PCMPEQQ,
261 OP_SETO,
262 OP_SETNO,
263 OP_SETC,
264 OP_SETNC,
265 OP_SETE,
266 OP_SETNE,
267 OP_SETBE,
268 OP_SETNBE,
269 OP_SETS,
270 OP_SETNS,
271 OP_SETP,
272 OP_SETNP,
273 OP_SETL,
274 OP_SETNL,
275 OP_SETLE,
276 OP_SETNLE,
277 OP_CPUID,
278 OP_BT,
279 OP_SHLD,
280 OP_RSM,
281 OP_BTS,
282 OP_SHRD,
283 OP_GRP15,
284 OP_CMPXCHG,
285 OP_LSS,
286 OP_BTR,
287 OP_LFS,
288 OP_LGS,
289 OP_MOVZX,
290 OP_GRP10_INV,
291 OP_GRP8,
292 OP_BTC,
293 OP_BSF,
294 OP_BSR,
295 OP_MOVSX,
296 OP_XADD,
297 OP_CMPPS,
298 OP_MOVNTI,
299 OP_PINSRW,
300 OP_PEXTRW,
301 OP_SHUFPS,
302 OP_GRP9,
303 OP_BSWAP,
304 OP_ADDSUBPS,
305 OP_ADDSUBPD,
306 OP_PSRLW,
307 OP_PSRLD,
308 OP_PSRLQ,
309 OP_PADDQ,
310 OP_PMULLW,
311 OP_PMOVMSKB,
312 OP_PSUBUSB,
313 OP_PSUBUSW,
314 OP_PMINUB,
315 OP_PAND,
316 OP_PADDUSB,
317 OP_PADDUSW,
318 OP_PMAXUB,
319 OP_PANDN,
320 OP_PAVGB,
321 OP_PSRAW,
322 OP_PSRAD,
323 OP_PAVGW,
324 OP_PMULHUW,
325 OP_PMULHW,
326 OP_MOVNTQ,
327 OP_PSUBSB,
328 OP_PSUBSW,
329 OP_PMINSW,
330 OP_POR,
331 OP_PADDSB,
332 OP_PADDSW,
333 OP_PMAXSW,
334 OP_PXOR,
335 OP_LDDQU,
336 OP_PSLLW,
337 OP_PSLLD,
338 OP_PSSQ,
339 OP_PMULUDQ,
340 OP_PMADDWD,
341 OP_PSADBW,
342 OP_MASKMOVQ,
343 OP_PSUBB,
344 OP_PSUBW,
345 OP_PSUBD,
346 OP_PSUBQ,
347 OP_PADDB,
348 OP_PADDW,
349 OP_PADDD,
350 OP_MOVUPD,
351 OP_MOVLPD,
352 OP_UNPCKLPD,
353 OP_UNPCKHPD,
354 OP_MOVHPD,
355 OP_MOVAPD,
356 OP_CVTPI2PD,
357 OP_MOVNTPD,
358 OP_CVTTPD2PI,
359 OP_CVTPD2PI,
360 OP_UCOMISD,
361 OP_COMISD,
362 OP_MOVMSKPD,
363 OP_SQRTPD,
364 OP_ANDPD,
365 OP_ANDNPD,
366 OP_ORPD,
367 OP_XORPD,
368 OP_ADDPD,
369 OP_MULPD,
370 OP_CVTPD2PS,
371 OP_CVTPS2DQ,
372 OP_SUBPD,
373 OP_MINPD,
374 OP_DIVPD,
375 OP_MAXPD,
376 OP_GRP12,
377 OP_GRP13,
378 OP_GRP14,
379 OP_EMMS,
380 OP_MMX_UD78,
381 OP_MMX_UD79,
382 OP_MMX_UD7A,
383 OP_MMX_UD7B,
384 OP_MMX_UD7C,
385 OP_MMX_UD7D,
386 OP_PUNPCKLQDQ,
387 OP_PUNPCKHQDQ,
388 OP_MOVDQA,
389 OP_PSHUFD,
390 OP_CMPPD,
391 OP_SHUFPD,
392 OP_CVTTPD2DQ,
393 OP_MOVNTDQ,
394 OP_MOVNTDQA,
395 OP_PACKUSDW,
396 OP_PSHUFB,
397 OP_PHADDW,
398 OP_PHADDD,
399 OP_PHADDSW,
400 OP_HADDPS,
401 OP_HADDPD,
402 OP_PMADDUBSW,
403 OP_PHSUBW,
404 OP_PHSUBD,
405 OP_PHSUBSW,
406 OP_HSUBPS,
407 OP_HSUBPD,
408 OP_PSIGNB,
409 OP_PSIGNW,
410 OP_PSIGND,
411 OP_PMULHRSW,
412 OP_PERMILPS,
413 OP_PERMILPD,
414 OP_TESTPS,
415 OP_TESTPD,
416 OP_PBLENDVB,
417 OP_CVTPH2PS,
418 OP_BLENDVPS,
419 OP_BLENDVPD,
420 OP_PERMPS,
421 OP_PERMD,
422 OP_PTEST,
423 OP_BROADCASTSS,
424 OP_BROADCASTSD,
425 OP_BROADCASTF128,
426 OP_PABSB,
427 OP_PABSW,
428 OP_PABSD,
429 OP_PMOVSX,
430 OP_PMOVZX,
431 OP_PMULDQ,
432 OP_PMINSB,
433 OP_PMINSD,
434 OP_PMINUW,
435 OP_PMINUD,
436 OP_PMAXSB,
437 OP_PMAXSD,
438 OP_PMAXUW,
439 OP_PMAXUD,
440 OP_PMULLD,
441 OP_PHMINPOSUW,
442 OP_PSRLVD,
443 OP_PSRAVD,
444 OP_PSLLVD,
445 OP_PBROADCASTD,
446 OP_PBROADCASTQ,
447 OP_PBROADCASTI128,
448 OP_PBROADCASTB,
449 OP_PBROADCASTW,
450 OP_PMASKMOVD,
451 OP_GATHER,
452 OP_FMADDSUB132PS,
453 OP_FMSUBADD132PS,
454 OP_FMADD132PS,
455 OP_FMADD132SS,
456 OP_FMSUB132PS,
457 OP_FMSUB132SS,
458 OP_FNMADD132PS,
459 OP_FNMADD132SS,
460 OP_FNMSUB132PS,
461 OP_FNMSUB132SS,
462 OP_FMADDSUB213PS,
463 OP_FMSUBADD213PS,
464 OP_FMADD213PS,
465 OP_FMADD213SS,
466 OP_FMSUB213PS,
467 OP_FMSUB213SS,
468 OP_FNMADD213PS,
469 OP_FNMADD213SS,
470 OP_FNMSUB213PS,
471 OP_FNMSUB213SS,
472 OP_FMADDSUB231PS,
473 OP_FMSUBADD231PS,
474 OP_FMADD231PS,
475 OP_FMADD231SS,
476 OP_FMSUB231PS,
477 OP_FMSUB231SS,
478 OP_FNMADD231PS,
479 OP_FNMADD231SS,
480 OP_FNMSUB231PS,
481 OP_FNMSUB231SS,
482 OP_AESIMC,
483 OP_AESENC,
484 OP_AESENCLAST,
485 OP_AESDEC,
486 OP_AESDECLAST,
487 OP_MOVBEGM,
488 OP_MOVBEMG,
489 OP_CRC32GDEB,
490 OP_CRC32GDEY,
491 OP_POPCNT,
492 OP_TZCNT,
493 OP_LZCNT,
494 OP_ADCX,
495 OP_ADOX,
496 OP_ANDN,
497 OP_BZHI,
498 OP_BEXTR,
499 OP_PEXT,
500 OP_SARX,
501 OP_PDEP,
502 OP_SHRX,
503 OP_MULX,
504 OP_MASKMOVDQU,
505 OP_MASKMOVPS,
506 OP_MASKMOVPD,
507 OP_MOVSD,
508 OP_CVTSI2SD,
509 OP_CVTTSD2SI,
510 OP_CVTSD2SI,
511 OP_SQRTSD,
512 OP_ADDSD,
513 OP_MULSD,
514 OP_CVTSD2SS,
515 OP_SUBSD,
516 OP_MINSD,
517 OP_DIVSD,
518 OP_MAXSD,
519 OP_PSHUFLW,
520 OP_CMPSD,
521 OP_MOVDQ2Q,
522 OP_CVTPD2DQ,
523 OP_MOVSS,
524 OP_MOVSLDUP,
525 OP_MOVDDUP,
526 OP_MOVSHDUP,
527 OP_CVTSI2SS,
528 OP_CVTTSS2SI,
529 OP_CVTSS2SI,
530 OP_CVTSS2SD,
531 OP_SQRTSS,
532 OP_RSQRTSS,
533 OP_RCPSS,
534 OP_ADDSS,
535 OP_MULSS,
536 OP_CVTTPS2DQ,
537 OP_SUBSS,
538 OP_MINSS,
539 OP_DIVSS,
540 OP_MAXSS,
541 OP_MOVDQU,
542 OP_PSHUFHW,
543 OP_CMPSS,
544 OP_MOVQ2DQ,
545 OP_CVTDQ2PD,
546 OP_PERMQ,
547 OP_PERMPD,
548 OP_PBLENDD,
549 OP_PERM2F128,
550 OP_ROUNDPS,
551 OP_ROUNDPD,
552 OP_ROUNDSS,
553 OP_ROUNDSD,
554 OP_BLENDPS,
555 OP_BLENDPD,
556 OP_PBLENDW,
557 OP_PALIGNR,
558 OP_PEXTRB,
559 OP_PEXTRD,
560 OP_EXTRACTPS,
561 OP_INSERTF128,
562 OP_EXTRACTF128,
563 OP_CVTPS2PH,
564 OP_PINSRB,
565 OP_PINSRD,
566 OP_INSERTPS,
567 OP_INSERTI128,
568 OP_EXTRACTI128,
569 OP_DPPS,
570 OP_DPPD,
571 OP_MPSADBW,
572 OP_PCLMULQDQ,
573 OP_PERM2I128,
574 OP_PCMPESTRM,
575 OP_PCMPESTRI,
576 OP_PCMPISTRM,
577 OP_PCMPISTRI,
578 OP_AESKEYGEN,
579 OP_RORX,
580 OP_VEX3B,
581 OP_VEX2B,
582/** @} */
583
584/** @name Floating point ops
585 * @{ */
586 OP_FADD,
587 OP_FMUL,
588 OP_FCOM,
589 OP_FCOMP,
590 OP_FSUB,
591 OP_FSUBR,
592 OP_FDIV,
593 OP_FDIVR,
594 OP_FLD,
595 OP_FST,
596 OP_FSTP,
597 OP_FLDENV,
598 OP_FSTENV,
599 OP_FSTCW,
600 OP_FXCH,
601 OP_FNOP,
602 OP_FCHS,
603 OP_FABS,
604 OP_FLD1,
605 OP_FLDL2T,
606 OP_FLDL2E,
607 OP_FLDPI,
608 OP_FLDLG2,
609 OP_FLDLN2,
610 OP_FLDZ,
611 OP_F2XM1,
612 OP_FYL2X,
613 OP_FPTAN,
614 OP_FPATAN,
615 OP_FXTRACT,
616 OP_FREM1,
617 OP_FDECSTP,
618 OP_FINCSTP,
619 OP_FPREM,
620 OP_FYL2XP1,
621 OP_FSQRT,
622 OP_FSINCOS,
623 OP_FRNDINT,
624 OP_FSCALE,
625 OP_FSIN,
626 OP_FCOS,
627 OP_FIADD,
628 OP_FIMUL,
629 OP_FISUB,
630 OP_FISUBR,
631 OP_FIDIV,
632 OP_FIDIVR,
633 OP_FCMOVB,
634 OP_FCMOVE,
635 OP_FCMOVBE,
636 OP_FCMOVU,
637 OP_FUCOMPP,
638 OP_FILD,
639 OP_FIST,
640 OP_FISTP,
641 OP_FCMOVNB,
642 OP_FCMOVNE,
643 OP_FCMOVNBE,
644 OP_FCMOVNU,
645 OP_FCLEX,
646 OP_FINIT,
647 OP_FUCOMI,
648 OP_FCOMI,
649 OP_FRSTOR,
650 OP_FSAVE,
651 OP_FNSTSW,
652 OP_FFREE,
653 OP_FUCOM,
654 OP_FUCOMP,
655 OP_FICOM,
656 OP_FICOMP,
657 OP_FADDP,
658 OP_FMULP,
659 OP_FCOMPP,
660 OP_FSUBRP,
661 OP_FSUBP,
662 OP_FDIVRP,
663 OP_FDIVP,
664 OP_FBLD,
665 OP_FBSTP,
666 OP_FCOMIP,
667 OP_FUCOMIP,
668/** @} */
669
670/** @name 3DNow!
671 * @{ */
672 OP_PI2FW,
673 OP_PI2FD,
674 OP_PF2IW,
675 OP_PF2ID,
676 OP_PFPNACC,
677 OP_PFCMPGE,
678 OP_PFMIN,
679 OP_PFRCP,
680 OP_PFRSQRT,
681 OP_PFSUB,
682 OP_PFADD,
683 OP_PFCMPGT,
684 OP_PFMAX,
685 OP_PFRCPIT1,
686 OP_PFRSQRTIT1,
687 OP_PFSUBR,
688 OP_PFACC,
689 OP_PFCMPEQ,
690 OP_PFMUL,
691 OP_PFRCPIT2,
692 OP_PFMULHRW,
693 OP_PFSWAPD,
694 OP_PAVGUSB,
695 OP_PFNACC,
696/** @} */
697 OP_ROL,
698 OP_ROR,
699 OP_RCL,
700 OP_RCR,
701 OP_SHL,
702 OP_SHR,
703 OP_SAR,
704 OP_NOT,
705 OP_NEG,
706 OP_MUL,
707 OP_DIV,
708 OP_IDIV,
709 OP_SLDT,
710 OP_STR,
711 OP_LLDT,
712 OP_LTR,
713 OP_VERR,
714 OP_VERW,
715 OP_SGDT,
716 OP_LGDT,
717 OP_SIDT,
718 OP_LIDT,
719 OP_SMSW,
720 OP_LMSW,
721 OP_INVLPG,
722 OP_CMPXCHG8B,
723 OP_PSLLQ,
724 OP_PSRLDQ,
725 OP_PSLLDQ,
726 OP_FXSAVE,
727 OP_FXRSTOR,
728 OP_LDMXCSR,
729 OP_STMXCSR,
730 OP_XSAVE,
731 OP_XSAVEOPT,
732 OP_XRSTOR,
733 OP_RDFSBASE,
734 OP_RDGSBASE,
735 OP_WRFSBASE,
736 OP_WRGSBASE,
737 OP_LFENCE,
738 OP_MFENCE,
739 OP_SFENCE,
740 OP_PREFETCH,
741 OP_MONITOR,
742 OP_MWAIT,
743 OP_CLFLUSH,
744 OP_CLFLUSHOPT,
745 OP_MOV_DR,
746 OP_MOV_TR,
747 OP_SWAPGS,
748 OP_UD1,
749 OP_UD2,
750/** @name VT-x instructions
751 * @{ */
752 OP_VMREAD,
753 OP_VMWRITE,
754 OP_VMCALL,
755 OP_VMXON,
756 OP_VMXOFF,
757 OP_VMCLEAR,
758 OP_VMLAUNCH,
759 OP_VMRESUME,
760 OP_VMPTRLD,
761 OP_VMPTRST,
762 OP_INVEPT,
763 OP_INVVPID,
764 OP_INVPCID,
765 OP_VMFUNC,
766/** @} */
767/** @name AMD-V instructions
768 * @{ */
769 OP_VMMCALL,
770 OP_VMRUN,
771 OP_VMLOAD,
772 OP_VMSAVE,
773 OP_CLGI,
774 OP_STGI,
775 OP_INVLPGA,
776 OP_SKINIT,
777/** @} */
778/** @name 64 bits instruction
779 * @{ */
780 OP_MOVSXD,
781/** @} */
782/** @name AVX instructions
783 * @{ */
784 OP_VLDMXCSR,
785 OP_VSTMXCSR,
786 OP_VMOVUPS,
787 OP_VMOVUPD,
788 OP_VMOVSS,
789 OP_VMOVSD,
790 OP_VMOVHLPS,
791 OP_VMOVLPS,
792 OP_VMOVLPD,
793 OP_VMOVSLDUP,
794 OP_VMOVDDUP,
795 OP_VMOVAPS,
796 OP_VMOVAPD,
797 OP_VMOVNTPS,
798 OP_VMOVNTPD,
799 OP_VMOVD,
800 OP_VMOVQ,
801 OP_VMOVDQA,
802 OP_VMOVDQU,
803 OP_VMOVNTDQ,
804 OP_VMOVNTDQA,
805/** @} */
806 OP_END_OF_OPCODES
807};
808AssertCompile(OP_LOCK == 7);
809/** @} */
810
811
812/** @defgroup grp_dis_opparam Opcode parameters (DISOPCODE::fParam1,
813 * DISOPCODE::fParam2, DISOPCODE::fParam3)
814 * @ingroup grp_dis
815 * @{
816 */
817
818/**
819 * @remarks Register order is important for translations!!
820 */
821enum OP_PARM
822{
823 OP_PARM_NONE,
824
825 OP_PARM_REG_EAX,
826 OP_PARM_REG_GEN32_START = OP_PARM_REG_EAX,
827 OP_PARM_REG_ECX,
828 OP_PARM_REG_EDX,
829 OP_PARM_REG_EBX,
830 OP_PARM_REG_ESP,
831 OP_PARM_REG_EBP,
832 OP_PARM_REG_ESI,
833 OP_PARM_REG_EDI,
834 OP_PARM_REG_GEN32_END = OP_PARM_REG_EDI,
835
836 OP_PARM_REG_ES,
837 OP_PARM_REG_SEG_START = OP_PARM_REG_ES,
838 OP_PARM_REG_CS,
839 OP_PARM_REG_SS,
840 OP_PARM_REG_DS,
841 OP_PARM_REG_FS,
842 OP_PARM_REG_GS,
843 OP_PARM_REG_SEG_END = OP_PARM_REG_GS,
844
845 OP_PARM_REG_AX,
846 OP_PARM_REG_GEN16_START = OP_PARM_REG_AX,
847 OP_PARM_REG_CX,
848 OP_PARM_REG_DX,
849 OP_PARM_REG_BX,
850 OP_PARM_REG_SP,
851 OP_PARM_REG_BP,
852 OP_PARM_REG_SI,
853 OP_PARM_REG_DI,
854 OP_PARM_REG_GEN16_END = OP_PARM_REG_DI,
855
856 OP_PARM_REG_AL,
857 OP_PARM_REG_GEN8_START = OP_PARM_REG_AL,
858 OP_PARM_REG_CL,
859 OP_PARM_REG_DL,
860 OP_PARM_REG_BL,
861 OP_PARM_REG_AH,
862 OP_PARM_REG_CH,
863 OP_PARM_REG_DH,
864 OP_PARM_REG_BH,
865 OP_PARM_REG_GEN8_END = OP_PARM_REG_BH,
866
867 OP_PARM_REGFP_0,
868 OP_PARM_REG_FP_START = OP_PARM_REGFP_0,
869 OP_PARM_REGFP_1,
870 OP_PARM_REGFP_2,
871 OP_PARM_REGFP_3,
872 OP_PARM_REGFP_4,
873 OP_PARM_REGFP_5,
874 OP_PARM_REGFP_6,
875 OP_PARM_REGFP_7,
876 OP_PARM_REG_FP_END = OP_PARM_REGFP_7,
877
878 OP_PARM_NTA,
879 OP_PARM_T0,
880 OP_PARM_T1,
881 OP_PARM_T2,
882 OP_PARM_1,
883
884 OP_PARM_REX,
885 OP_PARM_REX_START = OP_PARM_REX,
886 OP_PARM_REX_B,
887 OP_PARM_REX_X,
888 OP_PARM_REX_XB,
889 OP_PARM_REX_R,
890 OP_PARM_REX_RB,
891 OP_PARM_REX_RX,
892 OP_PARM_REX_RXB,
893 OP_PARM_REX_W,
894 OP_PARM_REX_WB,
895 OP_PARM_REX_WX,
896 OP_PARM_REX_WXB,
897 OP_PARM_REX_WR,
898 OP_PARM_REX_WRB,
899 OP_PARM_REX_WRX,
900 OP_PARM_REX_WRXB,
901
902 OP_PARM_REG_RAX,
903 OP_PARM_REG_GEN64_START = OP_PARM_REG_RAX,
904 OP_PARM_REG_RCX,
905 OP_PARM_REG_RDX,
906 OP_PARM_REG_RBX,
907 OP_PARM_REG_RSP,
908 OP_PARM_REG_RBP,
909 OP_PARM_REG_RSI,
910 OP_PARM_REG_RDI,
911 OP_PARM_REG_R8,
912 OP_PARM_REG_R9,
913 OP_PARM_REG_R10,
914 OP_PARM_REG_R11,
915 OP_PARM_REG_R12,
916 OP_PARM_REG_R13,
917 OP_PARM_REG_R14,
918 OP_PARM_REG_R15,
919 OP_PARM_REG_GEN64_END = OP_PARM_REG_R15
920};
921
922
923/* 8-bit GRP aliases (for IEM). */
924#define OP_PARM_AL OP_PARM_REG_AL
925
926/* GPR aliases for op-size specified register sizes (for IEM). */
927#define OP_PARM_rAX OP_PARM_REG_EAX
928#define OP_PARM_rCX OP_PARM_REG_ECX
929#define OP_PARM_rDX OP_PARM_REG_EDX
930#define OP_PARM_rBX OP_PARM_REG_EBX
931#define OP_PARM_rSP OP_PARM_REG_ESP
932#define OP_PARM_rBP OP_PARM_REG_EBP
933#define OP_PARM_rSI OP_PARM_REG_ESI
934#define OP_PARM_rDI OP_PARM_REG_EDI
935
936/* SREG aliases (for IEM). */
937#define OP_PARM_ES OP_PARM_REG_ES
938#define OP_PARM_CS OP_PARM_REG_CS
939#define OP_PARM_SS OP_PARM_REG_SS
940#define OP_PARM_DS OP_PARM_REG_DS
941#define OP_PARM_FS OP_PARM_REG_FS
942#define OP_PARM_GS OP_PARM_REG_GS
943
944/*
945 * Note! We don't document anything here if we can help it, because it we love
946 * wasting other peoples time figuring out crypting crap. The new VEX
947 * stuff of course uphelds this vexing tradition. Aaaaaaaaaaaaaaaaaaarg!
948 */
949
950#define OP_PARM_VTYPE(a) ((unsigned)a & 0xFE0)
951#define OP_PARM_VSUBTYPE(a) ((unsigned)a & 0x01F)
952
953#define OP_PARM_A 0x100
954#define OP_PARM_VARIABLE OP_PARM_A
955#define OP_PARM_E 0x120
956#define OP_PARM_F 0x140
957#define OP_PARM_G 0x160
958#define OP_PARM_I 0x180
959#define OP_PARM_J 0x1A0
960#define OP_PARM_M 0x1C0
961#define OP_PARM_O 0x1E0
962#define OP_PARM_R 0x200
963#define OP_PARM_X 0x220
964#define OP_PARM_Y 0x240
965
966/* Grouped rare parameters for optimization purposes */
967#define IS_OP_PARM_RARE(a) ((a & 0xF00) >= 0x300)
968#define OP_PARM_C 0x300 /* control register */
969#define OP_PARM_D 0x320 /* debug register */
970#define OP_PARM_S 0x340 /* segment register */
971#define OP_PARM_T 0x360 /* test register */
972#define OP_PARM_Q 0x380
973#define OP_PARM_P 0x3A0 /* mmx register */
974#define OP_PARM_W 0x3C0 /* xmm register */
975#define OP_PARM_V 0x3E0
976#define OP_PARM_U 0x400 /* The R/M field of the ModR/M byte selects XMM/YMM register. */
977#define OP_PARM_B 0x420 /* VEX.vvvv field select general purpose register. */
978#define OP_PARM_H 0x440
979#define OP_PARM_L 0x460
980
981#define OP_PARM_NONE 0
982#define OP_PARM_a 0x1 /**< Operand to bound instruction. */
983#define OP_PARM_b 0x2 /**< Byte (always). */
984#define OP_PARM_d 0x3 /**< Double word (always). */
985#define OP_PARM_dq 0x4 /**< Double quad word (always). */
986#define OP_PARM_p 0x5 /**< Far pointer (subject to opsize). */
987#define OP_PARM_pd 0x6 /**< 128-bit or 256-bit double precision floating point data. */
988#define OP_PARM_pi 0x7 /**< Quad word MMX register. */
989#define OP_PARM_ps 0x8 /**< 128-bit or 256-bit single precision floating point data. */
990#define OP_PARM_q 0xA /**< Quad word (always). */
991#define OP_PARM_s 0xB /**< Descriptor table size (SIDT/LIDT/SGDT/LGDT). */
992#define OP_PARM_sd 0xC /**< Scalar element of 128-bit double precision floating point data. */
993#define OP_PARM_ss 0xD /**< Scalar element of 128-bit single precision floating point data. */
994#define OP_PARM_v 0xE /**< Word, double word, or quad word depending on opsize. */
995#define OP_PARM_w 0xF /**< Word (always). */
996#define OP_PARM_x 0x10 /**< Double quad word (dq) or quad quad word (qq) depending on opsize. */
997#define OP_PARM_y 0x11 /**< Double word or quad word depending on opsize. */
998#define OP_PARM_z 0x12 /**< Word (16-bit opsize) or double word (32-bit/64-bit opsize). */
999#define OP_PARM_qq 0x13 /**< Quad quad word. */
1000
1001
1002#define OP_PARM_Ap (OP_PARM_A+OP_PARM_p)
1003#define OP_PARM_By (OP_PARM_B+OP_PARM_y)
1004#define OP_PARM_Cd (OP_PARM_C+OP_PARM_d)
1005#define OP_PARM_Dd (OP_PARM_D+OP_PARM_d)
1006#define OP_PARM_Eb (OP_PARM_E+OP_PARM_b)
1007#define OP_PARM_Ed (OP_PARM_E+OP_PARM_d)
1008#define OP_PARM_Ep (OP_PARM_E+OP_PARM_p)
1009#define OP_PARM_Ev (OP_PARM_E+OP_PARM_v)
1010#define OP_PARM_Ew (OP_PARM_E+OP_PARM_w)
1011#define OP_PARM_Ey (OP_PARM_E+OP_PARM_y)
1012#define OP_PARM_Fv (OP_PARM_F+OP_PARM_v)
1013#define OP_PARM_Gb (OP_PARM_G+OP_PARM_b)
1014#define OP_PARM_Gd (OP_PARM_G+OP_PARM_d)
1015#define OP_PARM_Gv (OP_PARM_G+OP_PARM_v)
1016#define OP_PARM_Gw (OP_PARM_G+OP_PARM_w)
1017#define OP_PARM_Gy (OP_PARM_G+OP_PARM_y)
1018#define OP_PARM_Hq (OP_PARM_H+OP_PARM_q)
1019#define OP_PARM_Hps (OP_PARM_H+OP_PARM_ps)
1020#define OP_PARM_Hpd (OP_PARM_H+OP_PARM_pd)
1021#define OP_PARM_Hdq (OP_PARM_H+OP_PARM_dq)
1022#define OP_PARM_Hqq (OP_PARM_H+OP_PARM_qq)
1023#define OP_PARM_Hsd (OP_PARM_H+OP_PARM_sd)
1024#define OP_PARM_Hss (OP_PARM_H+OP_PARM_ss)
1025#define OP_PARM_Hx (OP_PARM_H+OP_PARM_x)
1026#define OP_PARM_Ib (OP_PARM_I+OP_PARM_b)
1027#define OP_PARM_Id (OP_PARM_I+OP_PARM_d)
1028#define OP_PARM_Iq (OP_PARM_I+OP_PARM_q)
1029#define OP_PARM_Iw (OP_PARM_I+OP_PARM_w)
1030#define OP_PARM_Iv (OP_PARM_I+OP_PARM_v)
1031#define OP_PARM_Iz (OP_PARM_I+OP_PARM_z)
1032#define OP_PARM_Jb (OP_PARM_J+OP_PARM_b)
1033#define OP_PARM_Jv (OP_PARM_J+OP_PARM_v)
1034#define OP_PARM_Ma (OP_PARM_M+OP_PARM_a)
1035#define OP_PARM_Mb (OP_PARM_M+OP_PARM_b)
1036#define OP_PARM_Mw (OP_PARM_M+OP_PARM_w)
1037#define OP_PARM_Md (OP_PARM_M+OP_PARM_d)
1038#define OP_PARM_Mp (OP_PARM_M+OP_PARM_p)
1039#define OP_PARM_Mq (OP_PARM_M+OP_PARM_q)
1040#define OP_PARM_Mdq (OP_PARM_M+OP_PARM_dq)
1041#define OP_PARM_Ms (OP_PARM_M+OP_PARM_s)
1042#define OP_PARM_Mx (OP_PARM_M+OP_PARM_x)
1043#define OP_PARM_My (OP_PARM_M+OP_PARM_y)
1044#define OP_PARM_Mps (OP_PARM_M+OP_PARM_ps)
1045#define OP_PARM_Mpd (OP_PARM_M+OP_PARM_pd)
1046#define OP_PARM_Ob (OP_PARM_O+OP_PARM_b)
1047#define OP_PARM_Ov (OP_PARM_O+OP_PARM_v)
1048#define OP_PARM_Pq (OP_PARM_P+OP_PARM_q)
1049#define OP_PARM_Pd (OP_PARM_P+OP_PARM_d)
1050#define OP_PARM_Qd (OP_PARM_Q+OP_PARM_d)
1051#define OP_PARM_Qq (OP_PARM_Q+OP_PARM_q)
1052#define OP_PARM_Rd (OP_PARM_R+OP_PARM_d)
1053#define OP_PARM_Rw (OP_PARM_R+OP_PARM_w)
1054#define OP_PARM_Ry (OP_PARM_R+OP_PARM_y)
1055#define OP_PARM_Sw (OP_PARM_S+OP_PARM_w)
1056#define OP_PARM_Td (OP_PARM_T+OP_PARM_d)
1057#define OP_PARM_Ux (OP_PARM_U+OP_PARM_x)
1058#define OP_PARM_Vq (OP_PARM_V+OP_PARM_q)
1059#define OP_PARM_Vx (OP_PARM_V+OP_PARM_x)
1060#define OP_PARM_Vy (OP_PARM_V+OP_PARM_y)
1061#define OP_PARM_Wq (OP_PARM_W+OP_PARM_q)
1062/*#define OP_PARM_Ws (OP_PARM_W+OP_PARM_s) - wtf? Same as lgdt (OP_PARM_Ms)?*/
1063#define OP_PARM_Wx (OP_PARM_W+OP_PARM_x)
1064#define OP_PARM_Xb (OP_PARM_X+OP_PARM_b)
1065#define OP_PARM_Xv (OP_PARM_X+OP_PARM_v)
1066#define OP_PARM_Yb (OP_PARM_Y+OP_PARM_b)
1067#define OP_PARM_Yv (OP_PARM_Y+OP_PARM_v)
1068
1069#define OP_PARM_Vps (OP_PARM_V+OP_PARM_ps)
1070#define OP_PARM_Vss (OP_PARM_V+OP_PARM_ss)
1071#define OP_PARM_Vpd (OP_PARM_V+OP_PARM_pd)
1072#define OP_PARM_Vdq (OP_PARM_V+OP_PARM_dq)
1073#define OP_PARM_Wps (OP_PARM_W+OP_PARM_ps)
1074#define OP_PARM_Wpd (OP_PARM_W+OP_PARM_pd)
1075#define OP_PARM_Wss (OP_PARM_W+OP_PARM_ss)
1076#define OP_PARM_Ww (OP_PARM_W+OP_PARM_w)
1077#define OP_PARM_Wd (OP_PARM_W+OP_PARM_d)
1078#define OP_PARM_Wq (OP_PARM_W+OP_PARM_q)
1079#define OP_PARM_Wdq (OP_PARM_W+OP_PARM_dq)
1080#define OP_PARM_Wqq (OP_PARM_W+OP_PARM_qq)
1081#define OP_PARM_Ppi (OP_PARM_P+OP_PARM_pi)
1082#define OP_PARM_Qpi (OP_PARM_Q+OP_PARM_pi)
1083#define OP_PARM_Qdq (OP_PARM_Q+OP_PARM_dq)
1084#define OP_PARM_Vsd (OP_PARM_V+OP_PARM_sd)
1085#define OP_PARM_Wsd (OP_PARM_W+OP_PARM_sd)
1086#define OP_PARM_Vqq (OP_PARM_V+OP_PARM_qq)
1087#define OP_PARM_Pdq (OP_PARM_P+OP_PARM_dq)
1088#define OP_PARM_Ups (OP_PARM_U+OP_PARM_ps)
1089#define OP_PARM_Upd (OP_PARM_U+OP_PARM_pd)
1090#define OP_PARM_Udq (OP_PARM_U+OP_PARM_dq)
1091#define OP_PARM_Lx (OP_PARM_L+OP_PARM_x)
1092
1093/* For making IEM / bs3-cpu-generated-1 happy: */
1094#define OP_PARM_Ed_WO OP_PARM_Ed /**< Annotates write only operand. */
1095#define OP_PARM_Eq (OP_PARM_E+OP_PARM_q)
1096#define OP_PARM_Eq_WO OP_PARM_Eq /**< Annotates write only operand. */
1097#define OP_PARM_Gv_RO OP_PARM_Gv /**< Annotates read only first operand (default is readwrite). */
1098#define OP_PARM_HssHi OP_PARM_Hx /**< Register referenced by VEX.vvvv, bits [127:32]. */
1099#define OP_PARM_HsdHi OP_PARM_Hx /**< Register referenced by VEX.vvvv, bits [127:64]. */
1100#define OP_PARM_HqHi OP_PARM_Hx /**< Register referenced by VEX.vvvv, bits [127:64]. */
1101#define OP_PARM_M_RO OP_PARM_M /**< Annotates read only memory of variable operand size (xrstor). */
1102#define OP_PARM_M_RW OP_PARM_M /**< Annotates read-write memory of variable operand size (xsave). */
1103#define OP_PARM_Mb_RO OP_PARM_Mb /**< Annotates read only memory byte operand. */
1104#define OP_PARM_Md_RO OP_PARM_Md /**< Annotates read only memory operand. */
1105#define OP_PARM_Md_WO OP_PARM_Md /**< Annotates write only memory operand. */
1106#define OP_PARM_Mdq_WO OP_PARM_Mdq /**< Annotates write only memory operand. */
1107#define OP_PARM_Mq_WO OP_PARM_Mq /**< Annotates write only memory quad word operand. */
1108#define OP_PARM_Mps_WO OP_PARM_Mps /**< Annotates write only memory operand. */
1109#define OP_PARM_Mpd_WO OP_PARM_Mpd /**< Annotates write only memory operand. */
1110#define OP_PARM_Mx_WO OP_PARM_Mx /**< Annotates write only memory operand. */
1111#define OP_PARM_PdZx_WO OP_PARM_Pd /**< Annotates write only operand and zero extends to 64-bit. */
1112#define OP_PARM_Pq_WO OP_PARM_Pq /**< Annotates write only operand. */
1113#define OP_PARM_Qq_WO OP_PARM_Qq /**< Annotates write only operand. */
1114#define OP_PARM_Nq OP_PARM_Qq /**< Missing 'N' class (MMX reg selected by modrm.mem) in disasm. */
1115#define OP_PARM_Uq (OP_PARM_U+OP_PARM_q)
1116#define OP_PARM_UqHi (OP_PARM_U+OP_PARM_dq)
1117#define OP_PARM_Uss (OP_PARM_U+OP_PARM_ss)
1118#define OP_PARM_Uss_WO OP_PARM_Uss /**< Annotates write only operand. */
1119#define OP_PARM_Usd (OP_PARM_U+OP_PARM_sd)
1120#define OP_PARM_Usd_WO OP_PARM_Usd /**< Annotates write only operand. */
1121#define OP_PARM_Vd (OP_PARM_V+OP_PARM_d)
1122#define OP_PARM_Vd_WO OP_PARM_Vd /**< Annotates write only operand. */
1123#define OP_PARM_VdZx_WO OP_PARM_Vd /**< Annotates that the registers get their upper bits cleared */
1124#define OP_PARM_Vdq_WO OP_PARM_Vdq /**< Annotates that only YMM/XMM[127:64] are accessed. */
1125#define OP_PARM_Vpd_WO OP_PARM_Vpd /**< Annotates write only operand. */
1126#define OP_PARM_Vps_WO OP_PARM_Vps /**< Annotates write only operand. */
1127#define OP_PARM_Vq_WO OP_PARM_Vq /**< Annotates write only operand. */
1128#define OP_PARM_VqHi OP_PARM_Vdq /**< Annotates that only YMM/XMM[127:64] are accessed. */
1129#define OP_PARM_VqHi_WO OP_PARM_Vdq /**< Annotates that only YMM/XMM[127:64] are written. */
1130#define OP_PARM_VqZx_WO OP_PARM_Vq /**< Annotates that the registers get their upper bits cleared */
1131#define OP_PARM_VsdZx_WO OP_PARM_Vsd /**< Annotates that the registers get their upper bits cleared. */
1132#define OP_PARM_VssZx_WO OP_PARM_Vss /**< Annotates that the registers get their upper bits cleared. */
1133#define OP_PARM_Vss_WO OP_PARM_Vss /**< Annotates write only operand. */
1134#define OP_PARM_Vsd_WO OP_PARM_Vsd /**< Annotates write only operand. */
1135#define OP_PARM_Vx_WO OP_PARM_Vx /**< Annotates write only operand. */
1136#define OP_PARM_Wpd_WO OP_PARM_Wpd /**< Annotates write only operand. */
1137#define OP_PARM_Wps_WO OP_PARM_Wps /**< Annotates write only operand. */
1138#define OP_PARM_Wq_WO OP_PARM_Wq /**< Annotates write only operand. */
1139#define OP_PARM_WqZxReg_WO OP_PARM_Wq /**< Annotates that register targets get their upper bits cleared. */
1140#define OP_PARM_Wss_WO OP_PARM_Wss /**< Annotates write only operand. */
1141#define OP_PARM_Wsd_WO OP_PARM_Wsd /**< Annotates write only operand. */
1142#define OP_PARM_Wx_WO OP_PARM_Wx /**< Annotates write only operand. */
1143
1144/** @} */
1145
1146#endif /* !VBOX_INCLUDED_disopcode_h */
1147
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette