summaryrefslogtreecommitdiff
path: root/Libraries/LibX86/Interpreter.h
blob: 7952fc685f1447ea6257a4ec723f858493ff98f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
/*
 * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#pragma once

#include <AK/Types.h>

namespace X86 {

class Instruction;

class Interpreter {
public:
    virtual void AAA(const Instruction&) = 0;
    virtual void AAD(const Instruction&) = 0;
    virtual void AAM(const Instruction&) = 0;
    virtual void AAS(const Instruction&) = 0;
    virtual void ADC_AL_imm8(const Instruction&) = 0;
    virtual void ADC_AX_imm16(const Instruction&) = 0;
    virtual void ADC_EAX_imm32(const Instruction&) = 0;
    virtual void ADC_RM16_imm16(const Instruction&) = 0;
    virtual void ADC_RM16_imm8(const Instruction&) = 0;
    virtual void ADC_RM16_reg16(const Instruction&) = 0;
    virtual void ADC_RM32_imm32(const Instruction&) = 0;
    virtual void ADC_RM32_imm8(const Instruction&) = 0;
    virtual void ADC_RM32_reg32(const Instruction&) = 0;
    virtual void ADC_RM8_imm8(const Instruction&) = 0;
    virtual void ADC_RM8_reg8(const Instruction&) = 0;
    virtual void ADC_reg16_RM16(const Instruction&) = 0;
    virtual void ADC_reg32_RM32(const Instruction&) = 0;
    virtual void ADC_reg8_RM8(const Instruction&) = 0;
    virtual void ADD_AL_imm8(const Instruction&) = 0;
    virtual void ADD_AX_imm16(const Instruction&) = 0;
    virtual void ADD_EAX_imm32(const Instruction&) = 0;
    virtual void ADD_RM16_imm16(const Instruction&) = 0;
    virtual void ADD_RM16_imm8(const Instruction&) = 0;
    virtual void ADD_RM16_reg16(const Instruction&) = 0;
    virtual void ADD_RM32_imm32(const Instruction&) = 0;
    virtual void ADD_RM32_imm8(const Instruction&) = 0;
    virtual void ADD_RM32_reg32(const Instruction&) = 0;
    virtual void ADD_RM8_imm8(const Instruction&) = 0;
    virtual void ADD_RM8_reg8(const Instruction&) = 0;
    virtual void ADD_reg16_RM16(const Instruction&) = 0;
    virtual void ADD_reg32_RM32(const Instruction&) = 0;
    virtual void ADD_reg8_RM8(const Instruction&) = 0;
    virtual void AND_AL_imm8(const Instruction&) = 0;
    virtual void AND_AX_imm16(const Instruction&) = 0;
    virtual void AND_EAX_imm32(const Instruction&) = 0;
    virtual void AND_RM16_imm16(const Instruction&) = 0;
    virtual void AND_RM16_imm8(const Instruction&) = 0;
    virtual void AND_RM16_reg16(const Instruction&) = 0;
    virtual void AND_RM32_imm32(const Instruction&) = 0;
    virtual void AND_RM32_imm8(const Instruction&) = 0;
    virtual void AND_RM32_reg32(const Instruction&) = 0;
    virtual void AND_RM8_imm8(const Instruction&) = 0;
    virtual void AND_RM8_reg8(const Instruction&) = 0;
    virtual void AND_reg16_RM16(const Instruction&) = 0;
    virtual void AND_reg32_RM32(const Instruction&) = 0;
    virtual void AND_reg8_RM8(const Instruction&) = 0;
    virtual void ARPL(const Instruction&) = 0;
    virtual void BOUND(const Instruction&) = 0;
    virtual void BSF_reg16_RM16(const Instruction&) = 0;
    virtual void BSF_reg32_RM32(const Instruction&) = 0;
    virtual void BSR_reg16_RM16(const Instruction&) = 0;
    virtual void BSR_reg32_RM32(const Instruction&) = 0;
    virtual void BSWAP_reg32(const Instruction&) = 0;
    virtual void BTC_RM16_imm8(const Instruction&) = 0;
    virtual void BTC_RM16_reg16(const Instruction&) = 0;
    virtual void BTC_RM32_imm8(const Instruction&) = 0;
    virtual void BTC_RM32_reg32(const Instruction&) = 0;
    virtual void BTR_RM16_imm8(const Instruction&) = 0;
    virtual void BTR_RM16_reg16(const Instruction&) = 0;
    virtual void BTR_RM32_imm8(const Instruction&) = 0;
    virtual void BTR_RM32_reg32(const Instruction&) = 0;
    virtual void BTS_RM16_imm8(const Instruction&) = 0;
    virtual void BTS_RM16_reg16(const Instruction&) = 0;
    virtual void BTS_RM32_imm8(const Instruction&) = 0;
    virtual void BTS_RM32_reg32(const Instruction&) = 0;
    virtual void BT_RM16_imm8(const Instruction&) = 0;
    virtual void BT_RM16_reg16(const Instruction&) = 0;
    virtual void BT_RM32_imm8(const Instruction&) = 0;
    virtual void BT_RM32_reg32(const Instruction&) = 0;
    virtual void CALL_FAR_mem16(const Instruction&) = 0;
    virtual void CALL_FAR_mem32(const Instruction&) = 0;
    virtual void CALL_RM16(const Instruction&) = 0;
    virtual void CALL_RM32(const Instruction&) = 0;
    virtual void CALL_imm16(const Instruction&) = 0;
    virtual void CALL_imm16_imm16(const Instruction&) = 0;
    virtual void CALL_imm16_imm32(const Instruction&) = 0;
    virtual void CALL_imm32(const Instruction&) = 0;
    virtual void CBW(const Instruction&) = 0;
    virtual void CDQ(const Instruction&) = 0;
    virtual void CLC(const Instruction&) = 0;
    virtual void CLD(const Instruction&) = 0;
    virtual void CLI(const Instruction&) = 0;
    virtual void CLTS(const Instruction&) = 0;
    virtual void CMC(const Instruction&) = 0;
    virtual void CMOVcc_reg16_RM16(const Instruction&) = 0;
    virtual void CMOVcc_reg32_RM32(const Instruction&) = 0;
    virtual void CMPSB(const Instruction&) = 0;
    virtual void CMPSD(const Instruction&) = 0;
    virtual void CMPSW(const Instruction&) = 0;
    virtual void CMPXCHG_RM16_reg16(const Instruction&) = 0;
    virtual void CMPXCHG_RM32_reg32(const Instruction&) = 0;
    virtual void CMPXCHG_RM8_reg8(const Instruction&) = 0;
    virtual void CMP_AL_imm8(const Instruction&) = 0;
    virtual void CMP_AX_imm16(const Instruction&) = 0;
    virtual void CMP_EAX_imm32(const Instruction&) = 0;
    virtual void CMP_RM16_imm16(const Instruction&) = 0;
    virtual void CMP_RM16_imm8(const Instruction&) = 0;
    virtual void CMP_RM16_reg16(const Instruction&) = 0;
    virtual void CMP_RM32_imm32(const Instruction&) = 0;
    virtual void CMP_RM32_imm8(const Instruction&) = 0;
    virtual void CMP_RM32_reg32(const Instruction&) = 0;
    virtual void CMP_RM8_imm8(const Instruction&) = 0;
    virtual void CMP_RM8_reg8(const Instruction&) = 0;
    virtual void CMP_reg16_RM16(const Instruction&) = 0;
    virtual void CMP_reg32_RM32(const Instruction&) = 0;
    virtual void CMP_reg8_RM8(const Instruction&) = 0;
    virtual void CPUID(const Instruction&) = 0;
    virtual void CWD(const Instruction&) = 0;
    virtual void CWDE(const Instruction&) = 0;
    virtual void DAA(const Instruction&) = 0;
    virtual void DAS(const Instruction&) = 0;
    virtual void DEC_RM16(const Instruction&) = 0;
    virtual void DEC_RM32(const Instruction&) = 0;
    virtual void DEC_RM8(const Instruction&) = 0;
    virtual void DEC_reg16(const Instruction&) = 0;
    virtual void DEC_reg32(const Instruction&) = 0;
    virtual void DIV_RM16(const Instruction&) = 0;
    virtual void DIV_RM32(const Instruction&) = 0;
    virtual void DIV_RM8(const Instruction&) = 0;
    virtual void ENTER16(const Instruction&) = 0;
    virtual void ENTER32(const Instruction&) = 0;
    virtual void ESCAPE(const Instruction&) = 0;
    virtual void HLT(const Instruction&) = 0;
    virtual void IDIV_RM16(const Instruction&) = 0;
    virtual void IDIV_RM32(const Instruction&) = 0;
    virtual void IDIV_RM8(const Instruction&) = 0;
    virtual void IMUL_RM16(const Instruction&) = 0;
    virtual void IMUL_RM32(const Instruction&) = 0;
    virtual void IMUL_RM8(const Instruction&) = 0;
    virtual void IMUL_reg16_RM16(const Instruction&) = 0;
    virtual void IMUL_reg16_RM16_imm16(const Instruction&) = 0;
    virtual void IMUL_reg16_RM16_imm8(const Instruction&) = 0;
    virtual void IMUL_reg32_RM32(const Instruction&) = 0;
    virtual void IMUL_reg32_RM32_imm32(const Instruction&) = 0;
    virtual void IMUL_reg32_RM32_imm8(const Instruction&) = 0;
    virtual void INC_RM16(const Instruction&) = 0;
    virtual void INC_RM32(const Instruction&) = 0;
    virtual void INC_RM8(const Instruction&) = 0;
    virtual void INC_reg16(const Instruction&) = 0;
    virtual void INC_reg32(const Instruction&) = 0;
    virtual void INSB(const Instruction&) = 0;
    virtual void INSD(const Instruction&) = 0;
    virtual void INSW(const Instruction&) = 0;
    virtual void INT3(const Instruction&) = 0;
    virtual void INTO(const Instruction&) = 0;
    virtual void INT_imm8(const Instruction&) = 0;
    virtual void INVLPG(const Instruction&) = 0;
    virtual void IN_AL_DX(const Instruction&) = 0;
    virtual void IN_AL_imm8(const Instruction&) = 0;
    virtual void IN_AX_DX(const Instruction&) = 0;
    virtual void IN_AX_imm8(const Instruction&) = 0;
    virtual void IN_EAX_DX(const Instruction&) = 0;
    virtual void IN_EAX_imm8(const Instruction&) = 0;
    virtual void IRET(const Instruction&) = 0;
    virtual void JCXZ_imm8(const Instruction&) = 0;
    virtual void JMP_FAR_mem16(const Instruction&) = 0;
    virtual void JMP_FAR_mem32(const Instruction&) = 0;
    virtual void JMP_RM16(const Instruction&) = 0;
    virtual void JMP_RM32(const Instruction&) = 0;
    virtual void JMP_imm16(const Instruction&) = 0;
    virtual void JMP_imm16_imm16(const Instruction&) = 0;
    virtual void JMP_imm16_imm32(const Instruction&) = 0;
    virtual void JMP_imm32(const Instruction&) = 0;
    virtual void JMP_short_imm8(const Instruction&) = 0;
    virtual void Jcc_NEAR_imm(const Instruction&) = 0;
    virtual void Jcc_imm8(const Instruction&) = 0;
    virtual void LAHF(const Instruction&) = 0;
    virtual void LAR_reg16_RM16(const Instruction&) = 0;
    virtual void LAR_reg32_RM32(const Instruction&) = 0;
    virtual void LDS_reg16_mem16(const Instruction&) = 0;
    virtual void LDS_reg32_mem32(const Instruction&) = 0;
    virtual void LEAVE16(const Instruction&) = 0;
    virtual void LEAVE32(const Instruction&) = 0;
    virtual void LEA_reg16_mem16(const Instruction&) = 0;
    virtual void LEA_reg32_mem32(const Instruction&) = 0;
    virtual void LES_reg16_mem16(const Instruction&) = 0;
    virtual void LES_reg32_mem32(const Instruction&) = 0;
    virtual void LFS_reg16_mem16(const Instruction&) = 0;
    virtual void LFS_reg32_mem32(const Instruction&) = 0;
    virtual void LGDT(const Instruction&) = 0;
    virtual void LGS_reg16_mem16(const Instruction&) = 0;
    virtual void LGS_reg32_mem32(const Instruction&) = 0;
    virtual void LIDT(const Instruction&) = 0;
    virtual void LLDT_RM16(const Instruction&) = 0;
    virtual void LMSW_RM16(const Instruction&) = 0;
    virtual void LODSB(const Instruction&) = 0;
    virtual void LODSD(const Instruction&) = 0;
    virtual void LODSW(const Instruction&) = 0;
    virtual void LOOPNZ_imm8(const Instruction&) = 0;
    virtual void LOOPZ_imm8(const Instruction&) = 0;
    virtual void LOOP_imm8(const Instruction&) = 0;
    virtual void LSL_reg16_RM16(const Instruction&) = 0;
    virtual void LSL_reg32_RM32(const Instruction&) = 0;
    virtual void LSS_reg16_mem16(const Instruction&) = 0;
    virtual void LSS_reg32_mem32(const Instruction&) = 0;
    virtual void LTR_RM16(const Instruction&) = 0;
    virtual void MOVSB(const Instruction&) = 0;
    virtual void MOVSD(const Instruction&) = 0;
    virtual void MOVSW(const Instruction&) = 0;
    virtual void MOVSX_reg16_RM8(const Instruction&) = 0;
    virtual void MOVSX_reg32_RM16(const Instruction&) = 0;
    virtual void MOVSX_reg32_RM8(const Instruction&) = 0;
    virtual void MOVZX_reg16_RM8(const Instruction&) = 0;
    virtual void MOVZX_reg32_RM16(const Instruction&) = 0;
    virtual void MOVZX_reg32_RM8(const Instruction&) = 0;
    virtual void MOV_AL_moff8(const Instruction&) = 0;
    virtual void MOV_AX_moff16(const Instruction&) = 0;
    virtual void MOV_CR_reg32(const Instruction&) = 0;
    virtual void MOV_DR_reg32(const Instruction&) = 0;
    virtual void MOV_EAX_moff32(const Instruction&) = 0;
    virtual void MOV_RM16_imm16(const Instruction&) = 0;
    virtual void MOV_RM16_reg16(const Instruction&) = 0;
    virtual void MOV_RM16_seg(const Instruction&) = 0;
    virtual void MOV_RM32_imm32(const Instruction&) = 0;
    virtual void MOV_RM32_reg32(const Instruction&) = 0;
    virtual void MOV_RM8_imm8(const Instruction&) = 0;
    virtual void MOV_RM8_reg8(const Instruction&) = 0;
    virtual void MOV_moff16_AX(const Instruction&) = 0;
    virtual void MOV_moff32_EAX(const Instruction&) = 0;
    virtual void MOV_moff8_AL(const Instruction&) = 0;
    virtual void MOV_reg16_RM16(const Instruction&) = 0;
    virtual void MOV_reg16_imm16(const Instruction&) = 0;
    virtual void MOV_reg32_CR(const Instruction&) = 0;
    virtual void MOV_reg32_DR(const Instruction&) = 0;
    virtual void MOV_reg32_RM32(const Instruction&) = 0;
    virtual void MOV_reg32_imm32(const Instruction&) = 0;
    virtual void MOV_reg8_RM8(const Instruction&) = 0;
    virtual void MOV_reg8_imm8(const Instruction&) = 0;
    virtual void MOV_seg_RM16(const Instruction&) = 0;
    virtual void MOV_seg_RM32(const Instruction&) = 0;
    virtual void MUL_RM16(const Instruction&) = 0;
    virtual void MUL_RM32(const Instruction&) = 0;
    virtual void MUL_RM8(const Instruction&) = 0;
    virtual void NEG_RM16(const Instruction&) = 0;
    virtual void NEG_RM32(const Instruction&) = 0;
    virtual void NEG_RM8(const Instruction&) = 0;
    virtual void NOP(const Instruction&) = 0;
    virtual void NOT_RM16(const Instruction&) = 0;
    virtual void NOT_RM32(const Instruction&) = 0;
    virtual void NOT_RM8(const Instruction&) = 0;
    virtual void OR_AL_imm8(const Instruction&) = 0;
    virtual void OR_AX_imm16(const Instruction&) = 0;
    virtual void OR_EAX_imm32(const Instruction&) = 0;
    virtual void OR_RM16_imm16(const Instruction&) = 0;
    virtual void OR_RM16_imm8(const Instruction&) = 0;
    virtual void OR_RM16_reg16(const Instruction&) = 0;
    virtual void OR_RM32_imm32(const Instruction&) = 0;
    virtual void OR_RM32_imm8(const Instruction&) = 0;
    virtual void OR_RM32_reg32(const Instruction&) = 0;
    virtual void OR_RM8_imm8(const Instruction&) = 0;
    virtual void OR_RM8_reg8(const Instruction&) = 0;
    virtual void OR_reg16_RM16(const Instruction&) = 0;
    virtual void OR_reg32_RM32(const Instruction&) = 0;
    virtual void OR_reg8_RM8(const Instruction&) = 0;
    virtual void OUTSB(const Instruction&) = 0;
    virtual void OUTSD(const Instruction&) = 0;
    virtual void OUTSW(const Instruction&) = 0;
    virtual void OUT_DX_AL(const Instruction&) = 0;
    virtual void OUT_DX_AX(const Instruction&) = 0;
    virtual void OUT_DX_EAX(const Instruction&) = 0;
    virtual void OUT_imm8_AL(const Instruction&) = 0;
    virtual void OUT_imm8_AX(const Instruction&) = 0;
    virtual void OUT_imm8_EAX(const Instruction&) = 0;
    virtual void PADDB_mm1_mm2m64(const Instruction&) = 0;
    virtual void PADDW_mm1_mm2m64(const Instruction&) = 0;
    virtual void PADDD_mm1_mm2m64(const Instruction&) = 0;
    virtual void POPA(const Instruction&) = 0;
    virtual void POPAD(const Instruction&) = 0;
    virtual void POPF(const Instruction&) = 0;
    virtual void POPFD(const Instruction&) = 0;
    virtual void POP_DS(const Instruction&) = 0;
    virtual void POP_ES(const Instruction&) = 0;
    virtual void POP_FS(const Instruction&) = 0;
    virtual void POP_GS(const Instruction&) = 0;
    virtual void POP_RM16(const Instruction&) = 0;
    virtual void POP_RM32(const Instruction&) = 0;
    virtual void POP_SS(const Instruction&) = 0;
    virtual void POP_reg16(const Instruction&) = 0;
    virtual void POP_reg32(const Instruction&) = 0;
    virtual void PUSHA(const Instruction&) = 0;
    virtual void PUSHAD(const Instruction&) = 0;
    virtual void PUSHF(const Instruction&) = 0;
    virtual void PUSHFD(const Instruction&) = 0;
    virtual void PUSH_CS(const Instruction&) = 0;
    virtual void PUSH_DS(const Instruction&) = 0;
    virtual void PUSH_ES(const Instruction&) = 0;
    virtual void PUSH_FS(const Instruction&) = 0;
    virtual void PUSH_GS(const Instruction&) = 0;
    virtual void PUSH_RM16(const Instruction&) = 0;
    virtual void PUSH_RM32(const Instruction&) = 0;
    virtual void PUSH_SP_8086_80186(const Instruction&) = 0;
    virtual void PUSH_SS(const Instruction&) = 0;
    virtual void PUSH_imm16(const Instruction&) = 0;
    virtual void PUSH_imm32(const Instruction&) = 0;
    virtual void PUSH_imm8(const Instruction&) = 0;
    virtual void PUSH_reg16(const Instruction&) = 0;
    virtual void PUSH_reg32(const Instruction&) = 0;
    virtual void RCL_RM16_1(const Instruction&) = 0;
    virtual void RCL_RM16_CL(const Instruction&) = 0;
    virtual void RCL_RM16_imm8(const Instruction&) = 0;
    virtual void RCL_RM32_1(const Instruction&) = 0;
    virtual void RCL_RM32_CL(const Instruction&) = 0;
    virtual void RCL_RM32_imm8(const Instruction&) = 0;
    virtual void RCL_RM8_1(const Instruction&) = 0;
    virtual void RCL_RM8_CL(const Instruction&) = 0;
    virtual void RCL_RM8_imm8(const Instruction&) = 0;
    virtual void RCR_RM16_1(const Instruction&) = 0;
    virtual void RCR_RM16_CL(const Instruction&) = 0;
    virtual void RCR_RM16_imm8(const Instruction&) = 0;
    virtual void RCR_RM32_1(const Instruction&) = 0;
    virtual void RCR_RM32_CL(const Instruction&) = 0;
    virtual void RCR_RM32_imm8(const Instruction&) = 0;
    virtual void RCR_RM8_1(const Instruction&) = 0;
    virtual void RCR_RM8_CL(const Instruction&) = 0;
    virtual void RCR_RM8_imm8(const Instruction&) = 0;
    virtual void RDTSC(const Instruction&) = 0;
    virtual void RET(const Instruction&) = 0;
    virtual void RETF(const Instruction&) = 0;
    virtual void RETF_imm16(const Instruction&) = 0;
    virtual void RET_imm16(const Instruction&) = 0;
    virtual void ROL_RM16_1(const Instruction&) = 0;
    virtual void ROL_RM16_CL(const Instruction&) = 0;
    virtual void ROL_RM16_imm8(const Instruction&) = 0;
    virtual void ROL_RM32_1(const Instruction&) = 0;
    virtual void ROL_RM32_CL(const Instruction&) = 0;
    virtual void ROL_RM32_imm8(const Instruction&) = 0;
    virtual void ROL_RM8_1(const Instruction&) = 0;
    virtual void ROL_RM8_CL(const Instruction&) = 0;
    virtual void ROL_RM8_imm8(const Instruction&) = 0;
    virtual void ROR_RM16_1(const Instruction&) = 0;
    virtual void ROR_RM16_CL(const Instruction&) = 0;
    virtual void ROR_RM16_imm8(const Instruction&) = 0;
    virtual void ROR_RM32_1(const Instruction&) = 0;
    virtual void ROR_RM32_CL(const Instruction&) = 0;
    virtual void ROR_RM32_imm8(const Instruction&) = 0;
    virtual void ROR_RM8_1(const Instruction&) = 0;
    virtual void ROR_RM8_CL(const Instruction&) = 0;
    virtual void ROR_RM8_imm8(const Instruction&) = 0;
    virtual void SAHF(const Instruction&) = 0;
    virtual void SALC(const Instruction&) = 0;
    virtual void SAR_RM16_1(const Instruction&) = 0;
    virtual void SAR_RM16_CL(const Instruction&) = 0;
    virtual void SAR_RM16_imm8(const Instruction&) = 0;
    virtual void SAR_RM32_1(const Instruction&) = 0;
    virtual void SAR_RM32_CL(const Instruction&) = 0;
    virtual void SAR_RM32_imm8(const Instruction&) = 0;
    virtual void SAR_RM8_1(const Instruction&) = 0;
    virtual void SAR_RM8_CL(const Instruction&) = 0;
    virtual void SAR_RM8_imm8(const Instruction&) = 0;
    virtual void SBB_AL_imm8(const Instruction&) = 0;
    virtual void SBB_AX_imm16(const Instruction&) = 0;
    virtual void SBB_EAX_imm32(const Instruction&) = 0;
    virtual void SBB_RM16_imm16(const Instruction&) = 0;
    virtual void SBB_RM16_imm8(const Instruction&) = 0;
    virtual void SBB_RM16_reg16(const Instruction&) = 0;
    virtual void SBB_RM32_imm32(const Instruction&) = 0;
    virtual void SBB_RM32_imm8(const Instruction&) = 0;
    virtual void SBB_RM32_reg32(const Instruction&) = 0;
    virtual void SBB_RM8_imm8(const Instruction&) = 0;
    virtual void SBB_RM8_reg8(const Instruction&) = 0;
    virtual void SBB_reg16_RM16(const Instruction&) = 0;
    virtual void SBB_reg32_RM32(const Instruction&) = 0;
    virtual void SBB_reg8_RM8(const Instruction&) = 0;
    virtual void SCASB(const Instruction&) = 0;
    virtual void SCASD(const Instruction&) = 0;
    virtual void SCASW(const Instruction&) = 0;
    virtual void SETcc_RM8(const Instruction&) = 0;
    virtual void SGDT(const Instruction&) = 0;
    virtual void SHLD_RM16_reg16_CL(const Instruction&) = 0;
    virtual void SHLD_RM16_reg16_imm8(const Instruction&) = 0;
    virtual void SHLD_RM32_reg32_CL(const Instruction&) = 0;
    virtual void SHLD_RM32_reg32_imm8(const Instruction&) = 0;
    virtual void SHL_RM16_1(const Instruction&) = 0;
    virtual void SHL_RM16_CL(const Instruction&) = 0;
    virtual void SHL_RM16_imm8(const Instruction&) = 0;
    virtual void SHL_RM32_1(const Instruction&) = 0;
    virtual void SHL_RM32_CL(const Instruction&) = 0;
    virtual void SHL_RM32_imm8(const Instruction&) = 0;
    virtual void SHL_RM8_1(const Instruction&) = 0;
    virtual void SHL_RM8_CL(const Instruction&) = 0;
    virtual void SHL_RM8_imm8(const Instruction&) = 0;
    virtual void SHRD_RM16_reg16_CL(const Instruction&) = 0;
    virtual void SHRD_RM16_reg16_imm8(const Instruction&) = 0;
    virtual void SHRD_RM32_reg32_CL(const Instruction&) = 0;
    virtual void SHRD_RM32_reg32_imm8(const Instruction&) = 0;
    virtual void SHR_RM16_1(const Instruction&) = 0;
    virtual void SHR_RM16_CL(const Instruction&) = 0;
    virtual void SHR_RM16_imm8(const Instruction&) = 0;
    virtual void SHR_RM32_1(const Instruction&) = 0;
    virtual void SHR_RM32_CL(const Instruction&) = 0;
    virtual void SHR_RM32_imm8(const Instruction&) = 0;
    virtual void SHR_RM8_1(const Instruction&) = 0;
    virtual void SHR_RM8_CL(const Instruction&) = 0;
    virtual void SHR_RM8_imm8(const Instruction&) = 0;
    virtual void SIDT(const Instruction&) = 0;
    virtual void SLDT_RM16(const Instruction&) = 0;
    virtual void SMSW_RM16(const Instruction&) = 0;
    virtual void STC(const Instruction&) = 0;
    virtual void STD(const Instruction&) = 0;
    virtual void STI(const Instruction&) = 0;
    virtual void STOSB(const Instruction&) = 0;
    virtual void STOSD(const Instruction&) = 0;
    virtual void STOSW(const Instruction&) = 0;
    virtual void STR_RM16(const Instruction&) = 0;
    virtual void SUB_AL_imm8(const Instruction&) = 0;
    virtual void SUB_AX_imm16(const Instruction&) = 0;
    virtual void SUB_EAX_imm32(const Instruction&) = 0;
    virtual void SUB_RM16_imm16(const Instruction&) = 0;
    virtual void SUB_RM16_imm8(const Instruction&) = 0;
    virtual void SUB_RM16_reg16(const Instruction&) = 0;
    virtual void SUB_RM32_imm32(const Instruction&) = 0;
    virtual void SUB_RM32_imm8(const Instruction&) = 0;
    virtual void SUB_RM32_reg32(const Instruction&) = 0;
    virtual void SUB_RM8_imm8(const Instruction&) = 0;
    virtual void SUB_RM8_reg8(const Instruction&) = 0;
    virtual void SUB_reg16_RM16(const Instruction&) = 0;
    virtual void SUB_reg32_RM32(const Instruction&) = 0;
    virtual void SUB_reg8_RM8(const Instruction&) = 0;
    virtual void TEST_AL_imm8(const Instruction&) = 0;
    virtual void TEST_AX_imm16(const Instruction&) = 0;
    virtual void TEST_EAX_imm32(const Instruction&) = 0;
    virtual void TEST_RM16_imm16(const Instruction&) = 0;
    virtual void TEST_RM16_reg16(const Instruction&) = 0;
    virtual void TEST_RM32_imm32(const Instruction&) = 0;
    virtual void TEST_RM32_reg32(const Instruction&) = 0;
    virtual void TEST_RM8_imm8(const Instruction&) = 0;
    virtual void TEST_RM8_reg8(const Instruction&) = 0;
    virtual void UD0(const Instruction&) = 0;
    virtual void UD1(const Instruction&) = 0;
    virtual void UD2(const Instruction&) = 0;
    virtual void VERR_RM16(const Instruction&) = 0;
    virtual void VERW_RM16(const Instruction&) = 0;
    virtual void WAIT(const Instruction&) = 0;
    virtual void WBINVD(const Instruction&) = 0;
    virtual void XADD_RM16_reg16(const Instruction&) = 0;
    virtual void XADD_RM32_reg32(const Instruction&) = 0;
    virtual void XADD_RM8_reg8(const Instruction&) = 0;
    virtual void XCHG_AX_reg16(const Instruction&) = 0;
    virtual void XCHG_EAX_reg32(const Instruction&) = 0;
    virtual void XCHG_reg16_RM16(const Instruction&) = 0;
    virtual void XCHG_reg32_RM32(const Instruction&) = 0;
    virtual void XCHG_reg8_RM8(const Instruction&) = 0;
    virtual void XLAT(const Instruction&) = 0;
    virtual void XOR_AL_imm8(const Instruction&) = 0;
    virtual void XOR_AX_imm16(const Instruction&) = 0;
    virtual void XOR_EAX_imm32(const Instruction&) = 0;
    virtual void XOR_RM16_imm16(const Instruction&) = 0;
    virtual void XOR_RM16_imm8(const Instruction&) = 0;
    virtual void XOR_RM16_reg16(const Instruction&) = 0;
    virtual void XOR_RM32_imm32(const Instruction&) = 0;
    virtual void XOR_RM32_imm8(const Instruction&) = 0;
    virtual void XOR_RM32_reg32(const Instruction&) = 0;
    virtual void XOR_RM8_imm8(const Instruction&) = 0;
    virtual void XOR_RM8_reg8(const Instruction&) = 0;
    virtual void XOR_reg16_RM16(const Instruction&) = 0;
    virtual void XOR_reg32_RM32(const Instruction&) = 0;
    virtual void XOR_reg8_RM8(const Instruction&) = 0;
    virtual void MOVQ_mm1_mm2m64(const Instruction&) = 0;
    virtual void EMMS(const Instruction&) = 0;
    virtual void MOVQ_mm1_m64_mm2(const Instruction&) = 0;
    virtual void wrap_0xC0(const Instruction&) = 0;
    virtual void wrap_0xC1_16(const Instruction&) = 0;
    virtual void wrap_0xC1_32(const Instruction&) = 0;
    virtual void wrap_0xD0(const Instruction&) = 0;
    virtual void wrap_0xD1_16(const Instruction&) = 0;
    virtual void wrap_0xD1_32(const Instruction&) = 0;
    virtual void wrap_0xD2(const Instruction&) = 0;
    virtual void wrap_0xD3_16(const Instruction&) = 0;
    virtual void wrap_0xD3_32(const Instruction&) = 0;
};

typedef void (Interpreter::*InstructionHandler)(const Instruction&);

}