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