1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* * MSP430 Disassembler *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* *| |
7 | \*===----------------------------------------------------------------------===*/ |
8 | |
9 | |
10 | #include "llvm/MC/MCInst.h" |
11 | #include "llvm/MC/MCSubtargetInfo.h" |
12 | #include "llvm/Support/DataTypes.h" |
13 | #include "llvm/Support/Debug.h" |
14 | #include "llvm/Support/LEB128.h" |
15 | #include "llvm/Support/raw_ostream.h" |
16 | #include "llvm/TargetParser/SubtargetFeature.h" |
17 | #include <assert.h> |
18 | |
19 | namespace llvm { |
20 | |
21 | // Helper functions for extracting fields from encoded instructions. |
22 | // InsnType must either be integral or an APInt-like object that must: |
23 | // * be default-constructible and copy-constructible |
24 | // * be constructible from an APInt (this can be private) |
25 | // * Support insertBits(bits, startBit, numBits) |
26 | // * Support extractBitsAsZExtValue(numBits, startBit) |
27 | // * Support the ~, &, ==, and != operators with other objects of the same type |
28 | // * Support the != and bitwise & with uint64_t |
29 | // * Support put (<<) to raw_ostream& |
30 | template <typename InsnType> |
31 | #if defined(_MSC_VER) && !defined(__clang__) |
32 | __declspec(noinline) |
33 | #endif |
34 | static std::enable_if_t<std::is_integral<InsnType>::value, InsnType> |
35 | fieldFromInstruction(const InsnType &insn, unsigned startBit, |
36 | unsigned numBits) { |
37 | assert(startBit + numBits <= 64 && "Cannot support >64-bit extractions!" ); |
38 | assert(startBit + numBits <= (sizeof(InsnType) * 8) && |
39 | "Instruction field out of bounds!" ); |
40 | InsnType fieldMask; |
41 | if (numBits == sizeof(InsnType) * 8) |
42 | fieldMask = (InsnType)(-1LL); |
43 | else |
44 | fieldMask = (((InsnType)1 << numBits) - 1) << startBit; |
45 | return (insn & fieldMask) >> startBit; |
46 | } |
47 | |
48 | template <typename InsnType> |
49 | static std::enable_if_t<!std::is_integral<InsnType>::value, uint64_t> |
50 | fieldFromInstruction(const InsnType &insn, unsigned startBit, |
51 | unsigned numBits) { |
52 | return insn.extractBitsAsZExtValue(numBits, startBit); |
53 | } |
54 | |
55 | // Helper function for inserting bits extracted from an encoded instruction into |
56 | // a field. |
57 | template <typename InsnType> |
58 | static std::enable_if_t<std::is_integral<InsnType>::value> |
59 | insertBits(InsnType &field, InsnType bits, unsigned startBit, unsigned numBits) { |
60 | assert(startBit + numBits <= sizeof field * 8); |
61 | field |= (InsnType)bits << startBit; |
62 | } |
63 | |
64 | template <typename InsnType> |
65 | static std::enable_if_t<!std::is_integral<InsnType>::value> |
66 | insertBits(InsnType &field, uint64_t bits, unsigned startBit, unsigned numBits) { |
67 | field.insertBits(bits, startBit, numBits); |
68 | } |
69 | |
70 | static bool Check(DecodeStatus &Out, DecodeStatus In) { |
71 | Out = static_cast<DecodeStatus>(Out & In); |
72 | return Out != MCDisassembler::Fail; |
73 | } |
74 | |
75 | static const uint8_t DecoderTable16[] = { |
76 | /* 0 */ MCD::OPC_ExtractField, 13, 3, // Inst{15-13} ... |
77 | /* 3 */ MCD::OPC_FilterValue, 0, 44, 1, 0, // Skip to: 308 |
78 | /* 8 */ MCD::OPC_ExtractField, 6, 7, // Inst{12-6} ... |
79 | /* 11 */ MCD::OPC_FilterValue, 64, 30, 0, 0, // Skip to: 46 |
80 | /* 16 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
81 | /* 19 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 28 |
82 | /* 24 */ MCD::OPC_Decode, 158, 4, 0, // Opcode: RRC16r |
83 | /* 28 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 37 |
84 | /* 33 */ MCD::OPC_Decode, 156, 4, 1, // Opcode: RRC16n |
85 | /* 37 */ MCD::OPC_FilterValue, 3, 30, 1, 0, // Skip to: 328 |
86 | /* 42 */ MCD::OPC_Decode, 157, 4, 1, // Opcode: RRC16p |
87 | /* 46 */ MCD::OPC_FilterValue, 65, 30, 0, 0, // Skip to: 81 |
88 | /* 51 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
89 | /* 54 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 63 |
90 | /* 59 */ MCD::OPC_Decode, 162, 4, 2, // Opcode: RRC8r |
91 | /* 63 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 72 |
92 | /* 68 */ MCD::OPC_Decode, 160, 4, 1, // Opcode: RRC8n |
93 | /* 72 */ MCD::OPC_FilterValue, 3, 251, 0, 0, // Skip to: 328 |
94 | /* 77 */ MCD::OPC_Decode, 161, 4, 1, // Opcode: RRC8p |
95 | /* 81 */ MCD::OPC_FilterValue, 66, 30, 0, 0, // Skip to: 116 |
96 | /* 86 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
97 | /* 89 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 98 |
98 | /* 94 */ MCD::OPC_Decode, 220, 4, 0, // Opcode: SWPB16r |
99 | /* 98 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 107 |
100 | /* 103 */ MCD::OPC_Decode, 218, 4, 1, // Opcode: SWPB16n |
101 | /* 107 */ MCD::OPC_FilterValue, 3, 216, 0, 0, // Skip to: 328 |
102 | /* 112 */ MCD::OPC_Decode, 219, 4, 1, // Opcode: SWPB16p |
103 | /* 116 */ MCD::OPC_FilterValue, 68, 30, 0, 0, // Skip to: 151 |
104 | /* 121 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
105 | /* 124 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 133 |
106 | /* 129 */ MCD::OPC_Decode, 150, 4, 0, // Opcode: RRA16r |
107 | /* 133 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 142 |
108 | /* 138 */ MCD::OPC_Decode, 148, 4, 1, // Opcode: RRA16n |
109 | /* 142 */ MCD::OPC_FilterValue, 3, 181, 0, 0, // Skip to: 328 |
110 | /* 147 */ MCD::OPC_Decode, 149, 4, 1, // Opcode: RRA16p |
111 | /* 151 */ MCD::OPC_FilterValue, 69, 30, 0, 0, // Skip to: 186 |
112 | /* 156 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
113 | /* 159 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 168 |
114 | /* 164 */ MCD::OPC_Decode, 154, 4, 2, // Opcode: RRA8r |
115 | /* 168 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 177 |
116 | /* 173 */ MCD::OPC_Decode, 152, 4, 1, // Opcode: RRA8n |
117 | /* 177 */ MCD::OPC_FilterValue, 3, 146, 0, 0, // Skip to: 328 |
118 | /* 182 */ MCD::OPC_Decode, 153, 4, 1, // Opcode: RRA8p |
119 | /* 186 */ MCD::OPC_FilterValue, 70, 30, 0, 0, // Skip to: 221 |
120 | /* 191 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
121 | /* 194 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 203 |
122 | /* 199 */ MCD::OPC_Decode, 168, 4, 0, // Opcode: SEXT16r |
123 | /* 203 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 212 |
124 | /* 208 */ MCD::OPC_Decode, 166, 4, 1, // Opcode: SEXT16n |
125 | /* 212 */ MCD::OPC_FilterValue, 3, 111, 0, 0, // Skip to: 328 |
126 | /* 217 */ MCD::OPC_Decode, 167, 4, 1, // Opcode: SEXT16p |
127 | /* 221 */ MCD::OPC_FilterValue, 72, 15, 0, 0, // Skip to: 241 |
128 | /* 226 */ MCD::OPC_CheckField, 4, 2, 0, 4, 0, 0, // Skip to: 237 |
129 | /* 233 */ MCD::OPC_Decode, 143, 4, 1, // Opcode: PUSH16r |
130 | /* 237 */ MCD::OPC_Decode, 141, 4, 3, // Opcode: PUSH16c |
131 | /* 241 */ MCD::OPC_FilterValue, 73, 11, 0, 0, // Skip to: 257 |
132 | /* 246 */ MCD::OPC_CheckField, 4, 2, 0, 75, 0, 0, // Skip to: 328 |
133 | /* 253 */ MCD::OPC_Decode, 144, 4, 4, // Opcode: PUSH8r |
134 | /* 257 */ MCD::OPC_FilterValue, 74, 30, 0, 0, // Skip to: 292 |
135 | /* 262 */ MCD::OPC_ExtractField, 4, 2, // Inst{5-4} ... |
136 | /* 265 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 274 |
137 | /* 270 */ MCD::OPC_Decode, 193, 3, 1, // Opcode: CALLr |
138 | /* 274 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 283 |
139 | /* 279 */ MCD::OPC_Decode, 191, 3, 1, // Opcode: CALLn |
140 | /* 283 */ MCD::OPC_FilterValue, 3, 40, 0, 0, // Skip to: 328 |
141 | /* 288 */ MCD::OPC_Decode, 192, 3, 1, // Opcode: CALLp |
142 | /* 292 */ MCD::OPC_FilterValue, 76, 31, 0, 0, // Skip to: 328 |
143 | /* 297 */ MCD::OPC_CheckField, 0, 6, 0, 24, 0, 0, // Skip to: 328 |
144 | /* 304 */ MCD::OPC_Decode, 146, 4, 5, // Opcode: RETI |
145 | /* 308 */ MCD::OPC_FilterValue, 1, 15, 0, 0, // Skip to: 328 |
146 | /* 313 */ MCD::OPC_CheckField, 10, 3, 7, 4, 0, 0, // Skip to: 324 |
147 | /* 320 */ MCD::OPC_Decode, 243, 3, 6, // Opcode: JMP |
148 | /* 324 */ MCD::OPC_Decode, 242, 3, 7, // Opcode: JCC |
149 | /* 328 */ MCD::OPC_Fail, |
150 | 0 |
151 | }; |
152 | |
153 | static const uint8_t DecoderTable32[] = { |
154 | /* 0 */ MCD::OPC_ExtractField, 4, 12, // Inst{15-4} ... |
155 | /* 3 */ MCD::OPC_FilterValue, 129, 2, 4, 0, 0, // Skip to: 13 |
156 | /* 9 */ MCD::OPC_Decode, 155, 4, 8, // Opcode: RRC16m |
157 | /* 13 */ MCD::OPC_FilterValue, 133, 2, 4, 0, 0, // Skip to: 23 |
158 | /* 19 */ MCD::OPC_Decode, 159, 4, 8, // Opcode: RRC8m |
159 | /* 23 */ MCD::OPC_FilterValue, 137, 2, 4, 0, 0, // Skip to: 33 |
160 | /* 29 */ MCD::OPC_Decode, 217, 4, 8, // Opcode: SWPB16m |
161 | /* 33 */ MCD::OPC_FilterValue, 145, 2, 4, 0, 0, // Skip to: 43 |
162 | /* 39 */ MCD::OPC_Decode, 147, 4, 8, // Opcode: RRA16m |
163 | /* 43 */ MCD::OPC_FilterValue, 149, 2, 4, 0, 0, // Skip to: 53 |
164 | /* 49 */ MCD::OPC_Decode, 151, 4, 8, // Opcode: RRA8m |
165 | /* 53 */ MCD::OPC_FilterValue, 153, 2, 4, 0, 0, // Skip to: 63 |
166 | /* 59 */ MCD::OPC_Decode, 165, 4, 8, // Opcode: SEXT16m |
167 | /* 63 */ MCD::OPC_FilterValue, 163, 2, 11, 0, 0, // Skip to: 80 |
168 | /* 69 */ MCD::OPC_CheckField, 0, 4, 0, 31, 0, 0, // Skip to: 107 |
169 | /* 76 */ MCD::OPC_Decode, 142, 4, 9, // Opcode: PUSH16i |
170 | /* 80 */ MCD::OPC_FilterValue, 169, 2, 4, 0, 0, // Skip to: 90 |
171 | /* 86 */ MCD::OPC_Decode, 190, 3, 8, // Opcode: CALLm |
172 | /* 90 */ MCD::OPC_FilterValue, 171, 2, 11, 0, 0, // Skip to: 107 |
173 | /* 96 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, 0, // Skip to: 107 |
174 | /* 103 */ MCD::OPC_Decode, 189, 3, 9, // Opcode: CALLi |
175 | /* 107 */ MCD::OPC_Fail, |
176 | 0 |
177 | }; |
178 | |
179 | static const uint8_t DecoderTableAlpha16[] = { |
180 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
181 | /* 3 */ MCD::OPC_FilterValue, 4, 32, 0, 0, // Skip to: 40 |
182 | /* 8 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
183 | /* 11 */ MCD::OPC_FilterValue, 0, 15, 0, 0, // Skip to: 31 |
184 | /* 16 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, 0, // Skip to: 27 |
185 | /* 23 */ MCD::OPC_Decode, 188, 3, 10, // Opcode: Br |
186 | /* 27 */ MCD::OPC_Decode, 254, 3, 11, // Opcode: MOV16rr |
187 | /* 31 */ MCD::OPC_FilterValue, 4, 34, 1, 0, // Skip to: 326 |
188 | /* 36 */ MCD::OPC_Decode, 137, 4, 12, // Opcode: MOV8rr |
189 | /* 40 */ MCD::OPC_FilterValue, 5, 21, 0, 0, // Skip to: 66 |
190 | /* 45 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
191 | /* 48 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 57 |
192 | /* 53 */ MCD::OPC_Decode, 178, 2, 13, // Opcode: ADD16rr |
193 | /* 57 */ MCD::OPC_FilterValue, 4, 8, 1, 0, // Skip to: 326 |
194 | /* 62 */ MCD::OPC_Decode, 190, 2, 14, // Opcode: ADD8rr |
195 | /* 66 */ MCD::OPC_FilterValue, 6, 21, 0, 0, // Skip to: 92 |
196 | /* 71 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
197 | /* 74 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 83 |
198 | /* 79 */ MCD::OPC_Decode, 202, 2, 13, // Opcode: ADDC16rr |
199 | /* 83 */ MCD::OPC_FilterValue, 4, 238, 0, 0, // Skip to: 326 |
200 | /* 88 */ MCD::OPC_Decode, 214, 2, 14, // Opcode: ADDC8rr |
201 | /* 92 */ MCD::OPC_FilterValue, 7, 21, 0, 0, // Skip to: 118 |
202 | /* 97 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
203 | /* 100 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 109 |
204 | /* 105 */ MCD::OPC_Decode, 204, 4, 13, // Opcode: SUBC16rr |
205 | /* 109 */ MCD::OPC_FilterValue, 4, 212, 0, 0, // Skip to: 326 |
206 | /* 114 */ MCD::OPC_Decode, 216, 4, 14, // Opcode: SUBC8rr |
207 | /* 118 */ MCD::OPC_FilterValue, 8, 21, 0, 0, // Skip to: 144 |
208 | /* 123 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
209 | /* 126 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 135 |
210 | /* 131 */ MCD::OPC_Decode, 180, 4, 13, // Opcode: SUB16rr |
211 | /* 135 */ MCD::OPC_FilterValue, 4, 186, 0, 0, // Skip to: 326 |
212 | /* 140 */ MCD::OPC_Decode, 192, 4, 14, // Opcode: SUB8rr |
213 | /* 144 */ MCD::OPC_FilterValue, 9, 21, 0, 0, // Skip to: 170 |
214 | /* 149 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
215 | /* 152 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 161 |
216 | /* 157 */ MCD::OPC_Decode, 205, 3, 11, // Opcode: CMP16rr |
217 | /* 161 */ MCD::OPC_FilterValue, 4, 160, 0, 0, // Skip to: 326 |
218 | /* 166 */ MCD::OPC_Decode, 217, 3, 12, // Opcode: CMP8rr |
219 | /* 170 */ MCD::OPC_FilterValue, 10, 21, 0, 0, // Skip to: 196 |
220 | /* 175 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
221 | /* 178 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 187 |
222 | /* 183 */ MCD::OPC_Decode, 229, 3, 13, // Opcode: DADD16rr |
223 | /* 187 */ MCD::OPC_FilterValue, 4, 134, 0, 0, // Skip to: 326 |
224 | /* 192 */ MCD::OPC_Decode, 241, 3, 14, // Opcode: DADD8rr |
225 | /* 196 */ MCD::OPC_FilterValue, 11, 21, 0, 0, // Skip to: 222 |
226 | /* 201 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
227 | /* 204 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 213 |
228 | /* 209 */ MCD::OPC_Decode, 173, 3, 11, // Opcode: BIT16rr |
229 | /* 213 */ MCD::OPC_FilterValue, 4, 108, 0, 0, // Skip to: 326 |
230 | /* 218 */ MCD::OPC_Decode, 185, 3, 12, // Opcode: BIT8rr |
231 | /* 222 */ MCD::OPC_FilterValue, 12, 21, 0, 0, // Skip to: 248 |
232 | /* 227 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
233 | /* 230 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 239 |
234 | /* 235 */ MCD::OPC_Decode, 253, 2, 13, // Opcode: BIC16rr |
235 | /* 239 */ MCD::OPC_FilterValue, 4, 82, 0, 0, // Skip to: 326 |
236 | /* 244 */ MCD::OPC_Decode, 137, 3, 14, // Opcode: BIC8rr |
237 | /* 248 */ MCD::OPC_FilterValue, 13, 21, 0, 0, // Skip to: 274 |
238 | /* 253 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
239 | /* 256 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 265 |
240 | /* 261 */ MCD::OPC_Decode, 149, 3, 13, // Opcode: BIS16rr |
241 | /* 265 */ MCD::OPC_FilterValue, 4, 56, 0, 0, // Skip to: 326 |
242 | /* 270 */ MCD::OPC_Decode, 161, 3, 14, // Opcode: BIS8rr |
243 | /* 274 */ MCD::OPC_FilterValue, 14, 21, 0, 0, // Skip to: 300 |
244 | /* 279 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
245 | /* 282 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 291 |
246 | /* 287 */ MCD::OPC_Decode, 240, 4, 13, // Opcode: XOR16rr |
247 | /* 291 */ MCD::OPC_FilterValue, 4, 30, 0, 0, // Skip to: 326 |
248 | /* 296 */ MCD::OPC_Decode, 252, 4, 14, // Opcode: XOR8rr |
249 | /* 300 */ MCD::OPC_FilterValue, 15, 21, 0, 0, // Skip to: 326 |
250 | /* 305 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
251 | /* 308 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 317 |
252 | /* 313 */ MCD::OPC_Decode, 229, 2, 13, // Opcode: AND16rr |
253 | /* 317 */ MCD::OPC_FilterValue, 4, 4, 0, 0, // Skip to: 326 |
254 | /* 322 */ MCD::OPC_Decode, 241, 2, 14, // Opcode: AND8rr |
255 | /* 326 */ MCD::OPC_Fail, |
256 | 0 |
257 | }; |
258 | |
259 | static const uint8_t DecoderTableAlpha32[] = { |
260 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
261 | /* 3 */ MCD::OPC_FilterValue, 4, 21, 0, 0, // Skip to: 29 |
262 | /* 8 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
263 | /* 11 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 20 |
264 | /* 16 */ MCD::OPC_Decode, 248, 3, 15, // Opcode: MOV16mr |
265 | /* 20 */ MCD::OPC_FilterValue, 12, 34, 1, 0, // Skip to: 315 |
266 | /* 25 */ MCD::OPC_Decode, 131, 4, 16, // Opcode: MOV8mr |
267 | /* 29 */ MCD::OPC_FilterValue, 5, 21, 0, 0, // Skip to: 55 |
268 | /* 34 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
269 | /* 37 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 46 |
270 | /* 42 */ MCD::OPC_Decode, 172, 2, 15, // Opcode: ADD16mr |
271 | /* 46 */ MCD::OPC_FilterValue, 12, 8, 1, 0, // Skip to: 315 |
272 | /* 51 */ MCD::OPC_Decode, 184, 2, 16, // Opcode: ADD8mr |
273 | /* 55 */ MCD::OPC_FilterValue, 6, 21, 0, 0, // Skip to: 81 |
274 | /* 60 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
275 | /* 63 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 72 |
276 | /* 68 */ MCD::OPC_Decode, 196, 2, 15, // Opcode: ADDC16mr |
277 | /* 72 */ MCD::OPC_FilterValue, 12, 238, 0, 0, // Skip to: 315 |
278 | /* 77 */ MCD::OPC_Decode, 208, 2, 16, // Opcode: ADDC8mr |
279 | /* 81 */ MCD::OPC_FilterValue, 7, 21, 0, 0, // Skip to: 107 |
280 | /* 86 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
281 | /* 89 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 98 |
282 | /* 94 */ MCD::OPC_Decode, 198, 4, 15, // Opcode: SUBC16mr |
283 | /* 98 */ MCD::OPC_FilterValue, 12, 212, 0, 0, // Skip to: 315 |
284 | /* 103 */ MCD::OPC_Decode, 210, 4, 16, // Opcode: SUBC8mr |
285 | /* 107 */ MCD::OPC_FilterValue, 8, 21, 0, 0, // Skip to: 133 |
286 | /* 112 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
287 | /* 115 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 124 |
288 | /* 120 */ MCD::OPC_Decode, 174, 4, 15, // Opcode: SUB16mr |
289 | /* 124 */ MCD::OPC_FilterValue, 12, 186, 0, 0, // Skip to: 315 |
290 | /* 129 */ MCD::OPC_Decode, 186, 4, 16, // Opcode: SUB8mr |
291 | /* 133 */ MCD::OPC_FilterValue, 9, 21, 0, 0, // Skip to: 159 |
292 | /* 138 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
293 | /* 141 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 150 |
294 | /* 146 */ MCD::OPC_Decode, 199, 3, 15, // Opcode: CMP16mr |
295 | /* 150 */ MCD::OPC_FilterValue, 12, 160, 0, 0, // Skip to: 315 |
296 | /* 155 */ MCD::OPC_Decode, 211, 3, 16, // Opcode: CMP8mr |
297 | /* 159 */ MCD::OPC_FilterValue, 10, 21, 0, 0, // Skip to: 185 |
298 | /* 164 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
299 | /* 167 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 176 |
300 | /* 172 */ MCD::OPC_Decode, 223, 3, 15, // Opcode: DADD16mr |
301 | /* 176 */ MCD::OPC_FilterValue, 12, 134, 0, 0, // Skip to: 315 |
302 | /* 181 */ MCD::OPC_Decode, 235, 3, 16, // Opcode: DADD8mr |
303 | /* 185 */ MCD::OPC_FilterValue, 11, 21, 0, 0, // Skip to: 211 |
304 | /* 190 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
305 | /* 193 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 202 |
306 | /* 198 */ MCD::OPC_Decode, 167, 3, 15, // Opcode: BIT16mr |
307 | /* 202 */ MCD::OPC_FilterValue, 12, 108, 0, 0, // Skip to: 315 |
308 | /* 207 */ MCD::OPC_Decode, 179, 3, 16, // Opcode: BIT8mr |
309 | /* 211 */ MCD::OPC_FilterValue, 12, 21, 0, 0, // Skip to: 237 |
310 | /* 216 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
311 | /* 219 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 228 |
312 | /* 224 */ MCD::OPC_Decode, 247, 2, 15, // Opcode: BIC16mr |
313 | /* 228 */ MCD::OPC_FilterValue, 12, 82, 0, 0, // Skip to: 315 |
314 | /* 233 */ MCD::OPC_Decode, 131, 3, 16, // Opcode: BIC8mr |
315 | /* 237 */ MCD::OPC_FilterValue, 13, 21, 0, 0, // Skip to: 263 |
316 | /* 242 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
317 | /* 245 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 254 |
318 | /* 250 */ MCD::OPC_Decode, 143, 3, 15, // Opcode: BIS16mr |
319 | /* 254 */ MCD::OPC_FilterValue, 12, 56, 0, 0, // Skip to: 315 |
320 | /* 259 */ MCD::OPC_Decode, 155, 3, 16, // Opcode: BIS8mr |
321 | /* 263 */ MCD::OPC_FilterValue, 14, 21, 0, 0, // Skip to: 289 |
322 | /* 268 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
323 | /* 271 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 280 |
324 | /* 276 */ MCD::OPC_Decode, 234, 4, 15, // Opcode: XOR16mr |
325 | /* 280 */ MCD::OPC_FilterValue, 12, 30, 0, 0, // Skip to: 315 |
326 | /* 285 */ MCD::OPC_Decode, 246, 4, 16, // Opcode: XOR8mr |
327 | /* 289 */ MCD::OPC_FilterValue, 15, 21, 0, 0, // Skip to: 315 |
328 | /* 294 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
329 | /* 297 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 306 |
330 | /* 302 */ MCD::OPC_Decode, 223, 2, 15, // Opcode: AND16mr |
331 | /* 306 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 315 |
332 | /* 311 */ MCD::OPC_Decode, 235, 2, 16, // Opcode: AND8mr |
333 | /* 315 */ MCD::OPC_Fail, |
334 | 0 |
335 | }; |
336 | |
337 | static const uint8_t DecoderTableBeta16[] = { |
338 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
339 | /* 3 */ MCD::OPC_FilterValue, 4, 21, 0, 0, // Skip to: 29 |
340 | /* 8 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
341 | /* 11 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 20 |
342 | /* 16 */ MCD::OPC_Decode, 249, 3, 17, // Opcode: MOV16rc |
343 | /* 20 */ MCD::OPC_FilterValue, 1, 34, 1, 0, // Skip to: 315 |
344 | /* 25 */ MCD::OPC_Decode, 132, 4, 18, // Opcode: MOV8rc |
345 | /* 29 */ MCD::OPC_FilterValue, 5, 21, 0, 0, // Skip to: 55 |
346 | /* 34 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
347 | /* 37 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 46 |
348 | /* 42 */ MCD::OPC_Decode, 173, 2, 19, // Opcode: ADD16rc |
349 | /* 46 */ MCD::OPC_FilterValue, 1, 8, 1, 0, // Skip to: 315 |
350 | /* 51 */ MCD::OPC_Decode, 185, 2, 20, // Opcode: ADD8rc |
351 | /* 55 */ MCD::OPC_FilterValue, 6, 21, 0, 0, // Skip to: 81 |
352 | /* 60 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
353 | /* 63 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 72 |
354 | /* 68 */ MCD::OPC_Decode, 197, 2, 19, // Opcode: ADDC16rc |
355 | /* 72 */ MCD::OPC_FilterValue, 1, 238, 0, 0, // Skip to: 315 |
356 | /* 77 */ MCD::OPC_Decode, 209, 2, 20, // Opcode: ADDC8rc |
357 | /* 81 */ MCD::OPC_FilterValue, 7, 21, 0, 0, // Skip to: 107 |
358 | /* 86 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
359 | /* 89 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 98 |
360 | /* 94 */ MCD::OPC_Decode, 199, 4, 19, // Opcode: SUBC16rc |
361 | /* 98 */ MCD::OPC_FilterValue, 1, 212, 0, 0, // Skip to: 315 |
362 | /* 103 */ MCD::OPC_Decode, 211, 4, 20, // Opcode: SUBC8rc |
363 | /* 107 */ MCD::OPC_FilterValue, 8, 21, 0, 0, // Skip to: 133 |
364 | /* 112 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
365 | /* 115 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 124 |
366 | /* 120 */ MCD::OPC_Decode, 175, 4, 19, // Opcode: SUB16rc |
367 | /* 124 */ MCD::OPC_FilterValue, 1, 186, 0, 0, // Skip to: 315 |
368 | /* 129 */ MCD::OPC_Decode, 187, 4, 20, // Opcode: SUB8rc |
369 | /* 133 */ MCD::OPC_FilterValue, 9, 21, 0, 0, // Skip to: 159 |
370 | /* 138 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
371 | /* 141 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 150 |
372 | /* 146 */ MCD::OPC_Decode, 200, 3, 17, // Opcode: CMP16rc |
373 | /* 150 */ MCD::OPC_FilterValue, 1, 160, 0, 0, // Skip to: 315 |
374 | /* 155 */ MCD::OPC_Decode, 212, 3, 18, // Opcode: CMP8rc |
375 | /* 159 */ MCD::OPC_FilterValue, 10, 21, 0, 0, // Skip to: 185 |
376 | /* 164 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
377 | /* 167 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 176 |
378 | /* 172 */ MCD::OPC_Decode, 224, 3, 19, // Opcode: DADD16rc |
379 | /* 176 */ MCD::OPC_FilterValue, 1, 134, 0, 0, // Skip to: 315 |
380 | /* 181 */ MCD::OPC_Decode, 236, 3, 20, // Opcode: DADD8rc |
381 | /* 185 */ MCD::OPC_FilterValue, 11, 21, 0, 0, // Skip to: 211 |
382 | /* 190 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
383 | /* 193 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 202 |
384 | /* 198 */ MCD::OPC_Decode, 168, 3, 17, // Opcode: BIT16rc |
385 | /* 202 */ MCD::OPC_FilterValue, 1, 108, 0, 0, // Skip to: 315 |
386 | /* 207 */ MCD::OPC_Decode, 180, 3, 18, // Opcode: BIT8rc |
387 | /* 211 */ MCD::OPC_FilterValue, 12, 21, 0, 0, // Skip to: 237 |
388 | /* 216 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
389 | /* 219 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 228 |
390 | /* 224 */ MCD::OPC_Decode, 248, 2, 19, // Opcode: BIC16rc |
391 | /* 228 */ MCD::OPC_FilterValue, 1, 82, 0, 0, // Skip to: 315 |
392 | /* 233 */ MCD::OPC_Decode, 132, 3, 20, // Opcode: BIC8rc |
393 | /* 237 */ MCD::OPC_FilterValue, 13, 21, 0, 0, // Skip to: 263 |
394 | /* 242 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
395 | /* 245 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 254 |
396 | /* 250 */ MCD::OPC_Decode, 144, 3, 19, // Opcode: BIS16rc |
397 | /* 254 */ MCD::OPC_FilterValue, 1, 56, 0, 0, // Skip to: 315 |
398 | /* 259 */ MCD::OPC_Decode, 156, 3, 20, // Opcode: BIS8rc |
399 | /* 263 */ MCD::OPC_FilterValue, 14, 21, 0, 0, // Skip to: 289 |
400 | /* 268 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
401 | /* 271 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 280 |
402 | /* 276 */ MCD::OPC_Decode, 235, 4, 19, // Opcode: XOR16rc |
403 | /* 280 */ MCD::OPC_FilterValue, 1, 30, 0, 0, // Skip to: 315 |
404 | /* 285 */ MCD::OPC_Decode, 247, 4, 20, // Opcode: XOR8rc |
405 | /* 289 */ MCD::OPC_FilterValue, 15, 21, 0, 0, // Skip to: 315 |
406 | /* 294 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
407 | /* 297 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 306 |
408 | /* 302 */ MCD::OPC_Decode, 224, 2, 19, // Opcode: AND16rc |
409 | /* 306 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 315 |
410 | /* 311 */ MCD::OPC_Decode, 236, 2, 20, // Opcode: AND8rc |
411 | /* 315 */ MCD::OPC_Fail, |
412 | 0 |
413 | }; |
414 | |
415 | static const uint8_t DecoderTableBeta32[] = { |
416 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
417 | /* 3 */ MCD::OPC_FilterValue, 4, 21, 0, 0, // Skip to: 29 |
418 | /* 8 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
419 | /* 11 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 20 |
420 | /* 16 */ MCD::OPC_Decode, 244, 3, 21, // Opcode: MOV16mc |
421 | /* 20 */ MCD::OPC_FilterValue, 3, 34, 1, 0, // Skip to: 315 |
422 | /* 25 */ MCD::OPC_Decode, 255, 3, 21, // Opcode: MOV8mc |
423 | /* 29 */ MCD::OPC_FilterValue, 5, 21, 0, 0, // Skip to: 55 |
424 | /* 34 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
425 | /* 37 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 46 |
426 | /* 42 */ MCD::OPC_Decode, 167, 2, 21, // Opcode: ADD16mc |
427 | /* 46 */ MCD::OPC_FilterValue, 3, 8, 1, 0, // Skip to: 315 |
428 | /* 51 */ MCD::OPC_Decode, 179, 2, 21, // Opcode: ADD8mc |
429 | /* 55 */ MCD::OPC_FilterValue, 6, 21, 0, 0, // Skip to: 81 |
430 | /* 60 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
431 | /* 63 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 72 |
432 | /* 68 */ MCD::OPC_Decode, 191, 2, 21, // Opcode: ADDC16mc |
433 | /* 72 */ MCD::OPC_FilterValue, 3, 238, 0, 0, // Skip to: 315 |
434 | /* 77 */ MCD::OPC_Decode, 203, 2, 21, // Opcode: ADDC8mc |
435 | /* 81 */ MCD::OPC_FilterValue, 7, 21, 0, 0, // Skip to: 107 |
436 | /* 86 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
437 | /* 89 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 98 |
438 | /* 94 */ MCD::OPC_Decode, 193, 4, 21, // Opcode: SUBC16mc |
439 | /* 98 */ MCD::OPC_FilterValue, 3, 212, 0, 0, // Skip to: 315 |
440 | /* 103 */ MCD::OPC_Decode, 205, 4, 21, // Opcode: SUBC8mc |
441 | /* 107 */ MCD::OPC_FilterValue, 8, 21, 0, 0, // Skip to: 133 |
442 | /* 112 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
443 | /* 115 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 124 |
444 | /* 120 */ MCD::OPC_Decode, 169, 4, 21, // Opcode: SUB16mc |
445 | /* 124 */ MCD::OPC_FilterValue, 3, 186, 0, 0, // Skip to: 315 |
446 | /* 129 */ MCD::OPC_Decode, 181, 4, 21, // Opcode: SUB8mc |
447 | /* 133 */ MCD::OPC_FilterValue, 9, 21, 0, 0, // Skip to: 159 |
448 | /* 138 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
449 | /* 141 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 150 |
450 | /* 146 */ MCD::OPC_Decode, 194, 3, 21, // Opcode: CMP16mc |
451 | /* 150 */ MCD::OPC_FilterValue, 3, 160, 0, 0, // Skip to: 315 |
452 | /* 155 */ MCD::OPC_Decode, 206, 3, 21, // Opcode: CMP8mc |
453 | /* 159 */ MCD::OPC_FilterValue, 10, 21, 0, 0, // Skip to: 185 |
454 | /* 164 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
455 | /* 167 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 176 |
456 | /* 172 */ MCD::OPC_Decode, 218, 3, 21, // Opcode: DADD16mc |
457 | /* 176 */ MCD::OPC_FilterValue, 3, 134, 0, 0, // Skip to: 315 |
458 | /* 181 */ MCD::OPC_Decode, 230, 3, 21, // Opcode: DADD8mc |
459 | /* 185 */ MCD::OPC_FilterValue, 11, 21, 0, 0, // Skip to: 211 |
460 | /* 190 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
461 | /* 193 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 202 |
462 | /* 198 */ MCD::OPC_Decode, 162, 3, 21, // Opcode: BIT16mc |
463 | /* 202 */ MCD::OPC_FilterValue, 3, 108, 0, 0, // Skip to: 315 |
464 | /* 207 */ MCD::OPC_Decode, 174, 3, 21, // Opcode: BIT8mc |
465 | /* 211 */ MCD::OPC_FilterValue, 12, 21, 0, 0, // Skip to: 237 |
466 | /* 216 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
467 | /* 219 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 228 |
468 | /* 224 */ MCD::OPC_Decode, 242, 2, 21, // Opcode: BIC16mc |
469 | /* 228 */ MCD::OPC_FilterValue, 3, 82, 0, 0, // Skip to: 315 |
470 | /* 233 */ MCD::OPC_Decode, 254, 2, 21, // Opcode: BIC8mc |
471 | /* 237 */ MCD::OPC_FilterValue, 13, 21, 0, 0, // Skip to: 263 |
472 | /* 242 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
473 | /* 245 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 254 |
474 | /* 250 */ MCD::OPC_Decode, 138, 3, 21, // Opcode: BIS16mc |
475 | /* 254 */ MCD::OPC_FilterValue, 3, 56, 0, 0, // Skip to: 315 |
476 | /* 259 */ MCD::OPC_Decode, 150, 3, 21, // Opcode: BIS8mc |
477 | /* 263 */ MCD::OPC_FilterValue, 14, 21, 0, 0, // Skip to: 289 |
478 | /* 268 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
479 | /* 271 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 280 |
480 | /* 276 */ MCD::OPC_Decode, 229, 4, 21, // Opcode: XOR16mc |
481 | /* 280 */ MCD::OPC_FilterValue, 3, 30, 0, 0, // Skip to: 315 |
482 | /* 285 */ MCD::OPC_Decode, 241, 4, 21, // Opcode: XOR8mc |
483 | /* 289 */ MCD::OPC_FilterValue, 15, 21, 0, 0, // Skip to: 315 |
484 | /* 294 */ MCD::OPC_ExtractField, 6, 2, // Inst{7-6} ... |
485 | /* 297 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 306 |
486 | /* 302 */ MCD::OPC_Decode, 218, 2, 21, // Opcode: AND16mc |
487 | /* 306 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 315 |
488 | /* 311 */ MCD::OPC_Decode, 230, 2, 21, // Opcode: AND8mc |
489 | /* 315 */ MCD::OPC_Fail, |
490 | 0 |
491 | }; |
492 | |
493 | static const uint8_t DecoderTableDelta16[] = { |
494 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
495 | /* 3 */ MCD::OPC_FilterValue, 4, 68, 0, 0, // Skip to: 76 |
496 | /* 8 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
497 | /* 11 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 20 |
498 | /* 16 */ MCD::OPC_Decode, 252, 3, 11, // Opcode: MOV16rn |
499 | /* 20 */ MCD::OPC_FilterValue, 3, 33, 0, 0, // Skip to: 58 |
500 | /* 25 */ MCD::OPC_CheckField, 8, 4, 1, 11, 0, 0, // Skip to: 43 |
501 | /* 32 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, 0, // Skip to: 43 |
502 | /* 39 */ MCD::OPC_Decode, 145, 4, 5, // Opcode: RET |
503 | /* 43 */ MCD::OPC_CheckField, 8, 4, 1, 4, 0, 0, // Skip to: 54 |
504 | /* 50 */ MCD::OPC_Decode, 140, 4, 1, // Opcode: POP16r |
505 | /* 54 */ MCD::OPC_Decode, 253, 3, 22, // Opcode: MOV16rp |
506 | /* 58 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 67 |
507 | /* 63 */ MCD::OPC_Decode, 135, 4, 23, // Opcode: MOV8rn |
508 | /* 67 */ MCD::OPC_FilterValue, 7, 232, 1, 0, // Skip to: 560 |
509 | /* 72 */ MCD::OPC_Decode, 136, 4, 24, // Opcode: MOV8rp |
510 | /* 76 */ MCD::OPC_FilterValue, 5, 39, 0, 0, // Skip to: 120 |
511 | /* 81 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
512 | /* 84 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 93 |
513 | /* 89 */ MCD::OPC_Decode, 176, 2, 13, // Opcode: ADD16rn |
514 | /* 93 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 102 |
515 | /* 98 */ MCD::OPC_Decode, 177, 2, 25, // Opcode: ADD16rp |
516 | /* 102 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 111 |
517 | /* 107 */ MCD::OPC_Decode, 188, 2, 26, // Opcode: ADD8rn |
518 | /* 111 */ MCD::OPC_FilterValue, 7, 188, 1, 0, // Skip to: 560 |
519 | /* 116 */ MCD::OPC_Decode, 189, 2, 27, // Opcode: ADD8rp |
520 | /* 120 */ MCD::OPC_FilterValue, 6, 39, 0, 0, // Skip to: 164 |
521 | /* 125 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
522 | /* 128 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 137 |
523 | /* 133 */ MCD::OPC_Decode, 200, 2, 13, // Opcode: ADDC16rn |
524 | /* 137 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 146 |
525 | /* 142 */ MCD::OPC_Decode, 201, 2, 25, // Opcode: ADDC16rp |
526 | /* 146 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 155 |
527 | /* 151 */ MCD::OPC_Decode, 212, 2, 26, // Opcode: ADDC8rn |
528 | /* 155 */ MCD::OPC_FilterValue, 7, 144, 1, 0, // Skip to: 560 |
529 | /* 160 */ MCD::OPC_Decode, 213, 2, 27, // Opcode: ADDC8rp |
530 | /* 164 */ MCD::OPC_FilterValue, 7, 39, 0, 0, // Skip to: 208 |
531 | /* 169 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
532 | /* 172 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 181 |
533 | /* 177 */ MCD::OPC_Decode, 202, 4, 13, // Opcode: SUBC16rn |
534 | /* 181 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 190 |
535 | /* 186 */ MCD::OPC_Decode, 203, 4, 25, // Opcode: SUBC16rp |
536 | /* 190 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 199 |
537 | /* 195 */ MCD::OPC_Decode, 214, 4, 26, // Opcode: SUBC8rn |
538 | /* 199 */ MCD::OPC_FilterValue, 7, 100, 1, 0, // Skip to: 560 |
539 | /* 204 */ MCD::OPC_Decode, 215, 4, 27, // Opcode: SUBC8rp |
540 | /* 208 */ MCD::OPC_FilterValue, 8, 39, 0, 0, // Skip to: 252 |
541 | /* 213 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
542 | /* 216 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 225 |
543 | /* 221 */ MCD::OPC_Decode, 178, 4, 13, // Opcode: SUB16rn |
544 | /* 225 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 234 |
545 | /* 230 */ MCD::OPC_Decode, 179, 4, 25, // Opcode: SUB16rp |
546 | /* 234 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 243 |
547 | /* 239 */ MCD::OPC_Decode, 190, 4, 26, // Opcode: SUB8rn |
548 | /* 243 */ MCD::OPC_FilterValue, 7, 56, 1, 0, // Skip to: 560 |
549 | /* 248 */ MCD::OPC_Decode, 191, 4, 27, // Opcode: SUB8rp |
550 | /* 252 */ MCD::OPC_FilterValue, 9, 39, 0, 0, // Skip to: 296 |
551 | /* 257 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
552 | /* 260 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 269 |
553 | /* 265 */ MCD::OPC_Decode, 203, 3, 11, // Opcode: CMP16rn |
554 | /* 269 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 278 |
555 | /* 274 */ MCD::OPC_Decode, 204, 3, 11, // Opcode: CMP16rp |
556 | /* 278 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 287 |
557 | /* 283 */ MCD::OPC_Decode, 215, 3, 23, // Opcode: CMP8rn |
558 | /* 287 */ MCD::OPC_FilterValue, 7, 12, 1, 0, // Skip to: 560 |
559 | /* 292 */ MCD::OPC_Decode, 216, 3, 23, // Opcode: CMP8rp |
560 | /* 296 */ MCD::OPC_FilterValue, 10, 39, 0, 0, // Skip to: 340 |
561 | /* 301 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
562 | /* 304 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 313 |
563 | /* 309 */ MCD::OPC_Decode, 227, 3, 13, // Opcode: DADD16rn |
564 | /* 313 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 322 |
565 | /* 318 */ MCD::OPC_Decode, 228, 3, 25, // Opcode: DADD16rp |
566 | /* 322 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 331 |
567 | /* 327 */ MCD::OPC_Decode, 239, 3, 26, // Opcode: DADD8rn |
568 | /* 331 */ MCD::OPC_FilterValue, 7, 224, 0, 0, // Skip to: 560 |
569 | /* 336 */ MCD::OPC_Decode, 240, 3, 27, // Opcode: DADD8rp |
570 | /* 340 */ MCD::OPC_FilterValue, 11, 39, 0, 0, // Skip to: 384 |
571 | /* 345 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
572 | /* 348 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 357 |
573 | /* 353 */ MCD::OPC_Decode, 171, 3, 11, // Opcode: BIT16rn |
574 | /* 357 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 366 |
575 | /* 362 */ MCD::OPC_Decode, 172, 3, 11, // Opcode: BIT16rp |
576 | /* 366 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 375 |
577 | /* 371 */ MCD::OPC_Decode, 183, 3, 23, // Opcode: BIT8rn |
578 | /* 375 */ MCD::OPC_FilterValue, 7, 180, 0, 0, // Skip to: 560 |
579 | /* 380 */ MCD::OPC_Decode, 184, 3, 23, // Opcode: BIT8rp |
580 | /* 384 */ MCD::OPC_FilterValue, 12, 39, 0, 0, // Skip to: 428 |
581 | /* 389 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
582 | /* 392 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 401 |
583 | /* 397 */ MCD::OPC_Decode, 251, 2, 13, // Opcode: BIC16rn |
584 | /* 401 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 410 |
585 | /* 406 */ MCD::OPC_Decode, 252, 2, 25, // Opcode: BIC16rp |
586 | /* 410 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 419 |
587 | /* 415 */ MCD::OPC_Decode, 135, 3, 26, // Opcode: BIC8rn |
588 | /* 419 */ MCD::OPC_FilterValue, 7, 136, 0, 0, // Skip to: 560 |
589 | /* 424 */ MCD::OPC_Decode, 136, 3, 27, // Opcode: BIC8rp |
590 | /* 428 */ MCD::OPC_FilterValue, 13, 39, 0, 0, // Skip to: 472 |
591 | /* 433 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
592 | /* 436 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 445 |
593 | /* 441 */ MCD::OPC_Decode, 147, 3, 13, // Opcode: BIS16rn |
594 | /* 445 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 454 |
595 | /* 450 */ MCD::OPC_Decode, 148, 3, 25, // Opcode: BIS16rp |
596 | /* 454 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 463 |
597 | /* 459 */ MCD::OPC_Decode, 159, 3, 26, // Opcode: BIS8rn |
598 | /* 463 */ MCD::OPC_FilterValue, 7, 92, 0, 0, // Skip to: 560 |
599 | /* 468 */ MCD::OPC_Decode, 160, 3, 27, // Opcode: BIS8rp |
600 | /* 472 */ MCD::OPC_FilterValue, 14, 39, 0, 0, // Skip to: 516 |
601 | /* 477 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
602 | /* 480 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 489 |
603 | /* 485 */ MCD::OPC_Decode, 238, 4, 13, // Opcode: XOR16rn |
604 | /* 489 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 498 |
605 | /* 494 */ MCD::OPC_Decode, 239, 4, 25, // Opcode: XOR16rp |
606 | /* 498 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 507 |
607 | /* 503 */ MCD::OPC_Decode, 250, 4, 26, // Opcode: XOR8rn |
608 | /* 507 */ MCD::OPC_FilterValue, 7, 48, 0, 0, // Skip to: 560 |
609 | /* 512 */ MCD::OPC_Decode, 251, 4, 27, // Opcode: XOR8rp |
610 | /* 516 */ MCD::OPC_FilterValue, 15, 39, 0, 0, // Skip to: 560 |
611 | /* 521 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
612 | /* 524 */ MCD::OPC_FilterValue, 2, 4, 0, 0, // Skip to: 533 |
613 | /* 529 */ MCD::OPC_Decode, 227, 2, 13, // Opcode: AND16rn |
614 | /* 533 */ MCD::OPC_FilterValue, 3, 4, 0, 0, // Skip to: 542 |
615 | /* 538 */ MCD::OPC_Decode, 228, 2, 25, // Opcode: AND16rp |
616 | /* 542 */ MCD::OPC_FilterValue, 6, 4, 0, 0, // Skip to: 551 |
617 | /* 547 */ MCD::OPC_Decode, 239, 2, 26, // Opcode: AND8rn |
618 | /* 551 */ MCD::OPC_FilterValue, 7, 4, 0, 0, // Skip to: 560 |
619 | /* 556 */ MCD::OPC_Decode, 240, 2, 27, // Opcode: AND8rp |
620 | /* 560 */ MCD::OPC_Fail, |
621 | 0 |
622 | }; |
623 | |
624 | static const uint8_t DecoderTableDelta32[] = { |
625 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
626 | /* 3 */ MCD::OPC_FilterValue, 4, 21, 0, 0, // Skip to: 29 |
627 | /* 8 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
628 | /* 11 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 20 |
629 | /* 16 */ MCD::OPC_Decode, 247, 3, 15, // Opcode: MOV16mn |
630 | /* 20 */ MCD::OPC_FilterValue, 14, 232, 1, 0, // Skip to: 513 |
631 | /* 25 */ MCD::OPC_Decode, 130, 4, 15, // Opcode: MOV8mn |
632 | /* 29 */ MCD::OPC_FilterValue, 5, 39, 0, 0, // Skip to: 73 |
633 | /* 34 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
634 | /* 37 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 46 |
635 | /* 42 */ MCD::OPC_Decode, 170, 2, 15, // Opcode: ADD16mn |
636 | /* 46 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 55 |
637 | /* 51 */ MCD::OPC_Decode, 171, 2, 15, // Opcode: ADD16mp |
638 | /* 55 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 64 |
639 | /* 60 */ MCD::OPC_Decode, 182, 2, 15, // Opcode: ADD8mn |
640 | /* 64 */ MCD::OPC_FilterValue, 15, 188, 1, 0, // Skip to: 513 |
641 | /* 69 */ MCD::OPC_Decode, 183, 2, 15, // Opcode: ADD8mp |
642 | /* 73 */ MCD::OPC_FilterValue, 6, 39, 0, 0, // Skip to: 117 |
643 | /* 78 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
644 | /* 81 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 90 |
645 | /* 86 */ MCD::OPC_Decode, 194, 2, 15, // Opcode: ADDC16mn |
646 | /* 90 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 99 |
647 | /* 95 */ MCD::OPC_Decode, 195, 2, 15, // Opcode: ADDC16mp |
648 | /* 99 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 108 |
649 | /* 104 */ MCD::OPC_Decode, 206, 2, 15, // Opcode: ADDC8mn |
650 | /* 108 */ MCD::OPC_FilterValue, 15, 144, 1, 0, // Skip to: 513 |
651 | /* 113 */ MCD::OPC_Decode, 207, 2, 15, // Opcode: ADDC8mp |
652 | /* 117 */ MCD::OPC_FilterValue, 7, 39, 0, 0, // Skip to: 161 |
653 | /* 122 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
654 | /* 125 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 134 |
655 | /* 130 */ MCD::OPC_Decode, 196, 4, 15, // Opcode: SUBC16mn |
656 | /* 134 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 143 |
657 | /* 139 */ MCD::OPC_Decode, 197, 4, 15, // Opcode: SUBC16mp |
658 | /* 143 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 152 |
659 | /* 148 */ MCD::OPC_Decode, 208, 4, 15, // Opcode: SUBC8mn |
660 | /* 152 */ MCD::OPC_FilterValue, 15, 100, 1, 0, // Skip to: 513 |
661 | /* 157 */ MCD::OPC_Decode, 209, 4, 15, // Opcode: SUBC8mp |
662 | /* 161 */ MCD::OPC_FilterValue, 8, 39, 0, 0, // Skip to: 205 |
663 | /* 166 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
664 | /* 169 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 178 |
665 | /* 174 */ MCD::OPC_Decode, 172, 4, 15, // Opcode: SUB16mn |
666 | /* 178 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 187 |
667 | /* 183 */ MCD::OPC_Decode, 173, 4, 15, // Opcode: SUB16mp |
668 | /* 187 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 196 |
669 | /* 192 */ MCD::OPC_Decode, 184, 4, 15, // Opcode: SUB8mn |
670 | /* 196 */ MCD::OPC_FilterValue, 15, 56, 1, 0, // Skip to: 513 |
671 | /* 201 */ MCD::OPC_Decode, 185, 4, 15, // Opcode: SUB8mp |
672 | /* 205 */ MCD::OPC_FilterValue, 9, 39, 0, 0, // Skip to: 249 |
673 | /* 210 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
674 | /* 213 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 222 |
675 | /* 218 */ MCD::OPC_Decode, 197, 3, 15, // Opcode: CMP16mn |
676 | /* 222 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 231 |
677 | /* 227 */ MCD::OPC_Decode, 198, 3, 15, // Opcode: CMP16mp |
678 | /* 231 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 240 |
679 | /* 236 */ MCD::OPC_Decode, 209, 3, 15, // Opcode: CMP8mn |
680 | /* 240 */ MCD::OPC_FilterValue, 15, 12, 1, 0, // Skip to: 513 |
681 | /* 245 */ MCD::OPC_Decode, 210, 3, 15, // Opcode: CMP8mp |
682 | /* 249 */ MCD::OPC_FilterValue, 10, 39, 0, 0, // Skip to: 293 |
683 | /* 254 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
684 | /* 257 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 266 |
685 | /* 262 */ MCD::OPC_Decode, 221, 3, 15, // Opcode: DADD16mn |
686 | /* 266 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 275 |
687 | /* 271 */ MCD::OPC_Decode, 222, 3, 15, // Opcode: DADD16mp |
688 | /* 275 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 284 |
689 | /* 280 */ MCD::OPC_Decode, 233, 3, 15, // Opcode: DADD8mn |
690 | /* 284 */ MCD::OPC_FilterValue, 15, 224, 0, 0, // Skip to: 513 |
691 | /* 289 */ MCD::OPC_Decode, 234, 3, 15, // Opcode: DADD8mp |
692 | /* 293 */ MCD::OPC_FilterValue, 11, 39, 0, 0, // Skip to: 337 |
693 | /* 298 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
694 | /* 301 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 310 |
695 | /* 306 */ MCD::OPC_Decode, 165, 3, 15, // Opcode: BIT16mn |
696 | /* 310 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 319 |
697 | /* 315 */ MCD::OPC_Decode, 166, 3, 15, // Opcode: BIT16mp |
698 | /* 319 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 328 |
699 | /* 324 */ MCD::OPC_Decode, 177, 3, 15, // Opcode: BIT8mn |
700 | /* 328 */ MCD::OPC_FilterValue, 15, 180, 0, 0, // Skip to: 513 |
701 | /* 333 */ MCD::OPC_Decode, 178, 3, 15, // Opcode: BIT8mp |
702 | /* 337 */ MCD::OPC_FilterValue, 12, 39, 0, 0, // Skip to: 381 |
703 | /* 342 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
704 | /* 345 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 354 |
705 | /* 350 */ MCD::OPC_Decode, 245, 2, 15, // Opcode: BIC16mn |
706 | /* 354 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 363 |
707 | /* 359 */ MCD::OPC_Decode, 246, 2, 15, // Opcode: BIC16mp |
708 | /* 363 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 372 |
709 | /* 368 */ MCD::OPC_Decode, 129, 3, 15, // Opcode: BIC8mn |
710 | /* 372 */ MCD::OPC_FilterValue, 15, 136, 0, 0, // Skip to: 513 |
711 | /* 377 */ MCD::OPC_Decode, 130, 3, 15, // Opcode: BIC8mp |
712 | /* 381 */ MCD::OPC_FilterValue, 13, 39, 0, 0, // Skip to: 425 |
713 | /* 386 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
714 | /* 389 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 398 |
715 | /* 394 */ MCD::OPC_Decode, 141, 3, 15, // Opcode: BIS16mn |
716 | /* 398 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 407 |
717 | /* 403 */ MCD::OPC_Decode, 142, 3, 15, // Opcode: BIS16mp |
718 | /* 407 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 416 |
719 | /* 412 */ MCD::OPC_Decode, 153, 3, 15, // Opcode: BIS8mn |
720 | /* 416 */ MCD::OPC_FilterValue, 15, 92, 0, 0, // Skip to: 513 |
721 | /* 421 */ MCD::OPC_Decode, 154, 3, 15, // Opcode: BIS8mp |
722 | /* 425 */ MCD::OPC_FilterValue, 14, 39, 0, 0, // Skip to: 469 |
723 | /* 430 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
724 | /* 433 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 442 |
725 | /* 438 */ MCD::OPC_Decode, 232, 4, 15, // Opcode: XOR16mn |
726 | /* 442 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 451 |
727 | /* 447 */ MCD::OPC_Decode, 233, 4, 15, // Opcode: XOR16mp |
728 | /* 451 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 460 |
729 | /* 456 */ MCD::OPC_Decode, 244, 4, 15, // Opcode: XOR8mn |
730 | /* 460 */ MCD::OPC_FilterValue, 15, 48, 0, 0, // Skip to: 513 |
731 | /* 465 */ MCD::OPC_Decode, 245, 4, 15, // Opcode: XOR8mp |
732 | /* 469 */ MCD::OPC_FilterValue, 15, 39, 0, 0, // Skip to: 513 |
733 | /* 474 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
734 | /* 477 */ MCD::OPC_FilterValue, 10, 4, 0, 0, // Skip to: 486 |
735 | /* 482 */ MCD::OPC_Decode, 221, 2, 15, // Opcode: AND16mn |
736 | /* 486 */ MCD::OPC_FilterValue, 11, 4, 0, 0, // Skip to: 495 |
737 | /* 491 */ MCD::OPC_Decode, 222, 2, 15, // Opcode: AND16mp |
738 | /* 495 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 504 |
739 | /* 500 */ MCD::OPC_Decode, 233, 2, 15, // Opcode: AND8mn |
740 | /* 504 */ MCD::OPC_FilterValue, 15, 4, 0, 0, // Skip to: 513 |
741 | /* 509 */ MCD::OPC_Decode, 234, 2, 15, // Opcode: AND8mp |
742 | /* 513 */ MCD::OPC_Fail, |
743 | 0 |
744 | }; |
745 | |
746 | static const uint8_t DecoderTableGamma32[] = { |
747 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
748 | /* 3 */ MCD::OPC_FilterValue, 4, 76, 0, 0, // Skip to: 84 |
749 | /* 8 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
750 | /* 11 */ MCD::OPC_FilterValue, 1, 15, 0, 0, // Skip to: 31 |
751 | /* 16 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, 0, // Skip to: 27 |
752 | /* 23 */ MCD::OPC_Decode, 187, 3, 28, // Opcode: Bm |
753 | /* 27 */ MCD::OPC_Decode, 251, 3, 29, // Opcode: MOV16rm |
754 | /* 31 */ MCD::OPC_FilterValue, 3, 23, 0, 0, // Skip to: 59 |
755 | /* 36 */ MCD::OPC_ExtractField, 8, 4, // Inst{11-8} ... |
756 | /* 39 */ MCD::OPC_FilterValue, 0, 166, 2, 0, // Skip to: 722 |
757 | /* 44 */ MCD::OPC_CheckField, 0, 4, 0, 4, 0, 0, // Skip to: 55 |
758 | /* 51 */ MCD::OPC_Decode, 186, 3, 9, // Opcode: Bi |
759 | /* 55 */ MCD::OPC_Decode, 250, 3, 30, // Opcode: MOV16ri |
760 | /* 59 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 68 |
761 | /* 64 */ MCD::OPC_Decode, 134, 4, 31, // Opcode: MOV8rm |
762 | /* 68 */ MCD::OPC_FilterValue, 7, 137, 2, 0, // Skip to: 722 |
763 | /* 73 */ MCD::OPC_CheckField, 8, 4, 0, 130, 2, 0, // Skip to: 722 |
764 | /* 80 */ MCD::OPC_Decode, 133, 4, 32, // Opcode: MOV8ri |
765 | /* 84 */ MCD::OPC_FilterValue, 5, 53, 0, 0, // Skip to: 142 |
766 | /* 89 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
767 | /* 92 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 101 |
768 | /* 97 */ MCD::OPC_Decode, 175, 2, 33, // Opcode: ADD16rm |
769 | /* 101 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 117 |
770 | /* 106 */ MCD::OPC_CheckField, 8, 4, 0, 97, 2, 0, // Skip to: 722 |
771 | /* 113 */ MCD::OPC_Decode, 174, 2, 34, // Opcode: ADD16ri |
772 | /* 117 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 126 |
773 | /* 122 */ MCD::OPC_Decode, 187, 2, 35, // Opcode: ADD8rm |
774 | /* 126 */ MCD::OPC_FilterValue, 7, 79, 2, 0, // Skip to: 722 |
775 | /* 131 */ MCD::OPC_CheckField, 8, 4, 0, 72, 2, 0, // Skip to: 722 |
776 | /* 138 */ MCD::OPC_Decode, 186, 2, 36, // Opcode: ADD8ri |
777 | /* 142 */ MCD::OPC_FilterValue, 6, 53, 0, 0, // Skip to: 200 |
778 | /* 147 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
779 | /* 150 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 159 |
780 | /* 155 */ MCD::OPC_Decode, 199, 2, 33, // Opcode: ADDC16rm |
781 | /* 159 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 175 |
782 | /* 164 */ MCD::OPC_CheckField, 8, 4, 0, 39, 2, 0, // Skip to: 722 |
783 | /* 171 */ MCD::OPC_Decode, 198, 2, 34, // Opcode: ADDC16ri |
784 | /* 175 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 184 |
785 | /* 180 */ MCD::OPC_Decode, 211, 2, 35, // Opcode: ADDC8rm |
786 | /* 184 */ MCD::OPC_FilterValue, 7, 21, 2, 0, // Skip to: 722 |
787 | /* 189 */ MCD::OPC_CheckField, 8, 4, 0, 14, 2, 0, // Skip to: 722 |
788 | /* 196 */ MCD::OPC_Decode, 210, 2, 36, // Opcode: ADDC8ri |
789 | /* 200 */ MCD::OPC_FilterValue, 7, 53, 0, 0, // Skip to: 258 |
790 | /* 205 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
791 | /* 208 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 217 |
792 | /* 213 */ MCD::OPC_Decode, 201, 4, 33, // Opcode: SUBC16rm |
793 | /* 217 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 233 |
794 | /* 222 */ MCD::OPC_CheckField, 8, 4, 0, 237, 1, 0, // Skip to: 722 |
795 | /* 229 */ MCD::OPC_Decode, 200, 4, 34, // Opcode: SUBC16ri |
796 | /* 233 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 242 |
797 | /* 238 */ MCD::OPC_Decode, 213, 4, 35, // Opcode: SUBC8rm |
798 | /* 242 */ MCD::OPC_FilterValue, 7, 219, 1, 0, // Skip to: 722 |
799 | /* 247 */ MCD::OPC_CheckField, 8, 4, 0, 212, 1, 0, // Skip to: 722 |
800 | /* 254 */ MCD::OPC_Decode, 212, 4, 36, // Opcode: SUBC8ri |
801 | /* 258 */ MCD::OPC_FilterValue, 8, 53, 0, 0, // Skip to: 316 |
802 | /* 263 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
803 | /* 266 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 275 |
804 | /* 271 */ MCD::OPC_Decode, 177, 4, 33, // Opcode: SUB16rm |
805 | /* 275 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 291 |
806 | /* 280 */ MCD::OPC_CheckField, 8, 4, 0, 179, 1, 0, // Skip to: 722 |
807 | /* 287 */ MCD::OPC_Decode, 176, 4, 34, // Opcode: SUB16ri |
808 | /* 291 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 300 |
809 | /* 296 */ MCD::OPC_Decode, 189, 4, 35, // Opcode: SUB8rm |
810 | /* 300 */ MCD::OPC_FilterValue, 7, 161, 1, 0, // Skip to: 722 |
811 | /* 305 */ MCD::OPC_CheckField, 8, 4, 0, 154, 1, 0, // Skip to: 722 |
812 | /* 312 */ MCD::OPC_Decode, 188, 4, 36, // Opcode: SUB8ri |
813 | /* 316 */ MCD::OPC_FilterValue, 9, 53, 0, 0, // Skip to: 374 |
814 | /* 321 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
815 | /* 324 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 333 |
816 | /* 329 */ MCD::OPC_Decode, 202, 3, 29, // Opcode: CMP16rm |
817 | /* 333 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 349 |
818 | /* 338 */ MCD::OPC_CheckField, 8, 4, 0, 121, 1, 0, // Skip to: 722 |
819 | /* 345 */ MCD::OPC_Decode, 201, 3, 30, // Opcode: CMP16ri |
820 | /* 349 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 358 |
821 | /* 354 */ MCD::OPC_Decode, 214, 3, 31, // Opcode: CMP8rm |
822 | /* 358 */ MCD::OPC_FilterValue, 7, 103, 1, 0, // Skip to: 722 |
823 | /* 363 */ MCD::OPC_CheckField, 8, 4, 0, 96, 1, 0, // Skip to: 722 |
824 | /* 370 */ MCD::OPC_Decode, 213, 3, 32, // Opcode: CMP8ri |
825 | /* 374 */ MCD::OPC_FilterValue, 10, 53, 0, 0, // Skip to: 432 |
826 | /* 379 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
827 | /* 382 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 391 |
828 | /* 387 */ MCD::OPC_Decode, 226, 3, 33, // Opcode: DADD16rm |
829 | /* 391 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 407 |
830 | /* 396 */ MCD::OPC_CheckField, 8, 4, 0, 63, 1, 0, // Skip to: 722 |
831 | /* 403 */ MCD::OPC_Decode, 225, 3, 34, // Opcode: DADD16ri |
832 | /* 407 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 416 |
833 | /* 412 */ MCD::OPC_Decode, 238, 3, 35, // Opcode: DADD8rm |
834 | /* 416 */ MCD::OPC_FilterValue, 7, 45, 1, 0, // Skip to: 722 |
835 | /* 421 */ MCD::OPC_CheckField, 8, 4, 0, 38, 1, 0, // Skip to: 722 |
836 | /* 428 */ MCD::OPC_Decode, 237, 3, 36, // Opcode: DADD8ri |
837 | /* 432 */ MCD::OPC_FilterValue, 11, 53, 0, 0, // Skip to: 490 |
838 | /* 437 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
839 | /* 440 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 449 |
840 | /* 445 */ MCD::OPC_Decode, 170, 3, 29, // Opcode: BIT16rm |
841 | /* 449 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 465 |
842 | /* 454 */ MCD::OPC_CheckField, 8, 4, 0, 5, 1, 0, // Skip to: 722 |
843 | /* 461 */ MCD::OPC_Decode, 169, 3, 30, // Opcode: BIT16ri |
844 | /* 465 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 474 |
845 | /* 470 */ MCD::OPC_Decode, 182, 3, 31, // Opcode: BIT8rm |
846 | /* 474 */ MCD::OPC_FilterValue, 7, 243, 0, 0, // Skip to: 722 |
847 | /* 479 */ MCD::OPC_CheckField, 8, 4, 0, 236, 0, 0, // Skip to: 722 |
848 | /* 486 */ MCD::OPC_Decode, 181, 3, 32, // Opcode: BIT8ri |
849 | /* 490 */ MCD::OPC_FilterValue, 12, 53, 0, 0, // Skip to: 548 |
850 | /* 495 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
851 | /* 498 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 507 |
852 | /* 503 */ MCD::OPC_Decode, 250, 2, 33, // Opcode: BIC16rm |
853 | /* 507 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 523 |
854 | /* 512 */ MCD::OPC_CheckField, 8, 4, 0, 203, 0, 0, // Skip to: 722 |
855 | /* 519 */ MCD::OPC_Decode, 249, 2, 34, // Opcode: BIC16ri |
856 | /* 523 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 532 |
857 | /* 528 */ MCD::OPC_Decode, 134, 3, 35, // Opcode: BIC8rm |
858 | /* 532 */ MCD::OPC_FilterValue, 7, 185, 0, 0, // Skip to: 722 |
859 | /* 537 */ MCD::OPC_CheckField, 8, 4, 0, 178, 0, 0, // Skip to: 722 |
860 | /* 544 */ MCD::OPC_Decode, 133, 3, 36, // Opcode: BIC8ri |
861 | /* 548 */ MCD::OPC_FilterValue, 13, 53, 0, 0, // Skip to: 606 |
862 | /* 553 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
863 | /* 556 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 565 |
864 | /* 561 */ MCD::OPC_Decode, 146, 3, 33, // Opcode: BIS16rm |
865 | /* 565 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 581 |
866 | /* 570 */ MCD::OPC_CheckField, 8, 4, 0, 145, 0, 0, // Skip to: 722 |
867 | /* 577 */ MCD::OPC_Decode, 145, 3, 34, // Opcode: BIS16ri |
868 | /* 581 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 590 |
869 | /* 586 */ MCD::OPC_Decode, 158, 3, 35, // Opcode: BIS8rm |
870 | /* 590 */ MCD::OPC_FilterValue, 7, 127, 0, 0, // Skip to: 722 |
871 | /* 595 */ MCD::OPC_CheckField, 8, 4, 0, 120, 0, 0, // Skip to: 722 |
872 | /* 602 */ MCD::OPC_Decode, 157, 3, 36, // Opcode: BIS8ri |
873 | /* 606 */ MCD::OPC_FilterValue, 14, 53, 0, 0, // Skip to: 664 |
874 | /* 611 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
875 | /* 614 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 623 |
876 | /* 619 */ MCD::OPC_Decode, 237, 4, 33, // Opcode: XOR16rm |
877 | /* 623 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 639 |
878 | /* 628 */ MCD::OPC_CheckField, 8, 4, 0, 87, 0, 0, // Skip to: 722 |
879 | /* 635 */ MCD::OPC_Decode, 236, 4, 34, // Opcode: XOR16ri |
880 | /* 639 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 648 |
881 | /* 644 */ MCD::OPC_Decode, 249, 4, 35, // Opcode: XOR8rm |
882 | /* 648 */ MCD::OPC_FilterValue, 7, 69, 0, 0, // Skip to: 722 |
883 | /* 653 */ MCD::OPC_CheckField, 8, 4, 0, 62, 0, 0, // Skip to: 722 |
884 | /* 660 */ MCD::OPC_Decode, 248, 4, 36, // Opcode: XOR8ri |
885 | /* 664 */ MCD::OPC_FilterValue, 15, 53, 0, 0, // Skip to: 722 |
886 | /* 669 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
887 | /* 672 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 681 |
888 | /* 677 */ MCD::OPC_Decode, 226, 2, 33, // Opcode: AND16rm |
889 | /* 681 */ MCD::OPC_FilterValue, 3, 11, 0, 0, // Skip to: 697 |
890 | /* 686 */ MCD::OPC_CheckField, 8, 4, 0, 29, 0, 0, // Skip to: 722 |
891 | /* 693 */ MCD::OPC_Decode, 225, 2, 34, // Opcode: AND16ri |
892 | /* 697 */ MCD::OPC_FilterValue, 5, 4, 0, 0, // Skip to: 706 |
893 | /* 702 */ MCD::OPC_Decode, 238, 2, 35, // Opcode: AND8rm |
894 | /* 706 */ MCD::OPC_FilterValue, 7, 11, 0, 0, // Skip to: 722 |
895 | /* 711 */ MCD::OPC_CheckField, 8, 4, 0, 4, 0, 0, // Skip to: 722 |
896 | /* 718 */ MCD::OPC_Decode, 237, 2, 36, // Opcode: AND8ri |
897 | /* 722 */ MCD::OPC_Fail, |
898 | 0 |
899 | }; |
900 | |
901 | static const uint8_t DecoderTableGamma48[] = { |
902 | /* 0 */ MCD::OPC_ExtractField, 12, 4, // Inst{15-12} ... |
903 | /* 3 */ MCD::OPC_FilterValue, 4, 53, 0, 0, // Skip to: 61 |
904 | /* 8 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
905 | /* 11 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 20 |
906 | /* 16 */ MCD::OPC_Decode, 246, 3, 37, // Opcode: MOV16mm |
907 | /* 20 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 36 |
908 | /* 25 */ MCD::OPC_CheckField, 8, 4, 0, 155, 2, 0, // Skip to: 699 |
909 | /* 32 */ MCD::OPC_Decode, 245, 3, 38, // Opcode: MOV16mi |
910 | /* 36 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 45 |
911 | /* 41 */ MCD::OPC_Decode, 129, 4, 37, // Opcode: MOV8mm |
912 | /* 45 */ MCD::OPC_FilterValue, 15, 137, 2, 0, // Skip to: 699 |
913 | /* 50 */ MCD::OPC_CheckField, 8, 4, 0, 130, 2, 0, // Skip to: 699 |
914 | /* 57 */ MCD::OPC_Decode, 128, 4, 38, // Opcode: MOV8mi |
915 | /* 61 */ MCD::OPC_FilterValue, 5, 53, 0, 0, // Skip to: 119 |
916 | /* 66 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
917 | /* 69 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 78 |
918 | /* 74 */ MCD::OPC_Decode, 169, 2, 37, // Opcode: ADD16mm |
919 | /* 78 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 94 |
920 | /* 83 */ MCD::OPC_CheckField, 8, 4, 0, 97, 2, 0, // Skip to: 699 |
921 | /* 90 */ MCD::OPC_Decode, 168, 2, 38, // Opcode: ADD16mi |
922 | /* 94 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 103 |
923 | /* 99 */ MCD::OPC_Decode, 181, 2, 37, // Opcode: ADD8mm |
924 | /* 103 */ MCD::OPC_FilterValue, 15, 79, 2, 0, // Skip to: 699 |
925 | /* 108 */ MCD::OPC_CheckField, 8, 4, 0, 72, 2, 0, // Skip to: 699 |
926 | /* 115 */ MCD::OPC_Decode, 180, 2, 38, // Opcode: ADD8mi |
927 | /* 119 */ MCD::OPC_FilterValue, 6, 53, 0, 0, // Skip to: 177 |
928 | /* 124 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
929 | /* 127 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 136 |
930 | /* 132 */ MCD::OPC_Decode, 193, 2, 37, // Opcode: ADDC16mm |
931 | /* 136 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 152 |
932 | /* 141 */ MCD::OPC_CheckField, 8, 4, 0, 39, 2, 0, // Skip to: 699 |
933 | /* 148 */ MCD::OPC_Decode, 192, 2, 38, // Opcode: ADDC16mi |
934 | /* 152 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 161 |
935 | /* 157 */ MCD::OPC_Decode, 205, 2, 37, // Opcode: ADDC8mm |
936 | /* 161 */ MCD::OPC_FilterValue, 15, 21, 2, 0, // Skip to: 699 |
937 | /* 166 */ MCD::OPC_CheckField, 8, 4, 0, 14, 2, 0, // Skip to: 699 |
938 | /* 173 */ MCD::OPC_Decode, 204, 2, 38, // Opcode: ADDC8mi |
939 | /* 177 */ MCD::OPC_FilterValue, 7, 53, 0, 0, // Skip to: 235 |
940 | /* 182 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
941 | /* 185 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 194 |
942 | /* 190 */ MCD::OPC_Decode, 195, 4, 37, // Opcode: SUBC16mm |
943 | /* 194 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 210 |
944 | /* 199 */ MCD::OPC_CheckField, 8, 4, 0, 237, 1, 0, // Skip to: 699 |
945 | /* 206 */ MCD::OPC_Decode, 194, 4, 38, // Opcode: SUBC16mi |
946 | /* 210 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 219 |
947 | /* 215 */ MCD::OPC_Decode, 207, 4, 37, // Opcode: SUBC8mm |
948 | /* 219 */ MCD::OPC_FilterValue, 15, 219, 1, 0, // Skip to: 699 |
949 | /* 224 */ MCD::OPC_CheckField, 8, 4, 0, 212, 1, 0, // Skip to: 699 |
950 | /* 231 */ MCD::OPC_Decode, 206, 4, 38, // Opcode: SUBC8mi |
951 | /* 235 */ MCD::OPC_FilterValue, 8, 53, 0, 0, // Skip to: 293 |
952 | /* 240 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
953 | /* 243 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 252 |
954 | /* 248 */ MCD::OPC_Decode, 171, 4, 37, // Opcode: SUB16mm |
955 | /* 252 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 268 |
956 | /* 257 */ MCD::OPC_CheckField, 8, 4, 0, 179, 1, 0, // Skip to: 699 |
957 | /* 264 */ MCD::OPC_Decode, 170, 4, 38, // Opcode: SUB16mi |
958 | /* 268 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 277 |
959 | /* 273 */ MCD::OPC_Decode, 183, 4, 37, // Opcode: SUB8mm |
960 | /* 277 */ MCD::OPC_FilterValue, 15, 161, 1, 0, // Skip to: 699 |
961 | /* 282 */ MCD::OPC_CheckField, 8, 4, 0, 154, 1, 0, // Skip to: 699 |
962 | /* 289 */ MCD::OPC_Decode, 182, 4, 38, // Opcode: SUB8mi |
963 | /* 293 */ MCD::OPC_FilterValue, 9, 53, 0, 0, // Skip to: 351 |
964 | /* 298 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
965 | /* 301 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 310 |
966 | /* 306 */ MCD::OPC_Decode, 196, 3, 37, // Opcode: CMP16mm |
967 | /* 310 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 326 |
968 | /* 315 */ MCD::OPC_CheckField, 8, 4, 0, 121, 1, 0, // Skip to: 699 |
969 | /* 322 */ MCD::OPC_Decode, 195, 3, 38, // Opcode: CMP16mi |
970 | /* 326 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 335 |
971 | /* 331 */ MCD::OPC_Decode, 208, 3, 37, // Opcode: CMP8mm |
972 | /* 335 */ MCD::OPC_FilterValue, 15, 103, 1, 0, // Skip to: 699 |
973 | /* 340 */ MCD::OPC_CheckField, 8, 4, 0, 96, 1, 0, // Skip to: 699 |
974 | /* 347 */ MCD::OPC_Decode, 207, 3, 38, // Opcode: CMP8mi |
975 | /* 351 */ MCD::OPC_FilterValue, 10, 53, 0, 0, // Skip to: 409 |
976 | /* 356 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
977 | /* 359 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 368 |
978 | /* 364 */ MCD::OPC_Decode, 220, 3, 37, // Opcode: DADD16mm |
979 | /* 368 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 384 |
980 | /* 373 */ MCD::OPC_CheckField, 8, 4, 0, 63, 1, 0, // Skip to: 699 |
981 | /* 380 */ MCD::OPC_Decode, 219, 3, 38, // Opcode: DADD16mi |
982 | /* 384 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 393 |
983 | /* 389 */ MCD::OPC_Decode, 232, 3, 37, // Opcode: DADD8mm |
984 | /* 393 */ MCD::OPC_FilterValue, 15, 45, 1, 0, // Skip to: 699 |
985 | /* 398 */ MCD::OPC_CheckField, 8, 4, 0, 38, 1, 0, // Skip to: 699 |
986 | /* 405 */ MCD::OPC_Decode, 231, 3, 38, // Opcode: DADD8mi |
987 | /* 409 */ MCD::OPC_FilterValue, 11, 53, 0, 0, // Skip to: 467 |
988 | /* 414 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
989 | /* 417 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 426 |
990 | /* 422 */ MCD::OPC_Decode, 164, 3, 37, // Opcode: BIT16mm |
991 | /* 426 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 442 |
992 | /* 431 */ MCD::OPC_CheckField, 8, 4, 0, 5, 1, 0, // Skip to: 699 |
993 | /* 438 */ MCD::OPC_Decode, 163, 3, 38, // Opcode: BIT16mi |
994 | /* 442 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 451 |
995 | /* 447 */ MCD::OPC_Decode, 176, 3, 37, // Opcode: BIT8mm |
996 | /* 451 */ MCD::OPC_FilterValue, 15, 243, 0, 0, // Skip to: 699 |
997 | /* 456 */ MCD::OPC_CheckField, 8, 4, 0, 236, 0, 0, // Skip to: 699 |
998 | /* 463 */ MCD::OPC_Decode, 175, 3, 38, // Opcode: BIT8mi |
999 | /* 467 */ MCD::OPC_FilterValue, 12, 53, 0, 0, // Skip to: 525 |
1000 | /* 472 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
1001 | /* 475 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 484 |
1002 | /* 480 */ MCD::OPC_Decode, 244, 2, 37, // Opcode: BIC16mm |
1003 | /* 484 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 500 |
1004 | /* 489 */ MCD::OPC_CheckField, 8, 4, 0, 203, 0, 0, // Skip to: 699 |
1005 | /* 496 */ MCD::OPC_Decode, 243, 2, 38, // Opcode: BIC16mi |
1006 | /* 500 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 509 |
1007 | /* 505 */ MCD::OPC_Decode, 128, 3, 37, // Opcode: BIC8mm |
1008 | /* 509 */ MCD::OPC_FilterValue, 15, 185, 0, 0, // Skip to: 699 |
1009 | /* 514 */ MCD::OPC_CheckField, 8, 4, 0, 178, 0, 0, // Skip to: 699 |
1010 | /* 521 */ MCD::OPC_Decode, 255, 2, 38, // Opcode: BIC8mi |
1011 | /* 525 */ MCD::OPC_FilterValue, 13, 53, 0, 0, // Skip to: 583 |
1012 | /* 530 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
1013 | /* 533 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 542 |
1014 | /* 538 */ MCD::OPC_Decode, 140, 3, 37, // Opcode: BIS16mm |
1015 | /* 542 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 558 |
1016 | /* 547 */ MCD::OPC_CheckField, 8, 4, 0, 145, 0, 0, // Skip to: 699 |
1017 | /* 554 */ MCD::OPC_Decode, 139, 3, 38, // Opcode: BIS16mi |
1018 | /* 558 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 567 |
1019 | /* 563 */ MCD::OPC_Decode, 152, 3, 37, // Opcode: BIS8mm |
1020 | /* 567 */ MCD::OPC_FilterValue, 15, 127, 0, 0, // Skip to: 699 |
1021 | /* 572 */ MCD::OPC_CheckField, 8, 4, 0, 120, 0, 0, // Skip to: 699 |
1022 | /* 579 */ MCD::OPC_Decode, 151, 3, 38, // Opcode: BIS8mi |
1023 | /* 583 */ MCD::OPC_FilterValue, 14, 53, 0, 0, // Skip to: 641 |
1024 | /* 588 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
1025 | /* 591 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 600 |
1026 | /* 596 */ MCD::OPC_Decode, 231, 4, 37, // Opcode: XOR16mm |
1027 | /* 600 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 616 |
1028 | /* 605 */ MCD::OPC_CheckField, 8, 4, 0, 87, 0, 0, // Skip to: 699 |
1029 | /* 612 */ MCD::OPC_Decode, 230, 4, 38, // Opcode: XOR16mi |
1030 | /* 616 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 625 |
1031 | /* 621 */ MCD::OPC_Decode, 243, 4, 37, // Opcode: XOR8mm |
1032 | /* 625 */ MCD::OPC_FilterValue, 15, 69, 0, 0, // Skip to: 699 |
1033 | /* 630 */ MCD::OPC_CheckField, 8, 4, 0, 62, 0, 0, // Skip to: 699 |
1034 | /* 637 */ MCD::OPC_Decode, 242, 4, 38, // Opcode: XOR8mi |
1035 | /* 641 */ MCD::OPC_FilterValue, 15, 53, 0, 0, // Skip to: 699 |
1036 | /* 646 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ... |
1037 | /* 649 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 658 |
1038 | /* 654 */ MCD::OPC_Decode, 220, 2, 37, // Opcode: AND16mm |
1039 | /* 658 */ MCD::OPC_FilterValue, 11, 11, 0, 0, // Skip to: 674 |
1040 | /* 663 */ MCD::OPC_CheckField, 8, 4, 0, 29, 0, 0, // Skip to: 699 |
1041 | /* 670 */ MCD::OPC_Decode, 219, 2, 38, // Opcode: AND16mi |
1042 | /* 674 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 683 |
1043 | /* 679 */ MCD::OPC_Decode, 232, 2, 37, // Opcode: AND8mm |
1044 | /* 683 */ MCD::OPC_FilterValue, 15, 11, 0, 0, // Skip to: 699 |
1045 | /* 688 */ MCD::OPC_CheckField, 8, 4, 0, 4, 0, 0, // Skip to: 699 |
1046 | /* 695 */ MCD::OPC_Decode, 231, 2, 38, // Opcode: AND8mi |
1047 | /* 699 */ MCD::OPC_Fail, |
1048 | 0 |
1049 | }; |
1050 | |
1051 | static bool checkDecoderPredicate(unsigned Idx, const FeatureBitset &Bits) { |
1052 | llvm_unreachable("Invalid index!" ); |
1053 | } |
1054 | |
1055 | template <typename InsnType> |
1056 | static DecodeStatus decodeToMCInst(DecodeStatus S, unsigned Idx, InsnType insn, MCInst &MI, |
1057 | uint64_t Address, const MCDisassembler *Decoder, bool &DecodeComplete) { |
1058 | DecodeComplete = true; |
1059 | using TmpType = std::conditional_t<std::is_integral<InsnType>::value, InsnType, uint64_t>; |
1060 | TmpType tmp; |
1061 | switch (Idx) { |
1062 | default: llvm_unreachable("Invalid index!" ); |
1063 | case 0: |
1064 | tmp = fieldFromInstruction(insn, 0, 4); |
1065 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1066 | tmp = fieldFromInstruction(insn, 0, 4); |
1067 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1068 | return S; |
1069 | case 1: |
1070 | tmp = fieldFromInstruction(insn, 0, 4); |
1071 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1072 | return S; |
1073 | case 2: |
1074 | tmp = fieldFromInstruction(insn, 0, 4); |
1075 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1076 | tmp = fieldFromInstruction(insn, 0, 4); |
1077 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1078 | return S; |
1079 | case 3: |
1080 | tmp = fieldFromInstruction(insn, 0, 6); |
1081 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1082 | return S; |
1083 | case 4: |
1084 | tmp = fieldFromInstruction(insn, 0, 4); |
1085 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1086 | return S; |
1087 | case 5: |
1088 | return S; |
1089 | case 6: |
1090 | tmp = fieldFromInstruction(insn, 0, 10); |
1091 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1092 | return S; |
1093 | case 7: |
1094 | tmp = fieldFromInstruction(insn, 0, 10); |
1095 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1096 | tmp = fieldFromInstruction(insn, 10, 3); |
1097 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1098 | return S; |
1099 | case 8: |
1100 | tmp = 0x0; |
1101 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
1102 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1103 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1104 | return S; |
1105 | case 9: |
1106 | tmp = fieldFromInstruction(insn, 16, 16); |
1107 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1108 | return S; |
1109 | case 10: |
1110 | tmp = fieldFromInstruction(insn, 8, 4); |
1111 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1112 | return S; |
1113 | case 11: |
1114 | tmp = fieldFromInstruction(insn, 0, 4); |
1115 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1116 | tmp = fieldFromInstruction(insn, 8, 4); |
1117 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1118 | return S; |
1119 | case 12: |
1120 | tmp = fieldFromInstruction(insn, 0, 4); |
1121 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1122 | tmp = fieldFromInstruction(insn, 8, 4); |
1123 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1124 | return S; |
1125 | case 13: |
1126 | tmp = fieldFromInstruction(insn, 0, 4); |
1127 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1128 | tmp = fieldFromInstruction(insn, 0, 4); |
1129 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1130 | tmp = fieldFromInstruction(insn, 8, 4); |
1131 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1132 | return S; |
1133 | case 14: |
1134 | tmp = fieldFromInstruction(insn, 0, 4); |
1135 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1136 | tmp = fieldFromInstruction(insn, 0, 4); |
1137 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1138 | tmp = fieldFromInstruction(insn, 8, 4); |
1139 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1140 | return S; |
1141 | case 15: |
1142 | tmp = 0x0; |
1143 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
1144 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1145 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1146 | tmp = fieldFromInstruction(insn, 8, 4); |
1147 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1148 | return S; |
1149 | case 16: |
1150 | tmp = 0x0; |
1151 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
1152 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1153 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1154 | tmp = fieldFromInstruction(insn, 8, 4); |
1155 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1156 | return S; |
1157 | case 17: |
1158 | tmp = fieldFromInstruction(insn, 0, 4); |
1159 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1160 | tmp = 0x0; |
1161 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
1162 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1163 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1164 | return S; |
1165 | case 18: |
1166 | tmp = fieldFromInstruction(insn, 0, 4); |
1167 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1168 | tmp = 0x0; |
1169 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
1170 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1171 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1172 | return S; |
1173 | case 19: |
1174 | tmp = fieldFromInstruction(insn, 0, 4); |
1175 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1176 | tmp = fieldFromInstruction(insn, 0, 4); |
1177 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1178 | tmp = 0x0; |
1179 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
1180 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1181 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1182 | return S; |
1183 | case 20: |
1184 | tmp = fieldFromInstruction(insn, 0, 4); |
1185 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1186 | tmp = fieldFromInstruction(insn, 0, 4); |
1187 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1188 | tmp = 0x0; |
1189 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
1190 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1191 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1192 | return S; |
1193 | case 21: |
1194 | tmp = 0x0; |
1195 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
1196 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1197 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1198 | tmp = 0x0; |
1199 | insertBits(tmp, fieldFromInstruction(insn, 4, 2), 4, 2); |
1200 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1201 | if (!Check(S, DecodeCGImm(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1202 | return S; |
1203 | case 22: |
1204 | tmp = fieldFromInstruction(insn, 0, 4); |
1205 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1206 | tmp = fieldFromInstruction(insn, 8, 4); |
1207 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1208 | tmp = fieldFromInstruction(insn, 8, 4); |
1209 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1210 | return S; |
1211 | case 23: |
1212 | tmp = fieldFromInstruction(insn, 0, 4); |
1213 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1214 | tmp = fieldFromInstruction(insn, 8, 4); |
1215 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1216 | return S; |
1217 | case 24: |
1218 | tmp = fieldFromInstruction(insn, 0, 4); |
1219 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1220 | tmp = fieldFromInstruction(insn, 8, 4); |
1221 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1222 | tmp = fieldFromInstruction(insn, 8, 4); |
1223 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1224 | return S; |
1225 | case 25: |
1226 | tmp = fieldFromInstruction(insn, 0, 4); |
1227 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1228 | tmp = fieldFromInstruction(insn, 8, 4); |
1229 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1230 | tmp = fieldFromInstruction(insn, 0, 4); |
1231 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1232 | tmp = fieldFromInstruction(insn, 8, 4); |
1233 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1234 | return S; |
1235 | case 26: |
1236 | tmp = fieldFromInstruction(insn, 0, 4); |
1237 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1238 | tmp = fieldFromInstruction(insn, 0, 4); |
1239 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1240 | tmp = fieldFromInstruction(insn, 8, 4); |
1241 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1242 | return S; |
1243 | case 27: |
1244 | tmp = fieldFromInstruction(insn, 0, 4); |
1245 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1246 | tmp = fieldFromInstruction(insn, 8, 4); |
1247 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1248 | tmp = fieldFromInstruction(insn, 0, 4); |
1249 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1250 | tmp = fieldFromInstruction(insn, 8, 4); |
1251 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1252 | return S; |
1253 | case 28: |
1254 | tmp = 0x0; |
1255 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1256 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1257 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1258 | return S; |
1259 | case 29: |
1260 | tmp = fieldFromInstruction(insn, 0, 4); |
1261 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1262 | tmp = 0x0; |
1263 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1264 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1265 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1266 | return S; |
1267 | case 30: |
1268 | tmp = fieldFromInstruction(insn, 0, 4); |
1269 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1270 | tmp = fieldFromInstruction(insn, 16, 16); |
1271 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1272 | return S; |
1273 | case 31: |
1274 | tmp = fieldFromInstruction(insn, 0, 4); |
1275 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1276 | tmp = 0x0; |
1277 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1278 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1279 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1280 | return S; |
1281 | case 32: |
1282 | tmp = fieldFromInstruction(insn, 0, 4); |
1283 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1284 | tmp = fieldFromInstruction(insn, 16, 16); |
1285 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1286 | return S; |
1287 | case 33: |
1288 | tmp = fieldFromInstruction(insn, 0, 4); |
1289 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1290 | tmp = fieldFromInstruction(insn, 0, 4); |
1291 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1292 | tmp = 0x0; |
1293 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1294 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1295 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1296 | return S; |
1297 | case 34: |
1298 | tmp = fieldFromInstruction(insn, 0, 4); |
1299 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1300 | tmp = fieldFromInstruction(insn, 0, 4); |
1301 | if (!Check(S, DecodeGR16RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1302 | tmp = fieldFromInstruction(insn, 16, 16); |
1303 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1304 | return S; |
1305 | case 35: |
1306 | tmp = fieldFromInstruction(insn, 0, 4); |
1307 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1308 | tmp = fieldFromInstruction(insn, 0, 4); |
1309 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1310 | tmp = 0x0; |
1311 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1312 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1313 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1314 | return S; |
1315 | case 36: |
1316 | tmp = fieldFromInstruction(insn, 0, 4); |
1317 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1318 | tmp = fieldFromInstruction(insn, 0, 4); |
1319 | if (!Check(S, DecodeGR8RegisterClass(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1320 | tmp = fieldFromInstruction(insn, 16, 16); |
1321 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1322 | return S; |
1323 | case 37: |
1324 | tmp = 0x0; |
1325 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
1326 | insertBits(tmp, fieldFromInstruction(insn, 32, 16), 4, 16); |
1327 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1328 | tmp = 0x0; |
1329 | insertBits(tmp, fieldFromInstruction(insn, 8, 4), 0, 4); |
1330 | insertBits(tmp, fieldFromInstruction(insn, 16, 16), 4, 16); |
1331 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1332 | return S; |
1333 | case 38: |
1334 | tmp = 0x0; |
1335 | insertBits(tmp, fieldFromInstruction(insn, 0, 4), 0, 4); |
1336 | insertBits(tmp, fieldFromInstruction(insn, 32, 16), 4, 16); |
1337 | if (!Check(S, DecodeMemOperand(MI, tmp, Address, Decoder))) { return MCDisassembler::Fail; } |
1338 | tmp = fieldFromInstruction(insn, 16, 16); |
1339 | MI.addOperand(Op: MCOperand::createImm(Val: tmp)); |
1340 | return S; |
1341 | } |
1342 | } |
1343 | |
1344 | template <typename InsnType> |
1345 | static DecodeStatus decodeInstruction(const uint8_t DecodeTable[], MCInst &MI, |
1346 | InsnType insn, uint64_t Address, |
1347 | const MCDisassembler *DisAsm, |
1348 | const MCSubtargetInfo &STI) { |
1349 | const FeatureBitset &Bits = STI.getFeatureBits(); |
1350 | |
1351 | const uint8_t *Ptr = DecodeTable; |
1352 | uint64_t CurFieldValue = 0; |
1353 | DecodeStatus S = MCDisassembler::Success; |
1354 | while (true) { |
1355 | ptrdiff_t Loc = Ptr - DecodeTable; |
1356 | switch (*Ptr) { |
1357 | default: |
1358 | errs() << Loc << ": Unexpected decode table opcode!\n" ; |
1359 | return MCDisassembler::Fail; |
1360 | case MCD::OPC_ExtractField: { |
1361 | // Decode the start value. |
1362 | unsigned Start = decodeULEB128AndIncUnsafe(p&: ++Ptr); |
1363 | unsigned Len = *Ptr++; |
1364 | CurFieldValue = fieldFromInstruction(insn, Start, Len); |
1365 | LLVM_DEBUG(dbgs() << Loc << ": OPC_ExtractField(" << Start << ", " |
1366 | << Len << "): " << CurFieldValue << "\n" ); |
1367 | break; |
1368 | } |
1369 | case MCD::OPC_FilterValue: { |
1370 | // Decode the field value. |
1371 | uint64_t Val = decodeULEB128AndIncUnsafe(p&: ++Ptr); |
1372 | // NumToSkip is a plain 24-bit integer. |
1373 | unsigned NumToSkip = *Ptr++; |
1374 | NumToSkip |= (*Ptr++) << 8; |
1375 | NumToSkip |= (*Ptr++) << 16; |
1376 | |
1377 | // Perform the filter operation. |
1378 | if (Val != CurFieldValue) |
1379 | Ptr += NumToSkip; |
1380 | LLVM_DEBUG(dbgs() << Loc << ": OPC_FilterValue(" << Val << ", " << NumToSkip |
1381 | << "): " << ((Val != CurFieldValue) ? "FAIL:" : "PASS:" ) |
1382 | << " continuing at " << (Ptr - DecodeTable) << "\n" ); |
1383 | |
1384 | break; |
1385 | } |
1386 | case MCD::OPC_CheckField: { |
1387 | // Decode the start value. |
1388 | unsigned Start = decodeULEB128AndIncUnsafe(p&: ++Ptr); |
1389 | unsigned Len = *Ptr; |
1390 | uint64_t FieldValue = fieldFromInstruction(insn, Start, Len); |
1391 | // Decode the field value. |
1392 | unsigned PtrLen = 0; |
1393 | uint64_t ExpectedValue = decodeULEB128(p: ++Ptr, n: &PtrLen); |
1394 | Ptr += PtrLen; |
1395 | // NumToSkip is a plain 24-bit integer. |
1396 | unsigned NumToSkip = *Ptr++; |
1397 | NumToSkip |= (*Ptr++) << 8; |
1398 | NumToSkip |= (*Ptr++) << 16; |
1399 | |
1400 | // If the actual and expected values don't match, skip. |
1401 | if (ExpectedValue != FieldValue) |
1402 | Ptr += NumToSkip; |
1403 | LLVM_DEBUG(dbgs() << Loc << ": OPC_CheckField(" << Start << ", " |
1404 | << Len << ", " << ExpectedValue << ", " << NumToSkip |
1405 | << "): FieldValue = " << FieldValue << ", ExpectedValue = " |
1406 | << ExpectedValue << ": " |
1407 | << ((ExpectedValue == FieldValue) ? "PASS\n" : "FAIL\n" )); |
1408 | break; |
1409 | } |
1410 | case MCD::OPC_CheckPredicate: { |
1411 | // Decode the Predicate Index value. |
1412 | unsigned PIdx = decodeULEB128AndIncUnsafe(p&: ++Ptr); |
1413 | // NumToSkip is a plain 24-bit integer. |
1414 | unsigned NumToSkip = *Ptr++; |
1415 | NumToSkip |= (*Ptr++) << 8; |
1416 | NumToSkip |= (*Ptr++) << 16; |
1417 | // Check the predicate. |
1418 | bool Pred; |
1419 | if (!(Pred = checkDecoderPredicate(Idx: PIdx, Bits))) |
1420 | Ptr += NumToSkip; |
1421 | (void)Pred; |
1422 | LLVM_DEBUG(dbgs() << Loc << ": OPC_CheckPredicate(" << PIdx << "): " |
1423 | << (Pred ? "PASS\n" : "FAIL\n" )); |
1424 | |
1425 | break; |
1426 | } |
1427 | case MCD::OPC_Decode: { |
1428 | // Decode the Opcode value. |
1429 | unsigned Opc = decodeULEB128AndIncUnsafe(p&: ++Ptr); |
1430 | unsigned DecodeIdx = decodeULEB128AndIncUnsafe(p&: Ptr); |
1431 | |
1432 | MI.clear(); |
1433 | MI.setOpcode(Opc); |
1434 | bool DecodeComplete; |
1435 | S = decodeToMCInst(S, DecodeIdx, insn, MI, Address, DisAsm, DecodeComplete); |
1436 | assert(DecodeComplete); |
1437 | |
1438 | LLVM_DEBUG(dbgs() << Loc << ": OPC_Decode: opcode " << Opc |
1439 | << ", using decoder " << DecodeIdx << ": " |
1440 | << (S != MCDisassembler::Fail ? "PASS" : "FAIL" ) << "\n" ); |
1441 | return S; |
1442 | } |
1443 | case MCD::OPC_TryDecode: { |
1444 | // Decode the Opcode value. |
1445 | unsigned Opc = decodeULEB128AndIncUnsafe(p&: ++Ptr); |
1446 | unsigned DecodeIdx = decodeULEB128AndIncUnsafe(p&: Ptr); |
1447 | // NumToSkip is a plain 24-bit integer. |
1448 | unsigned NumToSkip = *Ptr++; |
1449 | NumToSkip |= (*Ptr++) << 8; |
1450 | NumToSkip |= (*Ptr++) << 16; |
1451 | |
1452 | // Perform the decode operation. |
1453 | MCInst TmpMI; |
1454 | TmpMI.setOpcode(Opc); |
1455 | bool DecodeComplete; |
1456 | S = decodeToMCInst(S, DecodeIdx, insn, TmpMI, Address, DisAsm, DecodeComplete); |
1457 | LLVM_DEBUG(dbgs() << Loc << ": OPC_TryDecode: opcode " << Opc |
1458 | << ", using decoder " << DecodeIdx << ": " ); |
1459 | |
1460 | if (DecodeComplete) { |
1461 | // Decoding complete. |
1462 | LLVM_DEBUG(dbgs() << (S != MCDisassembler::Fail ? "PASS" : "FAIL" ) << "\n" ); |
1463 | MI = TmpMI; |
1464 | return S; |
1465 | } else { |
1466 | assert(S == MCDisassembler::Fail); |
1467 | // If the decoding was incomplete, skip. |
1468 | Ptr += NumToSkip; |
1469 | LLVM_DEBUG(dbgs() << "FAIL: continuing at " << (Ptr - DecodeTable) << "\n" ); |
1470 | // Reset decode status. This also drops a SoftFail status that could be |
1471 | // set before the decode attempt. |
1472 | S = MCDisassembler::Success; |
1473 | } |
1474 | break; |
1475 | } |
1476 | case MCD::OPC_SoftFail: { |
1477 | // Decode the mask values. |
1478 | uint64_t PositiveMask = decodeULEB128AndIncUnsafe(p&: ++Ptr); |
1479 | uint64_t NegativeMask = decodeULEB128AndIncUnsafe(p&: Ptr); |
1480 | bool Fail = (insn & PositiveMask) != 0 || (~insn & NegativeMask) != 0; |
1481 | if (Fail) |
1482 | S = MCDisassembler::SoftFail; |
1483 | LLVM_DEBUG(dbgs() << Loc << ": OPC_SoftFail: " << (Fail ? "FAIL\n" : "PASS\n" )); |
1484 | break; |
1485 | } |
1486 | case MCD::OPC_Fail: { |
1487 | LLVM_DEBUG(dbgs() << Loc << ": OPC_Fail\n" ); |
1488 | return MCDisassembler::Fail; |
1489 | } |
1490 | } |
1491 | } |
1492 | llvm_unreachable("bogosity detected in disassembler state machine!" ); |
1493 | } |
1494 | |
1495 | |
1496 | } // end namespace llvm |
1497 | |