1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* Assembly Writer Source Fragment *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* From: XCore.td *| |
7 | |* *| |
8 | \*===----------------------------------------------------------------------===*/ |
9 | |
10 | /// getMnemonic - This method is automatically generated by tablegen |
11 | /// from the instruction set description. |
12 | std::pair<const char *, uint64_t> XCoreInstPrinter::getMnemonic(const MCInst *MI) { |
13 | |
14 | #ifdef __GNUC__ |
15 | #pragma GCC diagnostic push |
16 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
17 | #endif |
18 | static const char AsmStrs[] = { |
19 | /* 0 */ "ldap r11, \0" |
20 | /* 11 */ "getsr r11, \0" |
21 | /* 23 */ "set cp, \0" |
22 | /* 32 */ "set dp, \0" |
23 | /* 41 */ "set sp, \0" |
24 | /* 50 */ "crc32 \0" |
25 | /* 57 */ "lda16 \0" |
26 | /* 64 */ "st16 \0" |
27 | /* 70 */ "crc8 \0" |
28 | /* 76 */ "st8 \0" |
29 | /* 81 */ "# LDAWFI \0" |
30 | /* 91 */ "# LDWFI \0" |
31 | /* 100 */ "# STWFI \0" |
32 | /* 109 */ "# EH_RETURN \0" |
33 | /* 122 */ "# ADJCALLSTACKDOWN \0" |
34 | /* 142 */ "# ADJCALLSTACKUP \0" |
35 | /* 160 */ "# FRAME_TO_ARGS_OFFSET \0" |
36 | /* 184 */ "bla \0" |
37 | /* 189 */ "lsub \0" |
38 | /* 195 */ "ldc \0" |
39 | /* 200 */ "ladd \0" |
40 | /* 206 */ "and \0" |
41 | /* 211 */ "getd \0" |
42 | /* 217 */ "bf \0" |
43 | /* 221 */ "eef \0" |
44 | /* 226 */ "waitef \0" |
45 | /* 234 */ "ecallf \0" |
46 | /* 242 */ "neg \0" |
47 | /* 247 */ "dgetreg \0" |
48 | /* 256 */ "peek \0" |
49 | /* 262 */ "mkmsk \0" |
50 | /* 269 */ "bl \0" |
51 | /* 273 */ "testlcl \0" |
52 | /* 282 */ "shl \0" |
53 | /* 287 */ "kcall \0" |
54 | /* 294 */ "lmul \0" |
55 | /* 300 */ "endin \0" |
56 | /* 307 */ "getn \0" |
57 | /* 313 */ "extdp \0" |
58 | /* 320 */ "retsp \0" |
59 | /* 327 */ "kentsp \0" |
60 | /* 335 */ "krestsp \0" |
61 | /* 344 */ "extsp \0" |
62 | /* 351 */ "eq \0" |
63 | /* 355 */ "ashr \0" |
64 | /* 361 */ "inshr \0" |
65 | /* 368 */ "xor \0" |
66 | /* 373 */ "clrsr \0" |
67 | /* 380 */ "setsr \0" |
68 | /* 387 */ "getr \0" |
69 | /* 393 */ "ld16s \0" |
70 | /* 400 */ "maccs \0" |
71 | /* 407 */ "rems \0" |
72 | /* 413 */ "lss \0" |
73 | /* 418 */ "getts \0" |
74 | /* 425 */ "divs \0" |
75 | /* 431 */ "blat \0" |
76 | /* 437 */ "bt \0" |
77 | /* 441 */ "inct \0" |
78 | /* 447 */ "testct \0" |
79 | /* 455 */ "testwct \0" |
80 | /* 464 */ "eet \0" |
81 | /* 469 */ "get \0" |
82 | /* 474 */ "waitet \0" |
83 | /* 482 */ "ecallt \0" |
84 | /* 490 */ "int \0" |
85 | /* 495 */ "andnot \0" |
86 | /* 503 */ "getst \0" |
87 | /* 510 */ "sext \0" |
88 | /* 516 */ "zext \0" |
89 | /* 522 */ "ld8u \0" |
90 | /* 528 */ "bau \0" |
91 | /* 533 */ "bu \0" |
92 | /* 537 */ "maccu \0" |
93 | /* 544 */ "remu \0" |
94 | /* 550 */ "bru \0" |
95 | /* 555 */ "lsu \0" |
96 | /* 560 */ "ldivu \0" |
97 | /* 567 */ "byterev \0" |
98 | /* 576 */ "bitrev \0" |
99 | /* 584 */ "ldaw \0" |
100 | /* 590 */ "ldw \0" |
101 | /* 595 */ "inpw \0" |
102 | /* 601 */ "stw \0" |
103 | /* 606 */ "clz \0" |
104 | /* 611 */ "# SELECT_CC PSEUDO!\0" |
105 | /* 631 */ "# XRay Function Patchable RET.\0" |
106 | /* 662 */ "# XRay Typed Event Log.\0" |
107 | /* 686 */ "# XRay Custom Event Log.\0" |
108 | /* 711 */ "# XRay Function Enter.\0" |
109 | /* 734 */ "# XRay Tail Call Exit.\0" |
110 | /* 757 */ "# XRay Function Exit.\0" |
111 | /* 779 */ "set kep, r11\0" |
112 | /* 792 */ "LIFETIME_END\0" |
113 | /* 805 */ "PSEUDO_PROBE\0" |
114 | /* 818 */ "BUNDLE\0" |
115 | /* 825 */ "DBG_VALUE\0" |
116 | /* 835 */ "DBG_INSTR_REF\0" |
117 | /* 849 */ "DBG_PHI\0" |
118 | /* 857 */ "DBG_LABEL\0" |
119 | /* 867 */ "LIFETIME_START\0" |
120 | /* 882 */ "DBG_VALUE_LIST\0" |
121 | /* 897 */ "ldaw r11, cp[\0" |
122 | /* 911 */ "ldw r11, cp[\0" |
123 | /* 924 */ "bla cp[\0" |
124 | /* 932 */ "msync res[\0" |
125 | /* 943 */ "setpsc res[\0" |
126 | /* 955 */ "setc res[\0" |
127 | /* 965 */ "setd res[\0" |
128 | /* 975 */ "setclk res[\0" |
129 | /* 987 */ "mjoin res[\0" |
130 | /* 998 */ "setn res[\0" |
131 | /* 1008 */ "syncr res[\0" |
132 | /* 1019 */ "freer res[\0" |
133 | /* 1030 */ "outshr res[\0" |
134 | /* 1042 */ "chkct res[\0" |
135 | /* 1053 */ "outct res[\0" |
136 | /* 1064 */ "clrpt res[\0" |
137 | /* 1075 */ "setpt res[\0" |
138 | /* 1086 */ "outt res[\0" |
139 | /* 1096 */ "out res[\0" |
140 | /* 1105 */ "edu res[\0" |
141 | /* 1114 */ "eeu res[\0" |
142 | /* 1123 */ "setev res[\0" |
143 | /* 1134 */ "setv res[\0" |
144 | /* 1144 */ "outpw res[\0" |
145 | /* 1155 */ "settw res[\0" |
146 | /* 1166 */ "setrdy res[\0" |
147 | /* 1178 */ "set ps[\0" |
148 | /* 1186 */ "set t[\0" |
149 | /* 1193 */ "init t[\0" |
150 | /* 1201 */ "start t[\0" |
151 | /* 1210 */ "ldw spc, sp[1]\0" |
152 | /* 1225 */ "stw spc, sp[1]\0" |
153 | /* 1240 */ "ldw ssr, sp[2]\0" |
154 | /* 1255 */ "stw ssr, sp[2]\0" |
155 | /* 1270 */ "ldw sed, sp[3]\0" |
156 | /* 1285 */ "stw sed, sp[3]\0" |
157 | /* 1300 */ "ldw et, sp[4]\0" |
158 | /* 1314 */ "stw et, sp[4]\0" |
159 | /* 1328 */ "ssync\0" |
160 | /* 1334 */ "get r11, ed\0" |
161 | /* 1346 */ "get r11, id\0" |
162 | /* 1358 */ "clre\0" |
163 | /* 1363 */ "# FEntry call\0" |
164 | /* 1377 */ "dcall\0" |
165 | /* 1383 */ "get r11, kep\0" |
166 | /* 1396 */ "get r11, ksp\0" |
167 | /* 1409 */ "dentsp\0" |
168 | /* 1416 */ "drestsp\0" |
169 | /* 1424 */ "tsetmr r\0" |
170 | /* 1433 */ "get r11, et\0" |
171 | /* 1445 */ "freet\0" |
172 | /* 1451 */ "dret\0" |
173 | /* 1456 */ "kret\0" |
174 | /* 1461 */ "waiteu\0" |
175 | }; |
176 | #ifdef __GNUC__ |
177 | #pragma GCC diagnostic pop |
178 | #endif |
179 | |
180 | static const uint32_t OpInfo0[] = { |
181 | 0U, // PHI |
182 | 0U, // INLINEASM |
183 | 0U, // INLINEASM_BR |
184 | 0U, // CFI_INSTRUCTION |
185 | 0U, // EH_LABEL |
186 | 0U, // GC_LABEL |
187 | 0U, // ANNOTATION_LABEL |
188 | 0U, // KILL |
189 | 0U, // EXTRACT_SUBREG |
190 | 0U, // INSERT_SUBREG |
191 | 0U, // IMPLICIT_DEF |
192 | 0U, // SUBREG_TO_REG |
193 | 0U, // COPY_TO_REGCLASS |
194 | 826U, // DBG_VALUE |
195 | 883U, // DBG_VALUE_LIST |
196 | 836U, // DBG_INSTR_REF |
197 | 850U, // DBG_PHI |
198 | 858U, // DBG_LABEL |
199 | 0U, // REG_SEQUENCE |
200 | 0U, // COPY |
201 | 819U, // BUNDLE |
202 | 868U, // LIFETIME_START |
203 | 793U, // LIFETIME_END |
204 | 806U, // PSEUDO_PROBE |
205 | 0U, // ARITH_FENCE |
206 | 0U, // STACKMAP |
207 | 1364U, // FENTRY_CALL |
208 | 0U, // PATCHPOINT |
209 | 0U, // LOAD_STACK_GUARD |
210 | 0U, // PREALLOCATED_SETUP |
211 | 0U, // PREALLOCATED_ARG |
212 | 0U, // STATEPOINT |
213 | 0U, // LOCAL_ESCAPE |
214 | 0U, // FAULTING_OP |
215 | 0U, // PATCHABLE_OP |
216 | 712U, // PATCHABLE_FUNCTION_ENTER |
217 | 632U, // PATCHABLE_RET |
218 | 758U, // PATCHABLE_FUNCTION_EXIT |
219 | 735U, // PATCHABLE_TAIL_CALL |
220 | 687U, // PATCHABLE_EVENT_CALL |
221 | 663U, // PATCHABLE_TYPED_EVENT_CALL |
222 | 0U, // ICALL_BRANCH_FUNNEL |
223 | 0U, // MEMBARRIER |
224 | 0U, // JUMP_TABLE_DEBUG_INFO |
225 | 0U, // CONVERGENCECTRL_ENTRY |
226 | 0U, // CONVERGENCECTRL_ANCHOR |
227 | 0U, // CONVERGENCECTRL_LOOP |
228 | 0U, // CONVERGENCECTRL_GLUE |
229 | 0U, // G_ASSERT_SEXT |
230 | 0U, // G_ASSERT_ZEXT |
231 | 0U, // G_ASSERT_ALIGN |
232 | 0U, // G_ADD |
233 | 0U, // G_SUB |
234 | 0U, // G_MUL |
235 | 0U, // G_SDIV |
236 | 0U, // G_UDIV |
237 | 0U, // G_SREM |
238 | 0U, // G_UREM |
239 | 0U, // G_SDIVREM |
240 | 0U, // G_UDIVREM |
241 | 0U, // G_AND |
242 | 0U, // G_OR |
243 | 0U, // G_XOR |
244 | 0U, // G_IMPLICIT_DEF |
245 | 0U, // G_PHI |
246 | 0U, // G_FRAME_INDEX |
247 | 0U, // G_GLOBAL_VALUE |
248 | 0U, // G_PTRAUTH_GLOBAL_VALUE |
249 | 0U, // G_CONSTANT_POOL |
250 | 0U, // G_EXTRACT |
251 | 0U, // G_UNMERGE_VALUES |
252 | 0U, // G_INSERT |
253 | 0U, // G_MERGE_VALUES |
254 | 0U, // G_BUILD_VECTOR |
255 | 0U, // G_BUILD_VECTOR_TRUNC |
256 | 0U, // G_CONCAT_VECTORS |
257 | 0U, // G_PTRTOINT |
258 | 0U, // G_INTTOPTR |
259 | 0U, // G_BITCAST |
260 | 0U, // G_FREEZE |
261 | 0U, // G_CONSTANT_FOLD_BARRIER |
262 | 0U, // G_INTRINSIC_FPTRUNC_ROUND |
263 | 0U, // G_INTRINSIC_TRUNC |
264 | 0U, // G_INTRINSIC_ROUND |
265 | 0U, // G_INTRINSIC_LRINT |
266 | 0U, // G_INTRINSIC_LLRINT |
267 | 0U, // G_INTRINSIC_ROUNDEVEN |
268 | 0U, // G_READCYCLECOUNTER |
269 | 0U, // G_READSTEADYCOUNTER |
270 | 0U, // G_LOAD |
271 | 0U, // G_SEXTLOAD |
272 | 0U, // G_ZEXTLOAD |
273 | 0U, // G_INDEXED_LOAD |
274 | 0U, // G_INDEXED_SEXTLOAD |
275 | 0U, // G_INDEXED_ZEXTLOAD |
276 | 0U, // G_STORE |
277 | 0U, // G_INDEXED_STORE |
278 | 0U, // G_ATOMIC_CMPXCHG_WITH_SUCCESS |
279 | 0U, // G_ATOMIC_CMPXCHG |
280 | 0U, // G_ATOMICRMW_XCHG |
281 | 0U, // G_ATOMICRMW_ADD |
282 | 0U, // G_ATOMICRMW_SUB |
283 | 0U, // G_ATOMICRMW_AND |
284 | 0U, // G_ATOMICRMW_NAND |
285 | 0U, // G_ATOMICRMW_OR |
286 | 0U, // G_ATOMICRMW_XOR |
287 | 0U, // G_ATOMICRMW_MAX |
288 | 0U, // G_ATOMICRMW_MIN |
289 | 0U, // G_ATOMICRMW_UMAX |
290 | 0U, // G_ATOMICRMW_UMIN |
291 | 0U, // G_ATOMICRMW_FADD |
292 | 0U, // G_ATOMICRMW_FSUB |
293 | 0U, // G_ATOMICRMW_FMAX |
294 | 0U, // G_ATOMICRMW_FMIN |
295 | 0U, // G_ATOMICRMW_UINC_WRAP |
296 | 0U, // G_ATOMICRMW_UDEC_WRAP |
297 | 0U, // G_FENCE |
298 | 0U, // G_PREFETCH |
299 | 0U, // G_BRCOND |
300 | 0U, // G_BRINDIRECT |
301 | 0U, // G_INVOKE_REGION_START |
302 | 0U, // G_INTRINSIC |
303 | 0U, // G_INTRINSIC_W_SIDE_EFFECTS |
304 | 0U, // G_INTRINSIC_CONVERGENT |
305 | 0U, // G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS |
306 | 0U, // G_ANYEXT |
307 | 0U, // G_TRUNC |
308 | 0U, // G_CONSTANT |
309 | 0U, // G_FCONSTANT |
310 | 0U, // G_VASTART |
311 | 0U, // G_VAARG |
312 | 0U, // G_SEXT |
313 | 0U, // G_SEXT_INREG |
314 | 0U, // G_ZEXT |
315 | 0U, // G_SHL |
316 | 0U, // G_LSHR |
317 | 0U, // G_ASHR |
318 | 0U, // G_FSHL |
319 | 0U, // G_FSHR |
320 | 0U, // G_ROTR |
321 | 0U, // G_ROTL |
322 | 0U, // G_ICMP |
323 | 0U, // G_FCMP |
324 | 0U, // G_SCMP |
325 | 0U, // G_UCMP |
326 | 0U, // G_SELECT |
327 | 0U, // G_UADDO |
328 | 0U, // G_UADDE |
329 | 0U, // G_USUBO |
330 | 0U, // G_USUBE |
331 | 0U, // G_SADDO |
332 | 0U, // G_SADDE |
333 | 0U, // G_SSUBO |
334 | 0U, // G_SSUBE |
335 | 0U, // G_UMULO |
336 | 0U, // G_SMULO |
337 | 0U, // G_UMULH |
338 | 0U, // G_SMULH |
339 | 0U, // G_UADDSAT |
340 | 0U, // G_SADDSAT |
341 | 0U, // G_USUBSAT |
342 | 0U, // G_SSUBSAT |
343 | 0U, // G_USHLSAT |
344 | 0U, // G_SSHLSAT |
345 | 0U, // G_SMULFIX |
346 | 0U, // G_UMULFIX |
347 | 0U, // G_SMULFIXSAT |
348 | 0U, // G_UMULFIXSAT |
349 | 0U, // G_SDIVFIX |
350 | 0U, // G_UDIVFIX |
351 | 0U, // G_SDIVFIXSAT |
352 | 0U, // G_UDIVFIXSAT |
353 | 0U, // G_FADD |
354 | 0U, // G_FSUB |
355 | 0U, // G_FMUL |
356 | 0U, // G_FMA |
357 | 0U, // G_FMAD |
358 | 0U, // G_FDIV |
359 | 0U, // G_FREM |
360 | 0U, // G_FPOW |
361 | 0U, // G_FPOWI |
362 | 0U, // G_FEXP |
363 | 0U, // G_FEXP2 |
364 | 0U, // G_FEXP10 |
365 | 0U, // G_FLOG |
366 | 0U, // G_FLOG2 |
367 | 0U, // G_FLOG10 |
368 | 0U, // G_FLDEXP |
369 | 0U, // G_FFREXP |
370 | 0U, // G_FNEG |
371 | 0U, // G_FPEXT |
372 | 0U, // G_FPTRUNC |
373 | 0U, // G_FPTOSI |
374 | 0U, // G_FPTOUI |
375 | 0U, // G_SITOFP |
376 | 0U, // G_UITOFP |
377 | 0U, // G_FABS |
378 | 0U, // G_FCOPYSIGN |
379 | 0U, // G_IS_FPCLASS |
380 | 0U, // G_FCANONICALIZE |
381 | 0U, // G_FMINNUM |
382 | 0U, // G_FMAXNUM |
383 | 0U, // G_FMINNUM_IEEE |
384 | 0U, // G_FMAXNUM_IEEE |
385 | 0U, // G_FMINIMUM |
386 | 0U, // G_FMAXIMUM |
387 | 0U, // G_GET_FPENV |
388 | 0U, // G_SET_FPENV |
389 | 0U, // G_RESET_FPENV |
390 | 0U, // G_GET_FPMODE |
391 | 0U, // G_SET_FPMODE |
392 | 0U, // G_RESET_FPMODE |
393 | 0U, // G_PTR_ADD |
394 | 0U, // G_PTRMASK |
395 | 0U, // G_SMIN |
396 | 0U, // G_SMAX |
397 | 0U, // G_UMIN |
398 | 0U, // G_UMAX |
399 | 0U, // G_ABS |
400 | 0U, // G_LROUND |
401 | 0U, // G_LLROUND |
402 | 0U, // G_BR |
403 | 0U, // G_BRJT |
404 | 0U, // G_VSCALE |
405 | 0U, // G_INSERT_SUBVECTOR |
406 | 0U, // G_EXTRACT_SUBVECTOR |
407 | 0U, // G_INSERT_VECTOR_ELT |
408 | 0U, // G_EXTRACT_VECTOR_ELT |
409 | 0U, // G_SHUFFLE_VECTOR |
410 | 0U, // G_SPLAT_VECTOR |
411 | 0U, // G_VECTOR_COMPRESS |
412 | 0U, // G_CTTZ |
413 | 0U, // G_CTTZ_ZERO_UNDEF |
414 | 0U, // G_CTLZ |
415 | 0U, // G_CTLZ_ZERO_UNDEF |
416 | 0U, // G_CTPOP |
417 | 0U, // G_BSWAP |
418 | 0U, // G_BITREVERSE |
419 | 0U, // G_FCEIL |
420 | 0U, // G_FCOS |
421 | 0U, // G_FSIN |
422 | 0U, // G_FTAN |
423 | 0U, // G_FACOS |
424 | 0U, // G_FASIN |
425 | 0U, // G_FATAN |
426 | 0U, // G_FCOSH |
427 | 0U, // G_FSINH |
428 | 0U, // G_FTANH |
429 | 0U, // G_FSQRT |
430 | 0U, // G_FFLOOR |
431 | 0U, // G_FRINT |
432 | 0U, // G_FNEARBYINT |
433 | 0U, // G_ADDRSPACE_CAST |
434 | 0U, // G_BLOCK_ADDR |
435 | 0U, // G_JUMP_TABLE |
436 | 0U, // G_DYN_STACKALLOC |
437 | 0U, // G_STACKSAVE |
438 | 0U, // G_STACKRESTORE |
439 | 0U, // G_STRICT_FADD |
440 | 0U, // G_STRICT_FSUB |
441 | 0U, // G_STRICT_FMUL |
442 | 0U, // G_STRICT_FDIV |
443 | 0U, // G_STRICT_FREM |
444 | 0U, // G_STRICT_FMA |
445 | 0U, // G_STRICT_FSQRT |
446 | 0U, // G_STRICT_FLDEXP |
447 | 0U, // G_READ_REGISTER |
448 | 0U, // G_WRITE_REGISTER |
449 | 0U, // G_MEMCPY |
450 | 0U, // G_MEMCPY_INLINE |
451 | 0U, // G_MEMMOVE |
452 | 0U, // G_MEMSET |
453 | 0U, // G_BZERO |
454 | 0U, // G_TRAP |
455 | 0U, // G_DEBUGTRAP |
456 | 0U, // G_UBSANTRAP |
457 | 0U, // G_VECREDUCE_SEQ_FADD |
458 | 0U, // G_VECREDUCE_SEQ_FMUL |
459 | 0U, // G_VECREDUCE_FADD |
460 | 0U, // G_VECREDUCE_FMUL |
461 | 0U, // G_VECREDUCE_FMAX |
462 | 0U, // G_VECREDUCE_FMIN |
463 | 0U, // G_VECREDUCE_FMAXIMUM |
464 | 0U, // G_VECREDUCE_FMINIMUM |
465 | 0U, // G_VECREDUCE_ADD |
466 | 0U, // G_VECREDUCE_MUL |
467 | 0U, // G_VECREDUCE_AND |
468 | 0U, // G_VECREDUCE_OR |
469 | 0U, // G_VECREDUCE_XOR |
470 | 0U, // G_VECREDUCE_SMAX |
471 | 0U, // G_VECREDUCE_SMIN |
472 | 0U, // G_VECREDUCE_UMAX |
473 | 0U, // G_VECREDUCE_UMIN |
474 | 0U, // G_SBFX |
475 | 0U, // G_UBFX |
476 | 2171U, // ADJCALLSTACKDOWN |
477 | 10383U, // ADJCALLSTACKUP |
478 | 283175U, // BR_JT |
479 | 545319U, // BR_JT32 |
480 | 2158U, // EH_RETURN |
481 | 10401U, // FRAME_TO_ARGS_OFFSET |
482 | 2130U, // LDAWFI |
483 | 2140U, // LDWFI |
484 | 612U, // SELECT_CC |
485 | 2149U, // STWFI |
486 | 2099402U, // ADD_2rus |
487 | 2099402U, // ADD_3r |
488 | 788976U, // ANDNOT_2r |
489 | 2099407U, // AND_3r |
490 | 2099556U, // ASHR_l2rus |
491 | 2099556U, // ASHR_l3r |
492 | 10769U, // BAU_1r |
493 | 2625U, // BITREV_l2r |
494 | 27549U, // BLACP_lu10 |
495 | 27549U, // BLACP_u10 |
496 | 10672U, // BLAT_lu6 |
497 | 10672U, // BLAT_u6 |
498 | 10425U, // BLA_1r |
499 | 10510U, // BLRB_lu10 |
500 | 10510U, // BLRB_u10 |
501 | 10510U, // BLRF_lu10 |
502 | 10510U, // BLRF_u10 |
503 | 2266U, // BRBF_lru6 |
504 | 2266U, // BRBF_ru6 |
505 | 2486U, // BRBT_lru6 |
506 | 2486U, // BRBT_ru6 |
507 | 10774U, // BRBU_lu6 |
508 | 10774U, // BRBU_u6 |
509 | 2266U, // BRFF_lru6 |
510 | 2266U, // BRFF_ru6 |
511 | 2486U, // BRFT_lru6 |
512 | 2486U, // BRFT_ru6 |
513 | 10774U, // BRFU_lu6 |
514 | 10774U, // BRFU_u6 |
515 | 10791U, // BRU_1r |
516 | 2616U, // BYTEREV_l2r |
517 | 35859U, // CHKCT_2r |
518 | 35859U, // CHKCT_rus |
519 | 1359U, // CLRE_0R |
520 | 27689U, // CLRPT_1R |
521 | 10614U, // CLRSR_branch_lu6 |
522 | 10614U, // CLRSR_branch_u6 |
523 | 10614U, // CLRSR_lu6 |
524 | 10614U, // CLRSR_u6 |
525 | 2655U, // CLZ_l2r |
526 | 5247047U, // CRC8_l4r |
527 | 19662899U, // CRC_l3r |
528 | 1378U, // DCALL_0R |
529 | 1410U, // DENTSP_0R |
530 | 10488U, // DGETREG_1r |
531 | 2099626U, // DIVS_l3r |
532 | 2099762U, // DIVU_l3r |
533 | 1417U, // DRESTSP_0R |
534 | 1452U, // DRET_0R |
535 | 10475U, // ECALLF_1r |
536 | 10723U, // ECALLT_1r |
537 | 27730U, // EDU_1r |
538 | 6334686U, // EEF_2r |
539 | 6334929U, // EET_2r |
540 | 27739U, // EEU_1r |
541 | 6334765U, // ENDIN_2r |
542 | 10569U, // ENTSP_lu6 |
543 | 10569U, // ENTSP_u6 |
544 | 2099552U, // EQ_2rus |
545 | 2099552U, // EQ_3r |
546 | 10554U, // EXTDP_lu6 |
547 | 10554U, // EXTDP_u6 |
548 | 10585U, // EXTSP_lu6 |
549 | 10585U, // EXTSP_u6 |
550 | 27644U, // FREER_1r |
551 | 1446U, // FREET_0R |
552 | 6334676U, // GETD_l2r |
553 | 1335U, // GETED_0R |
554 | 1434U, // GETET_0R |
555 | 1347U, // GETID_0R |
556 | 1384U, // GETKEP_0R |
557 | 1397U, // GETKSP_0R |
558 | 6334772U, // GETN_l2r |
559 | 51670U, // GETPS_l2r |
560 | 2436U, // GETR_rus |
561 | 10252U, // GETSR_lu6 |
562 | 10252U, // GETSR_u6 |
563 | 6334968U, // GETST_2r |
564 | 6334883U, // GETTS_2r |
565 | 6334906U, // INCT_2r |
566 | 62634U, // INITCP_2r |
567 | 70826U, // INITDP_2r |
568 | 79018U, // INITLR_l2r |
569 | 87210U, // INITPC_2r |
570 | 95402U, // INITSP_2r |
571 | 8432212U, // INPW_l2rus |
572 | 7121258U, // INSHR_2r |
573 | 6334955U, // INT_2r |
574 | 6334768U, // IN_2r |
575 | 10528U, // KCALL_1r |
576 | 10528U, // KCALL_lu6 |
577 | 10528U, // KCALL_u6 |
578 | 10568U, // KENTSP_lu6 |
579 | 10568U, // KENTSP_u6 |
580 | 10576U, // KRESTSP_lu6 |
581 | 10576U, // KRESTSP_u6 |
582 | 1457U, // KRET_0R |
583 | 45093065U, // LADD_l5r |
584 | 12585354U, // LD16S_3r |
585 | 12585483U, // LD8U_3r |
586 | 14682170U, // LDA16B_l3r |
587 | 12585018U, // LDA16F_l3r |
588 | 10241U, // LDAPB_lu10 |
589 | 10241U, // LDAPB_u10 |
590 | 10241U, // LDAPF_lu10 |
591 | 10241U, // LDAPF_lu10_ba |
592 | 10241U, // LDAPF_u10 |
593 | 14682697U, // LDAWB_l2rus |
594 | 14682697U, // LDAWB_l3r |
595 | 27522U, // LDAWCP_lu6 |
596 | 27522U, // LDAWCP_u6 |
597 | 100937U, // LDAWDP_lru6 |
598 | 100937U, // LDAWDP_ru6 |
599 | 12585545U, // LDAWF_l2rus |
600 | 12585545U, // LDAWF_l3r |
601 | 109129U, // LDAWSP_lru6 |
602 | 109129U, // LDAWSP_ru6 |
603 | 2244U, // LDC_lru6 |
604 | 2244U, // LDC_ru6 |
605 | 1301U, // LDET_0R |
606 | 186649137U, // LDIVU_l5r |
607 | 1271U, // LDSED_0R |
608 | 1211U, // LDSPC_0R |
609 | 1241U, // LDSSR_0R |
610 | 117327U, // LDWCP_lru6 |
611 | 27536U, // LDWCP_lu10 |
612 | 117327U, // LDWCP_ru6 |
613 | 27536U, // LDWCP_u10 |
614 | 100943U, // LDWDP_lru6 |
615 | 100943U, // LDWDP_ru6 |
616 | 109135U, // LDWSP_lru6 |
617 | 109135U, // LDWSP_ru6 |
618 | 12585551U, // LDW_2rus |
619 | 12585551U, // LDW_3r |
620 | 270534951U, // LMUL_l6r |
621 | 2099614U, // LSS_3r |
622 | 45093054U, // LSUB_l5r |
623 | 2099756U, // LSU_3r |
624 | 455084433U, // MACCS_l4r |
625 | 455084570U, // MACCU_l4r |
626 | 27612U, // MJOIN_1r |
627 | 2311U, // MKMSK_2r |
628 | 2311U, // MKMSK_rus |
629 | 27557U, // MSYNC_1r |
630 | 2099496U, // MUL_l3r |
631 | 2291U, // NEG |
632 | 2547U, // NOT |
633 | 2099570U, // OR_3r |
634 | 35870U, // OUTCT_2r |
635 | 35870U, // OUTCT_rus |
636 | 78681209U, // OUTPW_l2rus |
637 | 39943U, // OUTSHR_2r |
638 | 35903U, // OUTT_2r |
639 | 35913U, // OUT_2r |
640 | 6334721U, // PEEK_2r |
641 | 2099608U, // REMS_l3r |
642 | 2099745U, // REMU_l3r |
643 | 10561U, // RETSP_lu6 |
644 | 10561U, // RETSP_u6 |
645 | 35792U, // SETCLK_l2r |
646 | 10264U, // SETCP_1r |
647 | 35772U, // SETC_l2r |
648 | 35772U, // SETC_lru6 |
649 | 35772U, // SETC_ru6 |
650 | 10273U, // SETDP_1r |
651 | 35782U, // SETD_2r |
652 | 126052U, // SETEV_1r |
653 | 780U, // SETKEP_0R |
654 | 35815U, // SETN_l2r |
655 | 35760U, // SETPSC_2r |
656 | 35995U, // SETPS_l2r |
657 | 35892U, // SETPT_2r |
658 | 35983U, // SETRDY_l2r |
659 | 10282U, // SETSP_1r |
660 | 10621U, // SETSR_branch_lu6 |
661 | 10621U, // SETSR_branch_u6 |
662 | 10621U, // SETSR_lu6 |
663 | 10621U, // SETSR_u6 |
664 | 35972U, // SETTW_l2r |
665 | 126063U, // SETV_1r |
666 | 788991U, // SEXT_2r |
667 | 788991U, // SEXT_rus |
668 | 2099483U, // SHL_2rus |
669 | 2099483U, // SHL_3r |
670 | 2099557U, // SHR_2rus |
671 | 2099557U, // SHR_3r |
672 | 1329U, // SSYNC_0r |
673 | 12585025U, // ST16_l3r |
674 | 12585037U, // ST8_l3r |
675 | 1315U, // STET_0R |
676 | 1286U, // STSED_0R |
677 | 1226U, // STSPC_0R |
678 | 1256U, // STSSR_0R |
679 | 100954U, // STWDP_lru6 |
680 | 100954U, // STWDP_ru6 |
681 | 109146U, // STWSP_lru6 |
682 | 109146U, // STWSP_ru6 |
683 | 12585562U, // STW_2rus |
684 | 12585562U, // STW_l3r |
685 | 2099391U, // SUB_2rus |
686 | 2099391U, // SUB_3r |
687 | 27633U, // SYNCR_1r |
688 | 6334912U, // TESTCT_2r |
689 | 6334738U, // TESTLCL_l2r |
690 | 6334920U, // TESTWCT_2r |
691 | 3473U, // TSETMR_2r |
692 | 138403U, // TSETR_3r |
693 | 27826U, // TSTART_1R |
694 | 10467U, // WAITEF_1R |
695 | 10715U, // WAITET_1R |
696 | 1462U, // WAITEU_0R |
697 | 2099569U, // XOR_l3r |
698 | 788997U, // ZEXT_2r |
699 | 788997U, // ZEXT_rus |
700 | }; |
701 | |
702 | // Emit the opcode for the instruction. |
703 | uint32_t Bits = 0; |
704 | Bits |= OpInfo0[MI->getOpcode()] << 0; |
705 | if (Bits == 0) |
706 | return {nullptr, Bits}; |
707 | return {AsmStrs+(Bits & 2047)-1, Bits}; |
708 | |
709 | } |
710 | /// printInstruction - This method is automatically generated by tablegen |
711 | /// from the instruction set description. |
712 | LLVM_NO_PROFILE_INSTRUMENT_FUNCTION |
713 | void XCoreInstPrinter::printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O) { |
714 | O << "\t" ; |
715 | |
716 | auto MnemonicInfo = getMnemonic(MI); |
717 | |
718 | O << MnemonicInfo.first; |
719 | |
720 | uint32_t Bits = MnemonicInfo.second; |
721 | assert(Bits != 0 && "Cannot print this instruction." ); |
722 | |
723 | // Fragment 0 encoded into 2 bits for 4 unique commands. |
724 | switch ((Bits >> 11) & 3) { |
725 | default: llvm_unreachable("Invalid command number." ); |
726 | case 0: |
727 | // DBG_VALUE, DBG_VALUE_LIST, DBG_INSTR_REF, DBG_PHI, DBG_LABEL, BUNDLE, ... |
728 | return; |
729 | break; |
730 | case 1: |
731 | // ADJCALLSTACKDOWN, ADJCALLSTACKUP, EH_RETURN, FRAME_TO_ARGS_OFFSET, LDA... |
732 | printOperand(MI, OpNo: 0, O); |
733 | break; |
734 | case 2: |
735 | // BR_JT, BR_JT32, CRC8_l4r, INITCP_2r, INITDP_2r, INITLR_l2r, INITPC_2r,... |
736 | printOperand(MI, OpNo: 1, O); |
737 | break; |
738 | case 3: |
739 | // OUTSHR_2r, TSETR_3r |
740 | printOperand(MI, OpNo: 2, O); |
741 | break; |
742 | } |
743 | |
744 | |
745 | // Fragment 1 encoded into 5 bits for 17 unique commands. |
746 | switch ((Bits >> 13) & 31) { |
747 | default: llvm_unreachable("Invalid command number." ); |
748 | case 0: |
749 | // ADJCALLSTACKDOWN, EH_RETURN, LDAWFI, LDWFI, STWFI, ADD_2rus, ADD_3r, A... |
750 | O << ", " ; |
751 | break; |
752 | case 1: |
753 | // ADJCALLSTACKUP, FRAME_TO_ARGS_OFFSET, BAU_1r, BLAT_lu6, BLAT_u6, BLA_1... |
754 | return; |
755 | break; |
756 | case 2: |
757 | // BR_JT, BR_JT32 |
758 | O << "\n" ; |
759 | break; |
760 | case 3: |
761 | // BLACP_lu10, BLACP_u10, CLRPT_1R, EDU_1r, EEU_1r, FREER_1r, LDAWCP_lu6,... |
762 | O << ']'; |
763 | return; |
764 | break; |
765 | case 4: |
766 | // CHKCT_2r, CHKCT_rus, OUTCT_2r, OUTCT_rus, OUTPW_l2rus, OUTSHR_2r, OUTT... |
767 | O << "], " ; |
768 | break; |
769 | case 5: |
770 | // EEF_2r, EET_2r, ENDIN_2r, GETD_l2r, GETN_l2r, GETST_2r, GETTS_2r, INCT... |
771 | O << ", res[" ; |
772 | break; |
773 | case 6: |
774 | // GETPS_l2r |
775 | O << ", ps[" ; |
776 | printOperand(MI, OpNo: 1, O); |
777 | O << ']'; |
778 | return; |
779 | break; |
780 | case 7: |
781 | // INITCP_2r |
782 | O << "]:cp, " ; |
783 | printOperand(MI, OpNo: 0, O); |
784 | return; |
785 | break; |
786 | case 8: |
787 | // INITDP_2r |
788 | O << "]:dp, " ; |
789 | printOperand(MI, OpNo: 0, O); |
790 | return; |
791 | break; |
792 | case 9: |
793 | // INITLR_l2r |
794 | O << "]:lr, " ; |
795 | printOperand(MI, OpNo: 0, O); |
796 | return; |
797 | break; |
798 | case 10: |
799 | // INITPC_2r |
800 | O << "]:pc, " ; |
801 | printOperand(MI, OpNo: 0, O); |
802 | return; |
803 | break; |
804 | case 11: |
805 | // INITSP_2r |
806 | O << "]:sp, " ; |
807 | printOperand(MI, OpNo: 0, O); |
808 | return; |
809 | break; |
810 | case 12: |
811 | // LDAWDP_lru6, LDAWDP_ru6, LDWDP_lru6, LDWDP_ru6, STWDP_lru6, STWDP_ru6 |
812 | O << ", dp[" ; |
813 | printOperand(MI, OpNo: 1, O); |
814 | O << ']'; |
815 | return; |
816 | break; |
817 | case 13: |
818 | // LDAWSP_lru6, LDAWSP_ru6, LDWSP_lru6, LDWSP_ru6, STWSP_lru6, STWSP_ru6 |
819 | O << ", sp[" ; |
820 | printOperand(MI, OpNo: 1, O); |
821 | O << ']'; |
822 | return; |
823 | break; |
824 | case 14: |
825 | // LDWCP_lru6, LDWCP_ru6 |
826 | O << ", cp[" ; |
827 | printOperand(MI, OpNo: 1, O); |
828 | O << ']'; |
829 | return; |
830 | break; |
831 | case 15: |
832 | // SETEV_1r, SETV_1r |
833 | O << "], r11" ; |
834 | return; |
835 | break; |
836 | case 16: |
837 | // TSETR_3r |
838 | O << "]:r" ; |
839 | printOperand(MI, OpNo: 0, O); |
840 | O << ", " ; |
841 | printOperand(MI, OpNo: 1, O); |
842 | return; |
843 | break; |
844 | } |
845 | |
846 | |
847 | // Fragment 2 encoded into 3 bits for 5 unique commands. |
848 | switch ((Bits >> 18) & 7) { |
849 | default: llvm_unreachable("Invalid command number." ); |
850 | case 0: |
851 | // ADJCALLSTACKDOWN, EH_RETURN, LDAWFI, LDWFI, STWFI, ADD_2rus, ADD_3r, A... |
852 | printOperand(MI, OpNo: 1, O); |
853 | break; |
854 | case 1: |
855 | // BR_JT |
856 | printInlineJT(MI, opNum: 0, O); |
857 | return; |
858 | break; |
859 | case 2: |
860 | // BR_JT32 |
861 | printInlineJT32(MI, opNum: 0, O); |
862 | return; |
863 | break; |
864 | case 3: |
865 | // ANDNOT_2r, CRC_l3r, INSHR_2r, SEXT_2r, SEXT_rus, ZEXT_2r, ZEXT_rus |
866 | printOperand(MI, OpNo: 2, O); |
867 | break; |
868 | case 4: |
869 | // CRC8_l4r, LADD_l5r, LSUB_l5r, OUTPW_l2rus |
870 | printOperand(MI, OpNo: 0, O); |
871 | O << ", " ; |
872 | break; |
873 | } |
874 | |
875 | |
876 | // Fragment 3 encoded into 3 bits for 8 unique commands. |
877 | switch ((Bits >> 21) & 7) { |
878 | default: llvm_unreachable("Invalid command number." ); |
879 | case 0: |
880 | // ADJCALLSTACKDOWN, EH_RETURN, LDAWFI, LDWFI, STWFI, ANDNOT_2r, BITREV_l... |
881 | return; |
882 | break; |
883 | case 1: |
884 | // ADD_2rus, ADD_3r, AND_3r, ASHR_l2rus, ASHR_l3r, CRC_l3r, DIVS_l3r, DIV... |
885 | O << ", " ; |
886 | break; |
887 | case 2: |
888 | // CRC8_l4r |
889 | printOperand(MI, OpNo: 3, O); |
890 | O << ", " ; |
891 | printOperand(MI, OpNo: 4, O); |
892 | return; |
893 | break; |
894 | case 3: |
895 | // EEF_2r, EET_2r, ENDIN_2r, GETD_l2r, GETN_l2r, GETST_2r, GETTS_2r, INCT... |
896 | O << ']'; |
897 | return; |
898 | break; |
899 | case 4: |
900 | // INPW_l2rus |
901 | O << "], " ; |
902 | printOperand(MI, OpNo: 2, O); |
903 | return; |
904 | break; |
905 | case 5: |
906 | // LADD_l5r, LSUB_l5r, OUTPW_l2rus |
907 | printOperand(MI, OpNo: 2, O); |
908 | break; |
909 | case 6: |
910 | // LD16S_3r, LD8U_3r, LDA16F_l3r, LDAWF_l2rus, LDAWF_l3r, LDW_2rus, LDW_3... |
911 | O << '['; |
912 | printOperand(MI, OpNo: 2, O); |
913 | O << ']'; |
914 | return; |
915 | break; |
916 | case 7: |
917 | // LDA16B_l3r, LDAWB_l2rus, LDAWB_l3r |
918 | O << "[-" ; |
919 | printOperand(MI, OpNo: 2, O); |
920 | O << ']'; |
921 | return; |
922 | break; |
923 | } |
924 | |
925 | |
926 | // Fragment 4 encoded into 3 bits for 5 unique commands. |
927 | switch ((Bits >> 24) & 7) { |
928 | default: llvm_unreachable("Invalid command number." ); |
929 | case 0: |
930 | // ADD_2rus, ADD_3r, AND_3r, ASHR_l2rus, ASHR_l3r, DIVS_l3r, DIVU_l3r, EQ... |
931 | printOperand(MI, OpNo: 2, O); |
932 | break; |
933 | case 1: |
934 | // CRC_l3r |
935 | printOperand(MI, OpNo: 3, O); |
936 | return; |
937 | break; |
938 | case 2: |
939 | // LADD_l5r, LSUB_l5r |
940 | O << ", " ; |
941 | printOperand(MI, OpNo: 3, O); |
942 | O << ", " ; |
943 | printOperand(MI, OpNo: 4, O); |
944 | return; |
945 | break; |
946 | case 3: |
947 | // LDIVU_l5r, MACCS_l4r, MACCU_l4r |
948 | printOperand(MI, OpNo: 4, O); |
949 | O << ", " ; |
950 | break; |
951 | case 4: |
952 | // OUTPW_l2rus |
953 | return; |
954 | break; |
955 | } |
956 | |
957 | |
958 | // Fragment 5 encoded into 2 bits for 4 unique commands. |
959 | switch ((Bits >> 27) & 3) { |
960 | default: llvm_unreachable("Invalid command number." ); |
961 | case 0: |
962 | // ADD_2rus, ADD_3r, AND_3r, ASHR_l2rus, ASHR_l3r, DIVS_l3r, DIVU_l3r, EQ... |
963 | return; |
964 | break; |
965 | case 1: |
966 | // LDIVU_l5r |
967 | printOperand(MI, OpNo: 2, O); |
968 | O << ", " ; |
969 | printOperand(MI, OpNo: 3, O); |
970 | return; |
971 | break; |
972 | case 2: |
973 | // LMUL_l6r |
974 | O << ", " ; |
975 | printOperand(MI, OpNo: 3, O); |
976 | O << ", " ; |
977 | printOperand(MI, OpNo: 4, O); |
978 | O << ", " ; |
979 | printOperand(MI, OpNo: 5, O); |
980 | return; |
981 | break; |
982 | case 3: |
983 | // MACCS_l4r, MACCU_l4r |
984 | printOperand(MI, OpNo: 5, O); |
985 | return; |
986 | break; |
987 | } |
988 | |
989 | } |
990 | |
991 | |
992 | /// getRegisterName - This method is automatically generated by tblgen |
993 | /// from the register set description. This returns the assembler name |
994 | /// for the specified register. |
995 | const char *XCoreInstPrinter::getRegisterName(MCRegister Reg) { |
996 | unsigned RegNo = Reg.id(); |
997 | assert(RegNo && RegNo < 17 && "Invalid register number!" ); |
998 | |
999 | |
1000 | #ifdef __GNUC__ |
1001 | #pragma GCC diagnostic push |
1002 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
1003 | #endif |
1004 | static const char AsmStrs[] = { |
1005 | /* 0 */ "r10\0" |
1006 | /* 4 */ "r0\0" |
1007 | /* 7 */ "r11\0" |
1008 | /* 11 */ "r1\0" |
1009 | /* 14 */ "r2\0" |
1010 | /* 17 */ "r3\0" |
1011 | /* 20 */ "r4\0" |
1012 | /* 23 */ "r5\0" |
1013 | /* 26 */ "r6\0" |
1014 | /* 29 */ "r7\0" |
1015 | /* 32 */ "r8\0" |
1016 | /* 35 */ "r9\0" |
1017 | /* 38 */ "cp\0" |
1018 | /* 41 */ "dp\0" |
1019 | /* 44 */ "sp\0" |
1020 | /* 47 */ "lr\0" |
1021 | }; |
1022 | #ifdef __GNUC__ |
1023 | #pragma GCC diagnostic pop |
1024 | #endif |
1025 | |
1026 | static const uint8_t RegAsmOffset[] = { |
1027 | 38, 41, 47, 44, 4, 11, 14, 17, 20, 23, 26, 29, 32, 35, |
1028 | 0, 7, |
1029 | }; |
1030 | |
1031 | assert (*(AsmStrs+RegAsmOffset[RegNo-1]) && |
1032 | "Invalid alt name index for register!" ); |
1033 | return AsmStrs+RegAsmOffset[RegNo-1]; |
1034 | } |
1035 | |
1036 | #ifdef PRINT_ALIAS_INSTR |
1037 | #undef PRINT_ALIAS_INSTR |
1038 | |
1039 | bool XCoreInstPrinter::printAliasInstr(const MCInst *MI, uint64_t Address, raw_ostream &OS) { |
1040 | return false; |
1041 | } |
1042 | |
1043 | #endif // PRINT_ALIAS_INSTR |
1044 | |