1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* Assembly Writer Source Fragment *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* From: MSP430.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> MSP430InstPrinter::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 */ "rra\t\0" |
20 | /* 5 */ "rra.b\t\0" |
21 | /* 12 */ "sub.b\t\0" |
22 | /* 19 */ "subc.b\t\0" |
23 | /* 27 */ "addc.b\t\0" |
24 | /* 35 */ "bic.b\t\0" |
25 | /* 42 */ "rrc.b\t\0" |
26 | /* 49 */ "dadd.b\t\0" |
27 | /* 57 */ "and.b\t\0" |
28 | /* 64 */ "push.b\t\0" |
29 | /* 72 */ "cmp.b\t\0" |
30 | /* 79 */ "xor.b\t\0" |
31 | /* 86 */ "bis.b\t\0" |
32 | /* 93 */ "bit.b\t\0" |
33 | /* 100 */ "mov.b\t\0" |
34 | /* 107 */ "swpb\t\0" |
35 | /* 113 */ "sub\t\0" |
36 | /* 118 */ "subc\t\0" |
37 | /* 124 */ "addc\t\0" |
38 | /* 130 */ "bic\t\0" |
39 | /* 135 */ "rrc\t\0" |
40 | /* 140 */ "dadd\t\0" |
41 | /* 146 */ "and\t\0" |
42 | /* 151 */ "push\t\0" |
43 | /* 157 */ "call\t\0" |
44 | /* 163 */ "cmp\t\0" |
45 | /* 168 */ "jmp\t\0" |
46 | /* 173 */ "pop\t\0" |
47 | /* 178 */ "br\t\0" |
48 | /* 182 */ "xor\t\0" |
49 | /* 187 */ "bis\t\0" |
50 | /* 192 */ "bit\t\0" |
51 | /* 197 */ "sxt\t\0" |
52 | /* 202 */ "mov\t\0" |
53 | /* 207 */ "#ADJCALLSTACKDOWN \0" |
54 | /* 226 */ "#ADJCALLSTACKUP \0" |
55 | /* 243 */ "# XRay Function Patchable RET.\0" |
56 | /* 274 */ "# XRay Typed Event Log.\0" |
57 | /* 298 */ "# XRay Custom Event Log.\0" |
58 | /* 323 */ "# XRay Function Enter.\0" |
59 | /* 346 */ "# XRay Tail Call Exit.\0" |
60 | /* 369 */ "# XRay Function Exit.\0" |
61 | /* 391 */ "LIFETIME_END\0" |
62 | /* 404 */ "PSEUDO_PROBE\0" |
63 | /* 417 */ "BUNDLE\0" |
64 | /* 424 */ "DBG_VALUE\0" |
65 | /* 434 */ "DBG_INSTR_REF\0" |
66 | /* 448 */ "DBG_PHI\0" |
67 | /* 456 */ "DBG_LABEL\0" |
68 | /* 466 */ "# Sra16 PSEUDO\0" |
69 | /* 481 */ "# Shl16 PSEUDO\0" |
70 | /* 496 */ "# Srl16 PSEUDO\0" |
71 | /* 511 */ "# Select16 PSEUDO\0" |
72 | /* 529 */ "# Sra8 PSEUDO\0" |
73 | /* 543 */ "# Shl8 PSEUDO\0" |
74 | /* 557 */ "# Srl8 PSEUDO\0" |
75 | /* 571 */ "# Select8 PSEUDO\0" |
76 | /* 588 */ "# ADDframe PSEUDO\0" |
77 | /* 606 */ "LIFETIME_START\0" |
78 | /* 621 */ "DBG_VALUE_LIST\0" |
79 | /* 636 */ "reti\0" |
80 | /* 641 */ "j\0" |
81 | /* 643 */ "# FEntry call\0" |
82 | /* 657 */ "ret\0" |
83 | }; |
84 | #ifdef __GNUC__ |
85 | #pragma GCC diagnostic pop |
86 | #endif |
87 | |
88 | static const uint16_t OpInfo0[] = { |
89 | 0U, // PHI |
90 | 0U, // INLINEASM |
91 | 0U, // INLINEASM_BR |
92 | 0U, // CFI_INSTRUCTION |
93 | 0U, // EH_LABEL |
94 | 0U, // GC_LABEL |
95 | 0U, // ANNOTATION_LABEL |
96 | 0U, // KILL |
97 | 0U, // EXTRACT_SUBREG |
98 | 0U, // INSERT_SUBREG |
99 | 0U, // IMPLICIT_DEF |
100 | 0U, // SUBREG_TO_REG |
101 | 0U, // COPY_TO_REGCLASS |
102 | 425U, // DBG_VALUE |
103 | 622U, // DBG_VALUE_LIST |
104 | 435U, // DBG_INSTR_REF |
105 | 449U, // DBG_PHI |
106 | 457U, // DBG_LABEL |
107 | 0U, // REG_SEQUENCE |
108 | 0U, // COPY |
109 | 418U, // BUNDLE |
110 | 607U, // LIFETIME_START |
111 | 392U, // LIFETIME_END |
112 | 405U, // PSEUDO_PROBE |
113 | 0U, // ARITH_FENCE |
114 | 0U, // STACKMAP |
115 | 644U, // FENTRY_CALL |
116 | 0U, // PATCHPOINT |
117 | 0U, // LOAD_STACK_GUARD |
118 | 0U, // PREALLOCATED_SETUP |
119 | 0U, // PREALLOCATED_ARG |
120 | 0U, // STATEPOINT |
121 | 0U, // LOCAL_ESCAPE |
122 | 0U, // FAULTING_OP |
123 | 0U, // PATCHABLE_OP |
124 | 324U, // PATCHABLE_FUNCTION_ENTER |
125 | 244U, // PATCHABLE_RET |
126 | 370U, // PATCHABLE_FUNCTION_EXIT |
127 | 347U, // PATCHABLE_TAIL_CALL |
128 | 299U, // PATCHABLE_EVENT_CALL |
129 | 275U, // PATCHABLE_TYPED_EVENT_CALL |
130 | 0U, // ICALL_BRANCH_FUNNEL |
131 | 0U, // MEMBARRIER |
132 | 0U, // JUMP_TABLE_DEBUG_INFO |
133 | 0U, // CONVERGENCECTRL_ENTRY |
134 | 0U, // CONVERGENCECTRL_ANCHOR |
135 | 0U, // CONVERGENCECTRL_LOOP |
136 | 0U, // CONVERGENCECTRL_GLUE |
137 | 0U, // G_ASSERT_SEXT |
138 | 0U, // G_ASSERT_ZEXT |
139 | 0U, // G_ASSERT_ALIGN |
140 | 0U, // G_ADD |
141 | 0U, // G_SUB |
142 | 0U, // G_MUL |
143 | 0U, // G_SDIV |
144 | 0U, // G_UDIV |
145 | 0U, // G_SREM |
146 | 0U, // G_UREM |
147 | 0U, // G_SDIVREM |
148 | 0U, // G_UDIVREM |
149 | 0U, // G_AND |
150 | 0U, // G_OR |
151 | 0U, // G_XOR |
152 | 0U, // G_IMPLICIT_DEF |
153 | 0U, // G_PHI |
154 | 0U, // G_FRAME_INDEX |
155 | 0U, // G_GLOBAL_VALUE |
156 | 0U, // G_PTRAUTH_GLOBAL_VALUE |
157 | 0U, // G_CONSTANT_POOL |
158 | 0U, // G_EXTRACT |
159 | 0U, // G_UNMERGE_VALUES |
160 | 0U, // G_INSERT |
161 | 0U, // G_MERGE_VALUES |
162 | 0U, // G_BUILD_VECTOR |
163 | 0U, // G_BUILD_VECTOR_TRUNC |
164 | 0U, // G_CONCAT_VECTORS |
165 | 0U, // G_PTRTOINT |
166 | 0U, // G_INTTOPTR |
167 | 0U, // G_BITCAST |
168 | 0U, // G_FREEZE |
169 | 0U, // G_CONSTANT_FOLD_BARRIER |
170 | 0U, // G_INTRINSIC_FPTRUNC_ROUND |
171 | 0U, // G_INTRINSIC_TRUNC |
172 | 0U, // G_INTRINSIC_ROUND |
173 | 0U, // G_INTRINSIC_LRINT |
174 | 0U, // G_INTRINSIC_LLRINT |
175 | 0U, // G_INTRINSIC_ROUNDEVEN |
176 | 0U, // G_READCYCLECOUNTER |
177 | 0U, // G_READSTEADYCOUNTER |
178 | 0U, // G_LOAD |
179 | 0U, // G_SEXTLOAD |
180 | 0U, // G_ZEXTLOAD |
181 | 0U, // G_INDEXED_LOAD |
182 | 0U, // G_INDEXED_SEXTLOAD |
183 | 0U, // G_INDEXED_ZEXTLOAD |
184 | 0U, // G_STORE |
185 | 0U, // G_INDEXED_STORE |
186 | 0U, // G_ATOMIC_CMPXCHG_WITH_SUCCESS |
187 | 0U, // G_ATOMIC_CMPXCHG |
188 | 0U, // G_ATOMICRMW_XCHG |
189 | 0U, // G_ATOMICRMW_ADD |
190 | 0U, // G_ATOMICRMW_SUB |
191 | 0U, // G_ATOMICRMW_AND |
192 | 0U, // G_ATOMICRMW_NAND |
193 | 0U, // G_ATOMICRMW_OR |
194 | 0U, // G_ATOMICRMW_XOR |
195 | 0U, // G_ATOMICRMW_MAX |
196 | 0U, // G_ATOMICRMW_MIN |
197 | 0U, // G_ATOMICRMW_UMAX |
198 | 0U, // G_ATOMICRMW_UMIN |
199 | 0U, // G_ATOMICRMW_FADD |
200 | 0U, // G_ATOMICRMW_FSUB |
201 | 0U, // G_ATOMICRMW_FMAX |
202 | 0U, // G_ATOMICRMW_FMIN |
203 | 0U, // G_ATOMICRMW_UINC_WRAP |
204 | 0U, // G_ATOMICRMW_UDEC_WRAP |
205 | 0U, // G_FENCE |
206 | 0U, // G_PREFETCH |
207 | 0U, // G_BRCOND |
208 | 0U, // G_BRINDIRECT |
209 | 0U, // G_INVOKE_REGION_START |
210 | 0U, // G_INTRINSIC |
211 | 0U, // G_INTRINSIC_W_SIDE_EFFECTS |
212 | 0U, // G_INTRINSIC_CONVERGENT |
213 | 0U, // G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS |
214 | 0U, // G_ANYEXT |
215 | 0U, // G_TRUNC |
216 | 0U, // G_CONSTANT |
217 | 0U, // G_FCONSTANT |
218 | 0U, // G_VASTART |
219 | 0U, // G_VAARG |
220 | 0U, // G_SEXT |
221 | 0U, // G_SEXT_INREG |
222 | 0U, // G_ZEXT |
223 | 0U, // G_SHL |
224 | 0U, // G_LSHR |
225 | 0U, // G_ASHR |
226 | 0U, // G_FSHL |
227 | 0U, // G_FSHR |
228 | 0U, // G_ROTR |
229 | 0U, // G_ROTL |
230 | 0U, // G_ICMP |
231 | 0U, // G_FCMP |
232 | 0U, // G_SCMP |
233 | 0U, // G_UCMP |
234 | 0U, // G_SELECT |
235 | 0U, // G_UADDO |
236 | 0U, // G_UADDE |
237 | 0U, // G_USUBO |
238 | 0U, // G_USUBE |
239 | 0U, // G_SADDO |
240 | 0U, // G_SADDE |
241 | 0U, // G_SSUBO |
242 | 0U, // G_SSUBE |
243 | 0U, // G_UMULO |
244 | 0U, // G_SMULO |
245 | 0U, // G_UMULH |
246 | 0U, // G_SMULH |
247 | 0U, // G_UADDSAT |
248 | 0U, // G_SADDSAT |
249 | 0U, // G_USUBSAT |
250 | 0U, // G_SSUBSAT |
251 | 0U, // G_USHLSAT |
252 | 0U, // G_SSHLSAT |
253 | 0U, // G_SMULFIX |
254 | 0U, // G_UMULFIX |
255 | 0U, // G_SMULFIXSAT |
256 | 0U, // G_UMULFIXSAT |
257 | 0U, // G_SDIVFIX |
258 | 0U, // G_UDIVFIX |
259 | 0U, // G_SDIVFIXSAT |
260 | 0U, // G_UDIVFIXSAT |
261 | 0U, // G_FADD |
262 | 0U, // G_FSUB |
263 | 0U, // G_FMUL |
264 | 0U, // G_FMA |
265 | 0U, // G_FMAD |
266 | 0U, // G_FDIV |
267 | 0U, // G_FREM |
268 | 0U, // G_FPOW |
269 | 0U, // G_FPOWI |
270 | 0U, // G_FEXP |
271 | 0U, // G_FEXP2 |
272 | 0U, // G_FEXP10 |
273 | 0U, // G_FLOG |
274 | 0U, // G_FLOG2 |
275 | 0U, // G_FLOG10 |
276 | 0U, // G_FLDEXP |
277 | 0U, // G_FFREXP |
278 | 0U, // G_FNEG |
279 | 0U, // G_FPEXT |
280 | 0U, // G_FPTRUNC |
281 | 0U, // G_FPTOSI |
282 | 0U, // G_FPTOUI |
283 | 0U, // G_SITOFP |
284 | 0U, // G_UITOFP |
285 | 0U, // G_FABS |
286 | 0U, // G_FCOPYSIGN |
287 | 0U, // G_IS_FPCLASS |
288 | 0U, // G_FCANONICALIZE |
289 | 0U, // G_FMINNUM |
290 | 0U, // G_FMAXNUM |
291 | 0U, // G_FMINNUM_IEEE |
292 | 0U, // G_FMAXNUM_IEEE |
293 | 0U, // G_FMINIMUM |
294 | 0U, // G_FMAXIMUM |
295 | 0U, // G_GET_FPENV |
296 | 0U, // G_SET_FPENV |
297 | 0U, // G_RESET_FPENV |
298 | 0U, // G_GET_FPMODE |
299 | 0U, // G_SET_FPMODE |
300 | 0U, // G_RESET_FPMODE |
301 | 0U, // G_PTR_ADD |
302 | 0U, // G_PTRMASK |
303 | 0U, // G_SMIN |
304 | 0U, // G_SMAX |
305 | 0U, // G_UMIN |
306 | 0U, // G_UMAX |
307 | 0U, // G_ABS |
308 | 0U, // G_LROUND |
309 | 0U, // G_LLROUND |
310 | 0U, // G_BR |
311 | 0U, // G_BRJT |
312 | 0U, // G_VSCALE |
313 | 0U, // G_INSERT_SUBVECTOR |
314 | 0U, // G_EXTRACT_SUBVECTOR |
315 | 0U, // G_INSERT_VECTOR_ELT |
316 | 0U, // G_EXTRACT_VECTOR_ELT |
317 | 0U, // G_SHUFFLE_VECTOR |
318 | 0U, // G_SPLAT_VECTOR |
319 | 0U, // G_VECTOR_COMPRESS |
320 | 0U, // G_CTTZ |
321 | 0U, // G_CTTZ_ZERO_UNDEF |
322 | 0U, // G_CTLZ |
323 | 0U, // G_CTLZ_ZERO_UNDEF |
324 | 0U, // G_CTPOP |
325 | 0U, // G_BSWAP |
326 | 0U, // G_BITREVERSE |
327 | 0U, // G_FCEIL |
328 | 0U, // G_FCOS |
329 | 0U, // G_FSIN |
330 | 0U, // G_FTAN |
331 | 0U, // G_FACOS |
332 | 0U, // G_FASIN |
333 | 0U, // G_FATAN |
334 | 0U, // G_FCOSH |
335 | 0U, // G_FSINH |
336 | 0U, // G_FTANH |
337 | 0U, // G_FSQRT |
338 | 0U, // G_FFLOOR |
339 | 0U, // G_FRINT |
340 | 0U, // G_FNEARBYINT |
341 | 0U, // G_ADDRSPACE_CAST |
342 | 0U, // G_BLOCK_ADDR |
343 | 0U, // G_JUMP_TABLE |
344 | 0U, // G_DYN_STACKALLOC |
345 | 0U, // G_STACKSAVE |
346 | 0U, // G_STACKRESTORE |
347 | 0U, // G_STRICT_FADD |
348 | 0U, // G_STRICT_FSUB |
349 | 0U, // G_STRICT_FMUL |
350 | 0U, // G_STRICT_FDIV |
351 | 0U, // G_STRICT_FREM |
352 | 0U, // G_STRICT_FMA |
353 | 0U, // G_STRICT_FSQRT |
354 | 0U, // G_STRICT_FLDEXP |
355 | 0U, // G_READ_REGISTER |
356 | 0U, // G_WRITE_REGISTER |
357 | 0U, // G_MEMCPY |
358 | 0U, // G_MEMCPY_INLINE |
359 | 0U, // G_MEMMOVE |
360 | 0U, // G_MEMSET |
361 | 0U, // G_BZERO |
362 | 0U, // G_TRAP |
363 | 0U, // G_DEBUGTRAP |
364 | 0U, // G_UBSANTRAP |
365 | 0U, // G_VECREDUCE_SEQ_FADD |
366 | 0U, // G_VECREDUCE_SEQ_FMUL |
367 | 0U, // G_VECREDUCE_FADD |
368 | 0U, // G_VECREDUCE_FMUL |
369 | 0U, // G_VECREDUCE_FMAX |
370 | 0U, // G_VECREDUCE_FMIN |
371 | 0U, // G_VECREDUCE_FMAXIMUM |
372 | 0U, // G_VECREDUCE_FMINIMUM |
373 | 0U, // G_VECREDUCE_ADD |
374 | 0U, // G_VECREDUCE_MUL |
375 | 0U, // G_VECREDUCE_AND |
376 | 0U, // G_VECREDUCE_OR |
377 | 0U, // G_VECREDUCE_XOR |
378 | 0U, // G_VECREDUCE_SMAX |
379 | 0U, // G_VECREDUCE_SMIN |
380 | 0U, // G_VECREDUCE_UMAX |
381 | 0U, // G_VECREDUCE_UMIN |
382 | 0U, // G_SBFX |
383 | 0U, // G_UBFX |
384 | 1166U, // ADD16mc |
385 | 1166U, // ADD16mi |
386 | 2190U, // ADD16mm |
387 | 3214U, // ADD16mn |
388 | 4238U, // ADD16mp |
389 | 1166U, // ADD16mr |
390 | 17550U, // ADD16rc |
391 | 17550U, // ADD16ri |
392 | 18574U, // ADD16rm |
393 | 19598U, // ADD16rn |
394 | 5262U, // ADD16rp |
395 | 17550U, // ADD16rr |
396 | 1075U, // ADD8mc |
397 | 1075U, // ADD8mi |
398 | 2099U, // ADD8mm |
399 | 3123U, // ADD8mn |
400 | 4147U, // ADD8mp |
401 | 1075U, // ADD8mr |
402 | 17459U, // ADD8rc |
403 | 17459U, // ADD8ri |
404 | 18483U, // ADD8rm |
405 | 19507U, // ADD8rn |
406 | 5171U, // ADD8rp |
407 | 17459U, // ADD8rr |
408 | 1149U, // ADDC16mc |
409 | 1149U, // ADDC16mi |
410 | 2173U, // ADDC16mm |
411 | 3197U, // ADDC16mn |
412 | 4221U, // ADDC16mp |
413 | 1149U, // ADDC16mr |
414 | 17533U, // ADDC16rc |
415 | 17533U, // ADDC16ri |
416 | 18557U, // ADDC16rm |
417 | 19581U, // ADDC16rn |
418 | 5245U, // ADDC16rp |
419 | 17533U, // ADDC16rr |
420 | 1052U, // ADDC8mc |
421 | 1052U, // ADDC8mi |
422 | 2076U, // ADDC8mm |
423 | 3100U, // ADDC8mn |
424 | 4124U, // ADDC8mp |
425 | 1052U, // ADDC8mr |
426 | 17436U, // ADDC8rc |
427 | 17436U, // ADDC8ri |
428 | 18460U, // ADDC8rm |
429 | 19484U, // ADDC8rn |
430 | 5148U, // ADDC8rp |
431 | 17436U, // ADDC8rr |
432 | 589U, // ADDframe |
433 | 39120U, // ADJCALLSTACKDOWN |
434 | 39139U, // ADJCALLSTACKUP |
435 | 1171U, // AND16mc |
436 | 1171U, // AND16mi |
437 | 2195U, // AND16mm |
438 | 3219U, // AND16mn |
439 | 4243U, // AND16mp |
440 | 1171U, // AND16mr |
441 | 17555U, // AND16rc |
442 | 17555U, // AND16ri |
443 | 18579U, // AND16rm |
444 | 19603U, // AND16rn |
445 | 5267U, // AND16rp |
446 | 17555U, // AND16rr |
447 | 1082U, // AND8mc |
448 | 1082U, // AND8mi |
449 | 2106U, // AND8mm |
450 | 3130U, // AND8mn |
451 | 4154U, // AND8mp |
452 | 1082U, // AND8mr |
453 | 17466U, // AND8rc |
454 | 17466U, // AND8ri |
455 | 18490U, // AND8rm |
456 | 19514U, // AND8rn |
457 | 5178U, // AND8rp |
458 | 17466U, // AND8rr |
459 | 1155U, // BIC16mc |
460 | 1155U, // BIC16mi |
461 | 2179U, // BIC16mm |
462 | 3203U, // BIC16mn |
463 | 4227U, // BIC16mp |
464 | 1155U, // BIC16mr |
465 | 17539U, // BIC16rc |
466 | 17539U, // BIC16ri |
467 | 18563U, // BIC16rm |
468 | 19587U, // BIC16rn |
469 | 5251U, // BIC16rp |
470 | 17539U, // BIC16rr |
471 | 1060U, // BIC8mc |
472 | 1060U, // BIC8mi |
473 | 2084U, // BIC8mm |
474 | 3108U, // BIC8mn |
475 | 4132U, // BIC8mp |
476 | 1060U, // BIC8mr |
477 | 17444U, // BIC8rc |
478 | 17444U, // BIC8ri |
479 | 18468U, // BIC8rm |
480 | 19492U, // BIC8rn |
481 | 5156U, // BIC8rp |
482 | 17444U, // BIC8rr |
483 | 1212U, // BIS16mc |
484 | 1212U, // BIS16mi |
485 | 2236U, // BIS16mm |
486 | 3260U, // BIS16mn |
487 | 4284U, // BIS16mp |
488 | 1212U, // BIS16mr |
489 | 17596U, // BIS16rc |
490 | 17596U, // BIS16ri |
491 | 18620U, // BIS16rm |
492 | 19644U, // BIS16rn |
493 | 5308U, // BIS16rp |
494 | 17596U, // BIS16rr |
495 | 1111U, // BIS8mc |
496 | 1111U, // BIS8mi |
497 | 2135U, // BIS8mm |
498 | 3159U, // BIS8mn |
499 | 4183U, // BIS8mp |
500 | 1111U, // BIS8mr |
501 | 17495U, // BIS8rc |
502 | 17495U, // BIS8ri |
503 | 18519U, // BIS8rm |
504 | 19543U, // BIS8rn |
505 | 5207U, // BIS8rp |
506 | 17495U, // BIS8rr |
507 | 1217U, // BIT16mc |
508 | 1217U, // BIT16mi |
509 | 2241U, // BIT16mm |
510 | 3265U, // BIT16mn |
511 | 4289U, // BIT16mp |
512 | 1217U, // BIT16mr |
513 | 7361U, // BIT16rc |
514 | 7361U, // BIT16ri |
515 | 8385U, // BIT16rm |
516 | 9409U, // BIT16rn |
517 | 10433U, // BIT16rp |
518 | 7361U, // BIT16rr |
519 | 1118U, // BIT8mc |
520 | 1118U, // BIT8mi |
521 | 2142U, // BIT8mm |
522 | 3166U, // BIT8mn |
523 | 4190U, // BIT8mp |
524 | 1118U, // BIT8mr |
525 | 7262U, // BIT8rc |
526 | 7262U, // BIT8ri |
527 | 8286U, // BIT8rm |
528 | 9310U, // BIT8rn |
529 | 10334U, // BIT8rp |
530 | 7262U, // BIT8rr |
531 | 55475U, // Bi |
532 | 11443U, // Bm |
533 | 55475U, // Br |
534 | 55454U, // CALLi |
535 | 11422U, // CALLm |
536 | 12446U, // CALLn |
537 | 13470U, // CALLp |
538 | 55454U, // CALLr |
539 | 1188U, // CMP16mc |
540 | 1188U, // CMP16mi |
541 | 2212U, // CMP16mm |
542 | 3236U, // CMP16mn |
543 | 4260U, // CMP16mp |
544 | 1188U, // CMP16mr |
545 | 7332U, // CMP16rc |
546 | 7332U, // CMP16ri |
547 | 8356U, // CMP16rm |
548 | 9380U, // CMP16rn |
549 | 10404U, // CMP16rp |
550 | 7332U, // CMP16rr |
551 | 1097U, // CMP8mc |
552 | 1097U, // CMP8mi |
553 | 2121U, // CMP8mm |
554 | 3145U, // CMP8mn |
555 | 4169U, // CMP8mp |
556 | 1097U, // CMP8mr |
557 | 7241U, // CMP8rc |
558 | 7241U, // CMP8ri |
559 | 8265U, // CMP8rm |
560 | 9289U, // CMP8rn |
561 | 10313U, // CMP8rp |
562 | 7241U, // CMP8rr |
563 | 1165U, // DADD16mc |
564 | 1165U, // DADD16mi |
565 | 2189U, // DADD16mm |
566 | 3213U, // DADD16mn |
567 | 4237U, // DADD16mp |
568 | 1165U, // DADD16mr |
569 | 17549U, // DADD16rc |
570 | 17549U, // DADD16ri |
571 | 18573U, // DADD16rm |
572 | 19597U, // DADD16rn |
573 | 5261U, // DADD16rp |
574 | 17549U, // DADD16rr |
575 | 1074U, // DADD8mc |
576 | 1074U, // DADD8mi |
577 | 2098U, // DADD8mm |
578 | 3122U, // DADD8mn |
579 | 4146U, // DADD8mp |
580 | 1074U, // DADD8mr |
581 | 17458U, // DADD8rc |
582 | 17458U, // DADD8ri |
583 | 18482U, // DADD8rm |
584 | 19506U, // DADD8rn |
585 | 5170U, // DADD8rp |
586 | 17458U, // DADD8rr |
587 | 14978U, // JCC |
588 | 15529U, // JMP |
589 | 1227U, // MOV16mc |
590 | 1227U, // MOV16mi |
591 | 2251U, // MOV16mm |
592 | 3275U, // MOV16mn |
593 | 1227U, // MOV16mr |
594 | 7371U, // MOV16rc |
595 | 7371U, // MOV16ri |
596 | 8395U, // MOV16rm |
597 | 9419U, // MOV16rn |
598 | 20683U, // MOV16rp |
599 | 7371U, // MOV16rr |
600 | 1125U, // MOV8mc |
601 | 1125U, // MOV8mi |
602 | 2149U, // MOV8mm |
603 | 3173U, // MOV8mn |
604 | 1125U, // MOV8mr |
605 | 7269U, // MOV8rc |
606 | 7269U, // MOV8ri |
607 | 8293U, // MOV8rm |
608 | 9317U, // MOV8rn |
609 | 20581U, // MOV8rp |
610 | 7269U, // MOV8rr |
611 | 8293U, // MOVZX16rm8 |
612 | 7269U, // MOVZX16rr8 |
613 | 55470U, // POP16r |
614 | 55448U, // PUSH16c |
615 | 55448U, // PUSH16i |
616 | 55448U, // PUSH16r |
617 | 55361U, // PUSH8r |
618 | 658U, // RET |
619 | 637U, // RETI |
620 | 11265U, // RRA16m |
621 | 12289U, // RRA16n |
622 | 13313U, // RRA16p |
623 | 55297U, // RRA16r |
624 | 11270U, // RRA8m |
625 | 12294U, // RRA8n |
626 | 13318U, // RRA8p |
627 | 55302U, // RRA8r |
628 | 11400U, // RRC16m |
629 | 12424U, // RRC16n |
630 | 13448U, // RRC16p |
631 | 55432U, // RRC16r |
632 | 11307U, // RRC8m |
633 | 12331U, // RRC8n |
634 | 13355U, // RRC8p |
635 | 55339U, // RRC8r |
636 | 0U, // Rrcl16 |
637 | 0U, // Rrcl8 |
638 | 11462U, // SEXT16m |
639 | 12486U, // SEXT16n |
640 | 13510U, // SEXT16p |
641 | 55494U, // SEXT16r |
642 | 1138U, // SUB16mc |
643 | 1138U, // SUB16mi |
644 | 2162U, // SUB16mm |
645 | 3186U, // SUB16mn |
646 | 4210U, // SUB16mp |
647 | 1138U, // SUB16mr |
648 | 17522U, // SUB16rc |
649 | 17522U, // SUB16ri |
650 | 18546U, // SUB16rm |
651 | 19570U, // SUB16rn |
652 | 5234U, // SUB16rp |
653 | 17522U, // SUB16rr |
654 | 1037U, // SUB8mc |
655 | 1037U, // SUB8mi |
656 | 2061U, // SUB8mm |
657 | 3085U, // SUB8mn |
658 | 4109U, // SUB8mp |
659 | 1037U, // SUB8mr |
660 | 17421U, // SUB8rc |
661 | 17421U, // SUB8ri |
662 | 18445U, // SUB8rm |
663 | 19469U, // SUB8rn |
664 | 5133U, // SUB8rp |
665 | 17421U, // SUB8rr |
666 | 1143U, // SUBC16mc |
667 | 1143U, // SUBC16mi |
668 | 2167U, // SUBC16mm |
669 | 3191U, // SUBC16mn |
670 | 4215U, // SUBC16mp |
671 | 1143U, // SUBC16mr |
672 | 17527U, // SUBC16rc |
673 | 17527U, // SUBC16ri |
674 | 18551U, // SUBC16rm |
675 | 19575U, // SUBC16rn |
676 | 5239U, // SUBC16rp |
677 | 17527U, // SUBC16rr |
678 | 1044U, // SUBC8mc |
679 | 1044U, // SUBC8mi |
680 | 2068U, // SUBC8mm |
681 | 3092U, // SUBC8mn |
682 | 4116U, // SUBC8mp |
683 | 1044U, // SUBC8mr |
684 | 17428U, // SUBC8rc |
685 | 17428U, // SUBC8ri |
686 | 18452U, // SUBC8rm |
687 | 19476U, // SUBC8rn |
688 | 5140U, // SUBC8rp |
689 | 17428U, // SUBC8rr |
690 | 11372U, // SWPB16m |
691 | 12396U, // SWPB16n |
692 | 13420U, // SWPB16p |
693 | 55404U, // SWPB16r |
694 | 512U, // Select16 |
695 | 572U, // Select8 |
696 | 482U, // Shl16 |
697 | 544U, // Shl8 |
698 | 467U, // Sra16 |
699 | 530U, // Sra8 |
700 | 497U, // Srl16 |
701 | 558U, // Srl8 |
702 | 1207U, // XOR16mc |
703 | 1207U, // XOR16mi |
704 | 2231U, // XOR16mm |
705 | 3255U, // XOR16mn |
706 | 4279U, // XOR16mp |
707 | 1207U, // XOR16mr |
708 | 17591U, // XOR16rc |
709 | 17591U, // XOR16ri |
710 | 18615U, // XOR16rm |
711 | 19639U, // XOR16rn |
712 | 5303U, // XOR16rp |
713 | 17591U, // XOR16rr |
714 | 1104U, // XOR8mc |
715 | 1104U, // XOR8mi |
716 | 2128U, // XOR8mm |
717 | 3152U, // XOR8mn |
718 | 4176U, // XOR8mp |
719 | 1104U, // XOR8mr |
720 | 17488U, // XOR8rc |
721 | 17488U, // XOR8ri |
722 | 18512U, // XOR8rm |
723 | 19536U, // XOR8rn |
724 | 5200U, // XOR8rp |
725 | 17488U, // XOR8rr |
726 | 7269U, // ZEXT16r |
727 | }; |
728 | |
729 | // Emit the opcode for the instruction. |
730 | uint32_t Bits = 0; |
731 | Bits |= OpInfo0[MI->getOpcode()] << 0; |
732 | if (Bits == 0) |
733 | return {nullptr, Bits}; |
734 | return {AsmStrs+(Bits & 1023)-1, Bits}; |
735 | |
736 | } |
737 | /// printInstruction - This method is automatically generated by tablegen |
738 | /// from the instruction set description. |
739 | LLVM_NO_PROFILE_INSTRUMENT_FUNCTION |
740 | void MSP430InstPrinter::printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O) { |
741 | O << "\t" ; |
742 | |
743 | auto MnemonicInfo = getMnemonic(MI); |
744 | |
745 | O << MnemonicInfo.first; |
746 | |
747 | uint32_t Bits = MnemonicInfo.second; |
748 | assert(Bits != 0 && "Cannot print this instruction." ); |
749 | |
750 | // Fragment 0 encoded into 4 bits for 16 unique commands. |
751 | switch ((Bits >> 10) & 15) { |
752 | default: llvm_unreachable("Invalid command number." ); |
753 | case 0: |
754 | // DBG_VALUE, DBG_VALUE_LIST, DBG_INSTR_REF, DBG_PHI, DBG_LABEL, BUNDLE, ... |
755 | return; |
756 | break; |
757 | case 1: |
758 | // ADD16mc, ADD16mi, ADD16mr, ADD16rc, ADD16ri, ADD16rr, ADD8mc, ADD8mi, ... |
759 | printOperand(MI, OpNo: 2, O); |
760 | O << ", " ; |
761 | break; |
762 | case 2: |
763 | // ADD16mm, ADD16rm, ADD8mm, ADD8rm, ADDC16mm, ADDC16rm, ADDC8mm, ADDC8rm... |
764 | printSrcMemOperand(MI, OpNo: 2, O); |
765 | O << ", " ; |
766 | break; |
767 | case 3: |
768 | // ADD16mn, ADD16rn, ADD8mn, ADD8rn, ADDC16mn, ADDC16rn, ADDC8mn, ADDC8rn... |
769 | printIndRegOperand(MI, OpNo: 2, O); |
770 | O << ", " ; |
771 | break; |
772 | case 4: |
773 | // ADD16mp, ADD8mp, ADDC16mp, ADDC8mp, AND16mp, AND8mp, BIC16mp, BIC8mp, ... |
774 | printPostIndRegOperand(MI, OpNo: 2, O); |
775 | O << ", " ; |
776 | break; |
777 | case 5: |
778 | // ADD16rp, ADD8rp, ADDC16rp, ADDC8rp, AND16rp, AND8rp, BIC16rp, BIC8rp, ... |
779 | printPostIndRegOperand(MI, OpNo: 3, O); |
780 | O << ", " ; |
781 | printOperand(MI, OpNo: 0, O); |
782 | return; |
783 | break; |
784 | case 6: |
785 | // ADJCALLSTACKDOWN, ADJCALLSTACKUP, Bi, Br, CALLi, CALLr, POP16r, PUSH16... |
786 | printOperand(MI, OpNo: 0, O); |
787 | break; |
788 | case 7: |
789 | // BIT16rc, BIT16ri, BIT16rr, BIT8rc, BIT8ri, BIT8rr, CMP16rc, CMP16ri, C... |
790 | printOperand(MI, OpNo: 1, O); |
791 | O << ", " ; |
792 | printOperand(MI, OpNo: 0, O); |
793 | return; |
794 | break; |
795 | case 8: |
796 | // BIT16rm, BIT8rm, CMP16rm, CMP8rm, MOV16rm, MOV8rm, MOVZX16rm8 |
797 | printSrcMemOperand(MI, OpNo: 1, O); |
798 | O << ", " ; |
799 | printOperand(MI, OpNo: 0, O); |
800 | return; |
801 | break; |
802 | case 9: |
803 | // BIT16rn, BIT8rn, CMP16rn, CMP8rn, MOV16rn, MOV8rn |
804 | printIndRegOperand(MI, OpNo: 1, O); |
805 | O << ", " ; |
806 | printOperand(MI, OpNo: 0, O); |
807 | return; |
808 | break; |
809 | case 10: |
810 | // BIT16rp, BIT8rp, CMP16rp, CMP8rp |
811 | printPostIndRegOperand(MI, OpNo: 1, O); |
812 | O << ", " ; |
813 | printOperand(MI, OpNo: 0, O); |
814 | return; |
815 | break; |
816 | case 11: |
817 | // Bm, CALLm, RRA16m, RRA8m, RRC16m, RRC8m, SEXT16m, SWPB16m |
818 | printSrcMemOperand(MI, OpNo: 0, O); |
819 | return; |
820 | break; |
821 | case 12: |
822 | // CALLn, RRA16n, RRA8n, RRC16n, RRC8n, SEXT16n, SWPB16n |
823 | printIndRegOperand(MI, OpNo: 0, O); |
824 | return; |
825 | break; |
826 | case 13: |
827 | // CALLp, RRA16p, RRA8p, RRC16p, RRC8p, SEXT16p, SWPB16p |
828 | printPostIndRegOperand(MI, OpNo: 0, O); |
829 | return; |
830 | break; |
831 | case 14: |
832 | // JCC |
833 | printCCOperand(MI, OpNo: 1, O); |
834 | O << "\t" ; |
835 | printPCRelImmOperand(MI, OpNo: 0, O); |
836 | return; |
837 | break; |
838 | case 15: |
839 | // JMP |
840 | printPCRelImmOperand(MI, OpNo: 0, O); |
841 | return; |
842 | break; |
843 | } |
844 | |
845 | |
846 | // Fragment 1 encoded into 2 bits for 4 unique commands. |
847 | switch ((Bits >> 14) & 3) { |
848 | default: llvm_unreachable("Invalid command number." ); |
849 | case 0: |
850 | // ADD16mc, ADD16mi, ADD16mm, ADD16mn, ADD16mp, ADD16mr, ADD8mc, ADD8mi, ... |
851 | printSrcMemOperand(MI, OpNo: 0, O); |
852 | return; |
853 | break; |
854 | case 1: |
855 | // ADD16rc, ADD16ri, ADD16rm, ADD16rn, ADD16rr, ADD8rc, ADD8ri, ADD8rm, A... |
856 | printOperand(MI, OpNo: 0, O); |
857 | return; |
858 | break; |
859 | case 2: |
860 | // ADJCALLSTACKDOWN, ADJCALLSTACKUP |
861 | O << ' '; |
862 | printOperand(MI, OpNo: 1, O); |
863 | return; |
864 | break; |
865 | case 3: |
866 | // Bi, Br, CALLi, CALLr, POP16r, PUSH16c, PUSH16i, PUSH16r, PUSH8r, RRA16... |
867 | return; |
868 | break; |
869 | } |
870 | |
871 | } |
872 | |
873 | |
874 | /// getRegisterName - This method is automatically generated by tblgen |
875 | /// from the register set description. This returns the assembler name |
876 | /// for the specified register. |
877 | const char *MSP430InstPrinter::getRegisterName(MCRegister Reg) { |
878 | unsigned RegNo = Reg.id(); |
879 | assert(RegNo && RegNo < 33 && "Invalid register number!" ); |
880 | |
881 | |
882 | #ifdef __GNUC__ |
883 | #pragma GCC diagnostic push |
884 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
885 | #endif |
886 | static const char AsmStrs[] = { |
887 | /* 0 */ "r10\0" |
888 | /* 4 */ "r0\0" |
889 | /* 7 */ "r11\0" |
890 | /* 11 */ "r1\0" |
891 | /* 14 */ "r12\0" |
892 | /* 18 */ "r2\0" |
893 | /* 21 */ "r13\0" |
894 | /* 25 */ "r3\0" |
895 | /* 28 */ "r14\0" |
896 | /* 32 */ "r4\0" |
897 | /* 35 */ "r15\0" |
898 | /* 39 */ "r5\0" |
899 | /* 42 */ "r6\0" |
900 | /* 45 */ "r7\0" |
901 | /* 48 */ "r8\0" |
902 | /* 51 */ "r9\0" |
903 | }; |
904 | #ifdef __GNUC__ |
905 | #pragma GCC diagnostic pop |
906 | #endif |
907 | |
908 | static const uint8_t RegAsmOffset[] = { |
909 | 25, 25, 4, 4, 11, 11, 18, 18, 32, 39, 42, 45, 48, 51, |
910 | 0, 7, 14, 21, 28, 35, 32, 39, 42, 45, 48, 51, 0, 7, |
911 | 14, 21, 28, 35, |
912 | }; |
913 | |
914 | assert (*(AsmStrs+RegAsmOffset[RegNo-1]) && |
915 | "Invalid alt name index for register!" ); |
916 | return AsmStrs+RegAsmOffset[RegNo-1]; |
917 | } |
918 | |
919 | #ifdef PRINT_ALIAS_INSTR |
920 | #undef PRINT_ALIAS_INSTR |
921 | |
922 | bool MSP430InstPrinter::printAliasInstr(const MCInst *MI, uint64_t Address, raw_ostream &OS) { |
923 | static const PatternsForOpcode OpToPatterns[] = { |
924 | {.Opcode: MSP430::ADD16mc, .PatternStart: 0, .NumPatterns: 2 }, |
925 | {.Opcode: MSP430::ADD16rc, .PatternStart: 2, .NumPatterns: 2 }, |
926 | {.Opcode: MSP430::ADD8mc, .PatternStart: 4, .NumPatterns: 2 }, |
927 | {.Opcode: MSP430::ADD8rc, .PatternStart: 6, .NumPatterns: 2 }, |
928 | {.Opcode: MSP430::ADDC16mc, .PatternStart: 8, .NumPatterns: 1 }, |
929 | {.Opcode: MSP430::ADDC16rc, .PatternStart: 9, .NumPatterns: 1 }, |
930 | {.Opcode: MSP430::ADDC8mc, .PatternStart: 10, .NumPatterns: 1 }, |
931 | {.Opcode: MSP430::ADDC8rc, .PatternStart: 11, .NumPatterns: 1 }, |
932 | {.Opcode: MSP430::BIC16rc, .PatternStart: 12, .NumPatterns: 4 }, |
933 | {.Opcode: MSP430::BIS16rc, .PatternStart: 16, .NumPatterns: 4 }, |
934 | {.Opcode: MSP430::CMP16mc, .PatternStart: 20, .NumPatterns: 1 }, |
935 | {.Opcode: MSP430::CMP16rc, .PatternStart: 21, .NumPatterns: 1 }, |
936 | {.Opcode: MSP430::CMP8mc, .PatternStart: 22, .NumPatterns: 1 }, |
937 | {.Opcode: MSP430::CMP8rc, .PatternStart: 23, .NumPatterns: 1 }, |
938 | {.Opcode: MSP430::DADD16mc, .PatternStart: 24, .NumPatterns: 1 }, |
939 | {.Opcode: MSP430::DADD16rc, .PatternStart: 25, .NumPatterns: 1 }, |
940 | {.Opcode: MSP430::DADD8mc, .PatternStart: 26, .NumPatterns: 1 }, |
941 | {.Opcode: MSP430::DADD8rc, .PatternStart: 27, .NumPatterns: 1 }, |
942 | {.Opcode: MSP430::MOV16mc, .PatternStart: 28, .NumPatterns: 1 }, |
943 | {.Opcode: MSP430::MOV16rc, .PatternStart: 29, .NumPatterns: 2 }, |
944 | {.Opcode: MSP430::MOV8mc, .PatternStart: 31, .NumPatterns: 1 }, |
945 | {.Opcode: MSP430::MOV8rc, .PatternStart: 32, .NumPatterns: 1 }, |
946 | {.Opcode: MSP430::SUB16mc, .PatternStart: 33, .NumPatterns: 2 }, |
947 | {.Opcode: MSP430::SUB16rc, .PatternStart: 35, .NumPatterns: 2 }, |
948 | {.Opcode: MSP430::SUB8mc, .PatternStart: 37, .NumPatterns: 2 }, |
949 | {.Opcode: MSP430::SUB8rc, .PatternStart: 39, .NumPatterns: 2 }, |
950 | {.Opcode: MSP430::SUBC16mc, .PatternStart: 41, .NumPatterns: 1 }, |
951 | {.Opcode: MSP430::SUBC16rc, .PatternStart: 42, .NumPatterns: 1 }, |
952 | {.Opcode: MSP430::SUBC8mc, .PatternStart: 43, .NumPatterns: 1 }, |
953 | {.Opcode: MSP430::SUBC8rc, .PatternStart: 44, .NumPatterns: 1 }, |
954 | {.Opcode: MSP430::XOR16mc, .PatternStart: 45, .NumPatterns: 1 }, |
955 | {.Opcode: MSP430::XOR16rc, .PatternStart: 46, .NumPatterns: 1 }, |
956 | {.Opcode: MSP430::XOR8mc, .PatternStart: 47, .NumPatterns: 1 }, |
957 | {.Opcode: MSP430::XOR8rc, .PatternStart: 48, .NumPatterns: 1 }, |
958 | }; |
959 | |
960 | static const AliasPattern Patterns[] = { |
961 | // MSP430::ADD16mc - 0 |
962 | {.AsmStrOffset: 0, .AliasCondStart: 0, .NumOperands: 3, .NumConds: 3 }, |
963 | {.AsmStrOffset: 9, .AliasCondStart: 3, .NumOperands: 3, .NumConds: 3 }, |
964 | // MSP430::ADD16rc - 2 |
965 | {.AsmStrOffset: 19, .AliasCondStart: 6, .NumOperands: 3, .NumConds: 3 }, |
966 | {.AsmStrOffset: 26, .AliasCondStart: 9, .NumOperands: 3, .NumConds: 3 }, |
967 | // MSP430::ADD8mc - 4 |
968 | {.AsmStrOffset: 34, .AliasCondStart: 12, .NumOperands: 3, .NumConds: 3 }, |
969 | {.AsmStrOffset: 45, .AliasCondStart: 15, .NumOperands: 3, .NumConds: 3 }, |
970 | // MSP430::ADD8rc - 6 |
971 | {.AsmStrOffset: 57, .AliasCondStart: 18, .NumOperands: 3, .NumConds: 3 }, |
972 | {.AsmStrOffset: 66, .AliasCondStart: 21, .NumOperands: 3, .NumConds: 3 }, |
973 | // MSP430::ADDC16mc - 8 |
974 | {.AsmStrOffset: 76, .AliasCondStart: 24, .NumOperands: 3, .NumConds: 3 }, |
975 | // MSP430::ADDC16rc - 9 |
976 | {.AsmStrOffset: 85, .AliasCondStart: 27, .NumOperands: 3, .NumConds: 3 }, |
977 | // MSP430::ADDC8mc - 10 |
978 | {.AsmStrOffset: 92, .AliasCondStart: 30, .NumOperands: 3, .NumConds: 3 }, |
979 | // MSP430::ADDC8rc - 11 |
980 | {.AsmStrOffset: 103, .AliasCondStart: 33, .NumOperands: 3, .NumConds: 3 }, |
981 | // MSP430::BIC16rc - 12 |
982 | {.AsmStrOffset: 112, .AliasCondStart: 36, .NumOperands: 3, .NumConds: 3 }, |
983 | {.AsmStrOffset: 117, .AliasCondStart: 39, .NumOperands: 3, .NumConds: 3 }, |
984 | {.AsmStrOffset: 122, .AliasCondStart: 42, .NumOperands: 3, .NumConds: 3 }, |
985 | {.AsmStrOffset: 127, .AliasCondStart: 45, .NumOperands: 3, .NumConds: 3 }, |
986 | // MSP430::BIS16rc - 16 |
987 | {.AsmStrOffset: 132, .AliasCondStart: 48, .NumOperands: 3, .NumConds: 3 }, |
988 | {.AsmStrOffset: 137, .AliasCondStart: 51, .NumOperands: 3, .NumConds: 3 }, |
989 | {.AsmStrOffset: 142, .AliasCondStart: 54, .NumOperands: 3, .NumConds: 3 }, |
990 | {.AsmStrOffset: 147, .AliasCondStart: 57, .NumOperands: 3, .NumConds: 3 }, |
991 | // MSP430::CMP16mc - 20 |
992 | {.AsmStrOffset: 152, .AliasCondStart: 60, .NumOperands: 3, .NumConds: 3 }, |
993 | // MSP430::CMP16rc - 21 |
994 | {.AsmStrOffset: 161, .AliasCondStart: 63, .NumOperands: 2, .NumConds: 2 }, |
995 | // MSP430::CMP8mc - 22 |
996 | {.AsmStrOffset: 168, .AliasCondStart: 65, .NumOperands: 3, .NumConds: 3 }, |
997 | // MSP430::CMP8rc - 23 |
998 | {.AsmStrOffset: 179, .AliasCondStart: 68, .NumOperands: 2, .NumConds: 2 }, |
999 | // MSP430::DADD16mc - 24 |
1000 | {.AsmStrOffset: 188, .AliasCondStart: 70, .NumOperands: 3, .NumConds: 3 }, |
1001 | // MSP430::DADD16rc - 25 |
1002 | {.AsmStrOffset: 198, .AliasCondStart: 73, .NumOperands: 3, .NumConds: 3 }, |
1003 | // MSP430::DADD8mc - 26 |
1004 | {.AsmStrOffset: 206, .AliasCondStart: 76, .NumOperands: 3, .NumConds: 3 }, |
1005 | // MSP430::DADD8rc - 27 |
1006 | {.AsmStrOffset: 218, .AliasCondStart: 79, .NumOperands: 3, .NumConds: 3 }, |
1007 | // MSP430::MOV16mc - 28 |
1008 | {.AsmStrOffset: 228, .AliasCondStart: 82, .NumOperands: 3, .NumConds: 3 }, |
1009 | // MSP430::MOV16rc - 29 |
1010 | {.AsmStrOffset: 237, .AliasCondStart: 85, .NumOperands: 2, .NumConds: 2 }, |
1011 | {.AsmStrOffset: 241, .AliasCondStart: 87, .NumOperands: 2, .NumConds: 2 }, |
1012 | // MSP430::MOV8mc - 31 |
1013 | {.AsmStrOffset: 248, .AliasCondStart: 89, .NumOperands: 3, .NumConds: 3 }, |
1014 | // MSP430::MOV8rc - 32 |
1015 | {.AsmStrOffset: 259, .AliasCondStart: 92, .NumOperands: 2, .NumConds: 2 }, |
1016 | // MSP430::SUB16mc - 33 |
1017 | {.AsmStrOffset: 268, .AliasCondStart: 94, .NumOperands: 3, .NumConds: 3 }, |
1018 | {.AsmStrOffset: 277, .AliasCondStart: 97, .NumOperands: 3, .NumConds: 3 }, |
1019 | // MSP430::SUB16rc - 35 |
1020 | {.AsmStrOffset: 287, .AliasCondStart: 100, .NumOperands: 3, .NumConds: 3 }, |
1021 | {.AsmStrOffset: 294, .AliasCondStart: 103, .NumOperands: 3, .NumConds: 3 }, |
1022 | // MSP430::SUB8mc - 37 |
1023 | {.AsmStrOffset: 302, .AliasCondStart: 106, .NumOperands: 3, .NumConds: 3 }, |
1024 | {.AsmStrOffset: 313, .AliasCondStart: 109, .NumOperands: 3, .NumConds: 3 }, |
1025 | // MSP430::SUB8rc - 39 |
1026 | {.AsmStrOffset: 325, .AliasCondStart: 112, .NumOperands: 3, .NumConds: 3 }, |
1027 | {.AsmStrOffset: 334, .AliasCondStart: 115, .NumOperands: 3, .NumConds: 3 }, |
1028 | // MSP430::SUBC16mc - 41 |
1029 | {.AsmStrOffset: 344, .AliasCondStart: 118, .NumOperands: 3, .NumConds: 3 }, |
1030 | // MSP430::SUBC16rc - 42 |
1031 | {.AsmStrOffset: 353, .AliasCondStart: 121, .NumOperands: 3, .NumConds: 3 }, |
1032 | // MSP430::SUBC8mc - 43 |
1033 | {.AsmStrOffset: 360, .AliasCondStart: 124, .NumOperands: 3, .NumConds: 3 }, |
1034 | // MSP430::SUBC8rc - 44 |
1035 | {.AsmStrOffset: 371, .AliasCondStart: 127, .NumOperands: 3, .NumConds: 3 }, |
1036 | // MSP430::XOR16mc - 45 |
1037 | {.AsmStrOffset: 380, .AliasCondStart: 130, .NumOperands: 3, .NumConds: 3 }, |
1038 | // MSP430::XOR16rc - 46 |
1039 | {.AsmStrOffset: 389, .AliasCondStart: 133, .NumOperands: 3, .NumConds: 3 }, |
1040 | // MSP430::XOR8mc - 47 |
1041 | {.AsmStrOffset: 396, .AliasCondStart: 136, .NumOperands: 3, .NumConds: 3 }, |
1042 | // MSP430::XOR8rc - 48 |
1043 | {.AsmStrOffset: 407, .AliasCondStart: 139, .NumOperands: 3, .NumConds: 3 }, |
1044 | }; |
1045 | |
1046 | static const AliasPatternCond Conds[] = { |
1047 | // (ADD16mc memdst:$dst, 1) - 0 |
1048 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1049 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1050 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1051 | // (ADD16mc memdst:$dst, 2) - 3 |
1052 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1053 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1054 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1055 | // (ADD16rc GR16:$dst, 1) - 6 |
1056 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1057 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1058 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1059 | // (ADD16rc GR16:$dst, 2) - 9 |
1060 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1061 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1062 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1063 | // (ADD8mc memdst:$dst, 1) - 12 |
1064 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1065 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1066 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1067 | // (ADD8mc memdst:$dst, 2) - 15 |
1068 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1069 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1070 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1071 | // (ADD8rc GR8:$dst, 1) - 18 |
1072 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1073 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1074 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1075 | // (ADD8rc GR8:$dst, 2) - 21 |
1076 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1077 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1078 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1079 | // (ADDC16mc memdst:$dst, 0) - 24 |
1080 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1081 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1082 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1083 | // (ADDC16rc GR16:$dst, 0) - 27 |
1084 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1085 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1086 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1087 | // (ADDC8mc memdst:$dst, 0) - 30 |
1088 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1089 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1090 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1091 | // (ADDC8rc GR8:$dst, 0) - 33 |
1092 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1093 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1094 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1095 | // (BIC16rc SR, 8) - 36 |
1096 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1097 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1098 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(8)}, |
1099 | // (BIC16rc SR, 1) - 39 |
1100 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1101 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1102 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1103 | // (BIC16rc SR, 4) - 42 |
1104 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1105 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1106 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(4)}, |
1107 | // (BIC16rc SR, 2) - 45 |
1108 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1109 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1110 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1111 | // (BIS16rc SR, 8) - 48 |
1112 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1113 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1114 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(8)}, |
1115 | // (BIS16rc SR, 1) - 51 |
1116 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1117 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1118 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1119 | // (BIS16rc SR, 4) - 54 |
1120 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1121 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1122 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(4)}, |
1123 | // (BIS16rc SR, 2) - 57 |
1124 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::SR}, |
1125 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1126 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1127 | // (CMP16mc memdst:$dst, 0) - 60 |
1128 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1129 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1130 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1131 | // (CMP16rc GR16:$dst, 0) - 63 |
1132 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1133 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1134 | // (CMP8mc memdst:$dst, 0) - 65 |
1135 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1136 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1137 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1138 | // (CMP8rc GR8:$dst, 0) - 68 |
1139 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1140 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1141 | // (DADD16mc memdst:$dst, 0) - 70 |
1142 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1143 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1144 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1145 | // (DADD16rc GR16:$dst, 0) - 73 |
1146 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1147 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1148 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1149 | // (DADD8mc memdst:$dst, 0) - 76 |
1150 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1151 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1152 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1153 | // (DADD8rc GR8:$dst, 0) - 79 |
1154 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1155 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1156 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1157 | // (MOV16mc memdst:$dst, 0) - 82 |
1158 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1159 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1160 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1161 | // (MOV16rc CG, 0) - 85 |
1162 | {.Kind: AliasPatternCond::K_Reg, .Value: MSP430::CG}, |
1163 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1164 | // (MOV16rc GR16:$dst, 0) - 87 |
1165 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1166 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1167 | // (MOV8mc memdst:$dst, 0) - 89 |
1168 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1169 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1170 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1171 | // (MOV8rc GR8:$dst, 0) - 92 |
1172 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1173 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1174 | // (SUB16mc memdst:$dst, 1) - 94 |
1175 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1176 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1177 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1178 | // (SUB16mc memdst:$dst, 2) - 97 |
1179 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1180 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1181 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1182 | // (SUB16rc GR16:$dst, 1) - 100 |
1183 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1184 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1185 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1186 | // (SUB16rc GR16:$dst, 2) - 103 |
1187 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1188 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1189 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1190 | // (SUB8mc memdst:$dst, 1) - 106 |
1191 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1192 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1193 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1194 | // (SUB8mc memdst:$dst, 2) - 109 |
1195 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1196 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1197 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1198 | // (SUB8rc GR8:$dst, 1) - 112 |
1199 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1200 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1201 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(1)}, |
1202 | // (SUB8rc GR8:$dst, 2) - 115 |
1203 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1204 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1205 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(2)}, |
1206 | // (SUBC16mc memdst:$dst, 0) - 118 |
1207 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1208 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1209 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1210 | // (SUBC16rc GR16:$dst, 0) - 121 |
1211 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1212 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1213 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1214 | // (SUBC8mc memdst:$dst, 0) - 124 |
1215 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1216 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1217 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1218 | // (SUBC8rc GR8:$dst, 0) - 127 |
1219 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1220 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1221 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(0)}, |
1222 | // (XOR16mc memdst:$dst, -1) - 130 |
1223 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1224 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1225 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(-1)}, |
1226 | // (XOR16rc GR16:$dst, -1) - 133 |
1227 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR16RegClassID}, |
1228 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1229 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(-1)}, |
1230 | // (XOR8mc memdst:$dst, -1) - 136 |
1231 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1232 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1233 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(-1)}, |
1234 | // (XOR8rc GR8:$dst, -1) - 139 |
1235 | {.Kind: AliasPatternCond::K_RegClass, .Value: MSP430::GR8RegClassID}, |
1236 | {.Kind: AliasPatternCond::K_Ignore, .Value: 0}, |
1237 | {.Kind: AliasPatternCond::K_Imm, .Value: uint32_t(-1)}, |
1238 | }; |
1239 | |
1240 | static const char AsmStrings[] = |
1241 | /* 0 */ "inc $\xFF\x01\x01\0" |
1242 | /* 9 */ "incd $\xFF\x01\x01\0" |
1243 | /* 19 */ "inc $\x01\0" |
1244 | /* 26 */ "incd $\x01\0" |
1245 | /* 34 */ "inc.b $\xFF\x01\x01\0" |
1246 | /* 45 */ "incd.b $\xFF\x01\x01\0" |
1247 | /* 57 */ "inc.b $\x01\0" |
1248 | /* 66 */ "incd.b $\x01\0" |
1249 | /* 76 */ "adc $\xFF\x01\x01\0" |
1250 | /* 85 */ "adc $\x01\0" |
1251 | /* 92 */ "adc.b $\xFF\x01\x01\0" |
1252 | /* 103 */ "adc.b $\x01\0" |
1253 | /* 112 */ "dint\0" |
1254 | /* 117 */ "clrc\0" |
1255 | /* 122 */ "clrn\0" |
1256 | /* 127 */ "clrz\0" |
1257 | /* 132 */ "eint\0" |
1258 | /* 137 */ "setc\0" |
1259 | /* 142 */ "setn\0" |
1260 | /* 147 */ "setz\0" |
1261 | /* 152 */ "tst $\xFF\x01\x01\0" |
1262 | /* 161 */ "tst $\x01\0" |
1263 | /* 168 */ "tst.b $\xFF\x01\x01\0" |
1264 | /* 179 */ "tst.b $\x01\0" |
1265 | /* 188 */ "dadc $\xFF\x01\x01\0" |
1266 | /* 198 */ "dadc $\x01\0" |
1267 | /* 206 */ "dadc.b $\xFF\x01\x01\0" |
1268 | /* 218 */ "dadc.b $\x01\0" |
1269 | /* 228 */ "clr $\xFF\x01\x01\0" |
1270 | /* 237 */ "nop\0" |
1271 | /* 241 */ "clr $\x01\0" |
1272 | /* 248 */ "clr.b $\xFF\x01\x01\0" |
1273 | /* 259 */ "clr.b $\x01\0" |
1274 | /* 268 */ "dec $\xFF\x01\x01\0" |
1275 | /* 277 */ "decd $\xFF\x01\x01\0" |
1276 | /* 287 */ "dec $\x01\0" |
1277 | /* 294 */ "decd $\x01\0" |
1278 | /* 302 */ "dec.b $\xFF\x01\x01\0" |
1279 | /* 313 */ "decd.b $\xFF\x01\x01\0" |
1280 | /* 325 */ "dec.b $\x01\0" |
1281 | /* 334 */ "decd.b $\x01\0" |
1282 | /* 344 */ "sbc $\xFF\x01\x01\0" |
1283 | /* 353 */ "sbc $\x01\0" |
1284 | /* 360 */ "sbc.b $\xFF\x01\x01\0" |
1285 | /* 371 */ "sbc.b $\x01\0" |
1286 | /* 380 */ "inv $\xFF\x01\x01\0" |
1287 | /* 389 */ "inv $\x01\0" |
1288 | /* 396 */ "inv.b $\xFF\x01\x01\0" |
1289 | /* 407 */ "inv.b $\x01\0" |
1290 | ; |
1291 | |
1292 | #ifndef NDEBUG |
1293 | static struct SortCheck { |
1294 | SortCheck(ArrayRef<PatternsForOpcode> OpToPatterns) { |
1295 | assert(std::is_sorted( |
1296 | OpToPatterns.begin(), OpToPatterns.end(), |
1297 | [](const PatternsForOpcode &L, const PatternsForOpcode &R) { |
1298 | return L.Opcode < R.Opcode; |
1299 | }) && |
1300 | "tablegen failed to sort opcode patterns" ); |
1301 | } |
1302 | } sortCheckVar(OpToPatterns); |
1303 | #endif |
1304 | |
1305 | AliasMatchingData M { |
1306 | .OpToPatterns: ArrayRef(OpToPatterns), |
1307 | .Patterns: ArrayRef(Patterns), |
1308 | .PatternConds: ArrayRef(Conds), |
1309 | .AsmStrings: StringRef(AsmStrings, std::size(AsmStrings)), |
1310 | .ValidateMCOperand: nullptr, |
1311 | }; |
1312 | const char *AsmString = matchAliasPatterns(MI, STI: nullptr, M); |
1313 | if (!AsmString) return false; |
1314 | |
1315 | unsigned I = 0; |
1316 | while (AsmString[I] != ' ' && AsmString[I] != '\t' && |
1317 | AsmString[I] != '$' && AsmString[I] != '\0') |
1318 | ++I; |
1319 | OS << '\t' << StringRef(AsmString, I); |
1320 | if (AsmString[I] != '\0') { |
1321 | if (AsmString[I] == ' ' || AsmString[I] == '\t') { |
1322 | OS << '\t'; |
1323 | ++I; |
1324 | } |
1325 | do { |
1326 | if (AsmString[I] == '$') { |
1327 | ++I; |
1328 | if (AsmString[I] == (char)0xff) { |
1329 | ++I; |
1330 | int OpIdx = AsmString[I++] - 1; |
1331 | int PrintMethodIdx = AsmString[I++] - 1; |
1332 | printCustomAliasOperand(MI, Address, OpIdx, PrintMethodIdx, O&: OS); |
1333 | } else |
1334 | printOperand(MI, OpNo: unsigned(AsmString[I++]) - 1, O&: OS); |
1335 | } else { |
1336 | OS << AsmString[I++]; |
1337 | } |
1338 | } while (AsmString[I] != '\0'); |
1339 | } |
1340 | |
1341 | return true; |
1342 | } |
1343 | |
1344 | void MSP430InstPrinter::printCustomAliasOperand( |
1345 | const MCInst *MI, uint64_t Address, unsigned OpIdx, |
1346 | unsigned PrintMethodIdx, |
1347 | raw_ostream &OS) { |
1348 | switch (PrintMethodIdx) { |
1349 | default: |
1350 | llvm_unreachable("Unknown PrintMethod kind" ); |
1351 | break; |
1352 | case 0: |
1353 | printSrcMemOperand(MI, OpNo: OpIdx, O&: OS); |
1354 | break; |
1355 | } |
1356 | } |
1357 | |
1358 | #endif // PRINT_ALIAS_INSTR |
1359 | |