VirtualBox

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

Last change on this file since 53164 was 53164, checked in by vboxsync, 10 years ago

DIS: #6249: Added missing 660F38h instructions. Small bug fixes. Unit test updated.

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