VirtualBox

source: vbox/trunk/src/VBox/Disassembler/DisasmTables.h@ 41668

Last change on this file since 41668 was 41668, checked in by vboxsync, 12 years ago

DIS,DIS-users: Drop the operand/parameter formatting during instruction parsing. The desired formatter can do this afterwards if desired. Should save time + size. (DISCPUSTATE is now 256 bytes here on 64-bit linux, was ~406 yesterday.)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/* $Id: DisasmTables.h 41668 2012-06-12 13:15:51Z vboxsync $ */
2/** @file
3 * VBox disassembler - Tables Header.
4 */
5
6/*
7 * Copyright (C) 2006-2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___disasmtable_h___
19#define ___disasmtable_h___
20
21#include <VBox/dis.h>
22
23extern const OPCODE g_InvalidOpcode[1];
24
25extern const OPCODE g_aOneByteMapX86[256];
26extern const OPCODE g_aOneByteMapX64[256];
27extern const OPCODE g_aTwoByteMapX86[256];
28
29/** Two byte opcode map with prefix 0x66 */
30extern const OPCODE g_aTwoByteMapX86_PF66[256];
31
32/** Two byte opcode map with prefix 0xF2 */
33extern const OPCODE g_aTwoByteMapX86_PFF2[256];
34
35/** Two byte opcode map with prefix 0xF3 */
36extern const OPCODE g_aTwoByteMapX86_PFF3[256];
37
38/** Three byte opcode map (0xF 0x38) */
39extern const OPCODE *g_apThreeByteMapX86_0F38[16];
40
41/** Three byte opcode map with prefix 0x66 (0xF 0x38) */
42extern const OPCODE *g_apThreeByteMapX86_660F38[16];
43
44/** Three byte opcode map with prefix 0xF2 (0xF 0x38) */
45extern const OPCODE *g_apThreeByteMapX86_F20F38[16];
46
47/** Three byte opcode map with prefix 0x66 (0xF 0x3A) */
48extern const OPCODE *g_apThreeByteMapX86_660F3A[16];
49
50/** Opcode extensions (Group tables)
51 * @{ */
52extern const OPCODE g_aMapX86_Group1[8*4];
53extern const OPCODE g_aMapX86_Group2[8*6];
54extern const OPCODE g_aMapX86_Group3[8*2];
55extern const OPCODE g_aMapX86_Group4[8];
56extern const OPCODE g_aMapX86_Group5[8];
57extern const OPCODE g_aMapX86_Group6[8];
58extern const OPCODE g_aMapX86_Group7_mem[8];
59extern const OPCODE g_aMapX86_Group7_mod11_rm000[8];
60extern const OPCODE g_aMapX86_Group7_mod11_rm001[8];
61extern const OPCODE g_aMapX86_Group8[8];
62extern const OPCODE g_aMapX86_Group9[8];
63extern const OPCODE g_aMapX86_Group10[8];
64extern const OPCODE g_aMapX86_Group11[8*2];
65extern const OPCODE g_aMapX86_Group12[8*2];
66extern const OPCODE g_aMapX86_Group13[8*2];
67extern const OPCODE g_aMapX86_Group14[8*2];
68extern const OPCODE g_aMapX86_Group15_mem[8];
69extern const OPCODE g_aMapX86_Group15_mod11_rm000[8];
70extern const OPCODE g_aMapX86_Group16[8];
71extern const OPCODE g_aMapX86_NopPause[2];
72/** @} */
73
74/** 3DNow! map (0x0F 0x0F prefix) */
75extern const OPCODE g_aTwoByteMapX86_3DNow[256];
76
77/** Floating point opcodes starting with escape byte 0xDF
78 * @{ */
79extern const OPCODE g_aMapX86_EscF0_Low[8];
80extern const OPCODE g_aMapX86_EscF0_High[16*4];
81extern const OPCODE g_aMapX86_EscF1_Low[8];
82extern const OPCODE g_aMapX86_EscF1_High[16*4];
83extern const OPCODE g_aMapX86_EscF2_Low[8];
84extern const OPCODE g_aMapX86_EscF2_High[16*4];
85extern const OPCODE g_aMapX86_EscF3_Low[8];
86extern const OPCODE g_aMapX86_EscF3_High[16*4];
87extern const OPCODE g_aMapX86_EscF4_Low[8];
88extern const OPCODE g_aMapX86_EscF4_High[16*4];
89extern const OPCODE g_aMapX86_EscF5_Low[8];
90extern const OPCODE g_aMapX86_EscF5_High[16*4];
91extern const OPCODE g_aMapX86_EscF6_Low[8];
92extern const OPCODE g_aMapX86_EscF6_High[16*4];
93extern const OPCODE g_aMapX86_EscF7_Low[8];
94extern const OPCODE g_aMapX86_EscF7_High[16*4];
95
96extern PCOPCODE g_paMapX86_FP_Low[8];
97extern PCOPCODE g_paMapX86_FP_High[8];
98/** @} */
99
100/** @def OP
101 * Wrapper which initializes an OPCODE.
102 * We must use this so that we can exclude unused fields in order
103 * to save precious bytes in the GC version.
104 *
105 * @internal
106 */
107#ifndef DIS_CORE_ONLY
108# define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
109 { pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype }
110#else
111# define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
112 { idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype }
113#endif
114
115#endif
116
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