1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* Assembly Writer Source Fragment *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* From: AVR.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> AVRInstPrinter::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 */ "rolb\t\0" |
20 | /* 6 */ "elpmb\t\0" |
21 | /* 13 */ "rorb\t\0" |
22 | /* 19 */ "sub\t\0" |
23 | /* 24 */ "lac\t\0" |
24 | /* 29 */ "brbc\t\0" |
25 | /* 35 */ "sbc\t\0" |
26 | /* 40 */ "adc\t\0" |
27 | /* 45 */ "dec\t\0" |
28 | /* 50 */ "sbic\t\0" |
29 | /* 56 */ "inc\t\0" |
30 | /* 61 */ "cpc\t\0" |
31 | /* 66 */ "sbrc\t\0" |
32 | /* 72 */ "spread\t\0" |
33 | /* 80 */ "add\t\0" |
34 | /* 85 */ "ldd\t\0" |
35 | /* 90 */ "bld\t\0" |
36 | /* 95 */ "and\t\0" |
37 | /* 100 */ "std\t\0" |
38 | /* 105 */ "brge\t\0" |
39 | /* 111 */ "brne\t\0" |
40 | /* 117 */ "cpse\t\0" |
41 | /* 123 */ "spwrite\t\0" |
42 | /* 132 */ "neg\t\0" |
43 | /* 137 */ "xch\t\0" |
44 | /* 142 */ "brsh\t\0" |
45 | /* 148 */ "push\t\0" |
46 | /* 154 */ "cbi\t\0" |
47 | /* 159 */ "sbi\t\0" |
48 | /* 164 */ "subi\t\0" |
49 | /* 170 */ "sbci\t\0" |
50 | /* 176 */ "ldi\t\0" |
51 | /* 181 */ "andi\t\0" |
52 | /* 187 */ "lslwhi\t\0" |
53 | /* 195 */ "brmi\t\0" |
54 | /* 201 */ "cpi\t\0" |
55 | /* 206 */ "ori\t\0" |
56 | /* 211 */ "stdstk\t\0" |
57 | /* 219 */ "stdwstk\t\0" |
58 | /* 228 */ "rcall\t\0" |
59 | /* 235 */ "brpl\t\0" |
60 | /* 241 */ "fmul\t\0" |
61 | /* 247 */ "com\t\0" |
62 | /* 252 */ "elpm\t\0" |
63 | /* 258 */ "lslbn\t\0" |
64 | /* 265 */ "asrbn\t\0" |
65 | /* 272 */ "lsrbn\t\0" |
66 | /* 279 */ "in\t\0" |
67 | /* 283 */ "lslwn\t\0" |
68 | /* 290 */ "asrwn\t\0" |
69 | /* 297 */ "lsrwn\t\0" |
70 | /* 304 */ "brlo\t\0" |
71 | /* 310 */ "asrwlo\t\0" |
72 | /* 318 */ "lsrwlo\t\0" |
73 | /* 326 */ "swap\t\0" |
74 | /* 332 */ "cp\t\0" |
75 | /* 336 */ "rjmp\t\0" |
76 | /* 342 */ "pop\t\0" |
77 | /* 347 */ "breq\t\0" |
78 | /* 353 */ "bclr\t\0" |
79 | /* 359 */ "eor\t\0" |
80 | /* 364 */ "ror\t\0" |
81 | /* 369 */ "asr\t\0" |
82 | /* 374 */ "lsr\t\0" |
83 | /* 379 */ "las\t\0" |
84 | /* 384 */ "brbs\t\0" |
85 | /* 390 */ "lds\t\0" |
86 | /* 395 */ "des\t\0" |
87 | /* 400 */ "sbis\t\0" |
88 | /* 406 */ "fmuls\t\0" |
89 | /* 413 */ "sbrs\t\0" |
90 | /* 419 */ "sts\t\0" |
91 | /* 424 */ "lat\t\0" |
92 | /* 429 */ "bset\t\0" |
93 | /* 435 */ "brlt\t\0" |
94 | /* 441 */ "bst\t\0" |
95 | /* 446 */ "out\t\0" |
96 | /* 451 */ "sext\t\0" |
97 | /* 457 */ "zext\t\0" |
98 | /* 463 */ "fmulsu\t\0" |
99 | /* 471 */ "mov\t\0" |
100 | /* 476 */ "subw\t\0" |
101 | /* 482 */ "sbcw\t\0" |
102 | /* 488 */ "adcw\t\0" |
103 | /* 494 */ "cpcw\t\0" |
104 | /* 500 */ "addw\t\0" |
105 | /* 506 */ "lddw\t\0" |
106 | /* 512 */ "ldw\t\0" |
107 | /* 517 */ "andw\t\0" |
108 | /* 523 */ "stdw\t\0" |
109 | /* 529 */ "negw\t\0" |
110 | /* 535 */ "pushw\t\0" |
111 | /* 542 */ "sbiw\t\0" |
112 | /* 548 */ "subiw\t\0" |
113 | /* 555 */ "sbciw\t\0" |
114 | /* 562 */ "adiw\t\0" |
115 | /* 568 */ "ldiw\t\0" |
116 | /* 574 */ "andiw\t\0" |
117 | /* 581 */ "oriw\t\0" |
118 | /* 587 */ "rolw\t\0" |
119 | /* 593 */ "lslw\t\0" |
120 | /* 599 */ "comw\t\0" |
121 | /* 605 */ "elpmw\t\0" |
122 | /* 612 */ "inw\t\0" |
123 | /* 617 */ "cpw\t\0" |
124 | /* 622 */ "popw\t\0" |
125 | /* 628 */ "eorw\t\0" |
126 | /* 634 */ "rorw\t\0" |
127 | /* 640 */ "asrw\t\0" |
128 | /* 646 */ "lsrw\t\0" |
129 | /* 652 */ "ldsw\t\0" |
130 | /* 658 */ "stsw\t\0" |
131 | /* 664 */ "stw\t\0" |
132 | /* 669 */ "outw\t\0" |
133 | /* 675 */ "movw\t\0" |
134 | /* 681 */ "frmidx\t\0" |
135 | /* 689 */ "clrz\t\0" |
136 | /* 695 */ "spm \0" |
137 | /* 700 */ "st\t-\0" |
138 | /* 705 */ "stw\t-\0" |
139 | /* 711 */ "# XRay Function Patchable RET.\0" |
140 | /* 742 */ "# XRay Typed Event Log.\0" |
141 | /* 766 */ "# XRay Custom Event Log.\0" |
142 | /* 791 */ "# XRay Function Enter.\0" |
143 | /* 814 */ "# XRay Tail Call Exit.\0" |
144 | /* 837 */ "# XRay Function Exit.\0" |
145 | /* 859 */ "LIFETIME_END\0" |
146 | /* 872 */ "PSEUDO_PROBE\0" |
147 | /* 885 */ "BUNDLE\0" |
148 | /* 892 */ "DBG_VALUE\0" |
149 | /* 902 */ "DBG_INSTR_REF\0" |
150 | /* 916 */ "DBG_PHI\0" |
151 | /* 924 */ "DBG_LABEL\0" |
152 | /* 934 */ "#ADJCALLSTACKDOWN\0" |
153 | /* 952 */ "# Lsl32 PSEUDO\0" |
154 | /* 967 */ "# Asr32 PSEUDO\0" |
155 | /* 982 */ "# Lsr32 PSEUDO\0" |
156 | /* 997 */ "# Rol16 PSEUDO\0" |
157 | /* 1012 */ "# Lsl16 PSEUDO\0" |
158 | /* 1027 */ "# Ror16 PSEUDO\0" |
159 | /* 1042 */ "# Asr16 PSEUDO\0" |
160 | /* 1057 */ "# Lsr16 PSEUDO\0" |
161 | /* 1072 */ "# Select16 PSEUDO\0" |
162 | /* 1090 */ "# Rol8 PSEUDO\0" |
163 | /* 1104 */ "# Lsl8 PSEUDO\0" |
164 | /* 1118 */ "# Ror8 PSEUDO\0" |
165 | /* 1132 */ "# Asr8 PSEUDO\0" |
166 | /* 1146 */ "# Lsr8 PSEUDO\0" |
167 | /* 1160 */ "# Select8 PSEUDO\0" |
168 | /* 1177 */ "#ADJCALLSTACKUP\0" |
169 | /* 1193 */ "LIFETIME_START\0" |
170 | /* 1208 */ "DBG_VALUE_LIST\0" |
171 | /* 1223 */ "atomic_fence\0" |
172 | /* 1236 */ "reti\0" |
173 | /* 1241 */ "break\0" |
174 | /* 1247 */ "# FEntry call\0" |
175 | /* 1261 */ "eicall\0" |
176 | /* 1268 */ "elpm\0" |
177 | /* 1273 */ "spm\0" |
178 | /* 1277 */ "sleep\0" |
179 | /* 1283 */ "eijmp\0" |
180 | /* 1289 */ "atomic_op\0" |
181 | /* 1299 */ "nop\0" |
182 | /* 1303 */ "wdr\0" |
183 | /* 1307 */ "ret\0" |
184 | }; |
185 | #ifdef __GNUC__ |
186 | #pragma GCC diagnostic pop |
187 | #endif |
188 | |
189 | static const uint16_t OpInfo0[] = { |
190 | 0U, // PHI |
191 | 0U, // INLINEASM |
192 | 0U, // INLINEASM_BR |
193 | 0U, // CFI_INSTRUCTION |
194 | 0U, // EH_LABEL |
195 | 0U, // GC_LABEL |
196 | 0U, // ANNOTATION_LABEL |
197 | 0U, // KILL |
198 | 0U, // EXTRACT_SUBREG |
199 | 0U, // INSERT_SUBREG |
200 | 0U, // IMPLICIT_DEF |
201 | 0U, // SUBREG_TO_REG |
202 | 0U, // COPY_TO_REGCLASS |
203 | 893U, // DBG_VALUE |
204 | 1209U, // DBG_VALUE_LIST |
205 | 903U, // DBG_INSTR_REF |
206 | 917U, // DBG_PHI |
207 | 925U, // DBG_LABEL |
208 | 0U, // REG_SEQUENCE |
209 | 0U, // COPY |
210 | 886U, // BUNDLE |
211 | 1194U, // LIFETIME_START |
212 | 860U, // LIFETIME_END |
213 | 873U, // PSEUDO_PROBE |
214 | 0U, // ARITH_FENCE |
215 | 0U, // STACKMAP |
216 | 1248U, // FENTRY_CALL |
217 | 0U, // PATCHPOINT |
218 | 0U, // LOAD_STACK_GUARD |
219 | 0U, // PREALLOCATED_SETUP |
220 | 0U, // PREALLOCATED_ARG |
221 | 0U, // STATEPOINT |
222 | 0U, // LOCAL_ESCAPE |
223 | 0U, // FAULTING_OP |
224 | 0U, // PATCHABLE_OP |
225 | 792U, // PATCHABLE_FUNCTION_ENTER |
226 | 712U, // PATCHABLE_RET |
227 | 838U, // PATCHABLE_FUNCTION_EXIT |
228 | 815U, // PATCHABLE_TAIL_CALL |
229 | 767U, // PATCHABLE_EVENT_CALL |
230 | 743U, // PATCHABLE_TYPED_EVENT_CALL |
231 | 0U, // ICALL_BRANCH_FUNNEL |
232 | 0U, // MEMBARRIER |
233 | 0U, // JUMP_TABLE_DEBUG_INFO |
234 | 0U, // CONVERGENCECTRL_ENTRY |
235 | 0U, // CONVERGENCECTRL_ANCHOR |
236 | 0U, // CONVERGENCECTRL_LOOP |
237 | 0U, // CONVERGENCECTRL_GLUE |
238 | 0U, // G_ASSERT_SEXT |
239 | 0U, // G_ASSERT_ZEXT |
240 | 0U, // G_ASSERT_ALIGN |
241 | 0U, // G_ADD |
242 | 0U, // G_SUB |
243 | 0U, // G_MUL |
244 | 0U, // G_SDIV |
245 | 0U, // G_UDIV |
246 | 0U, // G_SREM |
247 | 0U, // G_UREM |
248 | 0U, // G_SDIVREM |
249 | 0U, // G_UDIVREM |
250 | 0U, // G_AND |
251 | 0U, // G_OR |
252 | 0U, // G_XOR |
253 | 0U, // G_IMPLICIT_DEF |
254 | 0U, // G_PHI |
255 | 0U, // G_FRAME_INDEX |
256 | 0U, // G_GLOBAL_VALUE |
257 | 0U, // G_PTRAUTH_GLOBAL_VALUE |
258 | 0U, // G_CONSTANT_POOL |
259 | 0U, // G_EXTRACT |
260 | 0U, // G_UNMERGE_VALUES |
261 | 0U, // G_INSERT |
262 | 0U, // G_MERGE_VALUES |
263 | 0U, // G_BUILD_VECTOR |
264 | 0U, // G_BUILD_VECTOR_TRUNC |
265 | 0U, // G_CONCAT_VECTORS |
266 | 0U, // G_PTRTOINT |
267 | 0U, // G_INTTOPTR |
268 | 0U, // G_BITCAST |
269 | 0U, // G_FREEZE |
270 | 0U, // G_CONSTANT_FOLD_BARRIER |
271 | 0U, // G_INTRINSIC_FPTRUNC_ROUND |
272 | 0U, // G_INTRINSIC_TRUNC |
273 | 0U, // G_INTRINSIC_ROUND |
274 | 0U, // G_INTRINSIC_LRINT |
275 | 0U, // G_INTRINSIC_LLRINT |
276 | 0U, // G_INTRINSIC_ROUNDEVEN |
277 | 0U, // G_READCYCLECOUNTER |
278 | 0U, // G_READSTEADYCOUNTER |
279 | 0U, // G_LOAD |
280 | 0U, // G_SEXTLOAD |
281 | 0U, // G_ZEXTLOAD |
282 | 0U, // G_INDEXED_LOAD |
283 | 0U, // G_INDEXED_SEXTLOAD |
284 | 0U, // G_INDEXED_ZEXTLOAD |
285 | 0U, // G_STORE |
286 | 0U, // G_INDEXED_STORE |
287 | 0U, // G_ATOMIC_CMPXCHG_WITH_SUCCESS |
288 | 0U, // G_ATOMIC_CMPXCHG |
289 | 0U, // G_ATOMICRMW_XCHG |
290 | 0U, // G_ATOMICRMW_ADD |
291 | 0U, // G_ATOMICRMW_SUB |
292 | 0U, // G_ATOMICRMW_AND |
293 | 0U, // G_ATOMICRMW_NAND |
294 | 0U, // G_ATOMICRMW_OR |
295 | 0U, // G_ATOMICRMW_XOR |
296 | 0U, // G_ATOMICRMW_MAX |
297 | 0U, // G_ATOMICRMW_MIN |
298 | 0U, // G_ATOMICRMW_UMAX |
299 | 0U, // G_ATOMICRMW_UMIN |
300 | 0U, // G_ATOMICRMW_FADD |
301 | 0U, // G_ATOMICRMW_FSUB |
302 | 0U, // G_ATOMICRMW_FMAX |
303 | 0U, // G_ATOMICRMW_FMIN |
304 | 0U, // G_ATOMICRMW_UINC_WRAP |
305 | 0U, // G_ATOMICRMW_UDEC_WRAP |
306 | 0U, // G_FENCE |
307 | 0U, // G_PREFETCH |
308 | 0U, // G_BRCOND |
309 | 0U, // G_BRINDIRECT |
310 | 0U, // G_INVOKE_REGION_START |
311 | 0U, // G_INTRINSIC |
312 | 0U, // G_INTRINSIC_W_SIDE_EFFECTS |
313 | 0U, // G_INTRINSIC_CONVERGENT |
314 | 0U, // G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS |
315 | 0U, // G_ANYEXT |
316 | 0U, // G_TRUNC |
317 | 0U, // G_CONSTANT |
318 | 0U, // G_FCONSTANT |
319 | 0U, // G_VASTART |
320 | 0U, // G_VAARG |
321 | 0U, // G_SEXT |
322 | 0U, // G_SEXT_INREG |
323 | 0U, // G_ZEXT |
324 | 0U, // G_SHL |
325 | 0U, // G_LSHR |
326 | 0U, // G_ASHR |
327 | 0U, // G_FSHL |
328 | 0U, // G_FSHR |
329 | 0U, // G_ROTR |
330 | 0U, // G_ROTL |
331 | 0U, // G_ICMP |
332 | 0U, // G_FCMP |
333 | 0U, // G_SCMP |
334 | 0U, // G_UCMP |
335 | 0U, // G_SELECT |
336 | 0U, // G_UADDO |
337 | 0U, // G_UADDE |
338 | 0U, // G_USUBO |
339 | 0U, // G_USUBE |
340 | 0U, // G_SADDO |
341 | 0U, // G_SADDE |
342 | 0U, // G_SSUBO |
343 | 0U, // G_SSUBE |
344 | 0U, // G_UMULO |
345 | 0U, // G_SMULO |
346 | 0U, // G_UMULH |
347 | 0U, // G_SMULH |
348 | 0U, // G_UADDSAT |
349 | 0U, // G_SADDSAT |
350 | 0U, // G_USUBSAT |
351 | 0U, // G_SSUBSAT |
352 | 0U, // G_USHLSAT |
353 | 0U, // G_SSHLSAT |
354 | 0U, // G_SMULFIX |
355 | 0U, // G_UMULFIX |
356 | 0U, // G_SMULFIXSAT |
357 | 0U, // G_UMULFIXSAT |
358 | 0U, // G_SDIVFIX |
359 | 0U, // G_UDIVFIX |
360 | 0U, // G_SDIVFIXSAT |
361 | 0U, // G_UDIVFIXSAT |
362 | 0U, // G_FADD |
363 | 0U, // G_FSUB |
364 | 0U, // G_FMUL |
365 | 0U, // G_FMA |
366 | 0U, // G_FMAD |
367 | 0U, // G_FDIV |
368 | 0U, // G_FREM |
369 | 0U, // G_FPOW |
370 | 0U, // G_FPOWI |
371 | 0U, // G_FEXP |
372 | 0U, // G_FEXP2 |
373 | 0U, // G_FEXP10 |
374 | 0U, // G_FLOG |
375 | 0U, // G_FLOG2 |
376 | 0U, // G_FLOG10 |
377 | 0U, // G_FLDEXP |
378 | 0U, // G_FFREXP |
379 | 0U, // G_FNEG |
380 | 0U, // G_FPEXT |
381 | 0U, // G_FPTRUNC |
382 | 0U, // G_FPTOSI |
383 | 0U, // G_FPTOUI |
384 | 0U, // G_SITOFP |
385 | 0U, // G_UITOFP |
386 | 0U, // G_FABS |
387 | 0U, // G_FCOPYSIGN |
388 | 0U, // G_IS_FPCLASS |
389 | 0U, // G_FCANONICALIZE |
390 | 0U, // G_FMINNUM |
391 | 0U, // G_FMAXNUM |
392 | 0U, // G_FMINNUM_IEEE |
393 | 0U, // G_FMAXNUM_IEEE |
394 | 0U, // G_FMINIMUM |
395 | 0U, // G_FMAXIMUM |
396 | 0U, // G_GET_FPENV |
397 | 0U, // G_SET_FPENV |
398 | 0U, // G_RESET_FPENV |
399 | 0U, // G_GET_FPMODE |
400 | 0U, // G_SET_FPMODE |
401 | 0U, // G_RESET_FPMODE |
402 | 0U, // G_PTR_ADD |
403 | 0U, // G_PTRMASK |
404 | 0U, // G_SMIN |
405 | 0U, // G_SMAX |
406 | 0U, // G_UMIN |
407 | 0U, // G_UMAX |
408 | 0U, // G_ABS |
409 | 0U, // G_LROUND |
410 | 0U, // G_LLROUND |
411 | 0U, // G_BR |
412 | 0U, // G_BRJT |
413 | 0U, // G_VSCALE |
414 | 0U, // G_INSERT_SUBVECTOR |
415 | 0U, // G_EXTRACT_SUBVECTOR |
416 | 0U, // G_INSERT_VECTOR_ELT |
417 | 0U, // G_EXTRACT_VECTOR_ELT |
418 | 0U, // G_SHUFFLE_VECTOR |
419 | 0U, // G_SPLAT_VECTOR |
420 | 0U, // G_VECTOR_COMPRESS |
421 | 0U, // G_CTTZ |
422 | 0U, // G_CTTZ_ZERO_UNDEF |
423 | 0U, // G_CTLZ |
424 | 0U, // G_CTLZ_ZERO_UNDEF |
425 | 0U, // G_CTPOP |
426 | 0U, // G_BSWAP |
427 | 0U, // G_BITREVERSE |
428 | 0U, // G_FCEIL |
429 | 0U, // G_FCOS |
430 | 0U, // G_FSIN |
431 | 0U, // G_FTAN |
432 | 0U, // G_FACOS |
433 | 0U, // G_FASIN |
434 | 0U, // G_FATAN |
435 | 0U, // G_FCOSH |
436 | 0U, // G_FSINH |
437 | 0U, // G_FTANH |
438 | 0U, // G_FSQRT |
439 | 0U, // G_FFLOOR |
440 | 0U, // G_FRINT |
441 | 0U, // G_FNEARBYINT |
442 | 0U, // G_ADDRSPACE_CAST |
443 | 0U, // G_BLOCK_ADDR |
444 | 0U, // G_JUMP_TABLE |
445 | 0U, // G_DYN_STACKALLOC |
446 | 0U, // G_STACKSAVE |
447 | 0U, // G_STACKRESTORE |
448 | 0U, // G_STRICT_FADD |
449 | 0U, // G_STRICT_FSUB |
450 | 0U, // G_STRICT_FMUL |
451 | 0U, // G_STRICT_FDIV |
452 | 0U, // G_STRICT_FREM |
453 | 0U, // G_STRICT_FMA |
454 | 0U, // G_STRICT_FSQRT |
455 | 0U, // G_STRICT_FLDEXP |
456 | 0U, // G_READ_REGISTER |
457 | 0U, // G_WRITE_REGISTER |
458 | 0U, // G_MEMCPY |
459 | 0U, // G_MEMCPY_INLINE |
460 | 0U, // G_MEMMOVE |
461 | 0U, // G_MEMSET |
462 | 0U, // G_BZERO |
463 | 0U, // G_TRAP |
464 | 0U, // G_DEBUGTRAP |
465 | 0U, // G_UBSANTRAP |
466 | 0U, // G_VECREDUCE_SEQ_FADD |
467 | 0U, // G_VECREDUCE_SEQ_FMUL |
468 | 0U, // G_VECREDUCE_FADD |
469 | 0U, // G_VECREDUCE_FMUL |
470 | 0U, // G_VECREDUCE_FMAX |
471 | 0U, // G_VECREDUCE_FMIN |
472 | 0U, // G_VECREDUCE_FMAXIMUM |
473 | 0U, // G_VECREDUCE_FMINIMUM |
474 | 0U, // G_VECREDUCE_ADD |
475 | 0U, // G_VECREDUCE_MUL |
476 | 0U, // G_VECREDUCE_AND |
477 | 0U, // G_VECREDUCE_OR |
478 | 0U, // G_VECREDUCE_XOR |
479 | 0U, // G_VECREDUCE_SMAX |
480 | 0U, // G_VECREDUCE_SMIN |
481 | 0U, // G_VECREDUCE_UMAX |
482 | 0U, // G_VECREDUCE_UMIN |
483 | 0U, // G_SBFX |
484 | 0U, // G_UBFX |
485 | 2537U, // ADCWRdRr |
486 | 2549U, // ADDWRdRr |
487 | 935U, // ADJCALLSTACKDOWN |
488 | 1178U, // ADJCALLSTACKUP |
489 | 2623U, // ANDIWRdK |
490 | 2566U, // ANDWRdRr |
491 | 2314U, // ASRBNRd |
492 | 18743U, // ASRWLoRd |
493 | 2339U, // ASRWNRd |
494 | 19073U, // ASRWRd |
495 | 1043U, // Asr16 |
496 | 968U, // Asr32 |
497 | 1133U, // Asr8 |
498 | 1224U, // AtomicFence |
499 | 1290U, // AtomicLoad16 |
500 | 1290U, // AtomicLoad8 |
501 | 1290U, // AtomicLoadAdd16 |
502 | 1290U, // AtomicLoadAdd8 |
503 | 1290U, // AtomicLoadAnd16 |
504 | 1290U, // AtomicLoadAnd8 |
505 | 1290U, // AtomicLoadOr16 |
506 | 1290U, // AtomicLoadOr8 |
507 | 1290U, // AtomicLoadSub16 |
508 | 1290U, // AtomicLoadSub8 |
509 | 1290U, // AtomicLoadXor16 |
510 | 1290U, // AtomicLoadXor8 |
511 | 1290U, // AtomicStore16 |
512 | 1290U, // AtomicStore8 |
513 | 19032U, // COMWRd |
514 | 2543U, // CPCWRdRr |
515 | 2666U, // CPWRdRr |
516 | 19122U, // CopyZero |
517 | 2055U, // ELPMBRdZ |
518 | 2055U, // ELPMBRdZPi |
519 | 2654U, // ELPMWRdZ |
520 | 2654U, // ELPMWRdZPi |
521 | 2677U, // EORWRdRr |
522 | 2730U, // FRMIDX |
523 | 2661U, // INWRdA |
524 | 2555U, // LDDWRdPtrQ |
525 | 2555U, // LDDWRdYQ |
526 | 2617U, // LDIWRdK |
527 | 2701U, // LDSWRdK |
528 | 2561U, // LDWRdPtr |
529 | 35329U, // LDWRdPtrPd |
530 | 2561U, // LDWRdPtrPi |
531 | 2056U, // LPMBRdZ |
532 | 2655U, // LPMWRdZ |
533 | 2655U, // LPMWRdZPi |
534 | 2307U, // LSLBNRd |
535 | 18620U, // LSLWHiRd |
536 | 2332U, // LSLWNRd |
537 | 19026U, // LSLWRd |
538 | 2321U, // LSRBNRd |
539 | 18751U, // LSRWLoRd |
540 | 2346U, // LSRWNRd |
541 | 19079U, // LSRWRd |
542 | 1013U, // Lsl16 |
543 | 953U, // Lsl32 |
544 | 1105U, // Lsl8 |
545 | 1058U, // Lsr16 |
546 | 983U, // Lsr32 |
547 | 1147U, // Lsr8 |
548 | 18962U, // NEGWRd |
549 | 2630U, // ORIWRdK |
550 | 2678U, // ORWRdRr |
551 | 2718U, // OUTWARr |
552 | 19055U, // POPWRd |
553 | 18968U, // PUSHWRr |
554 | 18433U, // ROLBRdR1 |
555 | 18433U, // ROLBRdR17 |
556 | 19020U, // ROLWRd |
557 | 18446U, // RORBRd |
558 | 19067U, // RORWRd |
559 | 998U, // Rol16 |
560 | 1091U, // Rol8 |
561 | 1028U, // Ror16 |
562 | 1119U, // Ror8 |
563 | 2604U, // SBCIWRdK |
564 | 2531U, // SBCWRdRr |
565 | 2500U, // SEXT |
566 | 2121U, // SPREAD |
567 | 2172U, // SPWRITE |
568 | 4308U, // STDSPQRr |
569 | 6668U, // STDWPtrQRr |
570 | 4316U, // STDWSPQRr |
571 | 2707U, // STSWKRr |
572 | 8898U, // STWPtrPdRr |
573 | 58009U, // STWPtrPiRr |
574 | 2713U, // STWPtrRr |
575 | 2597U, // SUBIWRdK |
576 | 2525U, // SUBWRdRr |
577 | 1073U, // Select16 |
578 | 1161U, // Select8 |
579 | 2506U, // ZEXT |
580 | 2089U, // ADCRdRr |
581 | 2129U, // ADDRdRr |
582 | 2611U, // ADIWRdK |
583 | 2230U, // ANDIRdK |
584 | 2144U, // ANDRdRr |
585 | 18802U, // ASRRd |
586 | 18786U, // BCLRs |
587 | 2139U, // BLD |
588 | 2078U, // BRBCsk |
589 | 2433U, // BRBSsk |
590 | 1242U, // BREAK |
591 | 10588U, // BREQk |
592 | 10346U, // BRGEk |
593 | 10545U, // BRLOk |
594 | 10676U, // BRLTk |
595 | 10436U, // BRMIk |
596 | 10352U, // BRNEk |
597 | 10476U, // BRPLk |
598 | 10383U, // BRSHk |
599 | 18862U, // BSETs |
600 | 2490U, // BST |
601 | 18662U, // CALLk |
602 | 2203U, // CBIAb |
603 | 18680U, // COMRd |
604 | 2110U, // CPCRdRr |
605 | 2250U, // CPIRdK |
606 | 2381U, // CPRdRr |
607 | 2166U, // CPSE |
608 | 18478U, // DECRd |
609 | 18828U, // DESK |
610 | 1262U, // EICALL |
611 | 1284U, // EIJMP |
612 | 1269U, // ELPM |
613 | 2301U, // ELPMRdZ |
614 | 2301U, // ELPMRdZPi |
615 | 2408U, // EORRdRr |
616 | 2290U, // FMUL |
617 | 2455U, // FMULS |
618 | 2512U, // FMULSU |
619 | 1263U, // ICALL |
620 | 1285U, // IJMP |
621 | 18489U, // INCRd |
622 | 2328U, // INRdA |
623 | 18770U, // JMPk |
624 | 8217U, // LACZRd |
625 | 8572U, // LASZRd |
626 | 8617U, // LATZRd |
627 | 2134U, // LDDRdPtrQ |
628 | 2225U, // LDIRdK |
629 | 2140U, // LDRdPtr |
630 | 34908U, // LDRdPtrPd |
631 | 2140U, // LDRdPtrPi |
632 | 2439U, // LDSRdK |
633 | 2439U, // LDSRdKTiny |
634 | 1270U, // LPM |
635 | 2302U, // LPMRdZ |
636 | 2302U, // LPMRdZPi |
637 | 18807U, // LSRRd |
638 | 2520U, // MOVRdRr |
639 | 2724U, // MOVWRdRr |
640 | 2291U, // MULRdRr |
641 | 2456U, // MULSRdRr |
642 | 2513U, // MULSURdRr |
643 | 18565U, // NEGRd |
644 | 1300U, // NOP |
645 | 2255U, // ORIRdK |
646 | 2409U, // ORRdRr |
647 | 2495U, // OUTARr |
648 | 18775U, // POPRd |
649 | 18581U, // PUSHRr |
650 | 10469U, // RCALLk |
651 | 1308U, // RET |
652 | 1237U, // RETI |
653 | 10577U, // RJMPk |
654 | 18797U, // RORRd |
655 | 2219U, // SBCIRdK |
656 | 2084U, // SBCRdRr |
657 | 2208U, // SBIAb |
658 | 2099U, // SBICAb |
659 | 2449U, // SBISAb |
660 | 2591U, // SBIWRdK |
661 | 2115U, // SBRCRrB |
662 | 2462U, // SBRSRrB |
663 | 1278U, // SLEEP |
664 | 1274U, // SPM |
665 | 2744U, // SPMZPi |
666 | 6245U, // STDPtrQRr |
667 | 8893U, // STPtrPdRr |
668 | 57787U, // STPtrPiRr |
669 | 2491U, // STPtrRr |
670 | 2468U, // STSKRr |
671 | 2468U, // STSKRrTiny |
672 | 2213U, // SUBIRdK |
673 | 2068U, // SUBRdRr |
674 | 18759U, // SWAPRd |
675 | 1304U, // WDR |
676 | 8330U, // XCHZRd |
677 | }; |
678 | |
679 | static const uint8_t OpInfo1[] = { |
680 | 0U, // PHI |
681 | 0U, // INLINEASM |
682 | 0U, // INLINEASM_BR |
683 | 0U, // CFI_INSTRUCTION |
684 | 0U, // EH_LABEL |
685 | 0U, // GC_LABEL |
686 | 0U, // ANNOTATION_LABEL |
687 | 0U, // KILL |
688 | 0U, // EXTRACT_SUBREG |
689 | 0U, // INSERT_SUBREG |
690 | 0U, // IMPLICIT_DEF |
691 | 0U, // SUBREG_TO_REG |
692 | 0U, // COPY_TO_REGCLASS |
693 | 0U, // DBG_VALUE |
694 | 0U, // DBG_VALUE_LIST |
695 | 0U, // DBG_INSTR_REF |
696 | 0U, // DBG_PHI |
697 | 0U, // DBG_LABEL |
698 | 0U, // REG_SEQUENCE |
699 | 0U, // COPY |
700 | 0U, // BUNDLE |
701 | 0U, // LIFETIME_START |
702 | 0U, // LIFETIME_END |
703 | 0U, // PSEUDO_PROBE |
704 | 0U, // ARITH_FENCE |
705 | 0U, // STACKMAP |
706 | 0U, // FENTRY_CALL |
707 | 0U, // PATCHPOINT |
708 | 0U, // LOAD_STACK_GUARD |
709 | 0U, // PREALLOCATED_SETUP |
710 | 0U, // PREALLOCATED_ARG |
711 | 0U, // STATEPOINT |
712 | 0U, // LOCAL_ESCAPE |
713 | 0U, // FAULTING_OP |
714 | 0U, // PATCHABLE_OP |
715 | 0U, // PATCHABLE_FUNCTION_ENTER |
716 | 0U, // PATCHABLE_RET |
717 | 0U, // PATCHABLE_FUNCTION_EXIT |
718 | 0U, // PATCHABLE_TAIL_CALL |
719 | 0U, // PATCHABLE_EVENT_CALL |
720 | 0U, // PATCHABLE_TYPED_EVENT_CALL |
721 | 0U, // ICALL_BRANCH_FUNNEL |
722 | 0U, // MEMBARRIER |
723 | 0U, // JUMP_TABLE_DEBUG_INFO |
724 | 0U, // CONVERGENCECTRL_ENTRY |
725 | 0U, // CONVERGENCECTRL_ANCHOR |
726 | 0U, // CONVERGENCECTRL_LOOP |
727 | 0U, // CONVERGENCECTRL_GLUE |
728 | 0U, // G_ASSERT_SEXT |
729 | 0U, // G_ASSERT_ZEXT |
730 | 0U, // G_ASSERT_ALIGN |
731 | 0U, // G_ADD |
732 | 0U, // G_SUB |
733 | 0U, // G_MUL |
734 | 0U, // G_SDIV |
735 | 0U, // G_UDIV |
736 | 0U, // G_SREM |
737 | 0U, // G_UREM |
738 | 0U, // G_SDIVREM |
739 | 0U, // G_UDIVREM |
740 | 0U, // G_AND |
741 | 0U, // G_OR |
742 | 0U, // G_XOR |
743 | 0U, // G_IMPLICIT_DEF |
744 | 0U, // G_PHI |
745 | 0U, // G_FRAME_INDEX |
746 | 0U, // G_GLOBAL_VALUE |
747 | 0U, // G_PTRAUTH_GLOBAL_VALUE |
748 | 0U, // G_CONSTANT_POOL |
749 | 0U, // G_EXTRACT |
750 | 0U, // G_UNMERGE_VALUES |
751 | 0U, // G_INSERT |
752 | 0U, // G_MERGE_VALUES |
753 | 0U, // G_BUILD_VECTOR |
754 | 0U, // G_BUILD_VECTOR_TRUNC |
755 | 0U, // G_CONCAT_VECTORS |
756 | 0U, // G_PTRTOINT |
757 | 0U, // G_INTTOPTR |
758 | 0U, // G_BITCAST |
759 | 0U, // G_FREEZE |
760 | 0U, // G_CONSTANT_FOLD_BARRIER |
761 | 0U, // G_INTRINSIC_FPTRUNC_ROUND |
762 | 0U, // G_INTRINSIC_TRUNC |
763 | 0U, // G_INTRINSIC_ROUND |
764 | 0U, // G_INTRINSIC_LRINT |
765 | 0U, // G_INTRINSIC_LLRINT |
766 | 0U, // G_INTRINSIC_ROUNDEVEN |
767 | 0U, // G_READCYCLECOUNTER |
768 | 0U, // G_READSTEADYCOUNTER |
769 | 0U, // G_LOAD |
770 | 0U, // G_SEXTLOAD |
771 | 0U, // G_ZEXTLOAD |
772 | 0U, // G_INDEXED_LOAD |
773 | 0U, // G_INDEXED_SEXTLOAD |
774 | 0U, // G_INDEXED_ZEXTLOAD |
775 | 0U, // G_STORE |
776 | 0U, // G_INDEXED_STORE |
777 | 0U, // G_ATOMIC_CMPXCHG_WITH_SUCCESS |
778 | 0U, // G_ATOMIC_CMPXCHG |
779 | 0U, // G_ATOMICRMW_XCHG |
780 | 0U, // G_ATOMICRMW_ADD |
781 | 0U, // G_ATOMICRMW_SUB |
782 | 0U, // G_ATOMICRMW_AND |
783 | 0U, // G_ATOMICRMW_NAND |
784 | 0U, // G_ATOMICRMW_OR |
785 | 0U, // G_ATOMICRMW_XOR |
786 | 0U, // G_ATOMICRMW_MAX |
787 | 0U, // G_ATOMICRMW_MIN |
788 | 0U, // G_ATOMICRMW_UMAX |
789 | 0U, // G_ATOMICRMW_UMIN |
790 | 0U, // G_ATOMICRMW_FADD |
791 | 0U, // G_ATOMICRMW_FSUB |
792 | 0U, // G_ATOMICRMW_FMAX |
793 | 0U, // G_ATOMICRMW_FMIN |
794 | 0U, // G_ATOMICRMW_UINC_WRAP |
795 | 0U, // G_ATOMICRMW_UDEC_WRAP |
796 | 0U, // G_FENCE |
797 | 0U, // G_PREFETCH |
798 | 0U, // G_BRCOND |
799 | 0U, // G_BRINDIRECT |
800 | 0U, // G_INVOKE_REGION_START |
801 | 0U, // G_INTRINSIC |
802 | 0U, // G_INTRINSIC_W_SIDE_EFFECTS |
803 | 0U, // G_INTRINSIC_CONVERGENT |
804 | 0U, // G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS |
805 | 0U, // G_ANYEXT |
806 | 0U, // G_TRUNC |
807 | 0U, // G_CONSTANT |
808 | 0U, // G_FCONSTANT |
809 | 0U, // G_VASTART |
810 | 0U, // G_VAARG |
811 | 0U, // G_SEXT |
812 | 0U, // G_SEXT_INREG |
813 | 0U, // G_ZEXT |
814 | 0U, // G_SHL |
815 | 0U, // G_LSHR |
816 | 0U, // G_ASHR |
817 | 0U, // G_FSHL |
818 | 0U, // G_FSHR |
819 | 0U, // G_ROTR |
820 | 0U, // G_ROTL |
821 | 0U, // G_ICMP |
822 | 0U, // G_FCMP |
823 | 0U, // G_SCMP |
824 | 0U, // G_UCMP |
825 | 0U, // G_SELECT |
826 | 0U, // G_UADDO |
827 | 0U, // G_UADDE |
828 | 0U, // G_USUBO |
829 | 0U, // G_USUBE |
830 | 0U, // G_SADDO |
831 | 0U, // G_SADDE |
832 | 0U, // G_SSUBO |
833 | 0U, // G_SSUBE |
834 | 0U, // G_UMULO |
835 | 0U, // G_SMULO |
836 | 0U, // G_UMULH |
837 | 0U, // G_SMULH |
838 | 0U, // G_UADDSAT |
839 | 0U, // G_SADDSAT |
840 | 0U, // G_USUBSAT |
841 | 0U, // G_SSUBSAT |
842 | 0U, // G_USHLSAT |
843 | 0U, // G_SSHLSAT |
844 | 0U, // G_SMULFIX |
845 | 0U, // G_UMULFIX |
846 | 0U, // G_SMULFIXSAT |
847 | 0U, // G_UMULFIXSAT |
848 | 0U, // G_SDIVFIX |
849 | 0U, // G_UDIVFIX |
850 | 0U, // G_SDIVFIXSAT |
851 | 0U, // G_UDIVFIXSAT |
852 | 0U, // G_FADD |
853 | 0U, // G_FSUB |
854 | 0U, // G_FMUL |
855 | 0U, // G_FMA |
856 | 0U, // G_FMAD |
857 | 0U, // G_FDIV |
858 | 0U, // G_FREM |
859 | 0U, // G_FPOW |
860 | 0U, // G_FPOWI |
861 | 0U, // G_FEXP |
862 | 0U, // G_FEXP2 |
863 | 0U, // G_FEXP10 |
864 | 0U, // G_FLOG |
865 | 0U, // G_FLOG2 |
866 | 0U, // G_FLOG10 |
867 | 0U, // G_FLDEXP |
868 | 0U, // G_FFREXP |
869 | 0U, // G_FNEG |
870 | 0U, // G_FPEXT |
871 | 0U, // G_FPTRUNC |
872 | 0U, // G_FPTOSI |
873 | 0U, // G_FPTOUI |
874 | 0U, // G_SITOFP |
875 | 0U, // G_UITOFP |
876 | 0U, // G_FABS |
877 | 0U, // G_FCOPYSIGN |
878 | 0U, // G_IS_FPCLASS |
879 | 0U, // G_FCANONICALIZE |
880 | 0U, // G_FMINNUM |
881 | 0U, // G_FMAXNUM |
882 | 0U, // G_FMINNUM_IEEE |
883 | 0U, // G_FMAXNUM_IEEE |
884 | 0U, // G_FMINIMUM |
885 | 0U, // G_FMAXIMUM |
886 | 0U, // G_GET_FPENV |
887 | 0U, // G_SET_FPENV |
888 | 0U, // G_RESET_FPENV |
889 | 0U, // G_GET_FPMODE |
890 | 0U, // G_SET_FPMODE |
891 | 0U, // G_RESET_FPMODE |
892 | 0U, // G_PTR_ADD |
893 | 0U, // G_PTRMASK |
894 | 0U, // G_SMIN |
895 | 0U, // G_SMAX |
896 | 0U, // G_UMIN |
897 | 0U, // G_UMAX |
898 | 0U, // G_ABS |
899 | 0U, // G_LROUND |
900 | 0U, // G_LLROUND |
901 | 0U, // G_BR |
902 | 0U, // G_BRJT |
903 | 0U, // G_VSCALE |
904 | 0U, // G_INSERT_SUBVECTOR |
905 | 0U, // G_EXTRACT_SUBVECTOR |
906 | 0U, // G_INSERT_VECTOR_ELT |
907 | 0U, // G_EXTRACT_VECTOR_ELT |
908 | 0U, // G_SHUFFLE_VECTOR |
909 | 0U, // G_SPLAT_VECTOR |
910 | 0U, // G_VECTOR_COMPRESS |
911 | 0U, // G_CTTZ |
912 | 0U, // G_CTTZ_ZERO_UNDEF |
913 | 0U, // G_CTLZ |
914 | 0U, // G_CTLZ_ZERO_UNDEF |
915 | 0U, // G_CTPOP |
916 | 0U, // G_BSWAP |
917 | 0U, // G_BITREVERSE |
918 | 0U, // G_FCEIL |
919 | 0U, // G_FCOS |
920 | 0U, // G_FSIN |
921 | 0U, // G_FTAN |
922 | 0U, // G_FACOS |
923 | 0U, // G_FASIN |
924 | 0U, // G_FATAN |
925 | 0U, // G_FCOSH |
926 | 0U, // G_FSINH |
927 | 0U, // G_FTANH |
928 | 0U, // G_FSQRT |
929 | 0U, // G_FFLOOR |
930 | 0U, // G_FRINT |
931 | 0U, // G_FNEARBYINT |
932 | 0U, // G_ADDRSPACE_CAST |
933 | 0U, // G_BLOCK_ADDR |
934 | 0U, // G_JUMP_TABLE |
935 | 0U, // G_DYN_STACKALLOC |
936 | 0U, // G_STACKSAVE |
937 | 0U, // G_STACKRESTORE |
938 | 0U, // G_STRICT_FADD |
939 | 0U, // G_STRICT_FSUB |
940 | 0U, // G_STRICT_FMUL |
941 | 0U, // G_STRICT_FDIV |
942 | 0U, // G_STRICT_FREM |
943 | 0U, // G_STRICT_FMA |
944 | 0U, // G_STRICT_FSQRT |
945 | 0U, // G_STRICT_FLDEXP |
946 | 0U, // G_READ_REGISTER |
947 | 0U, // G_WRITE_REGISTER |
948 | 0U, // G_MEMCPY |
949 | 0U, // G_MEMCPY_INLINE |
950 | 0U, // G_MEMMOVE |
951 | 0U, // G_MEMSET |
952 | 0U, // G_BZERO |
953 | 0U, // G_TRAP |
954 | 0U, // G_DEBUGTRAP |
955 | 0U, // G_UBSANTRAP |
956 | 0U, // G_VECREDUCE_SEQ_FADD |
957 | 0U, // G_VECREDUCE_SEQ_FMUL |
958 | 0U, // G_VECREDUCE_FADD |
959 | 0U, // G_VECREDUCE_FMUL |
960 | 0U, // G_VECREDUCE_FMAX |
961 | 0U, // G_VECREDUCE_FMIN |
962 | 0U, // G_VECREDUCE_FMAXIMUM |
963 | 0U, // G_VECREDUCE_FMINIMUM |
964 | 0U, // G_VECREDUCE_ADD |
965 | 0U, // G_VECREDUCE_MUL |
966 | 0U, // G_VECREDUCE_AND |
967 | 0U, // G_VECREDUCE_OR |
968 | 0U, // G_VECREDUCE_XOR |
969 | 0U, // G_VECREDUCE_SMAX |
970 | 0U, // G_VECREDUCE_SMIN |
971 | 0U, // G_VECREDUCE_UMAX |
972 | 0U, // G_VECREDUCE_UMIN |
973 | 0U, // G_SBFX |
974 | 0U, // G_UBFX |
975 | 0U, // ADCWRdRr |
976 | 0U, // ADDWRdRr |
977 | 0U, // ADJCALLSTACKDOWN |
978 | 0U, // ADJCALLSTACKUP |
979 | 0U, // ANDIWRdK |
980 | 0U, // ANDWRdRr |
981 | 0U, // ASRBNRd |
982 | 0U, // ASRWLoRd |
983 | 0U, // ASRWNRd |
984 | 0U, // ASRWRd |
985 | 0U, // Asr16 |
986 | 0U, // Asr32 |
987 | 0U, // Asr8 |
988 | 0U, // AtomicFence |
989 | 0U, // AtomicLoad16 |
990 | 0U, // AtomicLoad8 |
991 | 0U, // AtomicLoadAdd16 |
992 | 0U, // AtomicLoadAdd8 |
993 | 0U, // AtomicLoadAnd16 |
994 | 0U, // AtomicLoadAnd8 |
995 | 0U, // AtomicLoadOr16 |
996 | 0U, // AtomicLoadOr8 |
997 | 0U, // AtomicLoadSub16 |
998 | 0U, // AtomicLoadSub8 |
999 | 0U, // AtomicLoadXor16 |
1000 | 0U, // AtomicLoadXor8 |
1001 | 0U, // AtomicStore16 |
1002 | 0U, // AtomicStore8 |
1003 | 0U, // COMWRd |
1004 | 2U, // CPCWRdRr |
1005 | 2U, // CPWRdRr |
1006 | 0U, // CopyZero |
1007 | 18U, // ELPMBRdZ |
1008 | 34U, // ELPMBRdZPi |
1009 | 18U, // ELPMWRdZ |
1010 | 34U, // ELPMWRdZPi |
1011 | 0U, // EORWRdRr |
1012 | 18U, // FRMIDX |
1013 | 2U, // INWRdA |
1014 | 4U, // LDDWRdPtrQ |
1015 | 4U, // LDDWRdYQ |
1016 | 2U, // LDIWRdK |
1017 | 2U, // LDSWRdK |
1018 | 2U, // LDWRdPtr |
1019 | 0U, // LDWRdPtrPd |
1020 | 48U, // LDWRdPtrPi |
1021 | 2U, // LPMBRdZ |
1022 | 2U, // LPMWRdZ |
1023 | 50U, // LPMWRdZPi |
1024 | 0U, // LSLBNRd |
1025 | 0U, // LSLWHiRd |
1026 | 0U, // LSLWNRd |
1027 | 0U, // LSLWRd |
1028 | 0U, // LSRBNRd |
1029 | 0U, // LSRWLoRd |
1030 | 0U, // LSRWNRd |
1031 | 0U, // LSRWRd |
1032 | 0U, // Lsl16 |
1033 | 0U, // Lsl32 |
1034 | 0U, // Lsl8 |
1035 | 0U, // Lsr16 |
1036 | 0U, // Lsr32 |
1037 | 0U, // Lsr8 |
1038 | 0U, // NEGWRd |
1039 | 0U, // ORIWRdK |
1040 | 0U, // ORWRdRr |
1041 | 2U, // OUTWARr |
1042 | 0U, // POPWRd |
1043 | 0U, // PUSHWRr |
1044 | 0U, // ROLBRdR1 |
1045 | 0U, // ROLBRdR17 |
1046 | 0U, // ROLWRd |
1047 | 0U, // RORBRd |
1048 | 0U, // RORWRd |
1049 | 0U, // Rol16 |
1050 | 0U, // Rol8 |
1051 | 0U, // Ror16 |
1052 | 0U, // Ror8 |
1053 | 0U, // SBCIWRdK |
1054 | 0U, // SBCWRdRr |
1055 | 2U, // SEXT |
1056 | 2U, // SPREAD |
1057 | 2U, // SPWRITE |
1058 | 0U, // STDSPQRr |
1059 | 0U, // STDWPtrQRr |
1060 | 0U, // STDWSPQRr |
1061 | 2U, // STSWKRr |
1062 | 0U, // STWPtrPdRr |
1063 | 0U, // STWPtrPiRr |
1064 | 2U, // STWPtrRr |
1065 | 0U, // SUBIWRdK |
1066 | 0U, // SUBWRdRr |
1067 | 0U, // Select16 |
1068 | 0U, // Select8 |
1069 | 2U, // ZEXT |
1070 | 0U, // ADCRdRr |
1071 | 0U, // ADDRdRr |
1072 | 0U, // ADIWRdK |
1073 | 0U, // ANDIRdK |
1074 | 0U, // ANDRdRr |
1075 | 0U, // ASRRd |
1076 | 0U, // BCLRs |
1077 | 0U, // BLD |
1078 | 6U, // BRBCsk |
1079 | 6U, // BRBSsk |
1080 | 0U, // BREAK |
1081 | 0U, // BREQk |
1082 | 0U, // BRGEk |
1083 | 0U, // BRLOk |
1084 | 0U, // BRLTk |
1085 | 0U, // BRMIk |
1086 | 0U, // BRNEk |
1087 | 0U, // BRPLk |
1088 | 0U, // BRSHk |
1089 | 0U, // BSETs |
1090 | 2U, // BST |
1091 | 0U, // CALLk |
1092 | 2U, // CBIAb |
1093 | 0U, // COMRd |
1094 | 2U, // CPCRdRr |
1095 | 2U, // CPIRdK |
1096 | 2U, // CPRdRr |
1097 | 2U, // CPSE |
1098 | 0U, // DECRd |
1099 | 0U, // DESK |
1100 | 0U, // EICALL |
1101 | 0U, // EIJMP |
1102 | 0U, // ELPM |
1103 | 2U, // ELPMRdZ |
1104 | 50U, // ELPMRdZPi |
1105 | 0U, // EORRdRr |
1106 | 2U, // FMUL |
1107 | 2U, // FMULS |
1108 | 2U, // FMULSU |
1109 | 0U, // ICALL |
1110 | 0U, // IJMP |
1111 | 0U, // INCRd |
1112 | 2U, // INRdA |
1113 | 0U, // JMPk |
1114 | 8U, // LACZRd |
1115 | 8U, // LASZRd |
1116 | 8U, // LATZRd |
1117 | 4U, // LDDRdPtrQ |
1118 | 2U, // LDIRdK |
1119 | 2U, // LDRdPtr |
1120 | 0U, // LDRdPtrPd |
1121 | 48U, // LDRdPtrPi |
1122 | 2U, // LDSRdK |
1123 | 2U, // LDSRdKTiny |
1124 | 0U, // LPM |
1125 | 2U, // LPMRdZ |
1126 | 50U, // LPMRdZPi |
1127 | 0U, // LSRRd |
1128 | 2U, // MOVRdRr |
1129 | 2U, // MOVWRdRr |
1130 | 2U, // MULRdRr |
1131 | 2U, // MULSRdRr |
1132 | 2U, // MULSURdRr |
1133 | 0U, // NEGRd |
1134 | 0U, // NOP |
1135 | 0U, // ORIRdK |
1136 | 0U, // ORRdRr |
1137 | 2U, // OUTARr |
1138 | 0U, // POPRd |
1139 | 0U, // PUSHRr |
1140 | 0U, // RCALLk |
1141 | 0U, // RET |
1142 | 0U, // RETI |
1143 | 0U, // RJMPk |
1144 | 0U, // RORRd |
1145 | 0U, // SBCIRdK |
1146 | 0U, // SBCRdRr |
1147 | 2U, // SBIAb |
1148 | 2U, // SBICAb |
1149 | 2U, // SBISAb |
1150 | 0U, // SBIWRdK |
1151 | 2U, // SBRCRrB |
1152 | 2U, // SBRSRrB |
1153 | 0U, // SLEEP |
1154 | 0U, // SPM |
1155 | 1U, // SPMZPi |
1156 | 0U, // STDPtrQRr |
1157 | 0U, // STPtrPdRr |
1158 | 0U, // STPtrPiRr |
1159 | 2U, // STPtrRr |
1160 | 2U, // STSKRr |
1161 | 2U, // STSKRrTiny |
1162 | 0U, // SUBIRdK |
1163 | 0U, // SUBRdRr |
1164 | 0U, // SWAPRd |
1165 | 0U, // WDR |
1166 | 8U, // XCHZRd |
1167 | }; |
1168 | |
1169 | // Emit the opcode for the instruction. |
1170 | uint32_t Bits = 0; |
1171 | Bits |= OpInfo0[MI->getOpcode()] << 0; |
1172 | Bits |= OpInfo1[MI->getOpcode()] << 16; |
1173 | if (Bits == 0) |
1174 | return {nullptr, Bits}; |
1175 | return {AsmStrs+(Bits & 2047)-1, Bits}; |
1176 | |
1177 | } |
1178 | /// printInstruction - This method is automatically generated by tablegen |
1179 | /// from the instruction set description. |
1180 | LLVM_NO_PROFILE_INSTRUMENT_FUNCTION |
1181 | void AVRInstPrinter::printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O) { |
1182 | O << "\t" ; |
1183 | |
1184 | auto MnemonicInfo = getMnemonic(MI); |
1185 | |
1186 | O << MnemonicInfo.first; |
1187 | |
1188 | uint32_t Bits = MnemonicInfo.second; |
1189 | assert(Bits != 0 && "Cannot print this instruction." ); |
1190 | |
1191 | // Fragment 0 encoded into 3 bits for 6 unique commands. |
1192 | switch ((Bits >> 11) & 7) { |
1193 | default: llvm_unreachable("Invalid command number." ); |
1194 | case 0: |
1195 | // DBG_VALUE, DBG_VALUE_LIST, DBG_INSTR_REF, DBG_PHI, DBG_LABEL, BUNDLE, ... |
1196 | return; |
1197 | break; |
1198 | case 1: |
1199 | // ADCWRdRr, ADDWRdRr, ANDIWRdK, ANDWRdRr, ASRBNRd, ASRWLoRd, ASRWNRd, AS... |
1200 | printOperand(MI, OpNo: 0, O); |
1201 | break; |
1202 | case 2: |
1203 | // STDSPQRr, STDWSPQRr |
1204 | printMemspi(MI, OpNo: 0, O); |
1205 | O << ", " ; |
1206 | printOperand(MI, OpNo: 2, O); |
1207 | return; |
1208 | break; |
1209 | case 3: |
1210 | // STDWPtrQRr, STDPtrQRr |
1211 | printMemri(MI, OpNo: 0, O); |
1212 | O << ", " ; |
1213 | printOperand(MI, OpNo: 2, O); |
1214 | return; |
1215 | break; |
1216 | case 4: |
1217 | // STWPtrPdRr, STWPtrPiRr, LACZRd, LASZRd, LATZRd, STPtrPdRr, STPtrPiRr, ... |
1218 | printOperand(MI, OpNo: 1, O); |
1219 | break; |
1220 | case 5: |
1221 | // BREQk, BRGEk, BRLOk, BRLTk, BRMIk, BRNEk, BRPLk, BRSHk, RCALLk, RJMPk |
1222 | printPCRelImm(MI, OpNo: 0, O); |
1223 | return; |
1224 | break; |
1225 | } |
1226 | |
1227 | |
1228 | // Fragment 1 encoded into 3 bits for 5 unique commands. |
1229 | switch ((Bits >> 14) & 7) { |
1230 | default: llvm_unreachable("Invalid command number." ); |
1231 | case 0: |
1232 | // ADCWRdRr, ADDWRdRr, ANDIWRdK, ANDWRdRr, ASRBNRd, ASRWNRd, CPCWRdRr, CP... |
1233 | O << ", " ; |
1234 | break; |
1235 | case 1: |
1236 | // ASRWLoRd, ASRWRd, COMWRd, CopyZero, LSLWHiRd, LSLWRd, LSRWLoRd, LSRWRd... |
1237 | return; |
1238 | break; |
1239 | case 2: |
1240 | // LDWRdPtrPd, LDRdPtrPd |
1241 | O << ", -" ; |
1242 | printOperand(MI, OpNo: 2, O); |
1243 | return; |
1244 | break; |
1245 | case 3: |
1246 | // STWPtrPiRr, STPtrPiRr |
1247 | O << "+, " ; |
1248 | printOperand(MI, OpNo: 2, O); |
1249 | return; |
1250 | break; |
1251 | case 4: |
1252 | // SPMZPi |
1253 | O << '+'; |
1254 | return; |
1255 | break; |
1256 | } |
1257 | |
1258 | |
1259 | // Fragment 2 encoded into 3 bits for 5 unique commands. |
1260 | switch ((Bits >> 17) & 7) { |
1261 | default: llvm_unreachable("Invalid command number." ); |
1262 | case 0: |
1263 | // ADCWRdRr, ADDWRdRr, ANDIWRdK, ANDWRdRr, ASRBNRd, ASRWNRd, EORWRdRr, LD... |
1264 | printOperand(MI, OpNo: 2, O); |
1265 | break; |
1266 | case 1: |
1267 | // CPCWRdRr, CPWRdRr, ELPMBRdZ, ELPMBRdZPi, ELPMWRdZ, ELPMWRdZPi, FRMIDX,... |
1268 | printOperand(MI, OpNo: 1, O); |
1269 | break; |
1270 | case 2: |
1271 | // LDDWRdPtrQ, LDDWRdYQ, LDDRdPtrQ |
1272 | printMemri(MI, OpNo: 1, O); |
1273 | return; |
1274 | break; |
1275 | case 3: |
1276 | // BRBCsk, BRBSsk |
1277 | printPCRelImm(MI, OpNo: 1, O); |
1278 | return; |
1279 | break; |
1280 | case 4: |
1281 | // LACZRd, LASZRd, LATZRd, XCHZRd |
1282 | printOperand(MI, OpNo: 0, O); |
1283 | return; |
1284 | break; |
1285 | } |
1286 | |
1287 | |
1288 | // Fragment 3 encoded into 2 bits for 4 unique commands. |
1289 | switch ((Bits >> 20) & 3) { |
1290 | default: llvm_unreachable("Invalid command number." ); |
1291 | case 0: |
1292 | // ADCWRdRr, ADDWRdRr, ANDIWRdK, ANDWRdRr, ASRBNRd, ASRWNRd, CPCWRdRr, CP... |
1293 | return; |
1294 | break; |
1295 | case 1: |
1296 | // ELPMBRdZ, ELPMWRdZ, FRMIDX |
1297 | O << ", " ; |
1298 | printOperand(MI, OpNo: 2, O); |
1299 | return; |
1300 | break; |
1301 | case 2: |
1302 | // ELPMBRdZPi, ELPMWRdZPi |
1303 | O << "+, " ; |
1304 | printOperand(MI, OpNo: 2, O); |
1305 | return; |
1306 | break; |
1307 | case 3: |
1308 | // LDWRdPtrPi, LPMWRdZPi, ELPMRdZPi, LDRdPtrPi, LPMRdZPi |
1309 | O << '+'; |
1310 | return; |
1311 | break; |
1312 | } |
1313 | |
1314 | } |
1315 | |
1316 | |
1317 | /// getRegisterName - This method is automatically generated by tblgen |
1318 | /// from the register set description. This returns the assembler name |
1319 | /// for the specified register. |
1320 | const char *AVRInstPrinter:: |
1321 | getRegisterName(MCRegister Reg, unsigned AltIdx) { |
1322 | unsigned RegNo = Reg.id(); |
1323 | assert(RegNo && RegNo < 62 && "Invalid register number!" ); |
1324 | |
1325 | |
1326 | #ifdef __GNUC__ |
1327 | #pragma GCC diagnostic push |
1328 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
1329 | #endif |
1330 | static const char AsmStrsNoRegAltName[] = { |
1331 | /* 0 */ "r11:r10\0" |
1332 | /* 8 */ "r21:r20\0" |
1333 | /* 16 */ "r31:r30\0" |
1334 | /* 24 */ "r1:r0\0" |
1335 | /* 30 */ "r12:r11\0" |
1336 | /* 38 */ "r22:r21\0" |
1337 | /* 46 */ "r31\0" |
1338 | /* 50 */ "r1\0" |
1339 | /* 53 */ "r13:r12\0" |
1340 | /* 61 */ "r23:r22\0" |
1341 | /* 69 */ "r3:r2\0" |
1342 | /* 75 */ "r14:r13\0" |
1343 | /* 83 */ "r24:r23\0" |
1344 | /* 91 */ "r3\0" |
1345 | /* 94 */ "r15:r14\0" |
1346 | /* 102 */ "r25:r24\0" |
1347 | /* 110 */ "r5:r4\0" |
1348 | /* 116 */ "r16:r15\0" |
1349 | /* 124 */ "r26:r25\0" |
1350 | /* 132 */ "r5\0" |
1351 | /* 135 */ "r17:r16\0" |
1352 | /* 143 */ "r27:r26\0" |
1353 | /* 151 */ "r7:r6\0" |
1354 | /* 157 */ "r18:r17\0" |
1355 | /* 165 */ "r27\0" |
1356 | /* 169 */ "r7\0" |
1357 | /* 172 */ "r19:r18\0" |
1358 | /* 180 */ "r29:r28\0" |
1359 | /* 188 */ "r9:r8\0" |
1360 | /* 194 */ "r20:r19\0" |
1361 | /* 202 */ "r29\0" |
1362 | /* 206 */ "r10:r9\0" |
1363 | /* 213 */ "SPH\0" |
1364 | /* 217 */ "SPL\0" |
1365 | /* 221 */ "SP\0" |
1366 | /* 224 */ "FLAGS\0" |
1367 | }; |
1368 | #ifdef __GNUC__ |
1369 | #pragma GCC diagnostic pop |
1370 | #endif |
1371 | |
1372 | static const uint8_t RegAsmOffsetNoRegAltName[] = { |
1373 | 221, 213, 217, 224, 27, 50, 72, 91, 113, 132, 154, 169, 191, 210, |
1374 | 4, 34, 57, 79, 98, 120, 139, 161, 176, 198, 12, 42, 65, 87, |
1375 | 106, 128, 147, 165, 184, 202, 20, 46, 24, 69, 110, 151, 188, 206, |
1376 | 0, 30, 53, 75, 94, 116, 135, 157, 172, 194, 8, 38, 61, 83, |
1377 | 102, 124, 143, 180, 16, |
1378 | }; |
1379 | |
1380 | |
1381 | #ifdef __GNUC__ |
1382 | #pragma GCC diagnostic push |
1383 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
1384 | #endif |
1385 | static const char AsmStrsptr[] = { |
1386 | /* 0 */ "X\0" |
1387 | /* 2 */ "Y\0" |
1388 | /* 4 */ "Z\0" |
1389 | }; |
1390 | #ifdef __GNUC__ |
1391 | #pragma GCC diagnostic pop |
1392 | #endif |
1393 | |
1394 | static const uint8_t RegAsmOffsetptr[] = { |
1395 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1396 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1397 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1398 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1399 | 1, 1, 0, 2, 4, |
1400 | }; |
1401 | |
1402 | switch(AltIdx) { |
1403 | default: llvm_unreachable("Invalid register alt name index!" ); |
1404 | case AVR::NoRegAltName: |
1405 | assert(*(AsmStrsNoRegAltName+RegAsmOffsetNoRegAltName[RegNo-1]) && |
1406 | "Invalid alt name index for register!" ); |
1407 | return AsmStrsNoRegAltName+RegAsmOffsetNoRegAltName[RegNo-1]; |
1408 | case AVR::ptr: |
1409 | assert(*(AsmStrsptr+RegAsmOffsetptr[RegNo-1]) && |
1410 | "Invalid alt name index for register!" ); |
1411 | return AsmStrsptr+RegAsmOffsetptr[RegNo-1]; |
1412 | } |
1413 | } |
1414 | |
1415 | #ifdef PRINT_ALIAS_INSTR |
1416 | #undef PRINT_ALIAS_INSTR |
1417 | |
1418 | bool AVRInstPrinter::printAliasInstr(const MCInst *MI, uint64_t Address, raw_ostream &OS) { |
1419 | static const PatternsForOpcode OpToPatterns[] = { |
1420 | {.Opcode: AVR::ADCRdRr, .PatternStart: 0, .NumPatterns: 1 }, |
1421 | {.Opcode: AVR::ADDRdRr, .PatternStart: 1, .NumPatterns: 1 }, |
1422 | {.Opcode: AVR::ANDRdRr, .PatternStart: 2, .NumPatterns: 1 }, |
1423 | {.Opcode: AVR::BCLRs, .PatternStart: 3, .NumPatterns: 8 }, |
1424 | {.Opcode: AVR::BRBCsk, .PatternStart: 11, .NumPatterns: 5 }, |
1425 | {.Opcode: AVR::BRBSsk, .PatternStart: 16, .NumPatterns: 5 }, |
1426 | {.Opcode: AVR::BSETs, .PatternStart: 21, .NumPatterns: 8 }, |
1427 | {.Opcode: AVR::EORRdRr, .PatternStart: 29, .NumPatterns: 1 }, |
1428 | }; |
1429 | |
1430 | static const AliasPattern Patterns[] = { |
1431 | // AVR::ADCRdRr - 0 |
1432 | {.AsmStrOffset: 0, .AliasCondStart: 0, .NumOperands: 3, .NumConds: 3 }, |
1433 | // AVR::ADDRdRr - 1 |
1434 | {.AsmStrOffset: 7, .AliasCondStart: 3, .NumOperands: 3, .NumConds: 3 }, |
1435 | // AVR::ANDRdRr - 2 |
1436 | {.AsmStrOffset: 14, .AliasCondStart: 6, .NumOperands: 3, .NumConds: 3 }, |
1437 | // AVR::BCLRs - 3 |
1438 | {.AsmStrOffset: 21, .AliasCondStart: 9, .NumOperands: 1, .NumConds: 1 }, |
1439 | {.AsmStrOffset: 25, .AliasCondStart: 10, .NumOperands: 1, .NumConds: 1 }, |
1440 | {.AsmStrOffset: 29, .AliasCondStart: 11, .NumOperands: 1, .NumConds: 1 }, |
1441 | {.AsmStrOffset: 33, .AliasCondStart: 12, .NumOperands: 1, .NumConds: 1 }, |
1442 | {.AsmStrOffset: 37, .AliasCondStart: 13, .NumOperands: 1, .NumConds: 1 }, |
1443 | {.AsmStrOffset: 41, .AliasCondStart: 14, .NumOperands: 1, .NumConds: 1 }, |
1444 | {.AsmStrOffset: 45, .AliasCondStart: 15, .NumOperands: 1, .NumConds: 1 }, |
1445 | {.AsmStrOffset: 49, .AliasCondStart: 16, .NumOperands: 1, .NumConds: 1 }, |
1446 | // AVR::BRBCsk - 11 |
1447 | {.AsmStrOffset: 53, .AliasCondStart: 17, .NumOperands: 2, .NumConds: 1 }, |
1448 | {.AsmStrOffset: 63, .AliasCondStart: 18, .NumOperands: 2, .NumConds: 1 }, |
1449 | {.AsmStrOffset: 73, .AliasCondStart: 19, .NumOperands: 2, .NumConds: 1 }, |
1450 | {.AsmStrOffset: 83, .AliasCondStart: 20, .NumOperands: 2, .NumConds: 1 }, |
1451 | {.AsmStrOffset: 93, .AliasCondStart: 21, .NumOperands: 2, .NumConds: 1 }, |
1452 | // AVR::BRBSsk - 16 |
1453 | {.AsmStrOffset: 103, .AliasCondStart: 22, .NumOperands: 2, .NumConds: 1 }, |
1454 | {.AsmStrOffset: 113, .AliasCondStart: 23, .NumOperands: 2, .NumConds: 1 }, |
1455 | {.AsmStrOffset: 123, .AliasCondStart: 24, .NumOperands: 2, .NumConds: 1 }, |
1456 | {.AsmStrOffset: 133, .AliasCondStart: 25, .NumOperands: 2, .NumConds: 1 }, |
1457 | {.AsmStrOffset: 143, .AliasCondStart: 26, .NumOperands: 2, .NumConds: 1 }, |
1458 | // AVR::BSETs - 21 |
1459 | {.AsmStrOffset: 153, .AliasCondStart: 27, .NumOperands: 1, .NumConds: 1 }, |
1460 | {.AsmStrOffset: 157, .AliasCondStart: 28, .NumOperands: 1, .NumConds: 1 }, |
1461 | {.AsmStrOffset: 161, .AliasCondStart: 29, .NumOperands: 1, .NumConds: 1 }, |
1462 | {.AsmStrOffset: 165, .AliasCondStart: 30, .NumOperands: 1, .NumConds: 1 }, |
1463 | {.AsmStrOffset: 169, .AliasCondStart: 31, .NumOperands: 1, .NumConds: 1 }, |
1464 | {.AsmStrOffset: 173, .AliasCondStart: 32, .NumOperands: 1, .NumConds: 1 }, |
1465 | {.AsmStrOffset: 177, .AliasCondStart: 33, .NumOperands: 1, .NumConds: 1 }, |
1466 | {.AsmStrOffset: 181, .AliasCondStart: 34, .NumOperands: 1, .NumConds: 1 }, |
1467 | // AVR::EORRdRr - 29 |
1468 | {.AsmStrOffset: 185, .AliasCondStart: 35, .NumOperands: 3, .NumConds: 3 }, |
1469 | }; |
1470 | |
1471 | static const AliasPatternCond Conds[] = { |
1472 | // (ADCRdRr GPR8:$rd, GPR8:$rd) - 0 |
1473 | {.Kind: AliasPatternCond::K_RegClass, .Value: AVR::GPR8RegClassID}, |
1474 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1475 | {.Kind: AliasPatternCond::K_TiedReg, .Value: 0}, |
1476 | // (ADDRdRr GPR8:$rd, GPR8:$rd) - 3 |
1477 | {.Kind: AliasPatternCond::K_RegClass, .Value: AVR::GPR8RegClassID}, |
1478 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1479 | {.Kind: AliasPatternCond::K_TiedReg, .Value: 0}, |
1480 | // (ANDRdRr GPR8:$rd, GPR8:$rd) - 6 |
1481 | {.Kind: AliasPatternCond::K_RegClass, .Value: AVR::GPR8RegClassID}, |
1482 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1483 | {.Kind: AliasPatternCond::K_TiedReg, .Value: 0}, |
1484 | // (BCLRs 0) - 9 |
1485 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1486 | // (BCLRs 1) - 10 |
1487 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1488 | // (BCLRs 2) - 11 |
1489 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1490 | // (BCLRs 3) - 12 |
1491 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(3)}, |
1492 | // (BCLRs 4) - 13 |
1493 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(4)}, |
1494 | // (BCLRs 5) - 14 |
1495 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(5)}, |
1496 | // (BCLRs 6) - 15 |
1497 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(6)}, |
1498 | // (BCLRs 7) - 16 |
1499 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(7)}, |
1500 | // (BRBCsk 0, relbrtarget_7:$k) - 17 |
1501 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1502 | // (BRBCsk 5, relbrtarget_7:$k) - 18 |
1503 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(5)}, |
1504 | // (BRBCsk 6, relbrtarget_7:$k) - 19 |
1505 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(6)}, |
1506 | // (BRBCsk 3, relbrtarget_7:$k) - 20 |
1507 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(3)}, |
1508 | // (BRBCsk 7, relbrtarget_7:$k) - 21 |
1509 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(7)}, |
1510 | // (BRBSsk 0, relbrtarget_7:$k) - 22 |
1511 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1512 | // (BRBSsk 5, relbrtarget_7:$k) - 23 |
1513 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(5)}, |
1514 | // (BRBSsk 6, relbrtarget_7:$k) - 24 |
1515 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(6)}, |
1516 | // (BRBSsk 3, relbrtarget_7:$k) - 25 |
1517 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(3)}, |
1518 | // (BRBSsk 7, relbrtarget_7:$k) - 26 |
1519 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(7)}, |
1520 | // (BSETs 0) - 27 |
1521 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1522 | // (BSETs 1) - 28 |
1523 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1524 | // (BSETs 2) - 29 |
1525 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1526 | // (BSETs 3) - 30 |
1527 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(3)}, |
1528 | // (BSETs 4) - 31 |
1529 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(4)}, |
1530 | // (BSETs 5) - 32 |
1531 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(5)}, |
1532 | // (BSETs 6) - 33 |
1533 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(6)}, |
1534 | // (BSETs 7) - 34 |
1535 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(7)}, |
1536 | // (EORRdRr GPR8:$rd, GPR8:$rd) - 35 |
1537 | {.Kind: AliasPatternCond::K_RegClass, .Value: AVR::GPR8RegClassID}, |
1538 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1539 | {.Kind: AliasPatternCond::K_TiedReg, .Value: 0}, |
1540 | }; |
1541 | |
1542 | static const char AsmStrings[] = |
1543 | /* 0 */ "rol $\x01\0" |
1544 | /* 7 */ "lsl $\x01\0" |
1545 | /* 14 */ "tst $\x01\0" |
1546 | /* 21 */ "clc\0" |
1547 | /* 25 */ "clz\0" |
1548 | /* 29 */ "cln\0" |
1549 | /* 33 */ "clv\0" |
1550 | /* 37 */ "cls\0" |
1551 | /* 41 */ "clh\0" |
1552 | /* 45 */ "clt\0" |
1553 | /* 49 */ "cli\0" |
1554 | /* 53 */ "brcc $\xFF\x02\x01\0" |
1555 | /* 63 */ "brhc $\xFF\x02\x01\0" |
1556 | /* 73 */ "brtc $\xFF\x02\x01\0" |
1557 | /* 83 */ "brvc $\xFF\x02\x01\0" |
1558 | /* 93 */ "brid $\xFF\x02\x01\0" |
1559 | /* 103 */ "brcs $\xFF\x02\x01\0" |
1560 | /* 113 */ "brhs $\xFF\x02\x01\0" |
1561 | /* 123 */ "brts $\xFF\x02\x01\0" |
1562 | /* 133 */ "brvs $\xFF\x02\x01\0" |
1563 | /* 143 */ "brie $\xFF\x02\x01\0" |
1564 | /* 153 */ "sec\0" |
1565 | /* 157 */ "sez\0" |
1566 | /* 161 */ "sen\0" |
1567 | /* 165 */ "sev\0" |
1568 | /* 169 */ "ses\0" |
1569 | /* 173 */ "seh\0" |
1570 | /* 177 */ "set\0" |
1571 | /* 181 */ "sei\0" |
1572 | /* 185 */ "clr $\x01\0" |
1573 | ; |
1574 | |
1575 | #ifndef NDEBUG |
1576 | static struct SortCheck { |
1577 | SortCheck(ArrayRef<PatternsForOpcode> OpToPatterns) { |
1578 | assert(std::is_sorted( |
1579 | OpToPatterns.begin(), OpToPatterns.end(), |
1580 | [](const PatternsForOpcode &L, const PatternsForOpcode &R) { |
1581 | return L.Opcode < R.Opcode; |
1582 | }) && |
1583 | "tablegen failed to sort opcode patterns" ); |
1584 | } |
1585 | } sortCheckVar(OpToPatterns); |
1586 | #endif |
1587 | |
1588 | AliasMatchingData M { |
1589 | .OpToPatterns: ArrayRef(OpToPatterns), |
1590 | .Patterns: ArrayRef(Patterns), |
1591 | .PatternConds: ArrayRef(Conds), |
1592 | .AsmStrings: StringRef(AsmStrings, std::size(AsmStrings)), |
1593 | .ValidateMCOperand: nullptr, |
1594 | }; |
1595 | const char *AsmString = matchAliasPatterns(MI, STI: nullptr, M); |
1596 | if (!AsmString) return false; |
1597 | |
1598 | unsigned I = 0; |
1599 | while (AsmString[I] != ' ' && AsmString[I] != '\t' && |
1600 | AsmString[I] != '$' && AsmString[I] != '\0') |
1601 | ++I; |
1602 | OS << '\t' << StringRef(AsmString, I); |
1603 | if (AsmString[I] != '\0') { |
1604 | if (AsmString[I] == ' ' || AsmString[I] == '\t') { |
1605 | OS << '\t'; |
1606 | ++I; |
1607 | } |
1608 | do { |
1609 | if (AsmString[I] == '$') { |
1610 | ++I; |
1611 | if (AsmString[I] == (char)0xff) { |
1612 | ++I; |
1613 | int OpIdx = AsmString[I++] - 1; |
1614 | int PrintMethodIdx = AsmString[I++] - 1; |
1615 | printCustomAliasOperand(MI, Address, OpIdx, PrintMethodIdx, O&: OS); |
1616 | } else |
1617 | printOperand(MI, OpNo: unsigned(AsmString[I++]) - 1, O&: OS); |
1618 | } else { |
1619 | OS << AsmString[I++]; |
1620 | } |
1621 | } while (AsmString[I] != '\0'); |
1622 | } |
1623 | |
1624 | return true; |
1625 | } |
1626 | |
1627 | void AVRInstPrinter::printCustomAliasOperand( |
1628 | const MCInst *MI, uint64_t Address, unsigned OpIdx, |
1629 | unsigned PrintMethodIdx, |
1630 | raw_ostream &OS) { |
1631 | switch (PrintMethodIdx) { |
1632 | default: |
1633 | llvm_unreachable("Unknown PrintMethod kind" ); |
1634 | break; |
1635 | case 0: |
1636 | printPCRelImm(MI, OpNo: OpIdx, O&: OS); |
1637 | break; |
1638 | } |
1639 | } |
1640 | |
1641 | #endif // PRINT_ALIAS_INSTR |
1642 | |