1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Assembly Matcher Source Fragment *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: MSP430.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10
11#ifdef GET_ASSEMBLER_HEADER
12#undef GET_ASSEMBLER_HEADER
13 // This should be included into the middle of the declaration of
14 // your subclasses implementation of MCTargetAsmParser.
15 FeatureBitset ComputeAvailableFeatures(const FeatureBitset &FB) const;
16 void convertToMCInst(unsigned Kind, MCInst &Inst, unsigned Opcode,
17 const OperandVector &Operands);
18 void convertToMapAndConstraints(unsigned Kind,
19 const OperandVector &Operands) override;
20 unsigned MatchInstructionImpl(const OperandVector &Operands,
21 MCInst &Inst,
22 uint64_t &ErrorInfo,
23 FeatureBitset &MissingFeatures,
24 bool matchingInlineAsm,
25 unsigned VariantID = 0);
26 unsigned MatchInstructionImpl(const OperandVector &Operands,
27 MCInst &Inst,
28 uint64_t &ErrorInfo,
29 bool matchingInlineAsm,
30 unsigned VariantID = 0) {
31 FeatureBitset MissingFeatures;
32 return MatchInstructionImpl(Operands, Inst, ErrorInfo, MissingFeatures,
33 matchingInlineAsm, VariantID);
34 }
35
36#endif // GET_ASSEMBLER_HEADER
37
38
39#ifdef GET_OPERAND_DIAGNOSTIC_TYPES
40#undef GET_OPERAND_DIAGNOSTIC_TYPES
41
42#endif // GET_OPERAND_DIAGNOSTIC_TYPES
43
44
45#ifdef GET_REGISTER_MATCHER
46#undef GET_REGISTER_MATCHER
47
48// Bits for subtarget features that participate in instruction matching.
49enum SubtargetFeatureBits : uint8_t {
50};
51
52static MCRegister MatchRegisterName(StringRef Name) {
53 switch (Name.size()) {
54 default: break;
55 case 2: // 20 strings to match.
56 if (Name[0] != 'r')
57 break;
58 switch (Name[1]) {
59 default: break;
60 case '0': // 2 strings to match.
61 return MSP430::PC; // "r0"
62 case '1': // 2 strings to match.
63 return MSP430::SP; // "r1"
64 case '2': // 2 strings to match.
65 return MSP430::SR; // "r2"
66 case '3': // 2 strings to match.
67 return MSP430::CG; // "r3"
68 case '4': // 2 strings to match.
69 return MSP430::R4; // "r4"
70 case '5': // 2 strings to match.
71 return MSP430::R5; // "r5"
72 case '6': // 2 strings to match.
73 return MSP430::R6; // "r6"
74 case '7': // 2 strings to match.
75 return MSP430::R7; // "r7"
76 case '8': // 2 strings to match.
77 return MSP430::R8; // "r8"
78 case '9': // 2 strings to match.
79 return MSP430::R9; // "r9"
80 }
81 break;
82 case 3: // 12 strings to match.
83 if (memcmp(Name.data()+0, "r1", 2) != 0)
84 break;
85 switch (Name[2]) {
86 default: break;
87 case '0': // 2 strings to match.
88 return MSP430::R10; // "r10"
89 case '1': // 2 strings to match.
90 return MSP430::R11; // "r11"
91 case '2': // 2 strings to match.
92 return MSP430::R12; // "r12"
93 case '3': // 2 strings to match.
94 return MSP430::R13; // "r13"
95 case '4': // 2 strings to match.
96 return MSP430::R14; // "r14"
97 case '5': // 2 strings to match.
98 return MSP430::R15; // "r15"
99 }
100 break;
101 }
102 return MSP430::NoRegister;
103}
104
105static MCRegister MatchRegisterAltName(StringRef Name) {
106 switch (Name.size()) {
107 default: break;
108 case 2: // 10 strings to match.
109 switch (Name[0]) {
110 default: break;
111 case 'c': // 2 strings to match.
112 if (Name[1] != 'g')
113 break;
114 return MSP430::CG; // "cg"
115 case 'f': // 2 strings to match.
116 if (Name[1] != 'p')
117 break;
118 return MSP430::R4; // "fp"
119 case 'p': // 2 strings to match.
120 if (Name[1] != 'c')
121 break;
122 return MSP430::PC; // "pc"
123 case 's': // 4 strings to match.
124 switch (Name[1]) {
125 default: break;
126 case 'p': // 2 strings to match.
127 return MSP430::SP; // "sp"
128 case 'r': // 2 strings to match.
129 return MSP430::SR; // "sr"
130 }
131 break;
132 }
133 break;
134 }
135 return MSP430::NoRegister;
136}
137
138#endif // GET_REGISTER_MATCHER
139
140
141#ifdef GET_SUBTARGET_FEATURE_NAME
142#undef GET_SUBTARGET_FEATURE_NAME
143
144// User-level names for subtarget features that participate in
145// instruction matching.
146static const char *getSubtargetFeatureName(uint64_t Val) {
147 return "(unknown)";
148}
149
150#endif // GET_SUBTARGET_FEATURE_NAME
151
152
153#ifdef GET_MATCHER_IMPLEMENTATION
154#undef GET_MATCHER_IMPLEMENTATION
155
156enum {
157 Tie0_1_1,
158 Tie1_1_1,
159};
160
161static const uint8_t TiedAsmOperandTable[][3] = {
162 /* Tie0_1_1 */ { 0, 1, 1 },
163 /* Tie1_1_1 */ { 1, 1, 1 },
164};
165
166namespace {
167enum OperatorConversionKind {
168 CVT_Done,
169 CVT_Reg,
170 CVT_Tied,
171 CVT_95_Reg,
172 CVT_imm_95_0,
173 CVT_95_addMemOperands,
174 CVT_95_addImmOperands,
175 CVT_95_addRegOperands,
176 CVT_regSR,
177 CVT_imm_95_1,
178 CVT_imm_95_4,
179 CVT_imm_95_2,
180 CVT_imm_95_8,
181 CVT_imm_95__MINUS_1,
182 CVT_regCG,
183 CVT_NUM_CONVERTERS
184};
185
186enum InstructionConversionKind {
187 Convert__Reg1_0__Tie0_1_1__imm_95_0,
188 Convert__Mem2_0__imm_95_0,
189 Convert__Reg1_1__Tie0_1_1__Reg1_0,
190 Convert__Mem2_1__Reg1_0,
191 Convert__Reg1_1__Tie0_1_1__CGImm1_0,
192 Convert__Mem2_1__CGImm1_0,
193 Convert__Reg1_1__Tie0_1_1__Imm1_0,
194 Convert__Mem2_1__Imm1_0,
195 Convert__Reg1_1__Tie0_1_1__IndReg1_0,
196 Convert__Mem2_1__IndReg1_0,
197 Convert__Reg1_1__Tie0_1_1__Mem2_0,
198 Convert__Mem2_1__Mem2_0,
199 Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1,
200 Convert__Mem2_1__PostIndReg1_0,
201 Convert__Reg1_1__Reg1_0,
202 Convert__Reg1_1__CGImm1_0,
203 Convert__Reg1_1__Imm1_0,
204 Convert__Reg1_1__IndReg1_0,
205 Convert__Reg1_1__Mem2_0,
206 Convert__Reg1_1__PostIndReg1_0,
207 Convert__Reg1_0,
208 Convert__Imm1_0,
209 Convert__Mem2_0,
210 Convert__IndReg1_0,
211 Convert__PostIndReg1_0,
212 Convert__Reg1_0__imm_95_0,
213 Convert__regSR__Tie0_1_1__imm_95_1,
214 Convert__regSR__Tie0_1_1__imm_95_4,
215 Convert__regSR__Tie0_1_1__imm_95_2,
216 Convert__Reg1_0__Tie0_1_1__imm_95_1,
217 Convert__Mem2_0__imm_95_1,
218 Convert__Reg1_0__Tie0_1_1__imm_95_2,
219 Convert__Mem2_0__imm_95_2,
220 Convert__regSR__Tie0_1_1__imm_95_8,
221 Convert__Reg1_0__Tie0_1_1__imm_95__MINUS_1,
222 Convert__Mem2_0__imm_95__MINUS_1,
223 Convert__Imm1_1__Imm1_0,
224 Convert__Reg1_1__PostIndReg1_0__Tie1_1_1,
225 Convert__regCG__imm_95_0,
226 Convert__CGImm1_0,
227 Convert_NoOperands,
228 Convert__Reg1_0__Tie0_1_1__Reg1_0,
229 Convert__Mem2_0__Mem2_0,
230 Convert__Reg1_0__Tie0_1_1,
231 CVT_NUM_SIGNATURES
232};
233
234} // end anonymous namespace
235
236static const uint8_t ConversionTable[CVT_NUM_SIGNATURES][9] = {
237 // Convert__Reg1_0__Tie0_1_1__imm_95_0
238 { CVT_95_Reg, 1, CVT_Tied, Tie0_1_1, CVT_imm_95_0, 0, CVT_Done },
239 // Convert__Mem2_0__imm_95_0
240 { CVT_95_addMemOperands, 1, CVT_imm_95_0, 0, CVT_Done },
241 // Convert__Reg1_1__Tie0_1_1__Reg1_0
242 { CVT_95_Reg, 2, CVT_Tied, Tie0_1_1, CVT_95_Reg, 1, CVT_Done },
243 // Convert__Mem2_1__Reg1_0
244 { CVT_95_addMemOperands, 2, CVT_95_Reg, 1, CVT_Done },
245 // Convert__Reg1_1__Tie0_1_1__CGImm1_0
246 { CVT_95_Reg, 2, CVT_Tied, Tie0_1_1, CVT_95_addImmOperands, 1, CVT_Done },
247 // Convert__Mem2_1__CGImm1_0
248 { CVT_95_addMemOperands, 2, CVT_95_addImmOperands, 1, CVT_Done },
249 // Convert__Reg1_1__Tie0_1_1__Imm1_0
250 { CVT_95_Reg, 2, CVT_Tied, Tie0_1_1, CVT_95_addImmOperands, 1, CVT_Done },
251 // Convert__Mem2_1__Imm1_0
252 { CVT_95_addMemOperands, 2, CVT_95_addImmOperands, 1, CVT_Done },
253 // Convert__Reg1_1__Tie0_1_1__IndReg1_0
254 { CVT_95_Reg, 2, CVT_Tied, Tie0_1_1, CVT_95_addRegOperands, 1, CVT_Done },
255 // Convert__Mem2_1__IndReg1_0
256 { CVT_95_addMemOperands, 2, CVT_95_addRegOperands, 1, CVT_Done },
257 // Convert__Reg1_1__Tie0_1_1__Mem2_0
258 { CVT_95_Reg, 2, CVT_Tied, Tie0_1_1, CVT_95_addMemOperands, 1, CVT_Done },
259 // Convert__Mem2_1__Mem2_0
260 { CVT_95_addMemOperands, 2, CVT_95_addMemOperands, 1, CVT_Done },
261 // Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1
262 { CVT_95_Reg, 2, CVT_95_addRegOperands, 1, CVT_Tied, Tie0_1_1, CVT_Tied, Tie1_1_1, CVT_Done },
263 // Convert__Mem2_1__PostIndReg1_0
264 { CVT_95_addMemOperands, 2, CVT_95_addRegOperands, 1, CVT_Done },
265 // Convert__Reg1_1__Reg1_0
266 { CVT_95_Reg, 2, CVT_95_Reg, 1, CVT_Done },
267 // Convert__Reg1_1__CGImm1_0
268 { CVT_95_Reg, 2, CVT_95_addImmOperands, 1, CVT_Done },
269 // Convert__Reg1_1__Imm1_0
270 { CVT_95_Reg, 2, CVT_95_addImmOperands, 1, CVT_Done },
271 // Convert__Reg1_1__IndReg1_0
272 { CVT_95_Reg, 2, CVT_95_addRegOperands, 1, CVT_Done },
273 // Convert__Reg1_1__Mem2_0
274 { CVT_95_Reg, 2, CVT_95_addMemOperands, 1, CVT_Done },
275 // Convert__Reg1_1__PostIndReg1_0
276 { CVT_95_Reg, 2, CVT_95_addRegOperands, 1, CVT_Done },
277 // Convert__Reg1_0
278 { CVT_95_Reg, 1, CVT_Done },
279 // Convert__Imm1_0
280 { CVT_95_addImmOperands, 1, CVT_Done },
281 // Convert__Mem2_0
282 { CVT_95_addMemOperands, 1, CVT_Done },
283 // Convert__IndReg1_0
284 { CVT_95_addRegOperands, 1, CVT_Done },
285 // Convert__PostIndReg1_0
286 { CVT_95_addRegOperands, 1, CVT_Done },
287 // Convert__Reg1_0__imm_95_0
288 { CVT_95_Reg, 1, CVT_imm_95_0, 0, CVT_Done },
289 // Convert__regSR__Tie0_1_1__imm_95_1
290 { CVT_regSR, 0, CVT_Tied, Tie0_1_1, CVT_imm_95_1, 0, CVT_Done },
291 // Convert__regSR__Tie0_1_1__imm_95_4
292 { CVT_regSR, 0, CVT_Tied, Tie0_1_1, CVT_imm_95_4, 0, CVT_Done },
293 // Convert__regSR__Tie0_1_1__imm_95_2
294 { CVT_regSR, 0, CVT_Tied, Tie0_1_1, CVT_imm_95_2, 0, CVT_Done },
295 // Convert__Reg1_0__Tie0_1_1__imm_95_1
296 { CVT_95_Reg, 1, CVT_Tied, Tie0_1_1, CVT_imm_95_1, 0, CVT_Done },
297 // Convert__Mem2_0__imm_95_1
298 { CVT_95_addMemOperands, 1, CVT_imm_95_1, 0, CVT_Done },
299 // Convert__Reg1_0__Tie0_1_1__imm_95_2
300 { CVT_95_Reg, 1, CVT_Tied, Tie0_1_1, CVT_imm_95_2, 0, CVT_Done },
301 // Convert__Mem2_0__imm_95_2
302 { CVT_95_addMemOperands, 1, CVT_imm_95_2, 0, CVT_Done },
303 // Convert__regSR__Tie0_1_1__imm_95_8
304 { CVT_regSR, 0, CVT_Tied, Tie0_1_1, CVT_imm_95_8, 0, CVT_Done },
305 // Convert__Reg1_0__Tie0_1_1__imm_95__MINUS_1
306 { CVT_95_Reg, 1, CVT_Tied, Tie0_1_1, CVT_imm_95__MINUS_1, 0, CVT_Done },
307 // Convert__Mem2_0__imm_95__MINUS_1
308 { CVT_95_addMemOperands, 1, CVT_imm_95__MINUS_1, 0, CVT_Done },
309 // Convert__Imm1_1__Imm1_0
310 { CVT_95_addImmOperands, 2, CVT_95_addImmOperands, 1, CVT_Done },
311 // Convert__Reg1_1__PostIndReg1_0__Tie1_1_1
312 { CVT_95_Reg, 2, CVT_95_addRegOperands, 1, CVT_Tied, Tie1_1_1, CVT_Done },
313 // Convert__regCG__imm_95_0
314 { CVT_regCG, 0, CVT_imm_95_0, 0, CVT_Done },
315 // Convert__CGImm1_0
316 { CVT_95_addImmOperands, 1, CVT_Done },
317 // Convert_NoOperands
318 { CVT_Done },
319 // Convert__Reg1_0__Tie0_1_1__Reg1_0
320 { CVT_95_Reg, 1, CVT_Tied, Tie0_1_1, CVT_95_Reg, 1, CVT_Done },
321 // Convert__Mem2_0__Mem2_0
322 { CVT_95_addMemOperands, 1, CVT_95_addMemOperands, 1, CVT_Done },
323 // Convert__Reg1_0__Tie0_1_1
324 { CVT_95_Reg, 1, CVT_Tied, Tie0_1_1, CVT_Done },
325};
326
327void MSP430AsmParser::
328convertToMCInst(unsigned Kind, MCInst &Inst, unsigned Opcode,
329 const OperandVector &Operands) {
330 assert(Kind < CVT_NUM_SIGNATURES && "Invalid signature!");
331 const uint8_t *Converter = ConversionTable[Kind];
332 Inst.setOpcode(Opcode);
333 for (const uint8_t *p = Converter; *p; p += 2) {
334 unsigned OpIdx = *(p + 1);
335 switch (*p) {
336 default: llvm_unreachable("invalid conversion entry!");
337 case CVT_Reg:
338 static_cast<MSP430Operand &>(*Operands[OpIdx]).addRegOperands(Inst, 1);
339 break;
340 case CVT_Tied: {
341 assert(*(p + 1) < (size_t)(std::end(TiedAsmOperandTable) -
342 std::begin(TiedAsmOperandTable)) &&
343 "Tied operand not found");
344 unsigned TiedResOpnd = TiedAsmOperandTable[*(p + 1)][0];
345 if (TiedResOpnd != (uint8_t)-1)
346 Inst.addOperand(Inst.getOperand(TiedResOpnd));
347 break;
348 }
349 case CVT_95_Reg:
350 static_cast<MSP430Operand &>(*Operands[OpIdx]).addRegOperands(Inst, 1);
351 break;
352 case CVT_imm_95_0:
353 Inst.addOperand(MCOperand::createImm(0));
354 break;
355 case CVT_95_addMemOperands:
356 static_cast<MSP430Operand &>(*Operands[OpIdx]).addMemOperands(Inst, 2);
357 break;
358 case CVT_95_addImmOperands:
359 static_cast<MSP430Operand &>(*Operands[OpIdx]).addImmOperands(Inst, 1);
360 break;
361 case CVT_95_addRegOperands:
362 static_cast<MSP430Operand &>(*Operands[OpIdx]).addRegOperands(Inst, 1);
363 break;
364 case CVT_regSR:
365 Inst.addOperand(MCOperand::createReg(MSP430::SR));
366 break;
367 case CVT_imm_95_1:
368 Inst.addOperand(MCOperand::createImm(1));
369 break;
370 case CVT_imm_95_4:
371 Inst.addOperand(MCOperand::createImm(4));
372 break;
373 case CVT_imm_95_2:
374 Inst.addOperand(MCOperand::createImm(2));
375 break;
376 case CVT_imm_95_8:
377 Inst.addOperand(MCOperand::createImm(8));
378 break;
379 case CVT_imm_95__MINUS_1:
380 Inst.addOperand(MCOperand::createImm(-1));
381 break;
382 case CVT_regCG:
383 Inst.addOperand(MCOperand::createReg(MSP430::CG));
384 break;
385 }
386 }
387}
388
389void MSP430AsmParser::
390convertToMapAndConstraints(unsigned Kind,
391 const OperandVector &Operands) {
392 assert(Kind < CVT_NUM_SIGNATURES && "Invalid signature!");
393 unsigned NumMCOperands = 0;
394 const uint8_t *Converter = ConversionTable[Kind];
395 for (const uint8_t *p = Converter; *p; p += 2) {
396 switch (*p) {
397 default: llvm_unreachable("invalid conversion entry!");
398 case CVT_Reg:
399 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
400 Operands[*(p + 1)]->setConstraint("r");
401 ++NumMCOperands;
402 break;
403 case CVT_Tied:
404 ++NumMCOperands;
405 break;
406 case CVT_95_Reg:
407 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
408 Operands[*(p + 1)]->setConstraint("r");
409 NumMCOperands += 1;
410 break;
411 case CVT_imm_95_0:
412 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
413 Operands[*(p + 1)]->setConstraint("");
414 ++NumMCOperands;
415 break;
416 case CVT_95_addMemOperands:
417 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
418 Operands[*(p + 1)]->setConstraint("m");
419 NumMCOperands += 2;
420 break;
421 case CVT_95_addImmOperands:
422 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
423 Operands[*(p + 1)]->setConstraint("m");
424 NumMCOperands += 1;
425 break;
426 case CVT_95_addRegOperands:
427 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
428 Operands[*(p + 1)]->setConstraint("m");
429 NumMCOperands += 1;
430 break;
431 case CVT_regSR:
432 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
433 Operands[*(p + 1)]->setConstraint("m");
434 ++NumMCOperands;
435 break;
436 case CVT_imm_95_1:
437 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
438 Operands[*(p + 1)]->setConstraint("");
439 ++NumMCOperands;
440 break;
441 case CVT_imm_95_4:
442 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
443 Operands[*(p + 1)]->setConstraint("");
444 ++NumMCOperands;
445 break;
446 case CVT_imm_95_2:
447 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
448 Operands[*(p + 1)]->setConstraint("");
449 ++NumMCOperands;
450 break;
451 case CVT_imm_95_8:
452 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
453 Operands[*(p + 1)]->setConstraint("");
454 ++NumMCOperands;
455 break;
456 case CVT_imm_95__MINUS_1:
457 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
458 Operands[*(p + 1)]->setConstraint("");
459 ++NumMCOperands;
460 break;
461 case CVT_regCG:
462 Operands[*(p + 1)]->setMCOperandNum(NumMCOperands);
463 Operands[*(p + 1)]->setConstraint("m");
464 ++NumMCOperands;
465 break;
466 }
467 }
468}
469
470namespace {
471
472/// MatchClassKind - The kinds of classes which participate in
473/// instruction matching.
474enum MatchClassKind {
475 InvalidMatchClass = 0,
476 OptionalMatchClass = 1,
477 MCK_LAST_TOKEN = OptionalMatchClass,
478 MCK_GR16, // register class 'GR16'
479 MCK_GR8, // register class 'GR8'
480 MCK_LAST_REGISTER = MCK_GR8,
481 MCK_CGImm, // user defined class 'CGImmAsmOperand'
482 MCK_Imm, // user defined class 'ImmAsmOperand'
483 MCK_IndReg, // user defined class 'IndRegAsmOperand'
484 MCK_Mem, // user defined class 'MemAsmOperand'
485 MCK_PostIndReg, // user defined class 'PostIndRegAsmOperand'
486 NumMatchClassKinds
487};
488
489} // end anonymous namespace
490
491static unsigned getDiagKindFromRegisterClass(MatchClassKind RegisterClass) {
492 return MCTargetAsmParser::Match_InvalidOperand;
493}
494
495static MatchClassKind matchTokenString(StringRef Name) {
496 return InvalidMatchClass;
497}
498
499/// isSubclass - Compute whether \p A is a subclass of \p B.
500static bool isSubclass(MatchClassKind A, MatchClassKind B) {
501 if (A == B)
502 return true;
503
504 return false;
505}
506
507static unsigned validateOperandClass(MCParsedAsmOperand &GOp, MatchClassKind Kind) {
508 MSP430Operand &Operand = (MSP430Operand &)GOp;
509 if (Kind == InvalidMatchClass)
510 return MCTargetAsmParser::Match_InvalidOperand;
511
512 if (Operand.isToken() && Kind <= MCK_LAST_TOKEN)
513 return isSubclass(matchTokenString(Operand.getToken()), Kind) ?
514 MCTargetAsmParser::Match_Success :
515 MCTargetAsmParser::Match_InvalidOperand;
516
517 switch (Kind) {
518 default: break;
519 // 'CGImm' class
520 case MCK_CGImm: {
521 DiagnosticPredicate DP(Operand.isCGImm());
522 if (DP.isMatch())
523 return MCTargetAsmParser::Match_Success;
524 break;
525 }
526 // 'Imm' class
527 case MCK_Imm: {
528 DiagnosticPredicate DP(Operand.isImm());
529 if (DP.isMatch())
530 return MCTargetAsmParser::Match_Success;
531 break;
532 }
533 // 'IndReg' class
534 case MCK_IndReg: {
535 DiagnosticPredicate DP(Operand.isIndReg());
536 if (DP.isMatch())
537 return MCTargetAsmParser::Match_Success;
538 break;
539 }
540 // 'Mem' class
541 case MCK_Mem: {
542 DiagnosticPredicate DP(Operand.isMem());
543 if (DP.isMatch())
544 return MCTargetAsmParser::Match_Success;
545 break;
546 }
547 // 'PostIndReg' class
548 case MCK_PostIndReg: {
549 DiagnosticPredicate DP(Operand.isPostIndReg());
550 if (DP.isMatch())
551 return MCTargetAsmParser::Match_Success;
552 break;
553 }
554 } // end switch (Kind)
555
556 if (Operand.isReg()) {
557 MatchClassKind OpKind;
558 switch (Operand.getReg().id()) {
559 default: OpKind = InvalidMatchClass; break;
560 case MSP430::PCB: OpKind = MCK_GR8; break;
561 case MSP430::SPB: OpKind = MCK_GR8; break;
562 case MSP430::SRB: OpKind = MCK_GR8; break;
563 case MSP430::CGB: OpKind = MCK_GR8; break;
564 case MSP430::R4B: OpKind = MCK_GR8; break;
565 case MSP430::R5B: OpKind = MCK_GR8; break;
566 case MSP430::R6B: OpKind = MCK_GR8; break;
567 case MSP430::R7B: OpKind = MCK_GR8; break;
568 case MSP430::R8B: OpKind = MCK_GR8; break;
569 case MSP430::R9B: OpKind = MCK_GR8; break;
570 case MSP430::R10B: OpKind = MCK_GR8; break;
571 case MSP430::R11B: OpKind = MCK_GR8; break;
572 case MSP430::R12B: OpKind = MCK_GR8; break;
573 case MSP430::R13B: OpKind = MCK_GR8; break;
574 case MSP430::R14B: OpKind = MCK_GR8; break;
575 case MSP430::R15B: OpKind = MCK_GR8; break;
576 case MSP430::PC: OpKind = MCK_GR16; break;
577 case MSP430::SP: OpKind = MCK_GR16; break;
578 case MSP430::SR: OpKind = MCK_GR16; break;
579 case MSP430::CG: OpKind = MCK_GR16; break;
580 case MSP430::R4: OpKind = MCK_GR16; break;
581 case MSP430::R5: OpKind = MCK_GR16; break;
582 case MSP430::R6: OpKind = MCK_GR16; break;
583 case MSP430::R7: OpKind = MCK_GR16; break;
584 case MSP430::R8: OpKind = MCK_GR16; break;
585 case MSP430::R9: OpKind = MCK_GR16; break;
586 case MSP430::R10: OpKind = MCK_GR16; break;
587 case MSP430::R11: OpKind = MCK_GR16; break;
588 case MSP430::R12: OpKind = MCK_GR16; break;
589 case MSP430::R13: OpKind = MCK_GR16; break;
590 case MSP430::R14: OpKind = MCK_GR16; break;
591 case MSP430::R15: OpKind = MCK_GR16; break;
592 }
593 return isSubclass(OpKind, Kind) ? (unsigned)MCTargetAsmParser::Match_Success :
594 getDiagKindFromRegisterClass(Kind);
595 }
596
597 if (Kind > MCK_LAST_TOKEN && Kind <= MCK_LAST_REGISTER)
598 return getDiagKindFromRegisterClass(Kind);
599
600 return MCTargetAsmParser::Match_InvalidOperand;
601}
602
603#ifndef NDEBUG
604const char *getMatchClassName(MatchClassKind Kind) {
605 switch (Kind) {
606 case InvalidMatchClass: return "InvalidMatchClass";
607 case OptionalMatchClass: return "OptionalMatchClass";
608 case MCK_GR16: return "MCK_GR16";
609 case MCK_GR8: return "MCK_GR8";
610 case MCK_CGImm: return "MCK_CGImm";
611 case MCK_Imm: return "MCK_Imm";
612 case MCK_IndReg: return "MCK_IndReg";
613 case MCK_Mem: return "MCK_Mem";
614 case MCK_PostIndReg: return "MCK_PostIndReg";
615 case NumMatchClassKinds: return "NumMatchClassKinds";
616 }
617 llvm_unreachable("unhandled MatchClassKind!");
618}
619
620#endif // NDEBUG
621FeatureBitset MSP430AsmParser::
622ComputeAvailableFeatures(const FeatureBitset &FB) const {
623 FeatureBitset Features;
624 return Features;
625}
626
627static bool checkAsmTiedOperandConstraints(const MSP430AsmParser&AsmParser,
628 unsigned Kind, const OperandVector &Operands,
629 uint64_t &ErrorInfo) {
630 assert(Kind < CVT_NUM_SIGNATURES && "Invalid signature!");
631 const uint8_t *Converter = ConversionTable[Kind];
632 for (const uint8_t *p = Converter; *p; p += 2) {
633 switch (*p) {
634 case CVT_Tied: {
635 unsigned OpIdx = *(p + 1);
636 assert(OpIdx < (size_t)(std::end(TiedAsmOperandTable) -
637 std::begin(TiedAsmOperandTable)) &&
638 "Tied operand not found");
639 unsigned OpndNum1 = TiedAsmOperandTable[OpIdx][1];
640 unsigned OpndNum2 = TiedAsmOperandTable[OpIdx][2];
641 if (OpndNum1 != OpndNum2) {
642 auto &SrcOp1 = Operands[OpndNum1];
643 auto &SrcOp2 = Operands[OpndNum2];
644 if (!AsmParser.areEqualRegs(*SrcOp1, *SrcOp2)) {
645 ErrorInfo = OpndNum2;
646 return false;
647 }
648 }
649 break;
650 }
651 default:
652 break;
653 }
654 }
655 return true;
656}
657
658static const char MnemonicTable[] =
659 "\003adc\005adc.b\003add\005add.b\004addc\006addc.b\003and\005and.b\003b"
660 "ic\005bic.b\003bis\005bis.b\003bit\005bit.b\002br\004call\003clr\005clr"
661 ".b\004clrc\004clrn\004clrz\003cmp\005cmp.b\004dadc\006dadc.b\004dadd\006"
662 "dadd.b\003dec\005dec.b\004decd\006decd.b\004dint\004eint\003inc\005inc."
663 "b\004incd\006incd.b\003inv\005inv.b\001j\003jmp\003mov\005mov.b\003nop\003"
664 "pop\004push\006push.b\003ret\004reti\003rla\005rla.b\003rlc\005rlc.b\003"
665 "rra\005rra.b\003rrc\005rrc.b\003sbc\005sbc.b\004setc\004setn\004setz\003"
666 "sub\005sub.b\004subc\006subc.b\004swpb\003sxt\003tst\005tst.b\003xor\005"
667 "xor.b";
668
669// Feature bitsets.
670enum : uint8_t {
671 AMFBS_None,
672};
673
674static constexpr FeatureBitset FeatureBitsets[] = {
675 {}, // AMFBS_None
676};
677
678namespace {
679 struct MatchEntry {
680 uint16_t Mnemonic;
681 uint16_t Opcode;
682 uint8_t ConvertFn;
683 uint8_t RequiredFeaturesIdx;
684 uint8_t Classes[2];
685 StringRef getMnemonic() const {
686 return StringRef(MnemonicTable + Mnemonic + 1,
687 MnemonicTable[Mnemonic]);
688 }
689 };
690
691 // Predicate for searching for an opcode.
692 struct LessOpcode {
693 bool operator()(const MatchEntry &LHS, StringRef RHS) {
694 return LHS.getMnemonic() < RHS;
695 }
696 bool operator()(StringRef LHS, const MatchEntry &RHS) {
697 return LHS < RHS.getMnemonic();
698 }
699 bool operator()(const MatchEntry &LHS, const MatchEntry &RHS) {
700 return LHS.getMnemonic() < RHS.getMnemonic();
701 }
702 };
703} // end anonymous namespace
704
705static const MatchEntry MatchTable0[] = {
706 { 0 /* adc */, MSP430::ADDC16rc, Convert__Reg1_0__Tie0_1_1__imm_95_0, AMFBS_None, { MCK_GR16 }, },
707 { 0 /* adc */, MSP430::ADDC16mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
708 { 4 /* adc.b */, MSP430::ADDC8rc, Convert__Reg1_0__Tie0_1_1__imm_95_0, AMFBS_None, { MCK_GR8 }, },
709 { 4 /* adc.b */, MSP430::ADDC8mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
710 { 10 /* add */, MSP430::ADD16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
711 { 10 /* add */, MSP430::ADD16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
712 { 10 /* add */, MSP430::ADD16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
713 { 10 /* add */, MSP430::ADD16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
714 { 10 /* add */, MSP430::ADD16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
715 { 10 /* add */, MSP430::ADD16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
716 { 10 /* add */, MSP430::ADD16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
717 { 10 /* add */, MSP430::ADD16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
718 { 10 /* add */, MSP430::ADD16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
719 { 10 /* add */, MSP430::ADD16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
720 { 10 /* add */, MSP430::ADD16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
721 { 10 /* add */, MSP430::ADD16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
722 { 14 /* add.b */, MSP430::ADD8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
723 { 14 /* add.b */, MSP430::ADD8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
724 { 14 /* add.b */, MSP430::ADD8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
725 { 14 /* add.b */, MSP430::ADD8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
726 { 14 /* add.b */, MSP430::ADD8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
727 { 14 /* add.b */, MSP430::ADD8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
728 { 14 /* add.b */, MSP430::ADD8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
729 { 14 /* add.b */, MSP430::ADD8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
730 { 14 /* add.b */, MSP430::ADD8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
731 { 14 /* add.b */, MSP430::ADD8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
732 { 14 /* add.b */, MSP430::ADD8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
733 { 14 /* add.b */, MSP430::ADD8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
734 { 20 /* addc */, MSP430::ADDC16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
735 { 20 /* addc */, MSP430::ADDC16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
736 { 20 /* addc */, MSP430::ADDC16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
737 { 20 /* addc */, MSP430::ADDC16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
738 { 20 /* addc */, MSP430::ADDC16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
739 { 20 /* addc */, MSP430::ADDC16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
740 { 20 /* addc */, MSP430::ADDC16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
741 { 20 /* addc */, MSP430::ADDC16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
742 { 20 /* addc */, MSP430::ADDC16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
743 { 20 /* addc */, MSP430::ADDC16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
744 { 20 /* addc */, MSP430::ADDC16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
745 { 20 /* addc */, MSP430::ADDC16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
746 { 25 /* addc.b */, MSP430::ADDC8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
747 { 25 /* addc.b */, MSP430::ADDC8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
748 { 25 /* addc.b */, MSP430::ADDC8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
749 { 25 /* addc.b */, MSP430::ADDC8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
750 { 25 /* addc.b */, MSP430::ADDC8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
751 { 25 /* addc.b */, MSP430::ADDC8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
752 { 25 /* addc.b */, MSP430::ADDC8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
753 { 25 /* addc.b */, MSP430::ADDC8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
754 { 25 /* addc.b */, MSP430::ADDC8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
755 { 25 /* addc.b */, MSP430::ADDC8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
756 { 25 /* addc.b */, MSP430::ADDC8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
757 { 25 /* addc.b */, MSP430::ADDC8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
758 { 32 /* and */, MSP430::AND16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
759 { 32 /* and */, MSP430::AND16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
760 { 32 /* and */, MSP430::AND16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
761 { 32 /* and */, MSP430::AND16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
762 { 32 /* and */, MSP430::AND16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
763 { 32 /* and */, MSP430::AND16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
764 { 32 /* and */, MSP430::AND16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
765 { 32 /* and */, MSP430::AND16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
766 { 32 /* and */, MSP430::AND16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
767 { 32 /* and */, MSP430::AND16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
768 { 32 /* and */, MSP430::AND16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
769 { 32 /* and */, MSP430::AND16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
770 { 36 /* and.b */, MSP430::AND8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
771 { 36 /* and.b */, MSP430::AND8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
772 { 36 /* and.b */, MSP430::AND8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
773 { 36 /* and.b */, MSP430::AND8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
774 { 36 /* and.b */, MSP430::AND8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
775 { 36 /* and.b */, MSP430::AND8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
776 { 36 /* and.b */, MSP430::AND8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
777 { 36 /* and.b */, MSP430::AND8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
778 { 36 /* and.b */, MSP430::AND8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
779 { 36 /* and.b */, MSP430::AND8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
780 { 36 /* and.b */, MSP430::AND8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
781 { 36 /* and.b */, MSP430::AND8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
782 { 42 /* bic */, MSP430::BIC16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
783 { 42 /* bic */, MSP430::BIC16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
784 { 42 /* bic */, MSP430::BIC16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
785 { 42 /* bic */, MSP430::BIC16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
786 { 42 /* bic */, MSP430::BIC16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
787 { 42 /* bic */, MSP430::BIC16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
788 { 42 /* bic */, MSP430::BIC16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
789 { 42 /* bic */, MSP430::BIC16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
790 { 42 /* bic */, MSP430::BIC16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
791 { 42 /* bic */, MSP430::BIC16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
792 { 42 /* bic */, MSP430::BIC16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
793 { 42 /* bic */, MSP430::BIC16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
794 { 46 /* bic.b */, MSP430::BIC8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
795 { 46 /* bic.b */, MSP430::BIC8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
796 { 46 /* bic.b */, MSP430::BIC8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
797 { 46 /* bic.b */, MSP430::BIC8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
798 { 46 /* bic.b */, MSP430::BIC8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
799 { 46 /* bic.b */, MSP430::BIC8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
800 { 46 /* bic.b */, MSP430::BIC8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
801 { 46 /* bic.b */, MSP430::BIC8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
802 { 46 /* bic.b */, MSP430::BIC8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
803 { 46 /* bic.b */, MSP430::BIC8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
804 { 46 /* bic.b */, MSP430::BIC8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
805 { 46 /* bic.b */, MSP430::BIC8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
806 { 52 /* bis */, MSP430::BIS16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
807 { 52 /* bis */, MSP430::BIS16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
808 { 52 /* bis */, MSP430::BIS16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
809 { 52 /* bis */, MSP430::BIS16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
810 { 52 /* bis */, MSP430::BIS16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
811 { 52 /* bis */, MSP430::BIS16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
812 { 52 /* bis */, MSP430::BIS16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
813 { 52 /* bis */, MSP430::BIS16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
814 { 52 /* bis */, MSP430::BIS16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
815 { 52 /* bis */, MSP430::BIS16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
816 { 52 /* bis */, MSP430::BIS16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
817 { 52 /* bis */, MSP430::BIS16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
818 { 56 /* bis.b */, MSP430::BIS8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
819 { 56 /* bis.b */, MSP430::BIS8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
820 { 56 /* bis.b */, MSP430::BIS8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
821 { 56 /* bis.b */, MSP430::BIS8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
822 { 56 /* bis.b */, MSP430::BIS8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
823 { 56 /* bis.b */, MSP430::BIS8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
824 { 56 /* bis.b */, MSP430::BIS8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
825 { 56 /* bis.b */, MSP430::BIS8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
826 { 56 /* bis.b */, MSP430::BIS8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
827 { 56 /* bis.b */, MSP430::BIS8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
828 { 56 /* bis.b */, MSP430::BIS8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
829 { 56 /* bis.b */, MSP430::BIS8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
830 { 62 /* bit */, MSP430::BIT16rr, Convert__Reg1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
831 { 62 /* bit */, MSP430::BIT16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
832 { 62 /* bit */, MSP430::BIT16rc, Convert__Reg1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
833 { 62 /* bit */, MSP430::BIT16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
834 { 62 /* bit */, MSP430::BIT16ri, Convert__Reg1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
835 { 62 /* bit */, MSP430::BIT16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
836 { 62 /* bit */, MSP430::BIT16rn, Convert__Reg1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
837 { 62 /* bit */, MSP430::BIT16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
838 { 62 /* bit */, MSP430::BIT16rm, Convert__Reg1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
839 { 62 /* bit */, MSP430::BIT16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
840 { 62 /* bit */, MSP430::BIT16rp, Convert__Reg1_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
841 { 62 /* bit */, MSP430::BIT16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
842 { 66 /* bit.b */, MSP430::BIT8rr, Convert__Reg1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
843 { 66 /* bit.b */, MSP430::BIT8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
844 { 66 /* bit.b */, MSP430::BIT8rc, Convert__Reg1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
845 { 66 /* bit.b */, MSP430::BIT8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
846 { 66 /* bit.b */, MSP430::BIT8ri, Convert__Reg1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
847 { 66 /* bit.b */, MSP430::BIT8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
848 { 66 /* bit.b */, MSP430::BIT8rn, Convert__Reg1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
849 { 66 /* bit.b */, MSP430::BIT8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
850 { 66 /* bit.b */, MSP430::BIT8rm, Convert__Reg1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
851 { 66 /* bit.b */, MSP430::BIT8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
852 { 66 /* bit.b */, MSP430::BIT8rp, Convert__Reg1_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
853 { 66 /* bit.b */, MSP430::BIT8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
854 { 72 /* br */, MSP430::Br, Convert__Reg1_0, AMFBS_None, { MCK_GR16 }, },
855 { 72 /* br */, MSP430::Bi, Convert__Imm1_0, AMFBS_None, { MCK_Imm }, },
856 { 72 /* br */, MSP430::Bm, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
857 { 75 /* call */, MSP430::CALLr, Convert__Reg1_0, AMFBS_None, { MCK_GR16 }, },
858 { 75 /* call */, MSP430::CALLi, Convert__Imm1_0, AMFBS_None, { MCK_Imm }, },
859 { 75 /* call */, MSP430::CALLn, Convert__IndReg1_0, AMFBS_None, { MCK_IndReg }, },
860 { 75 /* call */, MSP430::CALLm, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
861 { 75 /* call */, MSP430::CALLp, Convert__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg }, },
862 { 80 /* clr */, MSP430::MOV16rc, Convert__Reg1_0__imm_95_0, AMFBS_None, { MCK_GR16 }, },
863 { 80 /* clr */, MSP430::MOV16mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
864 { 84 /* clr.b */, MSP430::MOV8rc, Convert__Reg1_0__imm_95_0, AMFBS_None, { MCK_GR8 }, },
865 { 84 /* clr.b */, MSP430::MOV8mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
866 { 90 /* clrc */, MSP430::BIC16rc, Convert__regSR__Tie0_1_1__imm_95_1, AMFBS_None, { }, },
867 { 95 /* clrn */, MSP430::BIC16rc, Convert__regSR__Tie0_1_1__imm_95_4, AMFBS_None, { }, },
868 { 100 /* clrz */, MSP430::BIC16rc, Convert__regSR__Tie0_1_1__imm_95_2, AMFBS_None, { }, },
869 { 105 /* cmp */, MSP430::CMP16rr, Convert__Reg1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
870 { 105 /* cmp */, MSP430::CMP16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
871 { 105 /* cmp */, MSP430::CMP16rc, Convert__Reg1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
872 { 105 /* cmp */, MSP430::CMP16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
873 { 105 /* cmp */, MSP430::CMP16ri, Convert__Reg1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
874 { 105 /* cmp */, MSP430::CMP16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
875 { 105 /* cmp */, MSP430::CMP16rn, Convert__Reg1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
876 { 105 /* cmp */, MSP430::CMP16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
877 { 105 /* cmp */, MSP430::CMP16rm, Convert__Reg1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
878 { 105 /* cmp */, MSP430::CMP16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
879 { 105 /* cmp */, MSP430::CMP16rp, Convert__Reg1_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
880 { 105 /* cmp */, MSP430::CMP16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
881 { 109 /* cmp.b */, MSP430::CMP8rr, Convert__Reg1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
882 { 109 /* cmp.b */, MSP430::CMP8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
883 { 109 /* cmp.b */, MSP430::CMP8rc, Convert__Reg1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
884 { 109 /* cmp.b */, MSP430::CMP8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
885 { 109 /* cmp.b */, MSP430::CMP8ri, Convert__Reg1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
886 { 109 /* cmp.b */, MSP430::CMP8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
887 { 109 /* cmp.b */, MSP430::CMP8rn, Convert__Reg1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
888 { 109 /* cmp.b */, MSP430::CMP8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
889 { 109 /* cmp.b */, MSP430::CMP8rm, Convert__Reg1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
890 { 109 /* cmp.b */, MSP430::CMP8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
891 { 109 /* cmp.b */, MSP430::CMP8rp, Convert__Reg1_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
892 { 109 /* cmp.b */, MSP430::CMP8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
893 { 115 /* dadc */, MSP430::DADD16rc, Convert__Reg1_0__Tie0_1_1__imm_95_0, AMFBS_None, { MCK_GR16 }, },
894 { 115 /* dadc */, MSP430::DADD16mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
895 { 120 /* dadc.b */, MSP430::DADD8rc, Convert__Reg1_0__Tie0_1_1__imm_95_0, AMFBS_None, { MCK_GR8 }, },
896 { 120 /* dadc.b */, MSP430::DADD8mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
897 { 127 /* dadd */, MSP430::DADD16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
898 { 127 /* dadd */, MSP430::DADD16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
899 { 127 /* dadd */, MSP430::DADD16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
900 { 127 /* dadd */, MSP430::DADD16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
901 { 127 /* dadd */, MSP430::DADD16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
902 { 127 /* dadd */, MSP430::DADD16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
903 { 127 /* dadd */, MSP430::DADD16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
904 { 127 /* dadd */, MSP430::DADD16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
905 { 127 /* dadd */, MSP430::DADD16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
906 { 127 /* dadd */, MSP430::DADD16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
907 { 127 /* dadd */, MSP430::DADD16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
908 { 127 /* dadd */, MSP430::DADD16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
909 { 132 /* dadd.b */, MSP430::DADD8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
910 { 132 /* dadd.b */, MSP430::DADD8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
911 { 132 /* dadd.b */, MSP430::DADD8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
912 { 132 /* dadd.b */, MSP430::DADD8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
913 { 132 /* dadd.b */, MSP430::DADD8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
914 { 132 /* dadd.b */, MSP430::DADD8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
915 { 132 /* dadd.b */, MSP430::DADD8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
916 { 132 /* dadd.b */, MSP430::DADD8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
917 { 132 /* dadd.b */, MSP430::DADD8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
918 { 132 /* dadd.b */, MSP430::DADD8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
919 { 132 /* dadd.b */, MSP430::DADD8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
920 { 132 /* dadd.b */, MSP430::DADD8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
921 { 139 /* dec */, MSP430::SUB16rc, Convert__Reg1_0__Tie0_1_1__imm_95_1, AMFBS_None, { MCK_GR16 }, },
922 { 139 /* dec */, MSP430::SUB16mc, Convert__Mem2_0__imm_95_1, AMFBS_None, { MCK_Mem }, },
923 { 143 /* dec.b */, MSP430::SUB8rc, Convert__Reg1_0__Tie0_1_1__imm_95_1, AMFBS_None, { MCK_GR8 }, },
924 { 143 /* dec.b */, MSP430::SUB8mc, Convert__Mem2_0__imm_95_1, AMFBS_None, { MCK_Mem }, },
925 { 149 /* decd */, MSP430::SUB16rc, Convert__Reg1_0__Tie0_1_1__imm_95_2, AMFBS_None, { MCK_GR16 }, },
926 { 149 /* decd */, MSP430::SUB16mc, Convert__Mem2_0__imm_95_2, AMFBS_None, { MCK_Mem }, },
927 { 154 /* decd.b */, MSP430::SUB8rc, Convert__Reg1_0__Tie0_1_1__imm_95_2, AMFBS_None, { MCK_GR8 }, },
928 { 154 /* decd.b */, MSP430::SUB8mc, Convert__Mem2_0__imm_95_2, AMFBS_None, { MCK_Mem }, },
929 { 161 /* dint */, MSP430::BIC16rc, Convert__regSR__Tie0_1_1__imm_95_8, AMFBS_None, { }, },
930 { 166 /* eint */, MSP430::BIS16rc, Convert__regSR__Tie0_1_1__imm_95_8, AMFBS_None, { }, },
931 { 171 /* inc */, MSP430::ADD16rc, Convert__Reg1_0__Tie0_1_1__imm_95_1, AMFBS_None, { MCK_GR16 }, },
932 { 171 /* inc */, MSP430::ADD16mc, Convert__Mem2_0__imm_95_1, AMFBS_None, { MCK_Mem }, },
933 { 175 /* inc.b */, MSP430::ADD8rc, Convert__Reg1_0__Tie0_1_1__imm_95_1, AMFBS_None, { MCK_GR8 }, },
934 { 175 /* inc.b */, MSP430::ADD8mc, Convert__Mem2_0__imm_95_1, AMFBS_None, { MCK_Mem }, },
935 { 181 /* incd */, MSP430::ADD16rc, Convert__Reg1_0__Tie0_1_1__imm_95_2, AMFBS_None, { MCK_GR16 }, },
936 { 181 /* incd */, MSP430::ADD16mc, Convert__Mem2_0__imm_95_2, AMFBS_None, { MCK_Mem }, },
937 { 186 /* incd.b */, MSP430::ADD8rc, Convert__Reg1_0__Tie0_1_1__imm_95_2, AMFBS_None, { MCK_GR8 }, },
938 { 186 /* incd.b */, MSP430::ADD8mc, Convert__Mem2_0__imm_95_2, AMFBS_None, { MCK_Mem }, },
939 { 193 /* inv */, MSP430::XOR16rc, Convert__Reg1_0__Tie0_1_1__imm_95__MINUS_1, AMFBS_None, { MCK_GR16 }, },
940 { 193 /* inv */, MSP430::XOR16mc, Convert__Mem2_0__imm_95__MINUS_1, AMFBS_None, { MCK_Mem }, },
941 { 197 /* inv.b */, MSP430::XOR8rc, Convert__Reg1_0__Tie0_1_1__imm_95__MINUS_1, AMFBS_None, { MCK_GR8 }, },
942 { 197 /* inv.b */, MSP430::XOR8mc, Convert__Mem2_0__imm_95__MINUS_1, AMFBS_None, { MCK_Mem }, },
943 { 203 /* j */, MSP430::JCC, Convert__Imm1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Imm }, },
944 { 205 /* jmp */, MSP430::JMP, Convert__Imm1_0, AMFBS_None, { MCK_Imm }, },
945 { 209 /* mov */, MSP430::MOV16rr, Convert__Reg1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
946 { 209 /* mov */, MSP430::MOV16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
947 { 209 /* mov */, MSP430::MOV16rc, Convert__Reg1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
948 { 209 /* mov */, MSP430::MOV16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
949 { 209 /* mov */, MSP430::MOV16ri, Convert__Reg1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
950 { 209 /* mov */, MSP430::MOV16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
951 { 209 /* mov */, MSP430::MOV16rn, Convert__Reg1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
952 { 209 /* mov */, MSP430::MOV16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
953 { 209 /* mov */, MSP430::MOV16rm, Convert__Reg1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
954 { 209 /* mov */, MSP430::MOV16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
955 { 209 /* mov */, MSP430::MOV16rp, Convert__Reg1_1__PostIndReg1_0__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
956 { 213 /* mov.b */, MSP430::MOV8rr, Convert__Reg1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
957 { 213 /* mov.b */, MSP430::MOV8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
958 { 213 /* mov.b */, MSP430::MOV8rc, Convert__Reg1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
959 { 213 /* mov.b */, MSP430::MOV8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
960 { 213 /* mov.b */, MSP430::MOV8ri, Convert__Reg1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
961 { 213 /* mov.b */, MSP430::MOV8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
962 { 213 /* mov.b */, MSP430::MOV8rn, Convert__Reg1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
963 { 213 /* mov.b */, MSP430::MOV8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
964 { 213 /* mov.b */, MSP430::MOV8rm, Convert__Reg1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
965 { 213 /* mov.b */, MSP430::MOV8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
966 { 213 /* mov.b */, MSP430::MOV8rp, Convert__Reg1_1__PostIndReg1_0__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
967 { 219 /* nop */, MSP430::MOV16rc, Convert__regCG__imm_95_0, AMFBS_None, { }, },
968 { 223 /* pop */, MSP430::POP16r, Convert__Reg1_0, AMFBS_None, { MCK_GR16 }, },
969 { 227 /* push */, MSP430::PUSH16r, Convert__Reg1_0, AMFBS_None, { MCK_GR16 }, },
970 { 227 /* push */, MSP430::PUSH16c, Convert__CGImm1_0, AMFBS_None, { MCK_CGImm }, },
971 { 227 /* push */, MSP430::PUSH16i, Convert__Imm1_0, AMFBS_None, { MCK_Imm }, },
972 { 232 /* push.b */, MSP430::PUSH8r, Convert__Reg1_0, AMFBS_None, { MCK_GR8 }, },
973 { 239 /* ret */, MSP430::RET, Convert_NoOperands, AMFBS_None, { }, },
974 { 243 /* reti */, MSP430::RETI, Convert_NoOperands, AMFBS_None, { }, },
975 { 248 /* rla */, MSP430::ADD16rr, Convert__Reg1_0__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16 }, },
976 { 248 /* rla */, MSP430::ADD16mm, Convert__Mem2_0__Mem2_0, AMFBS_None, { MCK_Mem }, },
977 { 252 /* rla.b */, MSP430::ADD8rr, Convert__Reg1_0__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8 }, },
978 { 252 /* rla.b */, MSP430::ADD8mm, Convert__Mem2_0__Mem2_0, AMFBS_None, { MCK_Mem }, },
979 { 258 /* rlc */, MSP430::ADDC16rr, Convert__Reg1_0__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16 }, },
980 { 258 /* rlc */, MSP430::ADDC16mm, Convert__Mem2_0__Mem2_0, AMFBS_None, { MCK_Mem }, },
981 { 262 /* rlc.b */, MSP430::ADDC8rr, Convert__Reg1_0__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8 }, },
982 { 262 /* rlc.b */, MSP430::ADDC8mm, Convert__Mem2_0__Mem2_0, AMFBS_None, { MCK_Mem }, },
983 { 268 /* rra */, MSP430::RRA16r, Convert__Reg1_0__Tie0_1_1, AMFBS_None, { MCK_GR16 }, },
984 { 268 /* rra */, MSP430::RRA16n, Convert__IndReg1_0, AMFBS_None, { MCK_IndReg }, },
985 { 268 /* rra */, MSP430::RRA16m, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
986 { 268 /* rra */, MSP430::RRA16p, Convert__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg }, },
987 { 272 /* rra.b */, MSP430::RRA8r, Convert__Reg1_0__Tie0_1_1, AMFBS_None, { MCK_GR8 }, },
988 { 272 /* rra.b */, MSP430::RRA8n, Convert__IndReg1_0, AMFBS_None, { MCK_IndReg }, },
989 { 272 /* rra.b */, MSP430::RRA8m, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
990 { 272 /* rra.b */, MSP430::RRA8p, Convert__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg }, },
991 { 278 /* rrc */, MSP430::RRC16r, Convert__Reg1_0__Tie0_1_1, AMFBS_None, { MCK_GR16 }, },
992 { 278 /* rrc */, MSP430::RRC16n, Convert__IndReg1_0, AMFBS_None, { MCK_IndReg }, },
993 { 278 /* rrc */, MSP430::RRC16m, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
994 { 278 /* rrc */, MSP430::RRC16p, Convert__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg }, },
995 { 282 /* rrc.b */, MSP430::RRC8r, Convert__Reg1_0__Tie0_1_1, AMFBS_None, { MCK_GR8 }, },
996 { 282 /* rrc.b */, MSP430::RRC8n, Convert__IndReg1_0, AMFBS_None, { MCK_IndReg }, },
997 { 282 /* rrc.b */, MSP430::RRC8m, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
998 { 282 /* rrc.b */, MSP430::RRC8p, Convert__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg }, },
999 { 288 /* sbc */, MSP430::SUBC16rc, Convert__Reg1_0__Tie0_1_1__imm_95_0, AMFBS_None, { MCK_GR16 }, },
1000 { 288 /* sbc */, MSP430::SUBC16mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
1001 { 292 /* sbc.b */, MSP430::SUBC8rc, Convert__Reg1_0__Tie0_1_1__imm_95_0, AMFBS_None, { MCK_GR8 }, },
1002 { 292 /* sbc.b */, MSP430::SUBC8mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
1003 { 298 /* setc */, MSP430::BIS16rc, Convert__regSR__Tie0_1_1__imm_95_1, AMFBS_None, { }, },
1004 { 303 /* setn */, MSP430::BIS16rc, Convert__regSR__Tie0_1_1__imm_95_4, AMFBS_None, { }, },
1005 { 308 /* setz */, MSP430::BIS16rc, Convert__regSR__Tie0_1_1__imm_95_2, AMFBS_None, { }, },
1006 { 313 /* sub */, MSP430::SUB16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
1007 { 313 /* sub */, MSP430::SUB16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
1008 { 313 /* sub */, MSP430::SUB16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
1009 { 313 /* sub */, MSP430::SUB16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
1010 { 313 /* sub */, MSP430::SUB16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
1011 { 313 /* sub */, MSP430::SUB16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
1012 { 313 /* sub */, MSP430::SUB16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
1013 { 313 /* sub */, MSP430::SUB16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
1014 { 313 /* sub */, MSP430::SUB16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
1015 { 313 /* sub */, MSP430::SUB16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
1016 { 313 /* sub */, MSP430::SUB16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
1017 { 313 /* sub */, MSP430::SUB16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
1018 { 317 /* sub.b */, MSP430::SUB8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
1019 { 317 /* sub.b */, MSP430::SUB8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
1020 { 317 /* sub.b */, MSP430::SUB8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
1021 { 317 /* sub.b */, MSP430::SUB8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
1022 { 317 /* sub.b */, MSP430::SUB8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
1023 { 317 /* sub.b */, MSP430::SUB8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
1024 { 317 /* sub.b */, MSP430::SUB8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
1025 { 317 /* sub.b */, MSP430::SUB8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
1026 { 317 /* sub.b */, MSP430::SUB8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
1027 { 317 /* sub.b */, MSP430::SUB8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
1028 { 317 /* sub.b */, MSP430::SUB8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
1029 { 317 /* sub.b */, MSP430::SUB8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
1030 { 323 /* subc */, MSP430::SUBC16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
1031 { 323 /* subc */, MSP430::SUBC16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
1032 { 323 /* subc */, MSP430::SUBC16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
1033 { 323 /* subc */, MSP430::SUBC16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
1034 { 323 /* subc */, MSP430::SUBC16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
1035 { 323 /* subc */, MSP430::SUBC16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
1036 { 323 /* subc */, MSP430::SUBC16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
1037 { 323 /* subc */, MSP430::SUBC16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
1038 { 323 /* subc */, MSP430::SUBC16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
1039 { 323 /* subc */, MSP430::SUBC16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
1040 { 323 /* subc */, MSP430::SUBC16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
1041 { 323 /* subc */, MSP430::SUBC16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
1042 { 328 /* subc.b */, MSP430::SUBC8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
1043 { 328 /* subc.b */, MSP430::SUBC8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
1044 { 328 /* subc.b */, MSP430::SUBC8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
1045 { 328 /* subc.b */, MSP430::SUBC8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
1046 { 328 /* subc.b */, MSP430::SUBC8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
1047 { 328 /* subc.b */, MSP430::SUBC8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
1048 { 328 /* subc.b */, MSP430::SUBC8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
1049 { 328 /* subc.b */, MSP430::SUBC8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
1050 { 328 /* subc.b */, MSP430::SUBC8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
1051 { 328 /* subc.b */, MSP430::SUBC8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
1052 { 328 /* subc.b */, MSP430::SUBC8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
1053 { 328 /* subc.b */, MSP430::SUBC8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
1054 { 335 /* swpb */, MSP430::SWPB16r, Convert__Reg1_0__Tie0_1_1, AMFBS_None, { MCK_GR16 }, },
1055 { 335 /* swpb */, MSP430::SWPB16n, Convert__IndReg1_0, AMFBS_None, { MCK_IndReg }, },
1056 { 335 /* swpb */, MSP430::SWPB16m, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
1057 { 335 /* swpb */, MSP430::SWPB16p, Convert__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg }, },
1058 { 340 /* sxt */, MSP430::SEXT16r, Convert__Reg1_0__Tie0_1_1, AMFBS_None, { MCK_GR16 }, },
1059 { 340 /* sxt */, MSP430::SEXT16n, Convert__IndReg1_0, AMFBS_None, { MCK_IndReg }, },
1060 { 340 /* sxt */, MSP430::SEXT16m, Convert__Mem2_0, AMFBS_None, { MCK_Mem }, },
1061 { 340 /* sxt */, MSP430::SEXT16p, Convert__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg }, },
1062 { 344 /* tst */, MSP430::CMP16rc, Convert__Reg1_0__imm_95_0, AMFBS_None, { MCK_GR16 }, },
1063 { 344 /* tst */, MSP430::CMP16mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
1064 { 348 /* tst.b */, MSP430::CMP8rc, Convert__Reg1_0__imm_95_0, AMFBS_None, { MCK_GR8 }, },
1065 { 348 /* tst.b */, MSP430::CMP8mc, Convert__Mem2_0__imm_95_0, AMFBS_None, { MCK_Mem }, },
1066 { 354 /* xor */, MSP430::XOR16rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_GR16 }, },
1067 { 354 /* xor */, MSP430::XOR16mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR16, MCK_Mem }, },
1068 { 354 /* xor */, MSP430::XOR16rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR16 }, },
1069 { 354 /* xor */, MSP430::XOR16mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
1070 { 354 /* xor */, MSP430::XOR16ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR16 }, },
1071 { 354 /* xor */, MSP430::XOR16mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
1072 { 354 /* xor */, MSP430::XOR16rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR16 }, },
1073 { 354 /* xor */, MSP430::XOR16mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
1074 { 354 /* xor */, MSP430::XOR16rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR16 }, },
1075 { 354 /* xor */, MSP430::XOR16mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
1076 { 354 /* xor */, MSP430::XOR16rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR16 }, },
1077 { 354 /* xor */, MSP430::XOR16mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
1078 { 358 /* xor.b */, MSP430::XOR8rr, Convert__Reg1_1__Tie0_1_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_GR8 }, },
1079 { 358 /* xor.b */, MSP430::XOR8mr, Convert__Mem2_1__Reg1_0, AMFBS_None, { MCK_GR8, MCK_Mem }, },
1080 { 358 /* xor.b */, MSP430::XOR8rc, Convert__Reg1_1__Tie0_1_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_GR8 }, },
1081 { 358 /* xor.b */, MSP430::XOR8mc, Convert__Mem2_1__CGImm1_0, AMFBS_None, { MCK_CGImm, MCK_Mem }, },
1082 { 358 /* xor.b */, MSP430::XOR8ri, Convert__Reg1_1__Tie0_1_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_GR8 }, },
1083 { 358 /* xor.b */, MSP430::XOR8mi, Convert__Mem2_1__Imm1_0, AMFBS_None, { MCK_Imm, MCK_Mem }, },
1084 { 358 /* xor.b */, MSP430::XOR8rn, Convert__Reg1_1__Tie0_1_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_GR8 }, },
1085 { 358 /* xor.b */, MSP430::XOR8mn, Convert__Mem2_1__IndReg1_0, AMFBS_None, { MCK_IndReg, MCK_Mem }, },
1086 { 358 /* xor.b */, MSP430::XOR8rm, Convert__Reg1_1__Tie0_1_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_GR8 }, },
1087 { 358 /* xor.b */, MSP430::XOR8mm, Convert__Mem2_1__Mem2_0, AMFBS_None, { MCK_Mem, MCK_Mem }, },
1088 { 358 /* xor.b */, MSP430::XOR8rp, Convert__Reg1_1__PostIndReg1_0__Tie0_1_1__Tie1_1_1, AMFBS_None, { MCK_PostIndReg, MCK_GR8 }, },
1089 { 358 /* xor.b */, MSP430::XOR8mp, Convert__Mem2_1__PostIndReg1_0, AMFBS_None, { MCK_PostIndReg, MCK_Mem }, },
1090};
1091
1092#include "llvm/Support/Debug.h"
1093#include "llvm/Support/Format.h"
1094
1095unsigned MSP430AsmParser::
1096MatchInstructionImpl(const OperandVector &Operands,
1097 MCInst &Inst,
1098 uint64_t &ErrorInfo,
1099 FeatureBitset &MissingFeatures,
1100 bool matchingInlineAsm, unsigned VariantID) {
1101 // Eliminate obvious mismatches.
1102 if (Operands.size() > 3) {
1103 ErrorInfo = 3;
1104 return Match_InvalidOperand;
1105 }
1106
1107 // Get the current feature set.
1108 const FeatureBitset &AvailableFeatures = getAvailableFeatures();
1109
1110 // Get the instruction mnemonic, which is the first token.
1111 StringRef Mnemonic = ((MSP430Operand &)*Operands[0]).getToken();
1112
1113 // Some state to try to produce better error messages.
1114 bool HadMatchOtherThanFeatures = false;
1115 bool HadMatchOtherThanPredicate = false;
1116 unsigned RetCode = Match_InvalidOperand;
1117 MissingFeatures.set();
1118 // Set ErrorInfo to the operand that mismatches if it is
1119 // wrong for all instances of the instruction.
1120 ErrorInfo = ~0ULL;
1121 // Find the appropriate table for this asm variant.
1122 const MatchEntry *Start, *End;
1123 switch (VariantID) {
1124 default: llvm_unreachable("invalid variant!");
1125 case 0: Start = std::begin(MatchTable0); End = std::end(MatchTable0); break;
1126 }
1127 // Search the table.
1128 auto MnemonicRange = std::equal_range(Start, End, Mnemonic, LessOpcode());
1129
1130 DEBUG_WITH_TYPE("asm-matcher", dbgs() << "AsmMatcher: found " <<
1131 std::distance(MnemonicRange.first, MnemonicRange.second) <<
1132 " encodings with mnemonic '" << Mnemonic << "'\n");
1133
1134 // Return a more specific error code if no mnemonics match.
1135 if (MnemonicRange.first == MnemonicRange.second)
1136 return Match_MnemonicFail;
1137
1138 for (const MatchEntry *it = MnemonicRange.first, *ie = MnemonicRange.second;
1139 it != ie; ++it) {
1140 const FeatureBitset &RequiredFeatures = FeatureBitsets[it->RequiredFeaturesIdx];
1141 bool HasRequiredFeatures =
1142 (AvailableFeatures & RequiredFeatures) == RequiredFeatures;
1143 DEBUG_WITH_TYPE("asm-matcher", dbgs() << "Trying to match opcode "
1144 << MII.getName(it->Opcode) << "\n");
1145 // equal_range guarantees that instruction mnemonic matches.
1146 assert(Mnemonic == it->getMnemonic());
1147 bool OperandsValid = true;
1148 for (unsigned FormalIdx = 0, ActualIdx = 1; FormalIdx != 2; ++FormalIdx) {
1149 auto Formal = static_cast<MatchClassKind>(it->Classes[FormalIdx]);
1150 DEBUG_WITH_TYPE("asm-matcher",
1151 dbgs() << " Matching formal operand class " << getMatchClassName(Formal)
1152 << " against actual operand at index " << ActualIdx);
1153 if (ActualIdx < Operands.size())
1154 DEBUG_WITH_TYPE("asm-matcher", dbgs() << " (";
1155 Operands[ActualIdx]->print(dbgs()); dbgs() << "): ");
1156 else
1157 DEBUG_WITH_TYPE("asm-matcher", dbgs() << ": ");
1158 if (ActualIdx >= Operands.size()) {
1159 DEBUG_WITH_TYPE("asm-matcher", dbgs() << "actual operand index out of range\n");
1160 if (Formal == InvalidMatchClass) {
1161 break;
1162 }
1163 if (isSubclass(Formal, OptionalMatchClass)) {
1164 continue;
1165 }
1166 OperandsValid = false;
1167 ErrorInfo = ActualIdx;
1168 break;
1169 }
1170 MCParsedAsmOperand &Actual = *Operands[ActualIdx];
1171 unsigned Diag = validateOperandClass(Actual, Formal);
1172 if (Diag == Match_Success) {
1173 DEBUG_WITH_TYPE("asm-matcher",
1174 dbgs() << "match success using generic matcher\n");
1175 ++ActualIdx;
1176 continue;
1177 }
1178 // If the generic handler indicates an invalid operand
1179 // failure, check for a special case.
1180 if (Diag != Match_Success) {
1181 unsigned TargetDiag = validateTargetOperandClass(Actual, Formal);
1182 if (TargetDiag == Match_Success) {
1183 DEBUG_WITH_TYPE("asm-matcher",
1184 dbgs() << "match success using target matcher\n");
1185 ++ActualIdx;
1186 continue;
1187 }
1188 // If the target matcher returned a specific error code use
1189 // that, else use the one from the generic matcher.
1190 if (TargetDiag != Match_InvalidOperand && HasRequiredFeatures)
1191 Diag = TargetDiag;
1192 }
1193 // If current formal operand wasn't matched and it is optional
1194 // then try to match next formal operand
1195 if (Diag == Match_InvalidOperand && isSubclass(Formal, OptionalMatchClass)) {
1196 DEBUG_WITH_TYPE("asm-matcher", dbgs() << "ignoring optional operand\n");
1197 continue;
1198 }
1199 // If this operand is broken for all of the instances of this
1200 // mnemonic, keep track of it so we can report loc info.
1201 // If we already had a match that only failed due to a
1202 // target predicate, that diagnostic is preferred.
1203 if (!HadMatchOtherThanPredicate &&
1204 (it == MnemonicRange.first || ErrorInfo <= ActualIdx)) {
1205 if (HasRequiredFeatures && (ErrorInfo != ActualIdx || Diag != Match_InvalidOperand))
1206 RetCode = Diag;
1207 ErrorInfo = ActualIdx;
1208 }
1209 // Otherwise, just reject this instance of the mnemonic.
1210 OperandsValid = false;
1211 break;
1212 }
1213
1214 if (!OperandsValid) {
1215 DEBUG_WITH_TYPE("asm-matcher", dbgs() << "Opcode result: multiple "
1216 "operand mismatches, ignoring "
1217 "this opcode\n");
1218 continue;
1219 }
1220 if (!HasRequiredFeatures) {
1221 HadMatchOtherThanFeatures = true;
1222 FeatureBitset NewMissingFeatures = RequiredFeatures & ~AvailableFeatures;
1223 DEBUG_WITH_TYPE("asm-matcher", dbgs() << "Missing target features:";
1224 for (unsigned I = 0, E = NewMissingFeatures.size(); I != E; ++I)
1225 if (NewMissingFeatures[I])
1226 dbgs() << ' ' << I;
1227 dbgs() << "\n");
1228 if (NewMissingFeatures.count() <=
1229 MissingFeatures.count())
1230 MissingFeatures = NewMissingFeatures;
1231 continue;
1232 }
1233
1234 Inst.clear();
1235
1236 Inst.setOpcode(it->Opcode);
1237 // We have a potential match but have not rendered the operands.
1238 // Check the target predicate to handle any context sensitive
1239 // constraints.
1240 // For example, Ties that are referenced multiple times must be
1241 // checked here to ensure the input is the same for each match
1242 // constraints. If we leave it any later the ties will have been
1243 // canonicalized
1244 unsigned MatchResult;
1245 if ((MatchResult = checkEarlyTargetMatchPredicate(Inst, Operands)) != Match_Success) {
1246 Inst.clear();
1247 DEBUG_WITH_TYPE(
1248 "asm-matcher",
1249 dbgs() << "Early target match predicate failed with diag code "
1250 << MatchResult << "\n");
1251 RetCode = MatchResult;
1252 HadMatchOtherThanPredicate = true;
1253 continue;
1254 }
1255
1256 if (matchingInlineAsm) {
1257 convertToMapAndConstraints(it->ConvertFn, Operands);
1258 if (!checkAsmTiedOperandConstraints(*this, it->ConvertFn, Operands,
1259 ErrorInfo))
1260 return Match_InvalidTiedOperand;
1261
1262 return Match_Success;
1263 }
1264
1265 // We have selected a definite instruction, convert the parsed
1266 // operands into the appropriate MCInst.
1267 convertToMCInst(it->ConvertFn, Inst, it->Opcode, Operands);
1268
1269 // We have a potential match. Check the target predicate to
1270 // handle any context sensitive constraints.
1271 if ((MatchResult = checkTargetMatchPredicate(Inst)) != Match_Success) {
1272 DEBUG_WITH_TYPE("asm-matcher",
1273 dbgs() << "Target match predicate failed with diag code "
1274 << MatchResult << "\n");
1275 Inst.clear();
1276 RetCode = MatchResult;
1277 HadMatchOtherThanPredicate = true;
1278 continue;
1279 }
1280
1281 if (!checkAsmTiedOperandConstraints(*this, it->ConvertFn, Operands,
1282 ErrorInfo))
1283 return Match_InvalidTiedOperand;
1284
1285 DEBUG_WITH_TYPE(
1286 "asm-matcher",
1287 dbgs() << "Opcode result: complete match, selecting this opcode\n");
1288 return Match_Success;
1289 }
1290
1291 // Okay, we had no match. Try to return a useful error code.
1292 if (HadMatchOtherThanPredicate || !HadMatchOtherThanFeatures)
1293 return RetCode;
1294
1295 ErrorInfo = 0;
1296 return Match_MissingFeature;
1297}
1298
1299#endif // GET_MATCHER_IMPLEMENTATION
1300
1301
1302#ifdef GET_MNEMONIC_SPELL_CHECKER
1303#undef GET_MNEMONIC_SPELL_CHECKER
1304
1305static std::string MSP430MnemonicSpellCheck(StringRef S, const FeatureBitset &FBS, unsigned VariantID) {
1306 const unsigned MaxEditDist = 2;
1307 std::vector<StringRef> Candidates;
1308 StringRef Prev = "";
1309
1310 // Find the appropriate table for this asm variant.
1311 const MatchEntry *Start, *End;
1312 switch (VariantID) {
1313 default: llvm_unreachable("invalid variant!");
1314 case 0: Start = std::begin(MatchTable0); End = std::end(MatchTable0); break;
1315 }
1316
1317 for (auto I = Start; I < End; I++) {
1318 // Ignore unsupported instructions.
1319 const FeatureBitset &RequiredFeatures = FeatureBitsets[I->RequiredFeaturesIdx];
1320 if ((FBS & RequiredFeatures) != RequiredFeatures)
1321 continue;
1322
1323 StringRef T = I->getMnemonic();
1324 // Avoid recomputing the edit distance for the same string.
1325 if (T == Prev)
1326 continue;
1327
1328 Prev = T;
1329 unsigned Dist = S.edit_distance(T, false, MaxEditDist);
1330 if (Dist <= MaxEditDist)
1331 Candidates.push_back(T);
1332 }
1333
1334 if (Candidates.empty())
1335 return "";
1336
1337 std::string Res = ", did you mean: ";
1338 unsigned i = 0;
1339 for (; i < Candidates.size() - 1; i++)
1340 Res += Candidates[i].str() + ", ";
1341 return Res + Candidates[i].str() + "?";
1342}
1343
1344#endif // GET_MNEMONIC_SPELL_CHECKER
1345
1346
1347#ifdef GET_MNEMONIC_CHECKER
1348#undef GET_MNEMONIC_CHECKER
1349
1350static bool MSP430CheckMnemonic(StringRef Mnemonic,
1351 const FeatureBitset &AvailableFeatures,
1352 unsigned VariantID) {
1353 // Find the appropriate table for this asm variant.
1354 const MatchEntry *Start, *End;
1355 switch (VariantID) {
1356 default: llvm_unreachable("invalid variant!");
1357 case 0: Start = std::begin(MatchTable0); End = std::end(MatchTable0); break;
1358 }
1359
1360 // Search the table.
1361 auto MnemonicRange = std::equal_range(Start, End, Mnemonic, LessOpcode());
1362
1363 if (MnemonicRange.first == MnemonicRange.second)
1364 return false;
1365
1366 for (const MatchEntry *it = MnemonicRange.first, *ie = MnemonicRange.second;
1367 it != ie; ++it) {
1368 const FeatureBitset &RequiredFeatures =
1369 FeatureBitsets[it->RequiredFeaturesIdx];
1370 if ((AvailableFeatures & RequiredFeatures) == RequiredFeatures)
1371 return true;
1372 }
1373 return false;
1374}
1375
1376#endif // GET_MNEMONIC_CHECKER
1377
1378