VirtualBox

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

Last change on this file since 38643 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.7 KB
Line 
1/** @file
2 * Disassembler - opcode.h.
3 */
4
5/*
6 * Copyright (C) 2006-2007 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/** Full Intel X86 opcode list
40 * @{
41 */
42#define OP_INVALID 0
43#define OP_OPSIZE 1
44#define OP_ADDRSIZE 2
45#define OP_SEG 3
46#define OP_REPNE 4
47#define OP_REPE 5
48#define OP_REX 6
49#define OP_LOCK 7
50#define OP_LAST_PREFIX OP_LOCK /* disassembler assumes this is the last prefix byte value!!!! */
51#define OP_AND 8
52#define OP_OR 9
53#define OP_DAA 10
54#define OP_SUB 11
55#define OP_DAS 12
56#define OP_XOR 13
57#define OP_AAA 14
58#define OP_CMP 15
59#define OP_IMM_GRP1 16
60#define OP_AAS 17
61#define OP_INC 18
62#define OP_DEC 19
63#define OP_PUSHA 20
64#define OP_POPA 21
65#define OP_BOUND 22
66#define OP_ARPL 23
67#define OP_PUSH 24
68#define OP_POP 25
69#define OP_IMUL 26
70#define OP_INSB 27
71#define OP_INSWD 28
72#define OP_OUTSB 29
73#define OP_OUTSWD 30
74#define OP_JO 31
75#define OP_JNO 32
76#define OP_JC 33
77#define OP_JNC 34
78#define OP_JE 35
79#define OP_JNE 36
80#define OP_JBE 37
81#define OP_JNBE 38
82#define OP_JS 39
83#define OP_JNS 40
84#define OP_JP 41
85#define OP_JNP 42
86#define OP_JL 43
87#define OP_JNL 44
88#define OP_JLE 45
89#define OP_JNLE 46
90#define OP_ADD 47
91#define OP_TEST 48
92#define OP_XCHG 49
93#define OP_MOV 50
94#define OP_LEA 51
95#define OP_NOP 52
96#define OP_CBW 53
97#define OP_CWD 54
98#define OP_CALL 55
99#define OP_WAIT 56
100#define OP_PUSHF 57
101#define OP_POPF 58
102#define OP_SAHF 59
103#define OP_LAHF 60
104#define OP_MOVSB 61
105#define OP_MOVSWD 62
106#define OP_CMPSB 63
107#define OP_CMPWD 64
108#define OP_STOSB 65
109#define OP_STOSWD 66
110#define OP_LODSB 67
111#define OP_LODSWD 68
112#define OP_SCASB 69
113#define OP_SCASWD 70
114#define OP_SHIFT_GRP2 71
115#define OP_RETN 72
116#define OP_LES 73
117#define OP_LDS 74
118#define OP_ENTER 75
119#define OP_LEAVE 76
120#define OP_RETF 77
121#define OP_INT3 78
122#define OP_INT 79
123#define OP_INTO 80
124#define OP_IRET 81
125#define OP_AAM 82
126#define OP_AAD 83
127#define OP_XLAT 84
128#define OP_ESCF0 85
129#define OP_ESCF1 86
130#define OP_ESCF2 87
131#define OP_ESCF3 88
132#define OP_ESCF4 89
133#define OP_ESCF5 90
134#define OP_ESCF6 91
135#define OP_ESCF7 92
136#define OP_LOOPNE 93
137#define OP_LOOPE 94
138#define OP_LOOP 95
139#define OP_JECXZ 96
140#define OP_IN 97
141#define OP_OUT 98
142#define OP_JMP 99
143#define OP_2B_ESC 100
144#define OP_ADC 101
145#define OP_SBB 102
146#define OP_HLT 103
147#define OP_CMC 104
148#define OP_UNARY_GRP3 105
149#define OP_CLC 106
150#define OP_STC 107
151#define OP_CLI 108
152#define OP_STI 109
153#define OP_CLD 110
154#define OP_STD 111
155#define OP_INC_GRP4 112
156#define OP_IND_GRP5 113
157#define OP_GRP6 114
158#define OP_GRP7 115
159#define OP_LAR 116
160#define OP_LSL 117
161#define OP_SYSCALL 118
162#define OP_CLTS 119
163#define OP_SYSRET 120
164#define OP_INVD 121
165#define OP_WBINVD 122
166#define OP_ILLUD2 123
167#define OP_FEMMS 124
168#define OP_3DNOW 125
169#define OP_MOVUPS 126
170#define OP_MOVLPS 127
171#define OP_UNPCKLPS 128
172#define OP_MOVHPS 129
173#define OP_UNPCKHPS 130
174#define OP_PREFETCH_GRP16 131
175#define OP_MOV_CR 132
176#define OP_MOVAPS 133
177#define OP_CVTPI2PS 134
178#define OP_MOVNTPS 135
179#define OP_CVTTPS2PI 136
180#define OP_CVTPS2PI 137
181#define OP_UCOMISS 138
182#define OP_COMISS 139
183#define OP_WRMSR 140
184#define OP_RDTSC 141
185#define OP_RDMSR 142
186#define OP_RDPMC 143
187#define OP_SYSENTER 144
188#define OP_SYSEXIT 145
189#define OP_PAUSE 146
190#define OP_CMOVO 147
191#define OP_CMOVNO 148
192#define OP_CMOVC 149
193#define OP_CMOVNC 150
194#define OP_CMOVZ 151
195#define OP_CMOVNZ 152
196#define OP_CMOVBE 153
197#define OP_CMOVNBE 154
198#define OP_CMOVS 155
199#define OP_CMOVNS 156
200#define OP_CMOVP 157
201#define OP_CMOVNP 158
202#define OP_CMOVL 159
203#define OP_CMOVNL 160
204#define OP_CMOVLE 161
205#define OP_CMOVNLE 162
206#define OP_MOVMSKPS 163
207#define OP_SQRTPS 164
208#define OP_RSQRTPS 165
209#define OP_RCPPS 166
210#define OP_ANDPS 167
211#define OP_ANDNPS 168
212#define OP_ORPS 169
213#define OP_XORPS 170
214#define OP_ADDPS 171
215#define OP_MULPS 172
216#define OP_CVTPS2PD 173
217#define OP_CVTDQ2PS 174
218#define OP_SUBPS 175
219#define OP_MINPS 176
220#define OP_DIVPS 177
221#define OP_MAXPS 178
222#define OP_PUNPCKLBW 179
223#define OP_PUNPCKLWD 180
224#define OP_PUNPCKLDQ 181
225#define OP_PACKSSWB 182
226#define OP_PCMPGTB 183
227#define OP_PCMPGTW 184
228#define OP_PCMPGTD 185
229#define OP_PACKUSWB 186
230#define OP_PUNPCKHBW 187
231#define OP_PUNPCKHWD 188
232#define OP_PUNPCKHDQ 189
233#define OP_PACKSSDW 190
234#define OP_MOVD 191
235#define OP_MOVQ 192
236#define OP_PSHUFW 193
237#define OP_3B_ESC4 194
238#define OP_3B_ESC5 195
239
240#define OP_PCMPEQB 196
241#define OP_PCMPEQW 197
242#define OP_PCMPEQD 198
243#define OP_SETO 199
244#define OP_SETNO 200
245#define OP_SETC 201
246#define OP_SETNC 202
247#define OP_SETE 203
248#define OP_SETNE 204
249#define OP_SETBE 205
250#define OP_SETNBE 206
251#define OP_SETS 207
252#define OP_SETNS 208
253#define OP_SETP 209
254#define OP_SETNP 210
255#define OP_SETL 211
256#define OP_SETNL 212
257#define OP_SETLE 213
258#define OP_SETNLE 214
259#define OP_CPUID 215
260#define OP_BT 216
261#define OP_SHLD 217
262#define OP_RSM 218
263#define OP_BTS 219
264#define OP_SHRD 220
265#define OP_GRP15 221
266#define OP_CMPXCHG 222
267#define OP_LSS 223
268#define OP_BTR 224
269#define OP_LFS 225
270#define OP_LGS 226
271#define OP_MOVZX 227
272#define OP_GRP10_INV 228
273#define OP_GRP8 229
274#define OP_BTC 230
275#define OP_BSF 231
276#define OP_BSR 232
277#define OP_MOVSX 233
278#define OP_XADD 234
279#define OP_CMPPS 235
280#define OP_MOVNTI 236
281#define OP_PINSRW 237
282#define OP_PEXTRW 238
283#define OP_SHUFPS 239
284#define OP_GRP9 240
285#define OP_BSWAP 241
286#define OP_PSRLW 242
287#define OP_PSRLD 243
288#define OP_PSRLQ 244
289#define OP_PADDQ 245
290#define OP_PMULLW 246
291#define OP_PMOVSKB 247
292#define OP_PSUBUSB 248
293#define OP_PSUBUSW 249
294#define OP_PMINUB 250
295#define OP_PAND 251
296#define OP_PADDUSB 252
297#define OP_PADDUSW 253
298#define OP_PMAXUB 254
299#define OP_PANDN 255
300#define OP_PAVGN 256
301#define OP_PSRAW 257
302#define OP_PSRAD 258
303#define OP_PAVGW 259
304#define OP_PMULHUW 260
305#define OP_PMULHW 261
306#define OP_MOVNTQ 262
307#define OP_PSUBSB 263
308#define OP_PSUBSW 264
309#define OP_PMINSW 265
310#define OP_POR 266
311#define OP_PADDSB 267
312#define OP_PADDSW 268
313#define OP_PMAXSW 269
314#define OP_PXOR 270
315#define OP_PSLLW 271
316#define OP_PSLLD 272
317#define OP_PSSQ 273
318#define OP_PMULUDQ 274
319#define OP_PADDWD 275
320#define OP_PADBW 276
321#define OP_PMASKMOVQ 277
322#define OP_PSUBB 278
323#define OP_PSUBW 279
324
325#define OP_PSUBD 281
326#define OP_PADDB 282
327#define OP_PADDW 283
328#define OP_PADDD 284
329#define OP_MOVUPD 285
330#define OP_MOVLPD 286
331#define OP_UNPCKLPD 287
332#define OP_UNPCKHPD 288
333#define OP_MOVHPD 289
334
335#define OP_MOVAPD 291
336#define OP_CVTPI2PD 292
337#define OP_MOVNTPD 293
338#define OP_CVTTPD2PI 294
339#define OP_CVTPD2PI 295
340#define OP_UCOMISD 296
341#define OP_COMISD 297
342#define OP_MOVMSKPD 298
343#define OP_SQRTPD 299
344#define OP_ANDPD 301
345#define OP_ANDNPD 302
346#define OP_ORPD 303
347#define OP_XORPD 304
348#define OP_ADDPD 305
349#define OP_MULPD 306
350#define OP_CVTPD2PS 307
351#define OP_CVTPS2DQ 308
352#define OP_SUBPD 309
353#define OP_MINPD 310
354#define OP_DIVPD 311
355#define OP_MAXPD 312
356
357#define OP_GRP12 313
358#define OP_GRP13 314
359#define OP_GRP14 315
360#define OP_EMMS 316
361#define OP_MMX_UD78 317
362#define OP_MMX_UD79 318
363#define OP_MMX_UD7A 319
364#define OP_MMX_UD7B 320
365#define OP_MMX_UD7C 321
366#define OP_MMX_UD7D 322
367
368
369#define OP_PUNPCKLQDQ 325
370#define OP_PUNPCKHQD 326
371
372#define OP_MOVDQA 328
373#define OP_PSHUFD 329
374
375
376
377#define OP_CMPPD 334
378#define OP_SHUFPD 337
379
380
381#define OP_CVTTPD2DQ 353
382#define OP_MOVNTDQ 354
383
384#define OP_PSHUFB 355
385#define OP_PHADDW 356
386#define OP_PHADDD 357
387#define OP_PHADDSW 358
388#define OP_PMADDUBSW 359
389#define OP_PHSUBW 360
390#define OP_PHSUBD 361
391#define OP_PHSUBSW 362
392#define OP_PSIGNB 363
393#define OP_PSIGNW 364
394#define OP_PSIGND 365
395#define OP_PMULHRSW 366
396#define OP_PBLENDVB 367
397#define OP_BLENDVPS 368
398#define OP_BLENDVPD 369
399#define OP_PTEST 370
400#define OP_PABSB 371
401#define OP_PABSW 372
402#define OP_PABSD 373
403
404#define OP_PMASKMOVDQU 376
405#define OP_MOVSD 377
406#define OP_CVTSI2SD 378
407#define OP_CVTTSD2SI 379
408#define OP_CVTSD2SI 380
409#define OP_SQRTSD 381
410#define OP_ADDSD 382
411#define OP_MULSD 383
412#define OP_CVTSD2SS 384
413#define OP_SUBSD 385
414#define OP_MINSD 386
415#define OP_DIVSD 387
416#define OP_MAXSD 388
417#define OP_PSHUFLW 389
418#define OP_CMPSD 390
419#define OP_MOVDQ2Q 391
420#define OP_CVTPD2DQ 392
421#define OP_MOVSS 393
422#define OP_CVTSI2SS 394
423#define OP_CVTTSS2SI 395
424#define OP_CVTSS2SI 396
425#define OP_SQRTSS 397
426#define OP_RSQRTSS 398
427#define OP_ADDSS 399
428#define OP_MULSS 401
429#define OP_CVTTPS2DQ 403
430#define OP_SUBSS 404
431#define OP_MINSS 405
432#define OP_DIVSS 406
433#define OP_MAXSS 407
434#define OP_MOVDQU 408
435#define OP_PSHUFHW 409
436#define OP_CMPSS 410
437#define OP_MOVQ2DQ 411
438#define OP_CVTDQ2PD 412
439/** @} */
440
441/** Floating point ops
442 * @{
443 */
444#define OP_FADD 413
445#define OP_FMUL 414
446#define OP_FCOM 415
447#define OP_FCOMP 416
448#define OP_FSUB 417
449#define OP_FSUBR 418
450#define OP_FDIV 419
451#define OP_FDIVR 420
452#define OP_FLD 421
453#define OP_FST 422
454#define OP_FSTP 423
455#define OP_FLDENV 424
456
457#define OP_FSTENV 426
458#define OP_FSTCW 427
459#define OP_FXCH 428
460#define OP_FNOP 429
461#define OP_FCHS 430
462#define OP_FABS 431
463
464#define OP_FLD1 433
465#define OP_FLDL2T 434
466#define OP_FLDL2E 435
467#define OP_FLDPI 436
468#define OP_FLDLG2 437
469#define OP_FLDLN2 438
470#define OP_FLDZ 439
471#define OP_F2XM1 440
472#define OP_FYL2X 441
473#define OP_FPTAN 442
474#define OP_FPATAN 443
475#define OP_FXTRACT 444
476#define OP_FREM1 445
477#define OP_FDECSTP 446
478#define OP_FINCSTP 447
479#define OP_FPREM 448
480#define OP_FYL2XP1 449
481#define OP_FSQRT 450
482#define OP_FSINCOS 451
483#define OP_FRNDINT 452
484#define OP_FSCALE 453
485#define OP_FSIN 454
486#define OP_FCOS 455
487#define OP_FIADD 456
488#define OP_FIMUL 457
489#define OP_FISUB 460
490#define OP_FISUBR 461
491#define OP_FIDIV 462
492#define OP_FIDIVR 463
493#define OP_FCMOVB 464
494#define OP_FCMOVE 465
495#define OP_FCMOVBE 466
496#define OP_FCMOVU 467
497#define OP_FUCOMPP 468
498#define OP_FILD 469
499#define OP_FIST 470
500#define OP_FISTP 471
501#define OP_FCMOVNB 474
502#define OP_FCMOVNE 475
503#define OP_FCMOVNBE 476
504#define OP_FCMOVNU 477
505#define OP_FCLEX 478
506#define OP_FINIT 479
507#define OP_FUCOMI 480
508#define OP_FCOMI 481
509#define OP_FRSTOR 482
510#define OP_FSAVE 483
511#define OP_FNSTSW 484
512#define OP_FFREE 485
513#define OP_FUCOM 486
514#define OP_FUCOMP 487
515#define OP_FICOM 490
516#define OP_FICOMP 491
517#define OP_FADDP 496
518#define OP_FMULP 497
519#define OP_FCOMPP 498
520#define OP_FSUBRP 499
521#define OP_FSUBP 500
522#define OP_FDIVRP 501
523#define OP_FDIVP 502
524#define OP_FBLD 503
525#define OP_FBSTP 504
526#define OP_FCOMIP 506
527#define OP_FUCOMIP 507
528/** @} */
529
530/** 3DNow!
531 * @{
532 */
533#define OP_PI2FW 508
534#define OP_PI2FD 509
535#define OP_PF2IW 510
536#define OP_PF2ID 511
537#define OP_PFPNACC 512
538#define OP_PFCMPGE 513
539#define OP_PFMIN 514
540#define OP_PFRCP 515
541#define OP_PFRSQRT 516
542#define OP_PFSUB 517
543#define OP_PFADD 518
544#define OP_PFCMPGT 519
545#define OP_PFMAX 520
546#define OP_PFRCPIT1 521
547#define OP_PFRSQRTIT1 522
548#define OP_PFSUBR 523
549#define OP_PFACC 524
550#define OP_PFCMPEQ 525
551#define OP_PFMUL 526
552#define OP_PFRCPIT2 527
553#define OP_PFMULHRW 528
554#define OP_PFSWAPD 529
555#define OP_PAVGUSB 530
556#define OP_PFNACC 531
557#define OP_ROL 532
558#define OP_ROR 533
559#define OP_RCL 534
560#define OP_RCR 535
561#define OP_SHL 536
562#define OP_SHR 537
563#define OP_SAR 538
564#define OP_NOT 539
565#define OP_NEG 540
566#define OP_MUL 541
567#define OP_DIV 542
568#define OP_IDIV 543
569#define OP_SLDT 544
570#define OP_STR 545
571#define OP_LLDT 546
572#define OP_LTR 547
573#define OP_VERR 548
574#define OP_VERW 549
575#define OP_SGDT 550
576#define OP_LGDT 551
577#define OP_SIDT 552
578#define OP_LIDT 553
579#define OP_SMSW 554
580#define OP_LMSW 555
581#define OP_INVLPG 556
582#define OP_CMPXCHG8B 557
583#define OP_PSLLQ 558
584#define OP_PSRLDQ 559
585#define OP_PSLLDQ 560
586#define OP_FXSAVE 561
587#define OP_FXRSTOR 562
588#define OP_LDMXCSR 563
589#define OP_STMXCSR 564
590#define OP_LFENCE 565
591#define OP_MFENCE 566
592#define OP_SFENCE 567
593#define OP_PREFETCH 568
594#define OP_MONITOR 569
595#define OP_MWAIT 570
596#define OP_CLFLUSH 571
597
598#define OP_MOV_DR 600
599#define OP_MOV_TR 601
600
601#define OP_SWAPGS 610
602
603/* VT-x instructions */
604#define OP_VMREAD 650
605#define OP_VMWRITE 651
606#define OP_VMCALL 652
607#define OP_VMXON 653
608#define OP_VMXOFF 654
609#define OP_VMCLEAR 655
610#define OP_VMLAUNCH 656
611#define OP_VMRESUME 657
612#define OP_VMPTRLD 658
613#define OP_VMPTRST 659
614#define OP_INVEPT 660
615#define OP_INVVPID 661
616
617/* 64 bits instruction */
618#define OP_MOVSXD 700
619
620/** @} */
621
622
623/** Opcode parameters
624 * @{
625 */
626/* NOTE: Register order is important for translations!! */
627#define OP_PARM_NONE 0
628#define OP_PARM_REG_EAX 1
629#define OP_PARM_REG_GEN32_START OP_PARM_REG_EAX
630#define OP_PARM_REG_ECX 2
631#define OP_PARM_REG_EDX 3
632#define OP_PARM_REG_EBX 4
633#define OP_PARM_REG_ESP 5
634#define OP_PARM_REG_EBP 6
635#define OP_PARM_REG_ESI 7
636#define OP_PARM_REG_EDI 8
637#define OP_PARM_REG_GEN32_END OP_PARM_REG_EDI
638
639#define OP_PARM_REG_ES 9
640#define OP_PARM_REG_SEG_START OP_PARM_REG_ES
641#define OP_PARM_REG_CS 10
642#define OP_PARM_REG_SS 11
643#define OP_PARM_REG_DS 12
644#define OP_PARM_REG_FS 13
645#define OP_PARM_REG_GS 14
646#define OP_PARM_REG_SEG_END OP_PARM_REG_GS
647
648#define OP_PARM_REG_AX 15
649#define OP_PARM_REG_GEN16_START OP_PARM_REG_AX
650#define OP_PARM_REG_CX 16
651#define OP_PARM_REG_DX 17
652#define OP_PARM_REG_BX 18
653#define OP_PARM_REG_SP 19
654#define OP_PARM_REG_BP 20
655#define OP_PARM_REG_SI 21
656#define OP_PARM_REG_DI 22
657#define OP_PARM_REG_GEN16_END OP_PARM_REG_DI
658
659#define OP_PARM_REG_AL 23
660#define OP_PARM_REG_GEN8_START OP_PARM_REG_AL
661#define OP_PARM_REG_CL 24
662#define OP_PARM_REG_DL 25
663#define OP_PARM_REG_BL 26
664#define OP_PARM_REG_AH 27
665#define OP_PARM_REG_CH 28
666#define OP_PARM_REG_DH 29
667#define OP_PARM_REG_BH 30
668#define OP_PARM_REG_GEN8_END OP_PARM_REG_BH
669
670#define OP_PARM_REGFP_0 31
671#define OP_PARM_REG_FP_START OP_PARM_REGFP_0
672#define OP_PARM_REGFP_1 32
673#define OP_PARM_REGFP_2 33
674#define OP_PARM_REGFP_3 34
675#define OP_PARM_REGFP_4 35
676#define OP_PARM_REGFP_5 36
677#define OP_PARM_REGFP_6 37
678#define OP_PARM_REGFP_7 38
679#define OP_PARM_REG_FP_END OP_PARM_REGFP_7
680
681#define OP_PARM_NTA 39
682#define OP_PARM_T0 40
683#define OP_PARM_T1 41
684#define OP_PARM_T2 42
685
686#define OP_PARM_1 43
687
688#define OP_PARM_REX 50
689#define OP_PARM_REX_START OP_PARM_REX
690#define OP_PARM_REX_B 51
691#define OP_PARM_REX_X 52
692#define OP_PARM_REX_XB 53
693#define OP_PARM_REX_R 54
694#define OP_PARM_REX_RB 55
695#define OP_PARM_REX_RX 56
696#define OP_PARM_REX_RXB 57
697#define OP_PARM_REX_W 58
698#define OP_PARM_REX_WB 59
699#define OP_PARM_REX_WX 60
700#define OP_PARM_REX_WXB 61
701#define OP_PARM_REX_WR 62
702#define OP_PARM_REX_WRB 63
703#define OP_PARM_REX_WRX 64
704#define OP_PARM_REX_WRXB 65
705
706#define OP_PARM_REG_RAX 100
707#define OP_PARM_REG_GEN64_START OP_PARM_REG_RAX
708#define OP_PARM_REG_RCX 101
709#define OP_PARM_REG_RDX 102
710#define OP_PARM_REG_RBX 103
711#define OP_PARM_REG_RSP 104
712#define OP_PARM_REG_RBP 105
713#define OP_PARM_REG_RSI 106
714#define OP_PARM_REG_RDI 107
715#define OP_PARM_REG_R8 108
716#define OP_PARM_REG_R9 109
717#define OP_PARM_REG_R10 110
718#define OP_PARM_REG_R11 111
719#define OP_PARM_REG_R12 112
720#define OP_PARM_REG_R13 113
721#define OP_PARM_REG_R14 114
722#define OP_PARM_REG_R15 115
723#define OP_PARM_REG_GEN64_END OP_PARM_REG_R15
724
725
726#define OP_PARM_VTYPE(a) ((int)a & 0xFE0)
727#define OP_PARM_VSUBTYPE(a) ((int)a & 0x01F)
728
729#define OP_PARM_A 0x100
730#define OP_PARM_VARIABLE OP_PARM_A
731#define OP_PARM_E 0x120
732#define OP_PARM_F 0x140
733#define OP_PARM_G 0x160
734#define OP_PARM_I 0x180
735#define OP_PARM_J 0x1A0
736#define OP_PARM_M 0x1C0
737#define OP_PARM_O 0x1E0
738#define OP_PARM_Q 0x200
739#define OP_PARM_R 0x220
740#define OP_PARM_X 0x240
741#define OP_PARM_Y 0x260
742
743/* Grouped rare parameters for optimization purposes */
744#define IS_OP_PARM_RARE(a) ((a & 0xF00) == 0x300)
745#define OP_PARM_C 0x300 /* control register */
746#define OP_PARM_D 0x320 /* debug register */
747#define OP_PARM_S 0x340 /* segment register */
748#define OP_PARM_T 0x360 /* test register */
749#define OP_PARM_P 0x380 /* mmx register */
750#define OP_PARM_W 0x3A0 /* xmm register */
751#define OP_PARM_V 0x3C0
752
753#define OP_PARM_NONE 0
754#define OP_PARM_a 0x1
755#define OP_PARM_b 0x2
756#define OP_PARM_d 0x3
757#define OP_PARM_dq 0x4
758#define OP_PARM_p 0x5
759#define OP_PARM_pd 0x6
760#define OP_PARM_pi 0x7
761#define OP_PARM_ps 0x8
762#define OP_PARM_pq 0x9
763#define OP_PARM_q 0xA
764#define OP_PARM_s 0xB
765#define OP_PARM_sd 0xC
766#define OP_PARM_ss 0xD
767#define OP_PARM_v 0xE
768#define OP_PARM_w 0xF
769#define OP_PARM_z 0x10
770
771
772#define OP_PARM_Ap (OP_PARM_A+OP_PARM_p)
773#define OP_PARM_Cd (OP_PARM_C+OP_PARM_d)
774#define OP_PARM_Dd (OP_PARM_D+OP_PARM_d)
775#define OP_PARM_Eb (OP_PARM_E+OP_PARM_b)
776#define OP_PARM_Ed (OP_PARM_E+OP_PARM_d)
777#define OP_PARM_Ep (OP_PARM_E+OP_PARM_p)
778#define OP_PARM_Ev (OP_PARM_E+OP_PARM_v)
779#define OP_PARM_Ew (OP_PARM_E+OP_PARM_w)
780#define OP_PARM_Fv (OP_PARM_F+OP_PARM_v)
781#define OP_PARM_Gb (OP_PARM_G+OP_PARM_b)
782#define OP_PARM_Gd (OP_PARM_G+OP_PARM_d)
783#define OP_PARM_Gv (OP_PARM_G+OP_PARM_v)
784#define OP_PARM_Gw (OP_PARM_G+OP_PARM_w)
785#define OP_PARM_Ib (OP_PARM_I+OP_PARM_b)
786#define OP_PARM_Id (OP_PARM_I+OP_PARM_d)
787#define OP_PARM_Iq (OP_PARM_I+OP_PARM_q)
788#define OP_PARM_Iw (OP_PARM_I+OP_PARM_w)
789#define OP_PARM_Iv (OP_PARM_I+OP_PARM_v)
790#define OP_PARM_Iz (OP_PARM_I+OP_PARM_z)
791#define OP_PARM_Jb (OP_PARM_J+OP_PARM_b)
792#define OP_PARM_Jv (OP_PARM_J+OP_PARM_v)
793#define OP_PARM_Ma (OP_PARM_M+OP_PARM_a)
794#define OP_PARM_Mb (OP_PARM_M+OP_PARM_b)
795#define OP_PARM_Mw (OP_PARM_M+OP_PARM_w)
796#define OP_PARM_Md (OP_PARM_M+OP_PARM_d)
797#define OP_PARM_Mp (OP_PARM_M+OP_PARM_p)
798#define OP_PARM_Mq (OP_PARM_M+OP_PARM_q)
799#define OP_PARM_Mdq (OP_PARM_M+OP_PARM_dq)
800#define OP_PARM_Ms (OP_PARM_M+OP_PARM_s)
801#define OP_PARM_Ob (OP_PARM_O+OP_PARM_b)
802#define OP_PARM_Ov (OP_PARM_O+OP_PARM_v)
803#define OP_PARM_Pq (OP_PARM_P+OP_PARM_q)
804#define OP_PARM_Pd (OP_PARM_P+OP_PARM_d)
805#define OP_PARM_Qd (OP_PARM_Q+OP_PARM_d)
806#define OP_PARM_Qq (OP_PARM_Q+OP_PARM_q)
807#define OP_PARM_Rd (OP_PARM_R+OP_PARM_d)
808#define OP_PARM_Rw (OP_PARM_R+OP_PARM_w)
809#define OP_PARM_Sw (OP_PARM_S+OP_PARM_w)
810#define OP_PARM_Td (OP_PARM_T+OP_PARM_d)
811#define OP_PARM_Vq (OP_PARM_V+OP_PARM_q)
812#define OP_PARM_Wq (OP_PARM_W+OP_PARM_q)
813#define OP_PARM_Ws (OP_PARM_W+OP_PARM_s)
814#define OP_PARM_Xb (OP_PARM_X+OP_PARM_b)
815#define OP_PARM_Xv (OP_PARM_X+OP_PARM_v)
816#define OP_PARM_Yb (OP_PARM_Y+OP_PARM_b)
817#define OP_PARM_Yv (OP_PARM_Y+OP_PARM_v)
818
819#define OP_PARM_Vps (OP_PARM_V+OP_PARM_ps)
820#define OP_PARM_Vss (OP_PARM_V+OP_PARM_ss)
821#define OP_PARM_Vpd (OP_PARM_V+OP_PARM_pd)
822#define OP_PARM_Vdq (OP_PARM_V+OP_PARM_dq)
823#define OP_PARM_Wps (OP_PARM_W+OP_PARM_ps)
824#define OP_PARM_Wpd (OP_PARM_W+OP_PARM_pd)
825#define OP_PARM_Wss (OP_PARM_W+OP_PARM_ss)
826#define OP_PARM_Wdq (OP_PARM_W+OP_PARM_dq)
827#define OP_PARM_Ppi (OP_PARM_P+OP_PARM_pi)
828#define OP_PARM_Qpi (OP_PARM_Q+OP_PARM_pi)
829#define OP_PARM_Qdq (OP_PARM_Q+OP_PARM_dq)
830#define OP_PARM_Vsd (OP_PARM_V+OP_PARM_sd)
831#define OP_PARM_Wsd (OP_PARM_W+OP_PARM_sd)
832#define OP_PARM_Vpq (OP_PARM_V+OP_PARM_pq)
833#define OP_PARM_Pdq (OP_PARM_P+OP_PARM_dq)
834
835/** @} */
836
837#endif
838
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