Line data Source code
1 : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2 : |* *|
3 : |* * XCore Disassembler *|
4 : |* *|
5 : |* Automatically generated file, do not edit! *|
6 : |* *|
7 : \*===----------------------------------------------------------------------===*/
8 :
9 : #include "llvm/MC/MCInst.h"
10 : #include "llvm/Support/Debug.h"
11 : #include "llvm/Support/DataTypes.h"
12 : #include "llvm/Support/LEB128.h"
13 : #include "llvm/Support/raw_ostream.h"
14 : #include <assert.h>
15 :
16 : namespace llvm {
17 :
18 : // Helper function for extracting fields from encoded instructions.
19 : template<typename InsnType>
20 : #if defined(_MSC_VER) && !defined(__clang__)
21 : __declspec(noinline)
22 : #endif
23 : static InsnType fieldFromInstruction(InsnType insn, unsigned startBit,
24 : unsigned numBits) {
25 : assert(startBit + numBits <= (sizeof(InsnType)*8) &&
26 : "Instruction field out of bounds!");
27 : InsnType fieldMask;
28 432 : if (numBits == sizeof(InsnType)*8)
29 : fieldMask = (InsnType)(-1LL);
30 : else
31 432 : fieldMask = (((InsnType)1 << numBits) - 1) << startBit;
32 164 : return (insn & fieldMask) >> startBit;
33 : }
34 :
35 : static const uint8_t DecoderTable16[] = {
36 : /* 0 */ MCD::OPC_ExtractField, 11, 5, // Inst{15-11} ...
37 : /* 3 */ MCD::OPC_FilterValue, 0, 129, 0, 0, // Skip to: 137
38 : /* 8 */ MCD::OPC_ExtractField, 0, 11, // Inst{10-0} ...
39 : /* 11 */ MCD::OPC_FilterValue, 236, 15, 4, 0, 0, // Skip to: 21
40 : /* 17 */ MCD::OPC_Decode, 230, 2, 0, // Opcode: WAITEU_0R
41 : /* 21 */ MCD::OPC_FilterValue, 237, 15, 4, 0, 0, // Skip to: 31
42 : /* 27 */ MCD::OPC_Decode, 181, 1, 0, // Opcode: CLRE_0R
43 : /* 31 */ MCD::OPC_FilterValue, 238, 15, 4, 0, 0, // Skip to: 41
44 : /* 37 */ MCD::OPC_Decode, 206, 2, 0, // Opcode: SSYNC_0r
45 : /* 41 */ MCD::OPC_FilterValue, 239, 15, 4, 0, 0, // Skip to: 51
46 : /* 47 */ MCD::OPC_Decode, 213, 1, 0, // Opcode: FREET_0R
47 : /* 51 */ MCD::OPC_FilterValue, 252, 15, 4, 0, 0, // Skip to: 61
48 : /* 57 */ MCD::OPC_Decode, 190, 1, 0, // Opcode: DCALL_0R
49 : /* 61 */ MCD::OPC_FilterValue, 253, 15, 4, 0, 0, // Skip to: 71
50 : /* 67 */ MCD::OPC_Decode, 244, 1, 0, // Opcode: KRET_0R
51 : /* 71 */ MCD::OPC_FilterValue, 254, 15, 4, 0, 0, // Skip to: 81
52 : /* 77 */ MCD::OPC_Decode, 196, 1, 0, // Opcode: DRET_0R
53 : /* 81 */ MCD::OPC_FilterValue, 255, 15, 4, 0, 0, // Skip to: 91
54 : /* 87 */ MCD::OPC_Decode, 187, 2, 0, // Opcode: SETKEP_0R
55 : /* 91 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
56 : /* 94 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 103
57 : /* 99 */ MCD::OPC_Decode, 199, 1, 1, // Opcode: EDU_1r
58 : /* 103 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 112
59 : /* 108 */ MCD::OPC_Decode, 202, 1, 1, // Opcode: EEU_1r
60 : /* 112 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
61 : /* 115 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 124
62 : /* 120 */ MCD::OPC_Decode, 231, 1, 2, // Opcode: INITPC_2r
63 : /* 124 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 133
64 : /* 129 */ MCD::OPC_Decode, 225, 1, 2, // Opcode: GETST_2r
65 : /* 133 */ MCD::OPC_Decode, 217, 2, 3, // Opcode: STW_2rus
66 : /* 137 */ MCD::OPC_FilterValue, 1, 129, 0, 0, // Skip to: 271
67 : /* 142 */ MCD::OPC_ExtractField, 0, 11, // Inst{10-0} ...
68 : /* 145 */ MCD::OPC_FilterValue, 236, 15, 4, 0, 0, // Skip to: 155
69 : /* 151 */ MCD::OPC_Decode, 142, 2, 0, // Opcode: LDSPC_0R
70 : /* 155 */ MCD::OPC_FilterValue, 237, 15, 4, 0, 0, // Skip to: 165
71 : /* 161 */ MCD::OPC_Decode, 211, 2, 0, // Opcode: STSPC_0R
72 : /* 165 */ MCD::OPC_FilterValue, 238, 15, 4, 0, 0, // Skip to: 175
73 : /* 171 */ MCD::OPC_Decode, 143, 2, 0, // Opcode: LDSSR_0R
74 : /* 175 */ MCD::OPC_FilterValue, 239, 15, 4, 0, 0, // Skip to: 185
75 : /* 181 */ MCD::OPC_Decode, 212, 2, 0, // Opcode: STSSR_0R
76 : /* 185 */ MCD::OPC_FilterValue, 252, 15, 4, 0, 0, // Skip to: 195
77 : /* 191 */ MCD::OPC_Decode, 210, 2, 0, // Opcode: STSED_0R
78 : /* 195 */ MCD::OPC_FilterValue, 253, 15, 4, 0, 0, // Skip to: 205
79 : /* 201 */ MCD::OPC_Decode, 209, 2, 0, // Opcode: STET_0R
80 : /* 205 */ MCD::OPC_FilterValue, 254, 15, 4, 0, 0, // Skip to: 215
81 : /* 211 */ MCD::OPC_Decode, 215, 1, 0, // Opcode: GETED_0R
82 : /* 215 */ MCD::OPC_FilterValue, 255, 15, 4, 0, 0, // Skip to: 225
83 : /* 221 */ MCD::OPC_Decode, 216, 1, 0, // Opcode: GETET_0R
84 : /* 225 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
85 : /* 228 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 237
86 : /* 233 */ MCD::OPC_Decode, 229, 2, 1, // Opcode: WAITET_1R
87 : /* 237 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 246
88 : /* 242 */ MCD::OPC_Decode, 228, 2, 1, // Opcode: WAITEF_1R
89 : /* 246 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
90 : /* 249 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 258
91 : /* 254 */ MCD::OPC_Decode, 229, 1, 2, // Opcode: INITDP_2r
92 : /* 258 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 267
93 : /* 263 */ MCD::OPC_Decode, 172, 2, 4, // Opcode: OUTT_2r
94 : /* 267 */ MCD::OPC_Decode, 152, 2, 3, // Opcode: LDW_2rus
95 : /* 271 */ MCD::OPC_FilterValue, 2, 119, 0, 0, // Skip to: 395
96 : /* 276 */ MCD::OPC_ExtractField, 0, 11, // Inst{10-0} ...
97 : /* 279 */ MCD::OPC_FilterValue, 236, 15, 4, 0, 0, // Skip to: 289
98 : /* 285 */ MCD::OPC_Decode, 191, 1, 0, // Opcode: DENTSP_0R
99 : /* 289 */ MCD::OPC_FilterValue, 237, 15, 4, 0, 0, // Skip to: 299
100 : /* 295 */ MCD::OPC_Decode, 195, 1, 0, // Opcode: DRESTSP_0R
101 : /* 299 */ MCD::OPC_FilterValue, 238, 15, 4, 0, 0, // Skip to: 309
102 : /* 305 */ MCD::OPC_Decode, 217, 1, 0, // Opcode: GETID_0R
103 : /* 309 */ MCD::OPC_FilterValue, 239, 15, 4, 0, 0, // Skip to: 319
104 : /* 315 */ MCD::OPC_Decode, 218, 1, 0, // Opcode: GETKEP_0R
105 : /* 319 */ MCD::OPC_FilterValue, 252, 15, 4, 0, 0, // Skip to: 329
106 : /* 325 */ MCD::OPC_Decode, 219, 1, 0, // Opcode: GETKSP_0R
107 : /* 329 */ MCD::OPC_FilterValue, 253, 15, 4, 0, 0, // Skip to: 339
108 : /* 335 */ MCD::OPC_Decode, 141, 2, 0, // Opcode: LDSED_0R
109 : /* 339 */ MCD::OPC_FilterValue, 254, 15, 4, 0, 0, // Skip to: 349
110 : /* 345 */ MCD::OPC_Decode, 139, 2, 0, // Opcode: LDET_0R
111 : /* 349 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
112 : /* 352 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 361
113 : /* 357 */ MCD::OPC_Decode, 212, 1, 1, // Opcode: FREER_1r
114 : /* 361 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 370
115 : /* 366 */ MCD::OPC_Decode, 160, 2, 1, // Opcode: MJOIN_1r
116 : /* 370 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
117 : /* 373 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 382
118 : /* 378 */ MCD::OPC_Decode, 232, 1, 2, // Opcode: INITSP_2r
119 : /* 382 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 391
120 : /* 387 */ MCD::OPC_Decode, 185, 2, 4, // Opcode: SETD_2r
121 : /* 391 */ MCD::OPC_Decode, 149, 1, 5, // Opcode: ADD_3r
122 : /* 395 */ MCD::OPC_FilterValue, 3, 46, 0, 0, // Skip to: 446
123 : /* 400 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
124 : /* 403 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 412
125 : /* 408 */ MCD::OPC_Decode, 227, 2, 1, // Opcode: TSTART_1R
126 : /* 412 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 421
127 : /* 417 */ MCD::OPC_Decode, 163, 2, 1, // Opcode: MSYNC_1r
128 : /* 421 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
129 : /* 424 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 433
130 : /* 429 */ MCD::OPC_Decode, 228, 1, 2, // Opcode: INITCP_2r
131 : /* 433 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 442
132 : /* 438 */ MCD::OPC_Decode, 225, 2, 6, // Opcode: TSETMR_2r
133 : /* 442 */ MCD::OPC_Decode, 220, 2, 5, // Opcode: SUB_3r
134 : /* 446 */ MCD::OPC_FilterValue, 4, 36, 0, 0, // Skip to: 487
135 : /* 451 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
136 : /* 454 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 463
137 : /* 459 */ MCD::OPC_Decode, 160, 1, 1, // Opcode: BLA_1r
138 : /* 463 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 472
139 : /* 468 */ MCD::OPC_Decode, 154, 1, 1, // Opcode: BAU_1r
140 : /* 472 */ MCD::OPC_CheckField, 4, 1, 1, 4, 0, 0, // Skip to: 483
141 : /* 479 */ MCD::OPC_Decode, 201, 1, 2, // Opcode: EET_2r
142 : /* 483 */ MCD::OPC_Decode, 203, 2, 5, // Opcode: SHL_3r
143 : /* 487 */ MCD::OPC_FilterValue, 5, 46, 0, 0, // Skip to: 538
144 : /* 492 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
145 : /* 495 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 504
146 : /* 500 */ MCD::OPC_Decode, 177, 1, 1, // Opcode: BRU_1r
147 : /* 504 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 513
148 : /* 509 */ MCD::OPC_Decode, 193, 2, 1, // Opcode: SETSP_1r
149 : /* 513 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
150 : /* 516 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 525
151 : /* 521 */ MCD::OPC_Decode, 150, 1, 7, // Opcode: ANDNOT_2r
152 : /* 525 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 534
153 : /* 530 */ MCD::OPC_Decode, 200, 1, 2, // Opcode: EEF_2r
154 : /* 534 */ MCD::OPC_Decode, 205, 2, 5, // Opcode: SHR_3r
155 : /* 538 */ MCD::OPC_FilterValue, 6, 46, 0, 0, // Skip to: 589
156 : /* 543 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
157 : /* 546 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 555
158 : /* 551 */ MCD::OPC_Decode, 184, 2, 1, // Opcode: SETDP_1r
159 : /* 555 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 564
160 : /* 560 */ MCD::OPC_Decode, 180, 2, 1, // Opcode: SETCP_1r
161 : /* 564 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
162 : /* 567 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 576
163 : /* 572 */ MCD::OPC_Decode, 200, 2, 7, // Opcode: SEXT_2r
164 : /* 576 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 585
165 : /* 581 */ MCD::OPC_Decode, 201, 2, 8, // Opcode: SEXT_rus
166 : /* 585 */ MCD::OPC_Decode, 207, 1, 5, // Opcode: EQ_3r
167 : /* 589 */ MCD::OPC_FilterValue, 7, 46, 0, 0, // Skip to: 640
168 : /* 594 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
169 : /* 597 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 606
170 : /* 602 */ MCD::OPC_Decode, 192, 1, 1, // Opcode: DGETREG_1r
171 : /* 606 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 615
172 : /* 611 */ MCD::OPC_Decode, 186, 2, 1, // Opcode: SETEV_1r
173 : /* 615 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
174 : /* 618 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 627
175 : /* 623 */ MCD::OPC_Decode, 226, 1, 2, // Opcode: GETTS_2r
176 : /* 627 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 636
177 : /* 632 */ MCD::OPC_Decode, 191, 2, 4, // Opcode: SETPT_2r
178 : /* 636 */ MCD::OPC_Decode, 151, 1, 5, // Opcode: AND_3r
179 : /* 640 */ MCD::OPC_FilterValue, 8, 46, 0, 0, // Skip to: 691
180 : /* 645 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
181 : /* 648 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 657
182 : /* 653 */ MCD::OPC_Decode, 237, 1, 1, // Opcode: KCALL_1r
183 : /* 657 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 666
184 : /* 662 */ MCD::OPC_Decode, 199, 2, 1, // Opcode: SETV_1r
185 : /* 666 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
186 : /* 669 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 678
187 : /* 674 */ MCD::OPC_Decode, 232, 2, 7, // Opcode: ZEXT_2r
188 : /* 678 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 687
189 : /* 683 */ MCD::OPC_Decode, 233, 2, 8, // Opcode: ZEXT_rus
190 : /* 687 */ MCD::OPC_Decode, 167, 2, 5, // Opcode: OR_3r
191 : /* 691 */ MCD::OPC_FilterValue, 9, 46, 0, 0, // Skip to: 742
192 : /* 696 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
193 : /* 699 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 708
194 : /* 704 */ MCD::OPC_Decode, 197, 1, 1, // Opcode: ECALLF_1r
195 : /* 708 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 717
196 : /* 713 */ MCD::OPC_Decode, 198, 1, 1, // Opcode: ECALLT_1r
197 : /* 717 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
198 : /* 720 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 729
199 : /* 725 */ MCD::OPC_Decode, 168, 2, 2, // Opcode: OUTCT_2r
200 : /* 729 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 738
201 : /* 734 */ MCD::OPC_Decode, 169, 2, 9, // Opcode: OUTCT_rus
202 : /* 738 */ MCD::OPC_Decode, 153, 2, 5, // Opcode: LDW_3r
203 : /* 742 */ MCD::OPC_FilterValue, 10, 21, 0, 0, // Skip to: 768
204 : /* 747 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
205 : /* 750 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 759
206 : /* 755 */ MCD::OPC_Decode, 214, 2, 10, // Opcode: STWDP_ru6
207 : /* 759 */ MCD::OPC_FilterValue, 1, 154, 2, 0, // Skip to: 1430
208 : /* 764 */ MCD::OPC_Decode, 216, 2, 10, // Opcode: STWSP_ru6
209 : /* 768 */ MCD::OPC_FilterValue, 11, 21, 0, 0, // Skip to: 794
210 : /* 773 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
211 : /* 776 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 785
212 : /* 781 */ MCD::OPC_Decode, 149, 2, 10, // Opcode: LDWDP_ru6
213 : /* 785 */ MCD::OPC_FilterValue, 1, 128, 2, 0, // Skip to: 1430
214 : /* 790 */ MCD::OPC_Decode, 151, 2, 10, // Opcode: LDWSP_ru6
215 : /* 794 */ MCD::OPC_FilterValue, 12, 21, 0, 0, // Skip to: 820
216 : /* 799 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
217 : /* 802 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 811
218 : /* 807 */ MCD::OPC_Decode, 132, 2, 10, // Opcode: LDAWDP_ru6
219 : /* 811 */ MCD::OPC_FilterValue, 1, 102, 2, 0, // Skip to: 1430
220 : /* 816 */ MCD::OPC_Decode, 136, 2, 10, // Opcode: LDAWSP_ru6
221 : /* 820 */ MCD::OPC_FilterValue, 13, 21, 0, 0, // Skip to: 846
222 : /* 825 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
223 : /* 828 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 837
224 : /* 833 */ MCD::OPC_Decode, 138, 2, 10, // Opcode: LDC_ru6
225 : /* 837 */ MCD::OPC_FilterValue, 1, 76, 2, 0, // Skip to: 1430
226 : /* 842 */ MCD::OPC_Decode, 146, 2, 10, // Opcode: LDWCP_ru6
227 : /* 846 */ MCD::OPC_FilterValue, 14, 99, 0, 0, // Skip to: 950
228 : /* 851 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
229 : /* 854 */ MCD::OPC_FilterValue, 0, 43, 0, 0, // Skip to: 902
230 : /* 859 */ MCD::OPC_ExtractField, 6, 4, // Inst{9-6} ...
231 : /* 862 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 871
232 : /* 867 */ MCD::OPC_Decode, 176, 1, 11, // Opcode: BRFU_u6
233 : /* 871 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 880
234 : /* 876 */ MCD::OPC_Decode, 159, 1, 11, // Opcode: BLAT_u6
235 : /* 880 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 889
236 : /* 885 */ MCD::OPC_Decode, 209, 1, 11, // Opcode: EXTDP_u6
237 : /* 889 */ MCD::OPC_FilterValue, 15, 4, 0, 0, // Skip to: 898
238 : /* 894 */ MCD::OPC_Decode, 239, 1, 11, // Opcode: KCALL_u6
239 : /* 898 */ MCD::OPC_Decode, 174, 1, 12, // Opcode: BRFT_ru6
240 : /* 902 */ MCD::OPC_FilterValue, 1, 11, 2, 0, // Skip to: 1430
241 : /* 907 */ MCD::OPC_ExtractField, 6, 4, // Inst{9-6} ...
242 : /* 910 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 919
243 : /* 915 */ MCD::OPC_Decode, 170, 1, 13, // Opcode: BRBU_u6
244 : /* 919 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 928
245 : /* 924 */ MCD::OPC_Decode, 205, 1, 11, // Opcode: ENTSP_u6
246 : /* 928 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 937
247 : /* 933 */ MCD::OPC_Decode, 211, 1, 11, // Opcode: EXTSP_u6
248 : /* 937 */ MCD::OPC_FilterValue, 15, 4, 0, 0, // Skip to: 946
249 : /* 942 */ MCD::OPC_Decode, 178, 2, 11, // Opcode: RETSP_u6
250 : /* 946 */ MCD::OPC_Decode, 168, 1, 14, // Opcode: BRBT_ru6
251 : /* 950 */ MCD::OPC_FilterValue, 15, 81, 0, 0, // Skip to: 1036
252 : /* 955 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
253 : /* 958 */ MCD::OPC_FilterValue, 0, 43, 0, 0, // Skip to: 1006
254 : /* 963 */ MCD::OPC_ExtractField, 6, 4, // Inst{9-6} ...
255 : /* 966 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 975
256 : /* 971 */ MCD::OPC_Decode, 186, 1, 11, // Opcode: CLRSR_u6
257 : /* 975 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 984
258 : /* 980 */ MCD::OPC_Decode, 197, 2, 11, // Opcode: SETSR_u6
259 : /* 984 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 993
260 : /* 989 */ MCD::OPC_Decode, 241, 1, 11, // Opcode: KENTSP_u6
261 : /* 993 */ MCD::OPC_FilterValue, 15, 4, 0, 0, // Skip to: 1002
262 : /* 998 */ MCD::OPC_Decode, 243, 1, 11, // Opcode: KRESTSP_u6
263 : /* 1002 */ MCD::OPC_Decode, 172, 1, 12, // Opcode: BRFF_ru6
264 : /* 1006 */ MCD::OPC_FilterValue, 1, 163, 1, 0, // Skip to: 1430
265 : /* 1011 */ MCD::OPC_ExtractField, 6, 4, // Inst{9-6} ...
266 : /* 1014 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 1023
267 : /* 1019 */ MCD::OPC_Decode, 224, 1, 11, // Opcode: GETSR_u6
268 : /* 1023 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 1032
269 : /* 1028 */ MCD::OPC_Decode, 130, 2, 11, // Opcode: LDAWCP_u6
270 : /* 1032 */ MCD::OPC_Decode, 166, 1, 14, // Opcode: BRBF_ru6
271 : /* 1036 */ MCD::OPC_FilterValue, 16, 46, 0, 0, // Skip to: 1087
272 : /* 1041 */ MCD::OPC_ExtractField, 4, 7, // Inst{10-4} ...
273 : /* 1044 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 1053
274 : /* 1049 */ MCD::OPC_Decode, 182, 1, 1, // Opcode: CLRPT_1R
275 : /* 1053 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 1062
276 : /* 1058 */ MCD::OPC_Decode, 221, 2, 1, // Opcode: SYNCR_1r
277 : /* 1062 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
278 : /* 1065 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1074
279 : /* 1070 */ MCD::OPC_Decode, 222, 1, 9, // Opcode: GETR_rus
280 : /* 1074 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1083
281 : /* 1079 */ MCD::OPC_Decode, 227, 1, 2, // Opcode: INCT_2r
282 : /* 1083 */ MCD::OPC_Decode, 246, 1, 5, // Opcode: LD16S_3r
283 : /* 1087 */ MCD::OPC_FilterValue, 17, 25, 0, 0, // Skip to: 1117
284 : /* 1092 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
285 : /* 1095 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1104
286 : /* 1100 */ MCD::OPC_Decode, 166, 2, 2, // Opcode: NOT
287 : /* 1104 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1113
288 : /* 1109 */ MCD::OPC_Decode, 235, 1, 2, // Opcode: INT_2r
289 : /* 1113 */ MCD::OPC_Decode, 247, 1, 5, // Opcode: LD8U_3r
290 : /* 1117 */ MCD::OPC_FilterValue, 18, 25, 0, 0, // Skip to: 1147
291 : /* 1122 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
292 : /* 1125 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1134
293 : /* 1130 */ MCD::OPC_Decode, 165, 2, 2, // Opcode: NEG
294 : /* 1134 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1143
295 : /* 1139 */ MCD::OPC_Decode, 203, 1, 2, // Opcode: ENDIN_2r
296 : /* 1143 */ MCD::OPC_Decode, 148, 1, 3, // Opcode: ADD_2rus
297 : /* 1147 */ MCD::OPC_FilterValue, 19, 4, 0, 0, // Skip to: 1156
298 : /* 1152 */ MCD::OPC_Decode, 219, 2, 3, // Opcode: SUB_2rus
299 : /* 1156 */ MCD::OPC_FilterValue, 20, 25, 0, 0, // Skip to: 1186
300 : /* 1161 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
301 : /* 1164 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1173
302 : /* 1169 */ MCD::OPC_Decode, 161, 2, 2, // Opcode: MKMSK_2r
303 : /* 1173 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1182
304 : /* 1178 */ MCD::OPC_Decode, 162, 2, 15, // Opcode: MKMSK_rus
305 : /* 1182 */ MCD::OPC_Decode, 202, 2, 16, // Opcode: SHL_2rus
306 : /* 1186 */ MCD::OPC_FilterValue, 21, 25, 0, 0, // Skip to: 1216
307 : /* 1191 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
308 : /* 1194 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1203
309 : /* 1199 */ MCD::OPC_Decode, 173, 2, 4, // Opcode: OUT_2r
310 : /* 1203 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1212
311 : /* 1208 */ MCD::OPC_Decode, 171, 2, 7, // Opcode: OUTSHR_2r
312 : /* 1212 */ MCD::OPC_Decode, 204, 2, 16, // Opcode: SHR_2rus
313 : /* 1216 */ MCD::OPC_FilterValue, 22, 25, 0, 0, // Skip to: 1246
314 : /* 1221 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
315 : /* 1224 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1233
316 : /* 1229 */ MCD::OPC_Decode, 236, 1, 2, // Opcode: IN_2r
317 : /* 1233 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1242
318 : /* 1238 */ MCD::OPC_Decode, 234, 1, 7, // Opcode: INSHR_2r
319 : /* 1242 */ MCD::OPC_Decode, 206, 1, 3, // Opcode: EQ_2rus
320 : /* 1246 */ MCD::OPC_FilterValue, 23, 25, 0, 0, // Skip to: 1276
321 : /* 1251 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
322 : /* 1254 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1263
323 : /* 1259 */ MCD::OPC_Decode, 174, 2, 2, // Opcode: PEEK_2r
324 : /* 1263 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1272
325 : /* 1268 */ MCD::OPC_Decode, 222, 2, 2, // Opcode: TESTCT_2r
326 : /* 1272 */ MCD::OPC_Decode, 226, 2, 17, // Opcode: TSETR_3r
327 : /* 1276 */ MCD::OPC_FilterValue, 24, 25, 0, 0, // Skip to: 1306
328 : /* 1281 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
329 : /* 1284 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1293
330 : /* 1289 */ MCD::OPC_Decode, 189, 2, 4, // Opcode: SETPSC_2r
331 : /* 1293 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1302
332 : /* 1298 */ MCD::OPC_Decode, 224, 2, 2, // Opcode: TESTWCT_2r
333 : /* 1302 */ MCD::OPC_Decode, 155, 2, 5, // Opcode: LSS_3r
334 : /* 1306 */ MCD::OPC_FilterValue, 25, 25, 0, 0, // Skip to: 1336
335 : /* 1311 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
336 : /* 1314 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1323
337 : /* 1319 */ MCD::OPC_Decode, 179, 1, 2, // Opcode: CHKCT_2r
338 : /* 1323 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 1332
339 : /* 1328 */ MCD::OPC_Decode, 180, 1, 15, // Opcode: CHKCT_rus
340 : /* 1332 */ MCD::OPC_Decode, 157, 2, 5, // Opcode: LSU_3r
341 : /* 1336 */ MCD::OPC_FilterValue, 26, 21, 0, 0, // Skip to: 1362
342 : /* 1341 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
343 : /* 1344 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1353
344 : /* 1349 */ MCD::OPC_Decode, 164, 1, 18, // Opcode: BLRF_u10
345 : /* 1353 */ MCD::OPC_FilterValue, 1, 72, 0, 0, // Skip to: 1430
346 : /* 1358 */ MCD::OPC_Decode, 162, 1, 19, // Opcode: BLRB_u10
347 : /* 1362 */ MCD::OPC_FilterValue, 27, 21, 0, 0, // Skip to: 1388
348 : /* 1367 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
349 : /* 1370 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1379
350 : /* 1375 */ MCD::OPC_Decode, 254, 1, 18, // Opcode: LDAPF_u10
351 : /* 1379 */ MCD::OPC_FilterValue, 1, 46, 0, 0, // Skip to: 1430
352 : /* 1384 */ MCD::OPC_Decode, 251, 1, 19, // Opcode: LDAPB_u10
353 : /* 1388 */ MCD::OPC_FilterValue, 28, 21, 0, 0, // Skip to: 1414
354 : /* 1393 */ MCD::OPC_ExtractField, 10, 1, // Inst{10} ...
355 : /* 1396 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 1405
356 : /* 1401 */ MCD::OPC_Decode, 157, 1, 18, // Opcode: BLACP_u10
357 : /* 1405 */ MCD::OPC_FilterValue, 1, 20, 0, 0, // Skip to: 1430
358 : /* 1410 */ MCD::OPC_Decode, 147, 2, 18, // Opcode: LDWCP_u10
359 : /* 1414 */ MCD::OPC_FilterValue, 29, 11, 0, 0, // Skip to: 1430
360 : /* 1419 */ MCD::OPC_CheckField, 10, 1, 0, 4, 0, 0, // Skip to: 1430
361 : /* 1426 */ MCD::OPC_Decode, 183, 2, 12, // Opcode: SETC_ru6
362 : /* 1430 */ MCD::OPC_Fail,
363 : 0
364 : };
365 :
366 : static const uint8_t DecoderTable32[] = {
367 : /* 0 */ MCD::OPC_ExtractField, 27, 5, // Inst{31-27} ...
368 : /* 3 */ MCD::OPC_FilterValue, 0, 103, 0, 0, // Skip to: 111
369 : /* 8 */ MCD::OPC_ExtractField, 11, 5, // Inst{15-11} ...
370 : /* 11 */ MCD::OPC_FilterValue, 31, 120, 4, 0, // Skip to: 1160
371 : /* 16 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
372 : /* 19 */ MCD::OPC_FilterValue, 0, 12, 0, 0, // Skip to: 36
373 : /* 24 */ MCD::OPC_CheckField, 16, 11, 236, 15, 21, 0, 0, // Skip to: 53
374 : /* 32 */ MCD::OPC_Decode, 155, 1, 20, // Opcode: BITREV_l2r
375 : /* 36 */ MCD::OPC_FilterValue, 1, 12, 0, 0, // Skip to: 53
376 : /* 41 */ MCD::OPC_CheckField, 16, 11, 236, 15, 4, 0, 0, // Skip to: 53
377 : /* 49 */ MCD::OPC_Decode, 178, 1, 20, // Opcode: BYTEREV_l2r
378 : /* 53 */ MCD::OPC_CheckField, 16, 11, 236, 15, 4, 0, 0, // Skip to: 65
379 : /* 61 */ MCD::OPC_Decode, 218, 2, 21, // Opcode: STW_l3r
380 : /* 65 */ MCD::OPC_ExtractField, 20, 7, // Inst{26-20} ...
381 : /* 68 */ MCD::OPC_FilterValue, 126, 4, 0, 0, // Skip to: 77
382 : /* 73 */ MCD::OPC_Decode, 188, 1, 22, // Opcode: CRC8_l4r
383 : /* 77 */ MCD::OPC_FilterValue, 127, 4, 0, 0, // Skip to: 86
384 : /* 82 */ MCD::OPC_Decode, 159, 2, 23, // Opcode: MACCU_l4r
385 : /* 86 */ MCD::OPC_ExtractField, 20, 1, // Inst{20} ...
386 : /* 89 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 98
387 : /* 94 */ MCD::OPC_Decode, 140, 2, 24, // Opcode: LDIVU_l5r
388 : /* 98 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 107
389 : /* 103 */ MCD::OPC_Decode, 245, 1, 24, // Opcode: LADD_l5r
390 : /* 107 */ MCD::OPC_Decode, 154, 2, 25, // Opcode: LMUL_l6r
391 : /* 111 */ MCD::OPC_FilterValue, 1, 98, 0, 0, // Skip to: 214
392 : /* 116 */ MCD::OPC_ExtractField, 11, 5, // Inst{15-11} ...
393 : /* 119 */ MCD::OPC_FilterValue, 31, 12, 4, 0, // Skip to: 1160
394 : /* 124 */ MCD::OPC_ExtractField, 20, 1, // Inst{20} ...
395 : /* 127 */ MCD::OPC_FilterValue, 0, 4, 4, 0, // Skip to: 1160
396 : /* 132 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
397 : /* 135 */ MCD::OPC_FilterValue, 0, 18, 0, 0, // Skip to: 158
398 : /* 140 */ MCD::OPC_CheckField, 21, 6, 63, 34, 0, 0, // Skip to: 181
399 : /* 147 */ MCD::OPC_CheckField, 16, 4, 12, 27, 0, 0, // Skip to: 181
400 : /* 154 */ MCD::OPC_Decode, 187, 1, 20, // Opcode: CLZ_l2r
401 : /* 158 */ MCD::OPC_FilterValue, 1, 18, 0, 0, // Skip to: 181
402 : /* 163 */ MCD::OPC_CheckField, 21, 6, 63, 11, 0, 0, // Skip to: 181
403 : /* 170 */ MCD::OPC_CheckField, 16, 4, 12, 4, 0, 0, // Skip to: 181
404 : /* 177 */ MCD::OPC_Decode, 179, 2, 26, // Opcode: SETCLK_l2r
405 : /* 181 */ MCD::OPC_CheckField, 21, 6, 63, 11, 0, 0, // Skip to: 199
406 : /* 188 */ MCD::OPC_CheckField, 16, 4, 12, 4, 0, 0, // Skip to: 199
407 : /* 195 */ MCD::OPC_Decode, 231, 2, 21, // Opcode: XOR_l3r
408 : /* 199 */ MCD::OPC_CheckField, 21, 6, 63, 4, 0, 0, // Skip to: 210
409 : /* 206 */ MCD::OPC_Decode, 158, 2, 23, // Opcode: MACCS_l4r
410 : /* 210 */ MCD::OPC_Decode, 156, 2, 24, // Opcode: LSUB_l5r
411 : /* 214 */ MCD::OPC_FilterValue, 2, 35, 0, 0, // Skip to: 254
412 : /* 219 */ MCD::OPC_ExtractField, 11, 16, // Inst{26-11} ...
413 : /* 222 */ MCD::OPC_FilterValue, 159, 251, 3, 163, 3, 0, // Skip to: 1160
414 : /* 229 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
415 : /* 232 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 241
416 : /* 237 */ MCD::OPC_Decode, 230, 1, 20, // Opcode: INITLR_l2r
417 : /* 241 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 250
418 : /* 246 */ MCD::OPC_Decode, 221, 1, 20, // Opcode: GETPS_l2r
419 : /* 250 */ MCD::OPC_Decode, 153, 1, 21, // Opcode: ASHR_l3r
420 : /* 254 */ MCD::OPC_FilterValue, 3, 35, 0, 0, // Skip to: 294
421 : /* 259 */ MCD::OPC_ExtractField, 11, 16, // Inst{26-11} ...
422 : /* 262 */ MCD::OPC_FilterValue, 159, 251, 3, 123, 3, 0, // Skip to: 1160
423 : /* 269 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
424 : /* 272 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 281
425 : /* 277 */ MCD::OPC_Decode, 190, 2, 26, // Opcode: SETPS_l2r
426 : /* 281 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 290
427 : /* 286 */ MCD::OPC_Decode, 214, 1, 20, // Opcode: GETD_l2r
428 : /* 290 */ MCD::OPC_Decode, 134, 2, 21, // Opcode: LDAWF_l3r
429 : /* 294 */ MCD::OPC_FilterValue, 4, 35, 0, 0, // Skip to: 334
430 : /* 299 */ MCD::OPC_ExtractField, 11, 16, // Inst{26-11} ...
431 : /* 302 */ MCD::OPC_FilterValue, 159, 251, 3, 83, 3, 0, // Skip to: 1160
432 : /* 309 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
433 : /* 312 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 321
434 : /* 317 */ MCD::OPC_Decode, 223, 2, 20, // Opcode: TESTLCL_l2r
435 : /* 321 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 330
436 : /* 326 */ MCD::OPC_Decode, 198, 2, 26, // Opcode: SETTW_l2r
437 : /* 330 */ MCD::OPC_Decode, 128, 2, 21, // Opcode: LDAWB_l3r
438 : /* 334 */ MCD::OPC_FilterValue, 5, 35, 0, 0, // Skip to: 374
439 : /* 339 */ MCD::OPC_ExtractField, 11, 16, // Inst{26-11} ...
440 : /* 342 */ MCD::OPC_FilterValue, 159, 251, 3, 43, 3, 0, // Skip to: 1160
441 : /* 349 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
442 : /* 352 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 361
443 : /* 357 */ MCD::OPC_Decode, 192, 2, 26, // Opcode: SETRDY_l2r
444 : /* 361 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 370
445 : /* 366 */ MCD::OPC_Decode, 181, 2, 20, // Opcode: SETC_l2r
446 : /* 370 */ MCD::OPC_Decode, 249, 1, 21, // Opcode: LDA16F_l3r
447 : /* 374 */ MCD::OPC_FilterValue, 6, 35, 0, 0, // Skip to: 414
448 : /* 379 */ MCD::OPC_ExtractField, 11, 16, // Inst{26-11} ...
449 : /* 382 */ MCD::OPC_FilterValue, 159, 251, 3, 3, 3, 0, // Skip to: 1160
450 : /* 389 */ MCD::OPC_ExtractField, 4, 1, // Inst{4} ...
451 : /* 392 */ MCD::OPC_FilterValue, 0, 4, 0, 0, // Skip to: 401
452 : /* 397 */ MCD::OPC_Decode, 188, 2, 26, // Opcode: SETN_l2r
453 : /* 401 */ MCD::OPC_FilterValue, 1, 4, 0, 0, // Skip to: 410
454 : /* 406 */ MCD::OPC_Decode, 220, 1, 20, // Opcode: GETN_l2r
455 : /* 410 */ MCD::OPC_Decode, 248, 1, 21, // Opcode: LDA16B_l3r
456 : /* 414 */ MCD::OPC_FilterValue, 7, 13, 0, 0, // Skip to: 432
457 : /* 419 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 220, 2, 0, // Skip to: 1160
458 : /* 428 */ MCD::OPC_Decode, 164, 2, 21, // Opcode: MUL_l3r
459 : /* 432 */ MCD::OPC_FilterValue, 8, 13, 0, 0, // Skip to: 450
460 : /* 437 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 202, 2, 0, // Skip to: 1160
461 : /* 446 */ MCD::OPC_Decode, 193, 1, 21, // Opcode: DIVS_l3r
462 : /* 450 */ MCD::OPC_FilterValue, 9, 13, 0, 0, // Skip to: 468
463 : /* 455 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 184, 2, 0, // Skip to: 1160
464 : /* 464 */ MCD::OPC_Decode, 194, 1, 21, // Opcode: DIVU_l3r
465 : /* 468 */ MCD::OPC_FilterValue, 10, 35, 0, 0, // Skip to: 508
466 : /* 473 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
467 : /* 476 */ MCD::OPC_FilterValue, 0, 11, 0, 0, // Skip to: 492
468 : /* 481 */ MCD::OPC_CheckField, 10, 6, 60, 160, 2, 0, // Skip to: 1160
469 : /* 488 */ MCD::OPC_Decode, 213, 2, 27, // Opcode: STWDP_lru6
470 : /* 492 */ MCD::OPC_FilterValue, 1, 151, 2, 0, // Skip to: 1160
471 : /* 497 */ MCD::OPC_CheckField, 10, 6, 60, 144, 2, 0, // Skip to: 1160
472 : /* 504 */ MCD::OPC_Decode, 215, 2, 27, // Opcode: STWSP_lru6
473 : /* 508 */ MCD::OPC_FilterValue, 11, 35, 0, 0, // Skip to: 548
474 : /* 513 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
475 : /* 516 */ MCD::OPC_FilterValue, 0, 11, 0, 0, // Skip to: 532
476 : /* 521 */ MCD::OPC_CheckField, 10, 6, 60, 120, 2, 0, // Skip to: 1160
477 : /* 528 */ MCD::OPC_Decode, 148, 2, 27, // Opcode: LDWDP_lru6
478 : /* 532 */ MCD::OPC_FilterValue, 1, 111, 2, 0, // Skip to: 1160
479 : /* 537 */ MCD::OPC_CheckField, 10, 6, 60, 104, 2, 0, // Skip to: 1160
480 : /* 544 */ MCD::OPC_Decode, 150, 2, 27, // Opcode: LDWSP_lru6
481 : /* 548 */ MCD::OPC_FilterValue, 12, 35, 0, 0, // Skip to: 588
482 : /* 553 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
483 : /* 556 */ MCD::OPC_FilterValue, 0, 11, 0, 0, // Skip to: 572
484 : /* 561 */ MCD::OPC_CheckField, 10, 6, 60, 80, 2, 0, // Skip to: 1160
485 : /* 568 */ MCD::OPC_Decode, 131, 2, 27, // Opcode: LDAWDP_lru6
486 : /* 572 */ MCD::OPC_FilterValue, 1, 71, 2, 0, // Skip to: 1160
487 : /* 577 */ MCD::OPC_CheckField, 10, 6, 60, 64, 2, 0, // Skip to: 1160
488 : /* 584 */ MCD::OPC_Decode, 135, 2, 27, // Opcode: LDAWSP_lru6
489 : /* 588 */ MCD::OPC_FilterValue, 13, 35, 0, 0, // Skip to: 628
490 : /* 593 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
491 : /* 596 */ MCD::OPC_FilterValue, 0, 11, 0, 0, // Skip to: 612
492 : /* 601 */ MCD::OPC_CheckField, 10, 6, 60, 40, 2, 0, // Skip to: 1160
493 : /* 608 */ MCD::OPC_Decode, 137, 2, 27, // Opcode: LDC_lru6
494 : /* 612 */ MCD::OPC_FilterValue, 1, 31, 2, 0, // Skip to: 1160
495 : /* 617 */ MCD::OPC_CheckField, 10, 6, 60, 24, 2, 0, // Skip to: 1160
496 : /* 624 */ MCD::OPC_Decode, 144, 2, 27, // Opcode: LDWCP_lru6
497 : /* 628 */ MCD::OPC_FilterValue, 14, 115, 0, 0, // Skip to: 748
498 : /* 633 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
499 : /* 636 */ MCD::OPC_FilterValue, 0, 51, 0, 0, // Skip to: 692
500 : /* 641 */ MCD::OPC_ExtractField, 10, 6, // Inst{15-10} ...
501 : /* 644 */ MCD::OPC_FilterValue, 60, 255, 1, 0, // Skip to: 1160
502 : /* 649 */ MCD::OPC_ExtractField, 22, 4, // Inst{25-22} ...
503 : /* 652 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 661
504 : /* 657 */ MCD::OPC_Decode, 175, 1, 28, // Opcode: BRFU_lu6
505 : /* 661 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 670
506 : /* 666 */ MCD::OPC_Decode, 158, 1, 28, // Opcode: BLAT_lu6
507 : /* 670 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 679
508 : /* 675 */ MCD::OPC_Decode, 208, 1, 28, // Opcode: EXTDP_lu6
509 : /* 679 */ MCD::OPC_FilterValue, 15, 4, 0, 0, // Skip to: 688
510 : /* 684 */ MCD::OPC_Decode, 238, 1, 28, // Opcode: KCALL_lu6
511 : /* 688 */ MCD::OPC_Decode, 173, 1, 29, // Opcode: BRFT_lru6
512 : /* 692 */ MCD::OPC_FilterValue, 1, 207, 1, 0, // Skip to: 1160
513 : /* 697 */ MCD::OPC_ExtractField, 10, 6, // Inst{15-10} ...
514 : /* 700 */ MCD::OPC_FilterValue, 60, 199, 1, 0, // Skip to: 1160
515 : /* 705 */ MCD::OPC_ExtractField, 22, 4, // Inst{25-22} ...
516 : /* 708 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 717
517 : /* 713 */ MCD::OPC_Decode, 169, 1, 30, // Opcode: BRBU_lu6
518 : /* 717 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 726
519 : /* 722 */ MCD::OPC_Decode, 204, 1, 28, // Opcode: ENTSP_lu6
520 : /* 726 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 735
521 : /* 731 */ MCD::OPC_Decode, 210, 1, 28, // Opcode: EXTSP_lu6
522 : /* 735 */ MCD::OPC_FilterValue, 15, 4, 0, 0, // Skip to: 744
523 : /* 740 */ MCD::OPC_Decode, 177, 2, 28, // Opcode: RETSP_lu6
524 : /* 744 */ MCD::OPC_Decode, 167, 1, 31, // Opcode: BRBT_lru6
525 : /* 748 */ MCD::OPC_FilterValue, 15, 97, 0, 0, // Skip to: 850
526 : /* 753 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
527 : /* 756 */ MCD::OPC_FilterValue, 0, 51, 0, 0, // Skip to: 812
528 : /* 761 */ MCD::OPC_ExtractField, 10, 6, // Inst{15-10} ...
529 : /* 764 */ MCD::OPC_FilterValue, 60, 135, 1, 0, // Skip to: 1160
530 : /* 769 */ MCD::OPC_ExtractField, 22, 4, // Inst{25-22} ...
531 : /* 772 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 781
532 : /* 777 */ MCD::OPC_Decode, 185, 1, 28, // Opcode: CLRSR_lu6
533 : /* 781 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 790
534 : /* 786 */ MCD::OPC_Decode, 196, 2, 28, // Opcode: SETSR_lu6
535 : /* 790 */ MCD::OPC_FilterValue, 14, 4, 0, 0, // Skip to: 799
536 : /* 795 */ MCD::OPC_Decode, 240, 1, 28, // Opcode: KENTSP_lu6
537 : /* 799 */ MCD::OPC_FilterValue, 15, 4, 0, 0, // Skip to: 808
538 : /* 804 */ MCD::OPC_Decode, 242, 1, 28, // Opcode: KRESTSP_lu6
539 : /* 808 */ MCD::OPC_Decode, 171, 1, 29, // Opcode: BRFF_lru6
540 : /* 812 */ MCD::OPC_FilterValue, 1, 87, 1, 0, // Skip to: 1160
541 : /* 817 */ MCD::OPC_ExtractField, 10, 6, // Inst{15-10} ...
542 : /* 820 */ MCD::OPC_FilterValue, 60, 79, 1, 0, // Skip to: 1160
543 : /* 825 */ MCD::OPC_ExtractField, 22, 4, // Inst{25-22} ...
544 : /* 828 */ MCD::OPC_FilterValue, 12, 4, 0, 0, // Skip to: 837
545 : /* 833 */ MCD::OPC_Decode, 223, 1, 28, // Opcode: GETSR_lu6
546 : /* 837 */ MCD::OPC_FilterValue, 13, 4, 0, 0, // Skip to: 846
547 : /* 842 */ MCD::OPC_Decode, 129, 2, 28, // Opcode: LDAWCP_lu6
548 : /* 846 */ MCD::OPC_Decode, 165, 1, 31, // Opcode: BRBF_lru6
549 : /* 850 */ MCD::OPC_FilterValue, 16, 13, 0, 0, // Skip to: 868
550 : /* 855 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 40, 1, 0, // Skip to: 1160
551 : /* 864 */ MCD::OPC_Decode, 207, 2, 21, // Opcode: ST16_l3r
552 : /* 868 */ MCD::OPC_FilterValue, 17, 13, 0, 0, // Skip to: 886
553 : /* 873 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 22, 1, 0, // Skip to: 1160
554 : /* 882 */ MCD::OPC_Decode, 208, 2, 21, // Opcode: ST8_l3r
555 : /* 886 */ MCD::OPC_FilterValue, 18, 36, 0, 0, // Skip to: 927
556 : /* 891 */ MCD::OPC_ExtractField, 11, 16, // Inst{26-11} ...
557 : /* 894 */ MCD::OPC_FilterValue, 159, 251, 3, 4, 0, 0, // Skip to: 905
558 : /* 901 */ MCD::OPC_Decode, 152, 1, 32, // Opcode: ASHR_l2rus
559 : /* 905 */ MCD::OPC_FilterValue, 191, 251, 3, 4, 0, 0, // Skip to: 916
560 : /* 912 */ MCD::OPC_Decode, 170, 2, 32, // Opcode: OUTPW_l2rus
561 : /* 916 */ MCD::OPC_FilterValue, 223, 251, 3, 237, 0, 0, // Skip to: 1160
562 : /* 923 */ MCD::OPC_Decode, 233, 1, 32, // Opcode: INPW_l2rus
563 : /* 927 */ MCD::OPC_FilterValue, 19, 13, 0, 0, // Skip to: 945
564 : /* 932 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 219, 0, 0, // Skip to: 1160
565 : /* 941 */ MCD::OPC_Decode, 133, 2, 33, // Opcode: LDAWF_l2rus
566 : /* 945 */ MCD::OPC_FilterValue, 20, 13, 0, 0, // Skip to: 963
567 : /* 950 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 201, 0, 0, // Skip to: 1160
568 : /* 959 */ MCD::OPC_Decode, 255, 1, 33, // Opcode: LDAWB_l2rus
569 : /* 963 */ MCD::OPC_FilterValue, 21, 13, 0, 0, // Skip to: 981
570 : /* 968 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 183, 0, 0, // Skip to: 1160
571 : /* 977 */ MCD::OPC_Decode, 189, 1, 34, // Opcode: CRC_l3r
572 : /* 981 */ MCD::OPC_FilterValue, 24, 13, 0, 0, // Skip to: 999
573 : /* 986 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 165, 0, 0, // Skip to: 1160
574 : /* 995 */ MCD::OPC_Decode, 175, 2, 21, // Opcode: REMS_l3r
575 : /* 999 */ MCD::OPC_FilterValue, 25, 13, 0, 0, // Skip to: 1017
576 : /* 1004 */ MCD::OPC_CheckField, 11, 16, 159, 251, 3, 147, 0, 0, // Skip to: 1160
577 : /* 1013 */ MCD::OPC_Decode, 176, 2, 21, // Opcode: REMU_l3r
578 : /* 1017 */ MCD::OPC_FilterValue, 26, 35, 0, 0, // Skip to: 1057
579 : /* 1022 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
580 : /* 1025 */ MCD::OPC_FilterValue, 0, 11, 0, 0, // Skip to: 1041
581 : /* 1030 */ MCD::OPC_CheckField, 10, 6, 60, 123, 0, 0, // Skip to: 1160
582 : /* 1037 */ MCD::OPC_Decode, 163, 1, 35, // Opcode: BLRF_lu10
583 : /* 1041 */ MCD::OPC_FilterValue, 1, 114, 0, 0, // Skip to: 1160
584 : /* 1046 */ MCD::OPC_CheckField, 10, 6, 60, 107, 0, 0, // Skip to: 1160
585 : /* 1053 */ MCD::OPC_Decode, 161, 1, 36, // Opcode: BLRB_lu10
586 : /* 1057 */ MCD::OPC_FilterValue, 27, 35, 0, 0, // Skip to: 1097
587 : /* 1062 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
588 : /* 1065 */ MCD::OPC_FilterValue, 0, 11, 0, 0, // Skip to: 1081
589 : /* 1070 */ MCD::OPC_CheckField, 10, 6, 60, 83, 0, 0, // Skip to: 1160
590 : /* 1077 */ MCD::OPC_Decode, 252, 1, 35, // Opcode: LDAPF_lu10
591 : /* 1081 */ MCD::OPC_FilterValue, 1, 74, 0, 0, // Skip to: 1160
592 : /* 1086 */ MCD::OPC_CheckField, 10, 6, 60, 67, 0, 0, // Skip to: 1160
593 : /* 1093 */ MCD::OPC_Decode, 250, 1, 36, // Opcode: LDAPB_lu10
594 : /* 1097 */ MCD::OPC_FilterValue, 28, 35, 0, 0, // Skip to: 1137
595 : /* 1102 */ MCD::OPC_ExtractField, 26, 1, // Inst{26} ...
596 : /* 1105 */ MCD::OPC_FilterValue, 0, 11, 0, 0, // Skip to: 1121
597 : /* 1110 */ MCD::OPC_CheckField, 10, 6, 60, 43, 0, 0, // Skip to: 1160
598 : /* 1117 */ MCD::OPC_Decode, 156, 1, 35, // Opcode: BLACP_lu10
599 : /* 1121 */ MCD::OPC_FilterValue, 1, 34, 0, 0, // Skip to: 1160
600 : /* 1126 */ MCD::OPC_CheckField, 10, 6, 60, 27, 0, 0, // Skip to: 1160
601 : /* 1133 */ MCD::OPC_Decode, 145, 2, 35, // Opcode: LDWCP_lu10
602 : /* 1137 */ MCD::OPC_FilterValue, 29, 18, 0, 0, // Skip to: 1160
603 : /* 1142 */ MCD::OPC_CheckField, 26, 1, 0, 11, 0, 0, // Skip to: 1160
604 : /* 1149 */ MCD::OPC_CheckField, 10, 6, 60, 4, 0, 0, // Skip to: 1160
605 : /* 1156 */ MCD::OPC_Decode, 182, 2, 29, // Opcode: SETC_lru6
606 : /* 1160 */ MCD::OPC_Fail,
607 : 0
608 : };
609 :
610 0 : static bool checkDecoderPredicate(unsigned Idx, const FeatureBitset& Bits) {
611 0 : llvm_unreachable("Invalid index!");
612 : }
613 :
614 : template<typename InsnType>
615 143 : static DecodeStatus decodeToMCInst(DecodeStatus S, unsigned Idx, InsnType insn, MCInst &MI,
616 : uint64_t Address, const void *Decoder, bool &DecodeComplete) {
617 143 : DecodeComplete = true;
618 : InsnType tmp;
619 143 : switch (Idx) {
620 0 : default: llvm_unreachable("Invalid index!");
621 : case 0:
622 : return S;
623 22 : case 1:
624 : tmp = fieldFromInstruction(insn, 0, 4);
625 22 : if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
626 : return S;
627 29 : case 2:
628 29 : if (Decode2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
629 : return S;
630 1 : case 3:
631 1 : if (Decode2RUSInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
632 : return S;
633 8 : case 4:
634 8 : if (DecodeR2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
635 : return S;
636 1 : case 5:
637 1 : if (Decode3RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
638 : return S;
639 1 : case 6:
640 1 : if (Decode2RImmInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
641 : return S;
642 7 : case 7:
643 7 : if (Decode2RSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
644 : return S;
645 3 : case 8:
646 3 : if (DecodeRUSSrcDstBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
647 : return S;
648 4 : case 9:
649 4 : if (DecodeRUSInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
650 : return S;
651 16 : case 10:
652 : tmp = fieldFromInstruction(insn, 6, 4);
653 16 : if (DecodeRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
654 : tmp = fieldFromInstruction(insn, 0, 6);
655 16 : MI.addOperand(MCOperand::createImm(tmp));
656 16 : return S;
657 13 : case 11:
658 : tmp = fieldFromInstruction(insn, 0, 6);
659 13 : MI.addOperand(MCOperand::createImm(tmp));
660 13 : return S;
661 4 : case 12:
662 : tmp = fieldFromInstruction(insn, 6, 4);
663 4 : if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
664 : tmp = fieldFromInstruction(insn, 0, 6);
665 4 : MI.addOperand(MCOperand::createImm(tmp));
666 4 : return S;
667 1 : case 13:
668 : tmp = fieldFromInstruction(insn, 0, 6);
669 : if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
670 1 : return S;
671 1 : case 14:
672 : tmp = fieldFromInstruction(insn, 6, 4);
673 1 : if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
674 : tmp = fieldFromInstruction(insn, 0, 6);
675 : if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
676 1 : return S;
677 3 : case 15:
678 3 : if (DecodeRUSBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
679 : return S;
680 0 : case 16:
681 0 : if (Decode2RUSBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
682 : return S;
683 0 : case 17:
684 0 : if (Decode3RImmInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
685 : return S;
686 4 : case 18:
687 : tmp = fieldFromInstruction(insn, 0, 10);
688 4 : MI.addOperand(MCOperand::createImm(tmp));
689 4 : return S;
690 2 : case 19:
691 : tmp = fieldFromInstruction(insn, 0, 10);
692 : if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
693 2 : return S;
694 0 : case 20:
695 0 : if (DecodeL2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
696 : return S;
697 0 : case 21:
698 0 : if (DecodeL3RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
699 : return S;
700 0 : case 22:
701 0 : if (DecodeL4RSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
702 : return S;
703 0 : case 23:
704 0 : if (DecodeL4RSrcDstSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
705 : return S;
706 0 : case 24:
707 0 : if (DecodeL5RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
708 : return S;
709 0 : case 25:
710 0 : if (DecodeL6RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
711 : return S;
712 0 : case 26:
713 0 : if (DecodeLR2RInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
714 : return S;
715 0 : case 27:
716 : tmp = fieldFromInstruction(insn, 22, 4);
717 0 : if (DecodeRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
718 : tmp = 0;
719 0 : tmp |= fieldFromInstruction(insn, 0, 10) << 6;
720 0 : tmp |= fieldFromInstruction(insn, 16, 6) << 0;
721 0 : MI.addOperand(MCOperand::createImm(tmp));
722 0 : return S;
723 0 : case 28:
724 : tmp = 0;
725 0 : tmp |= fieldFromInstruction(insn, 0, 10) << 6;
726 0 : tmp |= fieldFromInstruction(insn, 16, 6) << 0;
727 0 : MI.addOperand(MCOperand::createImm(tmp));
728 0 : return S;
729 0 : case 29:
730 : tmp = fieldFromInstruction(insn, 22, 4);
731 0 : if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
732 : tmp = 0;
733 0 : tmp |= fieldFromInstruction(insn, 0, 10) << 6;
734 0 : tmp |= fieldFromInstruction(insn, 16, 6) << 0;
735 0 : MI.addOperand(MCOperand::createImm(tmp));
736 0 : return S;
737 0 : case 30:
738 : tmp = 0;
739 0 : tmp |= fieldFromInstruction(insn, 0, 10) << 6;
740 0 : tmp |= fieldFromInstruction(insn, 16, 6) << 0;
741 0 : if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
742 0 : return S;
743 0 : case 31:
744 : tmp = fieldFromInstruction(insn, 22, 4);
745 0 : if (DecodeGRRegsRegisterClass(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
746 : tmp = 0;
747 0 : tmp |= fieldFromInstruction(insn, 0, 10) << 6;
748 0 : tmp |= fieldFromInstruction(insn, 16, 6) << 0;
749 0 : if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
750 0 : return S;
751 0 : case 32:
752 0 : if (DecodeL2RUSBitpInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
753 : return S;
754 0 : case 33:
755 0 : if (DecodeL2RUSInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
756 : return S;
757 0 : case 34:
758 0 : if (DecodeL3RSrcDstInstruction(MI, insn, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
759 : return S;
760 0 : case 35:
761 : tmp = 0;
762 0 : tmp |= fieldFromInstruction(insn, 0, 10) << 10;
763 0 : tmp |= fieldFromInstruction(insn, 16, 10) << 0;
764 0 : MI.addOperand(MCOperand::createImm(tmp));
765 0 : return S;
766 0 : case 36:
767 : tmp = 0;
768 0 : tmp |= fieldFromInstruction(insn, 0, 10) << 10;
769 0 : tmp |= fieldFromInstruction(insn, 16, 10) << 0;
770 0 : if (DecodeNegImmOperand(MI, tmp, Address, Decoder) == MCDisassembler::Fail) { return MCDisassembler::Fail; }
771 0 : return S;
772 : }
773 : }
774 0 :
775 : template<typename InsnType>
776 0 : static DecodeStatus decodeInstruction(const uint8_t DecodeTable[], MCInst &MI,
777 : InsnType insn, uint64_t Address,
778 0 : const void *DisAsm,
779 0 : const MCSubtargetInfo &STI) {
780 : const FeatureBitset& Bits = STI.getFeatureBits();
781 :
782 : const uint8_t *Ptr = DecodeTable;
783 : uint32_t CurFieldValue = 0;
784 0 : DecodeStatus S = MCDisassembler::Success;
785 : while (true) {
786 0 : ptrdiff_t Loc = Ptr - DecodeTable;
787 0 : switch (*Ptr) {
788 : default:
789 0 : errs() << Loc << ": Unexpected decode table opcode!\n";
790 0 : return MCDisassembler::Fail;
791 : case MCD::OPC_ExtractField: {
792 0 : unsigned Start = *++Ptr;
793 0 : unsigned Len = *++Ptr;
794 : ++Ptr;
795 0 : CurFieldValue = fieldFromInstruction(insn, Start, Len);
796 0 : LLVM_DEBUG(dbgs() << Loc << ": OPC_ExtractField(" << Start << ", "
797 : << Len << "): " << CurFieldValue << "\n");
798 0 : break;
799 0 : }
800 : case MCD::OPC_FilterValue: {
801 0 : // Decode the field value.
802 0 : unsigned Len;
803 : InsnType Val = decodeULEB128(++Ptr, &Len);
804 0 : Ptr += Len;
805 0 : // NumToSkip is a plain 24-bit integer.
806 : unsigned NumToSkip = *Ptr++;
807 0 : NumToSkip |= (*Ptr++) << 8;
808 0 : NumToSkip |= (*Ptr++) << 16;
809 :
810 : // Perform the filter operation.
811 : if (Val != CurFieldValue)
812 0 : Ptr += NumToSkip;
813 : LLVM_DEBUG(dbgs() << Loc << ": OPC_FilterValue(" << Val << ", " << NumToSkip
814 0 : << "): " << ((Val != CurFieldValue) ? "FAIL:" : "PASS:")
815 0 : << " continuing at " << (Ptr - DecodeTable) << "\n");
816 :
817 : break;
818 0 : }
819 0 : case MCD::OPC_CheckField: {
820 : unsigned Start = *++Ptr;
821 : unsigned Len = *++Ptr;
822 0 : InsnType FieldValue = fieldFromInstruction(insn, Start, Len);
823 : // Decode the field value.
824 0 : uint32_t ExpectedValue = decodeULEB128(++Ptr, &Len);
825 0 : Ptr += Len;
826 : // NumToSkip is a plain 24-bit integer.
827 : unsigned NumToSkip = *Ptr++;
828 : NumToSkip |= (*Ptr++) << 8;
829 0 : NumToSkip |= (*Ptr++) << 16;
830 :
831 : // If the actual and expected values don't match, skip.
832 0 : if (ExpectedValue != FieldValue)
833 : Ptr += NumToSkip;
834 : LLVM_DEBUG(dbgs() << Loc << ": OPC_CheckField(" << Start << ", "
835 0 : << Len << ", " << ExpectedValue << ", " << NumToSkip
836 0 : << "): FieldValue = " << FieldValue << ", ExpectedValue = "
837 0 : << ExpectedValue << ": "
838 : << ((ExpectedValue == FieldValue) ? "PASS\n" : "FAIL\n"));
839 0 : break;
840 0 : }
841 : case MCD::OPC_CheckPredicate: {
842 0 : unsigned Len;
843 0 : // Decode the Predicate Index value.
844 : unsigned PIdx = decodeULEB128(++Ptr, &Len);
845 : Ptr += Len;
846 : // NumToSkip is a plain 24-bit integer.
847 0 : unsigned NumToSkip = *Ptr++;
848 0 : NumToSkip |= (*Ptr++) << 8;
849 : NumToSkip |= (*Ptr++) << 16;
850 : // Check the predicate.
851 : bool Pred;
852 0 : if (!(Pred = checkDecoderPredicate(PIdx, Bits)))
853 0 : Ptr += NumToSkip;
854 0 : (void)Pred;
855 : LLVM_DEBUG(dbgs() << Loc << ": OPC_CheckPredicate(" << PIdx << "): "
856 0 : << (Pred ? "PASS\n" : "FAIL\n"));
857 0 :
858 : break;
859 0 : }
860 0 : case MCD::OPC_Decode: {
861 : unsigned Len;
862 0 : // Decode the Opcode value.
863 0 : unsigned Opc = decodeULEB128(++Ptr, &Len);
864 : Ptr += Len;
865 0 : unsigned DecodeIdx = decodeULEB128(Ptr, &Len);
866 0 : Ptr += Len;
867 :
868 0 : MI.clear();
869 0 : MI.setOpcode(Opc);
870 : bool DecodeComplete;
871 0 : S = decodeToMCInst(S, DecodeIdx, insn, MI, Address, DisAsm, DecodeComplete);
872 0 : assert(DecodeComplete);
873 :
874 : LLVM_DEBUG(dbgs() << Loc << ": OPC_Decode: opcode " << Opc
875 : << ", using decoder " << DecodeIdx << ": "
876 0 : << (S != MCDisassembler::Fail ? "PASS" : "FAIL") << "\n");
877 : return S;
878 0 : }
879 0 : case MCD::OPC_TryDecode: {
880 0 : unsigned Len;
881 0 : // Decode the Opcode value.
882 0 : unsigned Opc = decodeULEB128(++Ptr, &Len);
883 : Ptr += Len;
884 0 : unsigned DecodeIdx = decodeULEB128(Ptr, &Len);
885 0 : Ptr += Len;
886 0 : // NumToSkip is a plain 24-bit integer.
887 0 : unsigned NumToSkip = *Ptr++;
888 : NumToSkip |= (*Ptr++) << 8;
889 : NumToSkip |= (*Ptr++) << 16;
890 0 :
891 : // Perform the decode operation.
892 0 : MCInst TmpMI;
893 0 : TmpMI.setOpcode(Opc);
894 0 : bool DecodeComplete;
895 0 : S = decodeToMCInst(S, DecodeIdx, insn, TmpMI, Address, DisAsm, DecodeComplete);
896 0 : LLVM_DEBUG(dbgs() << Loc << ": OPC_TryDecode: opcode " << Opc
897 : << ", using decoder " << DecodeIdx << ": ");
898 0 :
899 0 : if (DecodeComplete) {
900 : // Decoding complete.
901 0 : LLVM_DEBUG(dbgs() << (S != MCDisassembler::Fail ? "PASS" : "FAIL") << "\n");
902 : MI = TmpMI;
903 : return S;
904 0 : } else {
905 : assert(S == MCDisassembler::Fail);
906 0 : // If the decoding was incomplete, skip.
907 0 : Ptr += NumToSkip;
908 : LLVM_DEBUG(dbgs() << "FAIL: continuing at " << (Ptr - DecodeTable) << "\n");
909 0 : // Reset decode status. This also drops a SoftFail status that could be
910 0 : // set before the decode attempt.
911 0 : S = MCDisassembler::Success;
912 : }
913 0 : break;
914 0 : }
915 : case MCD::OPC_SoftFail: {
916 0 : // Decode the mask values.
917 0 : unsigned Len;
918 : InsnType PositiveMask = decodeULEB128(++Ptr, &Len);
919 0 : Ptr += Len;
920 : InsnType NegativeMask = decodeULEB128(Ptr, &Len);
921 0 : Ptr += Len;
922 0 : bool Fail = (insn & PositiveMask) || (~insn & NegativeMask);
923 0 : if (Fail)
924 0 : S = MCDisassembler::SoftFail;
925 0 : LLVM_DEBUG(dbgs() << Loc << ": OPC_SoftFail: " << (Fail ? "FAIL\n":"PASS\n"));
926 : break;
927 0 : }
928 0 : case MCD::OPC_Fail: {
929 : LLVM_DEBUG(dbgs() << Loc << ": OPC_Fail\n");
930 0 : return MCDisassembler::Fail;
931 : }
932 : }
933 143 : }
934 : llvm_unreachable("bogosity detected in disassembler state machine!");
935 143 : }
936 :
937 143 :
938 0 : } // End llvm namespace
|