1 #line 1 "msp430-decode.opc"
2 /* -*- c -*- */
3 /* Copyright (C) 2013-2016 Free Software Foundation, Inc.
4 Contributed by Red Hat.
5 Written by DJ Delorie.
6
7 This file is part of the GNU opcodes library.
8
9 This library is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
13
14 It is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22 MA 02110-1301, USA. */
23
24 #include "sysdep.h"
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include "ansidecl.h"
29 #include "opcode/msp430-decode.h"
30
31 static int trace = 0;
32
33 typedef struct
34 {
35 MSP430_Opcode_Decoded *msp430;
36 int (*getbyte)(void *);
37 void *ptr;
38 unsigned char *op;
39 int op_ptr;
40 int pc;
41 } LocalData;
42
43 #define AU ATTRIBUTE_UNUSED
44 #define GETBYTE() getbyte_swapped (ld)
45 #define B ((unsigned long) GETBYTE ())
46
47 static int
getbyte_swapped(LocalData * ld)48 getbyte_swapped (LocalData *ld)
49 {
50 int b;
51
52 if (ld->op_ptr == ld->msp430->n_bytes)
53 {
54 do
55 {
56 b = ld->getbyte (ld->ptr);
57 ld->op [(ld->msp430->n_bytes++)^1] = b;
58 }
59 while (ld->msp430->n_bytes & 1);
60 }
61 return ld->op[ld->op_ptr++];
62 }
63
64 #define ID(x) msp430->id = x
65
66 #define OP(n, t, r, a) (msp430->op[n].type = t, \
67 msp430->op[n].reg = r, \
68 msp430->op[n].addend = a)
69
70 #define OPX(n, t, r1, r2, a) \
71 (msp430->op[n].type = t, \
72 msp430->op[n].reg = r1, \
73 msp430->op[n].reg2 = r2, \
74 msp430->op[n].addend = a)
75
76 #define SYNTAX(x) msp430->syntax = x
77 #define UNSUPPORTED() msp430->syntax = "*unknown*"
78
79 #define DC(c) OP (0, MSP430_Operand_Immediate, 0, c)
80 #define DR(r) OP (0, MSP430_Operand_Register, r, 0)
81 #define DM(r, a) OP (0, MSP430_Operand_Indirect, r, a)
82 #define DA(a) OP (0, MSP430_Operand_Indirect, MSR_None, a)
83 #define AD(r, ad) encode_ad (r, ad, ld, 0)
84 #define ADX(r, ad, x) encode_ad (r, ad, ld, x)
85
86 #define SC(c) OP (1, MSP430_Operand_Immediate, 0, c)
87 #define SR(r) OP (1, MSP430_Operand_Register, r, 0)
88 #define SM(r, a) OP (1, MSP430_Operand_Indirect, r, a)
89 #define SA(a) OP (1, MSP430_Operand_Indirect, MSR_None, a)
90 #define SI(r) OP (1, MSP430_Operand_Indirect_Postinc, r, 0)
91 #define AS(r, as) encode_as (r, as, ld, 0)
92 #define ASX(r, as, x) encode_as (r, as, ld, x)
93
94 #define BW(x) msp430->size = (x ? 8 : 16)
95 /* The last 20 is for SWPBX.Z and SXTX.A. */
96 #define ABW(a,x) msp430->size = (a ? ((x ? 8 : 16)) : (x ? 20 : 20))
97
98 #define IMMU(bytes) immediate (bytes, 0, ld)
99 #define IMMS(bytes) immediate (bytes, 1, ld)
100
101 /* Helper macros for known status bits settings. */
102 #define F_____ msp430->flags_1 = msp430->flags_0 = 0; msp430->flags_set = 0
103 #define F_VNZC msp430->flags_1 = msp430->flags_0 = 0; msp430->flags_set = 0x87
104 #define F_0NZC msp430->flags_1 = 0; msp430->flags_0 = 0x80; msp430->flags_set = 0x07
105
106
107 /* The chip is little-endian, but GETBYTE byte-swaps words because the
108 decoder is based on 16-bit "words" so *this* logic is big-endian. */
109
110 static int
immediate(int bytes,int sign_extend,LocalData * ld)111 immediate (int bytes, int sign_extend, LocalData *ld)
112 {
113 unsigned long i = 0;
114
115 switch (bytes)
116 {
117 case 1:
118 i |= B;
119 if (sign_extend && (i & 0x80))
120 i -= 0x100;
121 break;
122 case 2:
123 i |= B << 8;
124 i |= B;
125 if (sign_extend && (i & 0x8000))
126 i -= 0x10000;
127 break;
128 case 3:
129 i |= B << 16;
130 i |= B << 8;
131 i |= B;
132 if (sign_extend && (i & 0x800000))
133 i -= 0x1000000;
134 break;
135 case 4:
136 i |= B << 24;
137 i |= B << 16;
138 i |= B << 8;
139 i |= B;
140 if (sign_extend && (i & 0x80000000ULL))
141 i -= 0x100000000ULL;
142 break;
143 default:
144 fprintf (stderr,
145 "Programmer error: immediate() called with invalid byte count %d\n",
146 bytes);
147 abort ();
148 }
149 return i;
150 }
151
152 /*
153 PC SP SR CG
154 As
155 00 Rn - - R2 #0
156 01 X(Rn) Sym - X(abs) #1
157 10 (Rn) - - #4 #2
158 11 (Rn++) #imm - #8 #-1
159
160 Ad
161 0 Rn - - - -
162 1 X(Rn) Sym - X(abs) - */
163
164 static void
encode_ad(int reg,int ad,LocalData * ld,int ext)165 encode_ad (int reg, int ad, LocalData *ld, int ext)
166 {
167 MSP430_Opcode_Decoded *msp430 = ld->msp430;
168
169 if (ad)
170 {
171 int x = IMMU(2) | (ext << 16);
172 switch (reg)
173 {
174 case 0: /* (PC) -> Symbolic. */
175 DA (x + ld->pc + ld->op_ptr - 2);
176 break;
177 case 2: /* (SR) -> Absolute. */
178 DA (x);
179 break;
180 default:
181 DM (reg, x);
182 break;
183 }
184 }
185 else
186 {
187 DR (reg);
188 }
189 }
190
191 static void
encode_as(int reg,int as,LocalData * ld,int ext)192 encode_as (int reg, int as, LocalData *ld, int ext)
193 {
194 MSP430_Opcode_Decoded *msp430 = ld->msp430;
195 int x;
196
197 switch (as)
198 {
199 case 0:
200 switch (reg)
201 {
202 case 3:
203 SC (0);
204 break;
205 default:
206 SR (reg);
207 break;
208 }
209 break;
210 case 1:
211 switch (reg)
212 {
213 case 0: /* PC -> Symbolic. */
214 x = IMMU(2) | (ext << 16);
215 SA (x + ld->pc + ld->op_ptr - 2);
216 break;
217 case 2: /* SR -> Absolute. */
218 x = IMMU(2) | (ext << 16);
219 SA (x);
220 break;
221 case 3:
222 SC (1);
223 break;
224 default:
225 x = IMMU(2) | (ext << 16);
226 SM (reg, x);
227 break;
228 }
229 break;
230 case 2:
231 switch (reg)
232 {
233 case 2:
234 SC (4);
235 break;
236 case 3:
237 SC (2);
238 break;
239 case MSR_None:
240 SA (0);
241 default:
242 SM (reg, 0);
243 break;
244 }
245 break;
246 case 3:
247 switch (reg)
248 {
249 case 0:
250 {
251 /* This fetch *is* the *PC++ that the opcode encodes :-) */
252 x = IMMU(2) | (ext << 16);
253 SC (x);
254 }
255 break;
256 case 2:
257 SC (8);
258 break;
259 case 3:
260 SC (-1);
261 break;
262 default:
263 SI (reg);
264 break;
265 }
266 break;
267 }
268 }
269
270 static void
encode_rep_zc(int srxt,int dsxt,LocalData * ld)271 encode_rep_zc (int srxt, int dsxt, LocalData *ld)
272 {
273 MSP430_Opcode_Decoded *msp430 = ld->msp430;
274
275 msp430->repeat_reg = srxt & 1;
276 msp430->repeats = dsxt;
277 msp430->zc = (srxt & 2) ? 1 : 0;
278 }
279
280 #define REPZC(s,d) encode_rep_zc (s, d, ld)
281
282 static int
dopc_to_id(int dopc)283 dopc_to_id (int dopc)
284 {
285 switch (dopc)
286 {
287 case 4: return MSO_mov;
288 case 5: return MSO_add;
289 case 6: return MSO_addc;
290 case 7: return MSO_subc;
291 case 8: return MSO_sub;
292 case 9: return MSO_cmp;
293 case 10: return MSO_dadd;
294 case 11: return MSO_bit;
295 case 12: return MSO_bic;
296 case 13: return MSO_bis;
297 case 14: return MSO_xor;
298 case 15: return MSO_and;
299 default: return MSO_unknown;
300 }
301 }
302
303 static int
sopc_to_id(int sop,int c)304 sopc_to_id (int sop, int c)
305 {
306 switch (sop * 2 + c)
307 {
308 case 0: return MSO_rrc;
309 case 1: return MSO_swpb;
310 case 2: return MSO_rra;
311 case 3: return MSO_sxt;
312 case 4: return MSO_push;
313 case 5: return MSO_call;
314 case 6: return MSO_reti;
315 default: return MSO_unknown;
316 }
317 }
318
319 int
msp430_decode_opcode(unsigned long pc,MSP430_Opcode_Decoded * msp430,int (* getbyte)(void *),void * ptr)320 msp430_decode_opcode (unsigned long pc,
321 MSP430_Opcode_Decoded *msp430,
322 int (*getbyte)(void *),
323 void *ptr)
324 {
325 LocalData lds, *ld = &lds;
326 unsigned char op_buf[20] = {0};
327 unsigned char *op = op_buf;
328 int raddr;
329 int al_bit;
330 int srxt_bits, dsxt_bits;
331
332 lds.msp430 = msp430;
333 lds.getbyte = getbyte;
334 lds.ptr = ptr;
335 lds.op = op;
336 lds.op_ptr = 0;
337 lds.pc = pc;
338
339 memset (msp430, 0, sizeof (*msp430));
340
341 /* These are overridden by an extension word. */
342 al_bit = 1;
343 srxt_bits = 0;
344 dsxt_bits = 0;
345
346 post_extension_word:
347 ;
348
349 /* 430X extention word. */
350 GETBYTE ();
351 switch (op[0] & 0xff)
352 {
353 case 0x00:
354 GETBYTE ();
355 switch (op[1] & 0xf0)
356 {
357 case 0x00:
358 op_semantics_1:
359 {
360 /** 0000 srcr 0000 dstr MOVA @%1, %0 */
361 #line 438 "msp430-decode.opc"
362 int srcr AU = op[0] & 0x0f;
363 #line 438 "msp430-decode.opc"
364 int dstr AU = op[1] & 0x0f;
365 if (trace)
366 {
367 printf ("\033[33m%s\033[0m %02x %02x\n",
368 "/** 0000 srcr 0000 dstr MOVA @%1, %0 */",
369 op[0], op[1]);
370 printf (" srcr = 0x%x,", srcr);
371 printf (" dstr = 0x%x\n", dstr);
372 }
373 SYNTAX("MOVA @%1, %0");
374 #line 438 "msp430-decode.opc"
375 ID (MSO_mov); SM (srcr, 0); DR (dstr);
376 msp430->size = 20;
377 msp430->ofs_430x = 1;
378
379 }
380 break;
381 case 0x10:
382 op_semantics_2:
383 {
384 /** 0000 srcr 0001 dstr MOVA @%1+, %0 */
385 #line 443 "msp430-decode.opc"
386 int srcr AU = op[0] & 0x0f;
387 #line 443 "msp430-decode.opc"
388 int dstr AU = op[1] & 0x0f;
389 if (trace)
390 {
391 printf ("\033[33m%s\033[0m %02x %02x\n",
392 "/** 0000 srcr 0001 dstr MOVA @%1+, %0 */",
393 op[0], op[1]);
394 printf (" srcr = 0x%x,", srcr);
395 printf (" dstr = 0x%x\n", dstr);
396 }
397 SYNTAX("MOVA @%1+, %0");
398 #line 443 "msp430-decode.opc"
399 ID (MSO_mov); SI (srcr); DR (dstr);
400 msp430->size = 20;
401 msp430->ofs_430x = 1;
402
403 }
404 break;
405 case 0x20:
406 op_semantics_3:
407 {
408 /** 0000 srcr 0010 dstr MOVA &%1, %0 */
409 #line 448 "msp430-decode.opc"
410 int srcr AU = op[0] & 0x0f;
411 #line 448 "msp430-decode.opc"
412 int dstr AU = op[1] & 0x0f;
413 if (trace)
414 {
415 printf ("\033[33m%s\033[0m %02x %02x\n",
416 "/** 0000 srcr 0010 dstr MOVA &%1, %0 */",
417 op[0], op[1]);
418 printf (" srcr = 0x%x,", srcr);
419 printf (" dstr = 0x%x\n", dstr);
420 }
421 SYNTAX("MOVA &%1, %0");
422 #line 448 "msp430-decode.opc"
423 ID (MSO_mov); SA ((srcr << 16) + IMMU(2)); DR (dstr);
424 msp430->size = 20;
425 msp430->ofs_430x = 1;
426
427 }
428 break;
429 case 0x30:
430 op_semantics_4:
431 {
432 /** 0000 srcr 0011 dstr MOVA %1, %0 */
433 #line 453 "msp430-decode.opc"
434 int srcr AU = op[0] & 0x0f;
435 #line 453 "msp430-decode.opc"
436 int dstr AU = op[1] & 0x0f;
437 if (trace)
438 {
439 printf ("\033[33m%s\033[0m %02x %02x\n",
440 "/** 0000 srcr 0011 dstr MOVA %1, %0 */",
441 op[0], op[1]);
442 printf (" srcr = 0x%x,", srcr);
443 printf (" dstr = 0x%x\n", dstr);
444 }
445 SYNTAX("MOVA %1, %0");
446 #line 453 "msp430-decode.opc"
447 ID (MSO_mov); SM (srcr, IMMS(2)); DR (dstr);
448 msp430->size = 20;
449 msp430->ofs_430x = 1;
450
451 }
452 break;
453 case 0x40:
454 case 0x50:
455 op_semantics_5:
456 {
457 /** 0000 bt00 010w dstr RRCM.A %c, %0 */
458 #line 520 "msp430-decode.opc"
459 int bt AU = (op[0] >> 2) & 0x03;
460 #line 520 "msp430-decode.opc"
461 int w AU = (op[1] >> 4) & 0x01;
462 #line 520 "msp430-decode.opc"
463 int dstr AU = op[1] & 0x0f;
464 if (trace)
465 {
466 printf ("\033[33m%s\033[0m %02x %02x\n",
467 "/** 0000 bt00 010w dstr RRCM.A %c, %0 */",
468 op[0], op[1]);
469 printf (" bt = 0x%x,", bt);
470 printf (" w = 0x%x,", w);
471 printf (" dstr = 0x%x\n", dstr);
472 }
473 SYNTAX("RRCM.A %c, %0");
474 #line 520 "msp430-decode.opc"
475 ID (MSO_rrc); DR (dstr); SR (dstr);
476 msp430->repeats = bt;
477 msp430->size = w ? 16 : 20;
478 msp430->ofs_430x = 1;
479 F_0NZC;
480
481 }
482 break;
483 case 0x60:
484 op_semantics_6:
485 {
486 /** 0000 srcr 0110 dstr MOVA %1, &%0 */
487 #line 458 "msp430-decode.opc"
488 int srcr AU = op[0] & 0x0f;
489 #line 458 "msp430-decode.opc"
490 int dstr AU = op[1] & 0x0f;
491 if (trace)
492 {
493 printf ("\033[33m%s\033[0m %02x %02x\n",
494 "/** 0000 srcr 0110 dstr MOVA %1, &%0 */",
495 op[0], op[1]);
496 printf (" srcr = 0x%x,", srcr);
497 printf (" dstr = 0x%x\n", dstr);
498 }
499 SYNTAX("MOVA %1, &%0");
500 #line 458 "msp430-decode.opc"
501 ID (MSO_mov); SR (srcr); DA ((dstr << 16) + IMMU(2));
502 msp430->size = 20;
503 msp430->ofs_430x = 1;
504
505 }
506 break;
507 case 0x70:
508 op_semantics_7:
509 {
510 /** 0000 srcr 0111 dstr MOVA %1, &%0 */
511 #line 463 "msp430-decode.opc"
512 int srcr AU = op[0] & 0x0f;
513 #line 463 "msp430-decode.opc"
514 int dstr AU = op[1] & 0x0f;
515 if (trace)
516 {
517 printf ("\033[33m%s\033[0m %02x %02x\n",
518 "/** 0000 srcr 0111 dstr MOVA %1, &%0 */",
519 op[0], op[1]);
520 printf (" srcr = 0x%x,", srcr);
521 printf (" dstr = 0x%x\n", dstr);
522 }
523 SYNTAX("MOVA %1, &%0");
524 #line 463 "msp430-decode.opc"
525 ID (MSO_mov); SR (srcr); DM (dstr, IMMS(2));
526 msp430->size = 20;
527 msp430->ofs_430x = 1;
528
529 }
530 break;
531 case 0x80:
532 op_semantics_8:
533 {
534 /** 0000 srcr 1000 dstr MOVA %1, %0 */
535 #line 468 "msp430-decode.opc"
536 int srcr AU = op[0] & 0x0f;
537 #line 468 "msp430-decode.opc"
538 int dstr AU = op[1] & 0x0f;
539 if (trace)
540 {
541 printf ("\033[33m%s\033[0m %02x %02x\n",
542 "/** 0000 srcr 1000 dstr MOVA %1, %0 */",
543 op[0], op[1]);
544 printf (" srcr = 0x%x,", srcr);
545 printf (" dstr = 0x%x\n", dstr);
546 }
547 SYNTAX("MOVA %1, %0");
548 #line 468 "msp430-decode.opc"
549 ID (MSO_mov); SC ((srcr << 16) + IMMU(2)); DR (dstr);
550 msp430->size = 20;
551 msp430->ofs_430x = 1;
552
553 }
554 break;
555 case 0x90:
556 op_semantics_9:
557 {
558 /** 0000 srcr 1001 dstr CMPA %1, %0 */
559 #line 473 "msp430-decode.opc"
560 int srcr AU = op[0] & 0x0f;
561 #line 473 "msp430-decode.opc"
562 int dstr AU = op[1] & 0x0f;
563 if (trace)
564 {
565 printf ("\033[33m%s\033[0m %02x %02x\n",
566 "/** 0000 srcr 1001 dstr CMPA %1, %0 */",
567 op[0], op[1]);
568 printf (" srcr = 0x%x,", srcr);
569 printf (" dstr = 0x%x\n", dstr);
570 }
571 SYNTAX("CMPA %1, %0");
572 #line 473 "msp430-decode.opc"
573 ID (MSO_cmp); SC ((srcr << 16) + IMMU(2)); DR (dstr);
574 msp430->size = 20;
575 msp430->ofs_430x = 1;
576 F_VNZC;
577
578 }
579 break;
580 case 0xa0:
581 op_semantics_10:
582 {
583 /** 0000 srcr 1010 dstr ADDA %1, %0 */
584 #line 479 "msp430-decode.opc"
585 int srcr AU = op[0] & 0x0f;
586 #line 479 "msp430-decode.opc"
587 int dstr AU = op[1] & 0x0f;
588 if (trace)
589 {
590 printf ("\033[33m%s\033[0m %02x %02x\n",
591 "/** 0000 srcr 1010 dstr ADDA %1, %0 */",
592 op[0], op[1]);
593 printf (" srcr = 0x%x,", srcr);
594 printf (" dstr = 0x%x\n", dstr);
595 }
596 SYNTAX("ADDA %1, %0");
597 #line 479 "msp430-decode.opc"
598 ID (MSO_add); SC ((srcr << 16) + IMMU(2)); DR (dstr);
599 msp430->size = 20;
600 msp430->ofs_430x = 1;
601 F_VNZC;
602
603 }
604 break;
605 case 0xb0:
606 op_semantics_11:
607 {
608 /** 0000 srcr 1011 dstr SUBA %1, %0 */
609 #line 485 "msp430-decode.opc"
610 int srcr AU = op[0] & 0x0f;
611 #line 485 "msp430-decode.opc"
612 int dstr AU = op[1] & 0x0f;
613 if (trace)
614 {
615 printf ("\033[33m%s\033[0m %02x %02x\n",
616 "/** 0000 srcr 1011 dstr SUBA %1, %0 */",
617 op[0], op[1]);
618 printf (" srcr = 0x%x,", srcr);
619 printf (" dstr = 0x%x\n", dstr);
620 }
621 SYNTAX("SUBA %1, %0");
622 #line 485 "msp430-decode.opc"
623 ID (MSO_sub); SC ((srcr << 16) + IMMU(2)); DR (dstr);
624 msp430->size = 20;
625 msp430->ofs_430x = 1;
626 F_VNZC;
627
628 }
629 break;
630 case 0xc0:
631 op_semantics_12:
632 {
633 /** 0000 srcr 1100 dstr MOVA %1, %0 */
634 #line 497 "msp430-decode.opc"
635 int srcr AU = op[0] & 0x0f;
636 #line 497 "msp430-decode.opc"
637 int dstr AU = op[1] & 0x0f;
638 if (trace)
639 {
640 printf ("\033[33m%s\033[0m %02x %02x\n",
641 "/** 0000 srcr 1100 dstr MOVA %1, %0 */",
642 op[0], op[1]);
643 printf (" srcr = 0x%x,", srcr);
644 printf (" dstr = 0x%x\n", dstr);
645 }
646 SYNTAX("MOVA %1, %0");
647 #line 497 "msp430-decode.opc"
648 ID (MSO_mov); SR (srcr); DR (dstr);
649 msp430->size = 20;
650 msp430->ofs_430x = 1;
651
652 }
653 break;
654 case 0xd0:
655 op_semantics_13:
656 {
657 /** 0000 srcr 1101 dstr CMPA %1, %0 */
658 #line 502 "msp430-decode.opc"
659 int srcr AU = op[0] & 0x0f;
660 #line 502 "msp430-decode.opc"
661 int dstr AU = op[1] & 0x0f;
662 if (trace)
663 {
664 printf ("\033[33m%s\033[0m %02x %02x\n",
665 "/** 0000 srcr 1101 dstr CMPA %1, %0 */",
666 op[0], op[1]);
667 printf (" srcr = 0x%x,", srcr);
668 printf (" dstr = 0x%x\n", dstr);
669 }
670 SYNTAX("CMPA %1, %0");
671 #line 502 "msp430-decode.opc"
672 ID (MSO_cmp); SR (srcr); DR (dstr);
673 msp430->size = 20;
674 msp430->ofs_430x = 1;
675 F_VNZC;
676
677 }
678 break;
679 case 0xe0:
680 op_semantics_14:
681 {
682 /** 0000 srcr 1110 dstr ADDA %1, %0 */
683 #line 508 "msp430-decode.opc"
684 int srcr AU = op[0] & 0x0f;
685 #line 508 "msp430-decode.opc"
686 int dstr AU = op[1] & 0x0f;
687 if (trace)
688 {
689 printf ("\033[33m%s\033[0m %02x %02x\n",
690 "/** 0000 srcr 1110 dstr ADDA %1, %0 */",
691 op[0], op[1]);
692 printf (" srcr = 0x%x,", srcr);
693 printf (" dstr = 0x%x\n", dstr);
694 }
695 SYNTAX("ADDA %1, %0");
696 #line 508 "msp430-decode.opc"
697 ID (MSO_add); SR (srcr); DR (dstr);
698 msp430->size = 20;
699 msp430->ofs_430x = 1;
700 F_VNZC;
701
702 }
703 break;
704 case 0xf0:
705 op_semantics_15:
706 {
707 /** 0000 srcr 1111 dstr SUBA %1, %0 */
708 #line 514 "msp430-decode.opc"
709 int srcr AU = op[0] & 0x0f;
710 #line 514 "msp430-decode.opc"
711 int dstr AU = op[1] & 0x0f;
712 if (trace)
713 {
714 printf ("\033[33m%s\033[0m %02x %02x\n",
715 "/** 0000 srcr 1111 dstr SUBA %1, %0 */",
716 op[0], op[1]);
717 printf (" srcr = 0x%x,", srcr);
718 printf (" dstr = 0x%x\n", dstr);
719 }
720 SYNTAX("SUBA %1, %0");
721 #line 514 "msp430-decode.opc"
722 ID (MSO_sub); SR (srcr); DR (dstr);
723 msp430->size = 20;
724 msp430->ofs_430x = 1;
725 F_VNZC;
726
727 }
728 break;
729 }
730 break;
731 case 0x01:
732 GETBYTE ();
733 switch (op[1] & 0xf0)
734 {
735 case 0x00:
736 goto op_semantics_1;
737 break;
738 case 0x10:
739 goto op_semantics_2;
740 break;
741 case 0x20:
742 goto op_semantics_3;
743 break;
744 case 0x30:
745 goto op_semantics_4;
746 break;
747 case 0x40:
748 case 0x50:
749 op_semantics_16:
750 {
751 /** 0000 bt01 010w dstr RRAM.A %c, %0 */
752 #line 527 "msp430-decode.opc"
753 int bt AU = (op[0] >> 2) & 0x03;
754 #line 527 "msp430-decode.opc"
755 int w AU = (op[1] >> 4) & 0x01;
756 #line 527 "msp430-decode.opc"
757 int dstr AU = op[1] & 0x0f;
758 if (trace)
759 {
760 printf ("\033[33m%s\033[0m %02x %02x\n",
761 "/** 0000 bt01 010w dstr RRAM.A %c, %0 */",
762 op[0], op[1]);
763 printf (" bt = 0x%x,", bt);
764 printf (" w = 0x%x,", w);
765 printf (" dstr = 0x%x\n", dstr);
766 }
767 SYNTAX("RRAM.A %c, %0");
768 #line 527 "msp430-decode.opc"
769 ID (MSO_rra); DR (dstr); SR (dstr);
770 msp430->repeats = bt;
771 msp430->size = w ? 16 : 20;
772 msp430->ofs_430x = 1;
773 F_0NZC;
774
775 }
776 break;
777 case 0x60:
778 goto op_semantics_6;
779 break;
780 case 0x70:
781 goto op_semantics_7;
782 break;
783 case 0x80:
784 goto op_semantics_8;
785 break;
786 case 0x90:
787 goto op_semantics_9;
788 break;
789 case 0xa0:
790 goto op_semantics_10;
791 break;
792 case 0xb0:
793 goto op_semantics_11;
794 break;
795 case 0xc0:
796 goto op_semantics_12;
797 break;
798 case 0xd0:
799 goto op_semantics_13;
800 break;
801 case 0xe0:
802 goto op_semantics_14;
803 break;
804 case 0xf0:
805 goto op_semantics_15;
806 break;
807 }
808 break;
809 case 0x02:
810 GETBYTE ();
811 switch (op[1] & 0xf0)
812 {
813 case 0x00:
814 goto op_semantics_1;
815 break;
816 case 0x10:
817 goto op_semantics_2;
818 break;
819 case 0x20:
820 goto op_semantics_3;
821 break;
822 case 0x30:
823 goto op_semantics_4;
824 break;
825 case 0x40:
826 case 0x50:
827 op_semantics_17:
828 {
829 /** 0000 bt10 010w dstr RLAM.A %c, %0 */
830 #line 534 "msp430-decode.opc"
831 int bt AU = (op[0] >> 2) & 0x03;
832 #line 534 "msp430-decode.opc"
833 int w AU = (op[1] >> 4) & 0x01;
834 #line 534 "msp430-decode.opc"
835 int dstr AU = op[1] & 0x0f;
836 if (trace)
837 {
838 printf ("\033[33m%s\033[0m %02x %02x\n",
839 "/** 0000 bt10 010w dstr RLAM.A %c, %0 */",
840 op[0], op[1]);
841 printf (" bt = 0x%x,", bt);
842 printf (" w = 0x%x,", w);
843 printf (" dstr = 0x%x\n", dstr);
844 }
845 SYNTAX("RLAM.A %c, %0");
846 #line 534 "msp430-decode.opc"
847 ID (MSO_add); DR (dstr); SR (dstr);
848 msp430->repeats = bt;
849 msp430->size = w ? 16 : 20;
850 msp430->ofs_430x = 1;
851 F_0NZC;
852
853 }
854 break;
855 case 0x60:
856 goto op_semantics_6;
857 break;
858 case 0x70:
859 goto op_semantics_7;
860 break;
861 case 0x80:
862 goto op_semantics_8;
863 break;
864 case 0x90:
865 goto op_semantics_9;
866 break;
867 case 0xa0:
868 goto op_semantics_10;
869 break;
870 case 0xb0:
871 goto op_semantics_11;
872 break;
873 case 0xc0:
874 goto op_semantics_12;
875 break;
876 case 0xd0:
877 goto op_semantics_13;
878 break;
879 case 0xe0:
880 goto op_semantics_14;
881 break;
882 case 0xf0:
883 goto op_semantics_15;
884 break;
885 }
886 break;
887 case 0x03:
888 GETBYTE ();
889 switch (op[1] & 0xf0)
890 {
891 case 0x00:
892 goto op_semantics_1;
893 break;
894 case 0x10:
895 goto op_semantics_2;
896 break;
897 case 0x20:
898 goto op_semantics_3;
899 break;
900 case 0x30:
901 goto op_semantics_4;
902 break;
903 case 0x40:
904 case 0x50:
905 op_semantics_18:
906 {
907 /** 0000 bt11 010w dstr RRUM.A %c, %0 */
908 #line 541 "msp430-decode.opc"
909 int bt AU = (op[0] >> 2) & 0x03;
910 #line 541 "msp430-decode.opc"
911 int w AU = (op[1] >> 4) & 0x01;
912 #line 541 "msp430-decode.opc"
913 int dstr AU = op[1] & 0x0f;
914 if (trace)
915 {
916 printf ("\033[33m%s\033[0m %02x %02x\n",
917 "/** 0000 bt11 010w dstr RRUM.A %c, %0 */",
918 op[0], op[1]);
919 printf (" bt = 0x%x,", bt);
920 printf (" w = 0x%x,", w);
921 printf (" dstr = 0x%x\n", dstr);
922 }
923 SYNTAX("RRUM.A %c, %0");
924 #line 541 "msp430-decode.opc"
925 ID (MSO_rru); DR (dstr); SR (dstr);
926 msp430->repeats = bt;
927 msp430->size = w ? 16 : 20;
928 msp430->ofs_430x = 1;
929 F_0NZC;
930
931 }
932 break;
933 case 0x60:
934 goto op_semantics_6;
935 break;
936 case 0x70:
937 goto op_semantics_7;
938 break;
939 case 0x80:
940 goto op_semantics_8;
941 break;
942 case 0x90:
943 goto op_semantics_9;
944 break;
945 case 0xa0:
946 goto op_semantics_10;
947 break;
948 case 0xb0:
949 goto op_semantics_11;
950 break;
951 case 0xc0:
952 goto op_semantics_12;
953 break;
954 case 0xd0:
955 goto op_semantics_13;
956 break;
957 case 0xe0:
958 goto op_semantics_14;
959 break;
960 case 0xf0:
961 goto op_semantics_15;
962 break;
963 }
964 break;
965 case 0x04:
966 GETBYTE ();
967 switch (op[1] & 0xf0)
968 {
969 case 0x00:
970 goto op_semantics_1;
971 break;
972 case 0x10:
973 goto op_semantics_2;
974 break;
975 case 0x20:
976 goto op_semantics_3;
977 break;
978 case 0x30:
979 goto op_semantics_4;
980 break;
981 case 0x40:
982 case 0x50:
983 goto op_semantics_5;
984 break;
985 case 0x60:
986 goto op_semantics_6;
987 break;
988 case 0x70:
989 goto op_semantics_7;
990 break;
991 case 0x80:
992 goto op_semantics_8;
993 break;
994 case 0x90:
995 goto op_semantics_9;
996 break;
997 case 0xa0:
998 goto op_semantics_10;
999 break;
1000 case 0xb0:
1001 goto op_semantics_11;
1002 break;
1003 case 0xc0:
1004 goto op_semantics_12;
1005 break;
1006 case 0xd0:
1007 goto op_semantics_13;
1008 break;
1009 case 0xe0:
1010 goto op_semantics_14;
1011 break;
1012 case 0xf0:
1013 goto op_semantics_15;
1014 break;
1015 }
1016 break;
1017 case 0x05:
1018 GETBYTE ();
1019 switch (op[1] & 0xf0)
1020 {
1021 case 0x00:
1022 goto op_semantics_1;
1023 break;
1024 case 0x10:
1025 goto op_semantics_2;
1026 break;
1027 case 0x20:
1028 goto op_semantics_3;
1029 break;
1030 case 0x30:
1031 goto op_semantics_4;
1032 break;
1033 case 0x40:
1034 case 0x50:
1035 goto op_semantics_16;
1036 break;
1037 case 0x60:
1038 goto op_semantics_6;
1039 break;
1040 case 0x70:
1041 goto op_semantics_7;
1042 break;
1043 case 0x80:
1044 goto op_semantics_8;
1045 break;
1046 case 0x90:
1047 goto op_semantics_9;
1048 break;
1049 case 0xa0:
1050 goto op_semantics_10;
1051 break;
1052 case 0xb0:
1053 goto op_semantics_11;
1054 break;
1055 case 0xc0:
1056 goto op_semantics_12;
1057 break;
1058 case 0xd0:
1059 goto op_semantics_13;
1060 break;
1061 case 0xe0:
1062 goto op_semantics_14;
1063 break;
1064 case 0xf0:
1065 goto op_semantics_15;
1066 break;
1067 }
1068 break;
1069 case 0x06:
1070 GETBYTE ();
1071 switch (op[1] & 0xf0)
1072 {
1073 case 0x00:
1074 goto op_semantics_1;
1075 break;
1076 case 0x10:
1077 goto op_semantics_2;
1078 break;
1079 case 0x20:
1080 goto op_semantics_3;
1081 break;
1082 case 0x30:
1083 goto op_semantics_4;
1084 break;
1085 case 0x40:
1086 case 0x50:
1087 goto op_semantics_17;
1088 break;
1089 case 0x60:
1090 goto op_semantics_6;
1091 break;
1092 case 0x70:
1093 goto op_semantics_7;
1094 break;
1095 case 0x80:
1096 goto op_semantics_8;
1097 break;
1098 case 0x90:
1099 goto op_semantics_9;
1100 break;
1101 case 0xa0:
1102 goto op_semantics_10;
1103 break;
1104 case 0xb0:
1105 goto op_semantics_11;
1106 break;
1107 case 0xc0:
1108 goto op_semantics_12;
1109 break;
1110 case 0xd0:
1111 goto op_semantics_13;
1112 break;
1113 case 0xe0:
1114 goto op_semantics_14;
1115 break;
1116 case 0xf0:
1117 goto op_semantics_15;
1118 break;
1119 }
1120 break;
1121 case 0x07:
1122 GETBYTE ();
1123 switch (op[1] & 0xf0)
1124 {
1125 case 0x00:
1126 goto op_semantics_1;
1127 break;
1128 case 0x10:
1129 goto op_semantics_2;
1130 break;
1131 case 0x20:
1132 goto op_semantics_3;
1133 break;
1134 case 0x30:
1135 goto op_semantics_4;
1136 break;
1137 case 0x40:
1138 case 0x50:
1139 goto op_semantics_18;
1140 break;
1141 case 0x60:
1142 goto op_semantics_6;
1143 break;
1144 case 0x70:
1145 goto op_semantics_7;
1146 break;
1147 case 0x80:
1148 goto op_semantics_8;
1149 break;
1150 case 0x90:
1151 goto op_semantics_9;
1152 break;
1153 case 0xa0:
1154 goto op_semantics_10;
1155 break;
1156 case 0xb0:
1157 goto op_semantics_11;
1158 break;
1159 case 0xc0:
1160 goto op_semantics_12;
1161 break;
1162 case 0xd0:
1163 goto op_semantics_13;
1164 break;
1165 case 0xe0:
1166 goto op_semantics_14;
1167 break;
1168 case 0xf0:
1169 goto op_semantics_15;
1170 break;
1171 }
1172 break;
1173 case 0x08:
1174 GETBYTE ();
1175 switch (op[1] & 0xf0)
1176 {
1177 case 0x00:
1178 goto op_semantics_1;
1179 break;
1180 case 0x10:
1181 goto op_semantics_2;
1182 break;
1183 case 0x20:
1184 goto op_semantics_3;
1185 break;
1186 case 0x30:
1187 goto op_semantics_4;
1188 break;
1189 case 0x40:
1190 case 0x50:
1191 goto op_semantics_5;
1192 break;
1193 case 0x60:
1194 goto op_semantics_6;
1195 break;
1196 case 0x70:
1197 goto op_semantics_7;
1198 break;
1199 case 0x80:
1200 goto op_semantics_8;
1201 break;
1202 case 0x90:
1203 goto op_semantics_9;
1204 break;
1205 case 0xa0:
1206 goto op_semantics_10;
1207 break;
1208 case 0xb0:
1209 goto op_semantics_11;
1210 break;
1211 case 0xc0:
1212 goto op_semantics_12;
1213 break;
1214 case 0xd0:
1215 goto op_semantics_13;
1216 break;
1217 case 0xe0:
1218 goto op_semantics_14;
1219 break;
1220 case 0xf0:
1221 goto op_semantics_15;
1222 break;
1223 }
1224 break;
1225 case 0x09:
1226 GETBYTE ();
1227 switch (op[1] & 0xf0)
1228 {
1229 case 0x00:
1230 goto op_semantics_1;
1231 break;
1232 case 0x10:
1233 goto op_semantics_2;
1234 break;
1235 case 0x20:
1236 goto op_semantics_3;
1237 break;
1238 case 0x30:
1239 goto op_semantics_4;
1240 break;
1241 case 0x40:
1242 case 0x50:
1243 goto op_semantics_16;
1244 break;
1245 case 0x60:
1246 goto op_semantics_6;
1247 break;
1248 case 0x70:
1249 goto op_semantics_7;
1250 break;
1251 case 0x80:
1252 goto op_semantics_8;
1253 break;
1254 case 0x90:
1255 goto op_semantics_9;
1256 break;
1257 case 0xa0:
1258 goto op_semantics_10;
1259 break;
1260 case 0xb0:
1261 goto op_semantics_11;
1262 break;
1263 case 0xc0:
1264 goto op_semantics_12;
1265 break;
1266 case 0xd0:
1267 goto op_semantics_13;
1268 break;
1269 case 0xe0:
1270 goto op_semantics_14;
1271 break;
1272 case 0xf0:
1273 goto op_semantics_15;
1274 break;
1275 }
1276 break;
1277 case 0x0a:
1278 GETBYTE ();
1279 switch (op[1] & 0xf0)
1280 {
1281 case 0x00:
1282 goto op_semantics_1;
1283 break;
1284 case 0x10:
1285 goto op_semantics_2;
1286 break;
1287 case 0x20:
1288 goto op_semantics_3;
1289 break;
1290 case 0x30:
1291 goto op_semantics_4;
1292 break;
1293 case 0x40:
1294 case 0x50:
1295 goto op_semantics_17;
1296 break;
1297 case 0x60:
1298 goto op_semantics_6;
1299 break;
1300 case 0x70:
1301 goto op_semantics_7;
1302 break;
1303 case 0x80:
1304 goto op_semantics_8;
1305 break;
1306 case 0x90:
1307 goto op_semantics_9;
1308 break;
1309 case 0xa0:
1310 goto op_semantics_10;
1311 break;
1312 case 0xb0:
1313 goto op_semantics_11;
1314 break;
1315 case 0xc0:
1316 goto op_semantics_12;
1317 break;
1318 case 0xd0:
1319 goto op_semantics_13;
1320 break;
1321 case 0xe0:
1322 goto op_semantics_14;
1323 break;
1324 case 0xf0:
1325 goto op_semantics_15;
1326 break;
1327 }
1328 break;
1329 case 0x0b:
1330 GETBYTE ();
1331 switch (op[1] & 0xf0)
1332 {
1333 case 0x00:
1334 goto op_semantics_1;
1335 break;
1336 case 0x10:
1337 goto op_semantics_2;
1338 break;
1339 case 0x20:
1340 goto op_semantics_3;
1341 break;
1342 case 0x30:
1343 goto op_semantics_4;
1344 break;
1345 case 0x40:
1346 case 0x50:
1347 goto op_semantics_18;
1348 break;
1349 case 0x60:
1350 goto op_semantics_6;
1351 break;
1352 case 0x70:
1353 goto op_semantics_7;
1354 break;
1355 case 0x80:
1356 goto op_semantics_8;
1357 break;
1358 case 0x90:
1359 goto op_semantics_9;
1360 break;
1361 case 0xa0:
1362 goto op_semantics_10;
1363 break;
1364 case 0xb0:
1365 goto op_semantics_11;
1366 break;
1367 case 0xc0:
1368 goto op_semantics_12;
1369 break;
1370 case 0xd0:
1371 goto op_semantics_13;
1372 break;
1373 case 0xe0:
1374 goto op_semantics_14;
1375 break;
1376 case 0xf0:
1377 goto op_semantics_15;
1378 break;
1379 }
1380 break;
1381 case 0x0c:
1382 GETBYTE ();
1383 switch (op[1] & 0xf0)
1384 {
1385 case 0x00:
1386 goto op_semantics_1;
1387 break;
1388 case 0x10:
1389 goto op_semantics_2;
1390 break;
1391 case 0x20:
1392 goto op_semantics_3;
1393 break;
1394 case 0x30:
1395 goto op_semantics_4;
1396 break;
1397 case 0x40:
1398 case 0x50:
1399 goto op_semantics_5;
1400 break;
1401 case 0x60:
1402 goto op_semantics_6;
1403 break;
1404 case 0x70:
1405 goto op_semantics_7;
1406 break;
1407 case 0x80:
1408 goto op_semantics_8;
1409 break;
1410 case 0x90:
1411 goto op_semantics_9;
1412 break;
1413 case 0xa0:
1414 goto op_semantics_10;
1415 break;
1416 case 0xb0:
1417 goto op_semantics_11;
1418 break;
1419 case 0xc0:
1420 goto op_semantics_12;
1421 break;
1422 case 0xd0:
1423 goto op_semantics_13;
1424 break;
1425 case 0xe0:
1426 goto op_semantics_14;
1427 break;
1428 case 0xf0:
1429 goto op_semantics_15;
1430 break;
1431 }
1432 break;
1433 case 0x0d:
1434 GETBYTE ();
1435 switch (op[1] & 0xf0)
1436 {
1437 case 0x00:
1438 goto op_semantics_1;
1439 break;
1440 case 0x10:
1441 goto op_semantics_2;
1442 break;
1443 case 0x20:
1444 goto op_semantics_3;
1445 break;
1446 case 0x30:
1447 goto op_semantics_4;
1448 break;
1449 case 0x40:
1450 case 0x50:
1451 goto op_semantics_16;
1452 break;
1453 case 0x60:
1454 goto op_semantics_6;
1455 break;
1456 case 0x70:
1457 goto op_semantics_7;
1458 break;
1459 case 0x80:
1460 goto op_semantics_8;
1461 break;
1462 case 0x90:
1463 goto op_semantics_9;
1464 break;
1465 case 0xa0:
1466 goto op_semantics_10;
1467 break;
1468 case 0xb0:
1469 goto op_semantics_11;
1470 break;
1471 case 0xc0:
1472 goto op_semantics_12;
1473 break;
1474 case 0xd0:
1475 goto op_semantics_13;
1476 break;
1477 case 0xe0:
1478 goto op_semantics_14;
1479 break;
1480 case 0xf0:
1481 goto op_semantics_15;
1482 break;
1483 }
1484 break;
1485 case 0x0e:
1486 GETBYTE ();
1487 switch (op[1] & 0xf0)
1488 {
1489 case 0x00:
1490 goto op_semantics_1;
1491 break;
1492 case 0x10:
1493 goto op_semantics_2;
1494 break;
1495 case 0x20:
1496 goto op_semantics_3;
1497 break;
1498 case 0x30:
1499 goto op_semantics_4;
1500 break;
1501 case 0x40:
1502 case 0x50:
1503 goto op_semantics_17;
1504 break;
1505 case 0x60:
1506 goto op_semantics_6;
1507 break;
1508 case 0x70:
1509 goto op_semantics_7;
1510 break;
1511 case 0x80:
1512 goto op_semantics_8;
1513 break;
1514 case 0x90:
1515 goto op_semantics_9;
1516 break;
1517 case 0xa0:
1518 goto op_semantics_10;
1519 break;
1520 case 0xb0:
1521 goto op_semantics_11;
1522 break;
1523 case 0xc0:
1524 goto op_semantics_12;
1525 break;
1526 case 0xd0:
1527 goto op_semantics_13;
1528 break;
1529 case 0xe0:
1530 goto op_semantics_14;
1531 break;
1532 case 0xf0:
1533 goto op_semantics_15;
1534 break;
1535 }
1536 break;
1537 case 0x0f:
1538 GETBYTE ();
1539 switch (op[1] & 0xf0)
1540 {
1541 case 0x00:
1542 goto op_semantics_1;
1543 break;
1544 case 0x10:
1545 goto op_semantics_2;
1546 break;
1547 case 0x20:
1548 goto op_semantics_3;
1549 break;
1550 case 0x30:
1551 goto op_semantics_4;
1552 break;
1553 case 0x40:
1554 case 0x50:
1555 goto op_semantics_18;
1556 break;
1557 case 0x60:
1558 goto op_semantics_6;
1559 break;
1560 case 0x70:
1561 goto op_semantics_7;
1562 break;
1563 case 0x80:
1564 goto op_semantics_8;
1565 break;
1566 case 0x90:
1567 goto op_semantics_9;
1568 break;
1569 case 0xa0:
1570 goto op_semantics_10;
1571 break;
1572 case 0xb0:
1573 goto op_semantics_11;
1574 break;
1575 case 0xc0:
1576 goto op_semantics_12;
1577 break;
1578 case 0xd0:
1579 goto op_semantics_13;
1580 break;
1581 case 0xe0:
1582 goto op_semantics_14;
1583 break;
1584 case 0xf0:
1585 goto op_semantics_15;
1586 break;
1587 }
1588 break;
1589 case 0x10:
1590 GETBYTE ();
1591 switch (op[1] & 0x00)
1592 {
1593 case 0x00:
1594 op_semantics_19:
1595 {
1596 /** 0001 00so c b ad dreg %S%b %1 */
1597 #line 394 "msp430-decode.opc"
1598 int so AU = op[0] & 0x03;
1599 #line 394 "msp430-decode.opc"
1600 int c AU = (op[1] >> 7) & 0x01;
1601 #line 394 "msp430-decode.opc"
1602 int b AU = (op[1] >> 6) & 0x01;
1603 #line 394 "msp430-decode.opc"
1604 int ad AU = (op[1] >> 4) & 0x03;
1605 #line 394 "msp430-decode.opc"
1606 int dreg AU = op[1] & 0x0f;
1607 if (trace)
1608 {
1609 printf ("\033[33m%s\033[0m %02x %02x\n",
1610 "/** 0001 00so c b ad dreg %S%b %1 */",
1611 op[0], op[1]);
1612 printf (" so = 0x%x,", so);
1613 printf (" c = 0x%x,", c);
1614 printf (" b = 0x%x,", b);
1615 printf (" ad = 0x%x,", ad);
1616 printf (" dreg = 0x%x\n", dreg);
1617 }
1618 SYNTAX("%S%b %1");
1619 #line 394 "msp430-decode.opc"
1620
1621 ID (sopc_to_id (so,c)); ASX (dreg, ad, srxt_bits); ABW (al_bit, b);
1622
1623 if (ad == 0)
1624 REPZC (srxt_bits, dsxt_bits);
1625
1626 /* The helper functions encode for source, but it's
1627 both source and dest, with a few documented exceptions. */
1628 msp430->op[0] = msp430->op[1];
1629
1630 /* RETI ignores the operand. */
1631 if (msp430->id == MSO_reti)
1632 msp430->syntax = "%S";
1633
1634 switch (msp430->id)
1635 {
1636 case MSO_rrc: F_VNZC; break;
1637 case MSO_swpb: F_____; break;
1638 case MSO_rra: F_0NZC; break;
1639 case MSO_sxt: F_0NZC; break;
1640 case MSO_push: F_____; break;
1641 case MSO_call: F_____; break;
1642 case MSO_reti: F_VNZC; break;
1643 default: break;
1644 }
1645
1646 /* 20xx 0010 0000 ---- ----
1647 3cxx 0011 1100 ---- ----
1648 001j mp-- ---- ----. */
1649 }
1650 break;
1651 }
1652 break;
1653 case 0x11:
1654 GETBYTE ();
1655 switch (op[1] & 0x00)
1656 {
1657 case 0x00:
1658 goto op_semantics_19;
1659 break;
1660 }
1661 break;
1662 case 0x12:
1663 GETBYTE ();
1664 switch (op[1] & 0x00)
1665 {
1666 case 0x00:
1667 goto op_semantics_19;
1668 break;
1669 }
1670 break;
1671 case 0x13:
1672 GETBYTE ();
1673 switch (op[1] & 0xff)
1674 {
1675 case 0x00:
1676 {
1677 /** 0001 0011 0000 0000 RETI */
1678 if (trace)
1679 {
1680 printf ("\033[33m%s\033[0m %02x %02x\n",
1681 "/** 0001 0011 0000 0000 RETI */",
1682 op[0], op[1]);
1683 }
1684 SYNTAX("RETI");
1685 #line 548 "msp430-decode.opc"
1686 ID (MSO_reti);
1687 msp430->size = 20;
1688 msp430->ofs_430x = 1;
1689
1690 }
1691 break;
1692 case 0x01:
1693 case 0x02:
1694 case 0x03:
1695 case 0x04:
1696 case 0x05:
1697 case 0x06:
1698 case 0x07:
1699 case 0x08:
1700 case 0x09:
1701 case 0x0a:
1702 case 0x0b:
1703 case 0x0c:
1704 case 0x0d:
1705 case 0x0e:
1706 case 0x0f:
1707 case 0x10:
1708 case 0x11:
1709 case 0x12:
1710 case 0x13:
1711 case 0x14:
1712 case 0x15:
1713 case 0x16:
1714 case 0x17:
1715 case 0x18:
1716 case 0x19:
1717 case 0x1a:
1718 case 0x1b:
1719 case 0x1c:
1720 case 0x1d:
1721 case 0x1e:
1722 case 0x1f:
1723 case 0x20:
1724 case 0x21:
1725 case 0x22:
1726 case 0x23:
1727 case 0x24:
1728 case 0x25:
1729 case 0x26:
1730 case 0x27:
1731 case 0x28:
1732 case 0x29:
1733 case 0x2a:
1734 case 0x2b:
1735 case 0x2c:
1736 case 0x2d:
1737 case 0x2e:
1738 case 0x2f:
1739 case 0x30:
1740 case 0x31:
1741 case 0x32:
1742 case 0x33:
1743 case 0x34:
1744 case 0x35:
1745 case 0x36:
1746 case 0x37:
1747 case 0x38:
1748 case 0x39:
1749 case 0x3a:
1750 case 0x3b:
1751 case 0x3c:
1752 case 0x3d:
1753 case 0x3e:
1754 case 0x3f:
1755 case 0xa0:
1756 case 0xa1:
1757 case 0xa2:
1758 case 0xa3:
1759 case 0xa4:
1760 case 0xa5:
1761 case 0xa6:
1762 case 0xa7:
1763 case 0xa8:
1764 case 0xa9:
1765 case 0xaa:
1766 case 0xab:
1767 case 0xac:
1768 case 0xad:
1769 case 0xae:
1770 case 0xaf:
1771 case 0xc0:
1772 case 0xc1:
1773 case 0xc2:
1774 case 0xc3:
1775 case 0xc4:
1776 case 0xc5:
1777 case 0xc6:
1778 case 0xc7:
1779 case 0xc8:
1780 case 0xc9:
1781 case 0xca:
1782 case 0xcb:
1783 case 0xcc:
1784 case 0xcd:
1785 case 0xce:
1786 case 0xcf:
1787 case 0xd0:
1788 case 0xd1:
1789 case 0xd2:
1790 case 0xd3:
1791 case 0xd4:
1792 case 0xd5:
1793 case 0xd6:
1794 case 0xd7:
1795 case 0xd8:
1796 case 0xd9:
1797 case 0xda:
1798 case 0xdb:
1799 case 0xdc:
1800 case 0xdd:
1801 case 0xde:
1802 case 0xdf:
1803 case 0xe0:
1804 case 0xe1:
1805 case 0xe2:
1806 case 0xe3:
1807 case 0xe4:
1808 case 0xe5:
1809 case 0xe6:
1810 case 0xe7:
1811 case 0xe8:
1812 case 0xe9:
1813 case 0xea:
1814 case 0xeb:
1815 case 0xec:
1816 case 0xed:
1817 case 0xee:
1818 case 0xef:
1819 case 0xf0:
1820 case 0xf1:
1821 case 0xf2:
1822 case 0xf3:
1823 case 0xf4:
1824 case 0xf5:
1825 case 0xf6:
1826 case 0xf7:
1827 case 0xf8:
1828 case 0xf9:
1829 case 0xfa:
1830 case 0xfb:
1831 case 0xfc:
1832 case 0xfd:
1833 case 0xfe:
1834 case 0xff:
1835 goto op_semantics_19;
1836 break;
1837 case 0x40:
1838 case 0x41:
1839 case 0x42:
1840 case 0x43:
1841 case 0x44:
1842 case 0x45:
1843 case 0x46:
1844 case 0x47:
1845 case 0x48:
1846 case 0x49:
1847 case 0x4a:
1848 case 0x4b:
1849 case 0x4c:
1850 case 0x4d:
1851 case 0x4e:
1852 case 0x4f:
1853 case 0x50:
1854 case 0x51:
1855 case 0x52:
1856 case 0x53:
1857 case 0x54:
1858 case 0x55:
1859 case 0x56:
1860 case 0x57:
1861 case 0x58:
1862 case 0x59:
1863 case 0x5a:
1864 case 0x5b:
1865 case 0x5c:
1866 case 0x5d:
1867 case 0x5e:
1868 case 0x5f:
1869 case 0x60:
1870 case 0x61:
1871 case 0x62:
1872 case 0x63:
1873 case 0x64:
1874 case 0x65:
1875 case 0x66:
1876 case 0x67:
1877 case 0x68:
1878 case 0x69:
1879 case 0x6a:
1880 case 0x6b:
1881 case 0x6c:
1882 case 0x6d:
1883 case 0x6e:
1884 case 0x6f:
1885 case 0x70:
1886 case 0x71:
1887 case 0x72:
1888 case 0x73:
1889 case 0x74:
1890 case 0x75:
1891 case 0x76:
1892 case 0x77:
1893 case 0x78:
1894 case 0x79:
1895 case 0x7a:
1896 case 0x7b:
1897 case 0x7c:
1898 case 0x7d:
1899 case 0x7e:
1900 case 0x7f:
1901 {
1902 /** 0001 0011 01as dstr CALLA %0 */
1903 #line 553 "msp430-decode.opc"
1904 int as AU = (op[1] >> 4) & 0x03;
1905 #line 553 "msp430-decode.opc"
1906 int dstr AU = op[1] & 0x0f;
1907 if (trace)
1908 {
1909 printf ("\033[33m%s\033[0m %02x %02x\n",
1910 "/** 0001 0011 01as dstr CALLA %0 */",
1911 op[0], op[1]);
1912 printf (" as = 0x%x,", as);
1913 printf (" dstr = 0x%x\n", dstr);
1914 }
1915 SYNTAX("CALLA %0");
1916 #line 553 "msp430-decode.opc"
1917 ID (MSO_call); AS (dstr, as);
1918 msp430->size = 20;
1919 msp430->ofs_430x = 1;
1920
1921 }
1922 break;
1923 case 0x80:
1924 case 0x81:
1925 case 0x82:
1926 case 0x83:
1927 case 0x84:
1928 case 0x85:
1929 case 0x86:
1930 case 0x87:
1931 case 0x88:
1932 case 0x89:
1933 case 0x8a:
1934 case 0x8b:
1935 case 0x8c:
1936 case 0x8d:
1937 case 0x8e:
1938 case 0x8f:
1939 {
1940 /** 0001 0011 1000 extb CALLA %0 */
1941 #line 558 "msp430-decode.opc"
1942 int extb AU = op[1] & 0x0f;
1943 if (trace)
1944 {
1945 printf ("\033[33m%s\033[0m %02x %02x\n",
1946 "/** 0001 0011 1000 extb CALLA %0 */",
1947 op[0], op[1]);
1948 printf (" extb = 0x%x\n", extb);
1949 }
1950 SYNTAX("CALLA %0");
1951 #line 558 "msp430-decode.opc"
1952 ID (MSO_call); SA (IMMU(2) | (extb << 16));
1953 msp430->size = 20;
1954 msp430->ofs_430x = 1;
1955
1956 }
1957 break;
1958 case 0x90:
1959 case 0x91:
1960 case 0x92:
1961 case 0x93:
1962 case 0x94:
1963 case 0x95:
1964 case 0x96:
1965 case 0x97:
1966 case 0x98:
1967 case 0x99:
1968 case 0x9a:
1969 case 0x9b:
1970 case 0x9c:
1971 case 0x9d:
1972 case 0x9e:
1973 case 0x9f:
1974 {
1975 /** 0001 0011 1001 extb CALLA %0 */
1976 #line 563 "msp430-decode.opc"
1977 int extb AU = op[1] & 0x0f;
1978 if (trace)
1979 {
1980 printf ("\033[33m%s\033[0m %02x %02x\n",
1981 "/** 0001 0011 1001 extb CALLA %0 */",
1982 op[0], op[1]);
1983 printf (" extb = 0x%x\n", extb);
1984 }
1985 SYNTAX("CALLA %0");
1986 #line 563 "msp430-decode.opc"
1987 raddr = IMMU(2) | (extb << 16);
1988 if (raddr & 0x80000)
1989 raddr -= 0x100000;
1990 ID (MSO_call); SA (pc + raddr + msp430->n_bytes);
1991 msp430->size = 20;
1992 msp430->ofs_430x = 1;
1993
1994 }
1995 break;
1996 case 0xb0:
1997 case 0xb1:
1998 case 0xb2:
1999 case 0xb3:
2000 case 0xb4:
2001 case 0xb5:
2002 case 0xb6:
2003 case 0xb7:
2004 case 0xb8:
2005 case 0xb9:
2006 case 0xba:
2007 case 0xbb:
2008 case 0xbc:
2009 case 0xbd:
2010 case 0xbe:
2011 case 0xbf:
2012 {
2013 /** 0001 0011 1011 extb CALLA %0 */
2014 #line 571 "msp430-decode.opc"
2015 int extb AU = op[1] & 0x0f;
2016 if (trace)
2017 {
2018 printf ("\033[33m%s\033[0m %02x %02x\n",
2019 "/** 0001 0011 1011 extb CALLA %0 */",
2020 op[0], op[1]);
2021 printf (" extb = 0x%x\n", extb);
2022 }
2023 SYNTAX("CALLA %0");
2024 #line 571 "msp430-decode.opc"
2025 ID (MSO_call); SC (IMMU(2) | (extb << 16));
2026 msp430->size = 20;
2027 msp430->ofs_430x = 1;
2028
2029 }
2030 break;
2031 }
2032 break;
2033 case 0x14:
2034 GETBYTE ();
2035 switch (op[1] & 0x00)
2036 {
2037 case 0x00:
2038 op_semantics_20:
2039 {
2040 /** 0001 010w bits srcr PUSHM.A %0 */
2041 #line 576 "msp430-decode.opc"
2042 int w AU = op[0] & 0x01;
2043 #line 576 "msp430-decode.opc"
2044 int bits AU = (op[1] >> 4) & 0x0f;
2045 #line 576 "msp430-decode.opc"
2046 int srcr AU = op[1] & 0x0f;
2047 if (trace)
2048 {
2049 printf ("\033[33m%s\033[0m %02x %02x\n",
2050 "/** 0001 010w bits srcr PUSHM.A %0 */",
2051 op[0], op[1]);
2052 printf (" w = 0x%x,", w);
2053 printf (" bits = 0x%x,", bits);
2054 printf (" srcr = 0x%x\n", srcr);
2055 }
2056 SYNTAX("PUSHM.A %0");
2057 #line 576 "msp430-decode.opc"
2058 ID (MSO_push); SR (srcr);
2059 msp430->size = w ? 16 : 20;
2060 msp430->repeats = bits;
2061 msp430->ofs_430x = 1;
2062
2063 }
2064 break;
2065 }
2066 break;
2067 case 0x15:
2068 GETBYTE ();
2069 switch (op[1] & 0x00)
2070 {
2071 case 0x00:
2072 goto op_semantics_20;
2073 break;
2074 }
2075 break;
2076 case 0x16:
2077 GETBYTE ();
2078 switch (op[1] & 0x00)
2079 {
2080 case 0x00:
2081 op_semantics_21:
2082 {
2083 /** 0001 011w bits dstr POPM.A %0 */
2084 #line 582 "msp430-decode.opc"
2085 int w AU = op[0] & 0x01;
2086 #line 582 "msp430-decode.opc"
2087 int bits AU = (op[1] >> 4) & 0x0f;
2088 #line 582 "msp430-decode.opc"
2089 int dstr AU = op[1] & 0x0f;
2090 if (trace)
2091 {
2092 printf ("\033[33m%s\033[0m %02x %02x\n",
2093 "/** 0001 011w bits dstr POPM.A %0 */",
2094 op[0], op[1]);
2095 printf (" w = 0x%x,", w);
2096 printf (" bits = 0x%x,", bits);
2097 printf (" dstr = 0x%x\n", dstr);
2098 }
2099 SYNTAX("POPM.A %0");
2100 #line 582 "msp430-decode.opc"
2101 ID (MSO_pop); DR (dstr);
2102 msp430->size = w ? 16 : 20;
2103 msp430->repeats = bits;
2104 msp430->ofs_430x = 1;
2105
2106 }
2107 break;
2108 }
2109 break;
2110 case 0x17:
2111 GETBYTE ();
2112 switch (op[1] & 0x00)
2113 {
2114 case 0x00:
2115 goto op_semantics_21;
2116 break;
2117 }
2118 break;
2119 case 0x18:
2120 GETBYTE ();
2121 switch (op[1] & 0x30)
2122 {
2123 case 0x00:
2124 op_semantics_22:
2125 {
2126 /** 0001 1srx t l 00 dsxt 430x */
2127 #line 350 "msp430-decode.opc"
2128 int srx AU = op[0] & 0x07;
2129 #line 350 "msp430-decode.opc"
2130 int t AU = (op[1] >> 7) & 0x01;
2131 #line 350 "msp430-decode.opc"
2132 int l AU = (op[1] >> 6) & 0x01;
2133 #line 350 "msp430-decode.opc"
2134 int dsxt AU = op[1] & 0x0f;
2135 if (trace)
2136 {
2137 printf ("\033[33m%s\033[0m %02x %02x\n",
2138 "/** 0001 1srx t l 00 dsxt 430x */",
2139 op[0], op[1]);
2140 printf (" srx = 0x%x,", srx);
2141 printf (" t = 0x%x,", t);
2142 printf (" l = 0x%x,", l);
2143 printf (" dsxt = 0x%x\n", dsxt);
2144 }
2145 SYNTAX("430x");
2146 #line 350 "msp430-decode.opc"
2147
2148 al_bit = l;
2149 srxt_bits = srx * 2 + t;
2150 dsxt_bits = dsxt;
2151 op = op_buf + lds.op_ptr;
2152 msp430->ofs_430x = 1;
2153 goto post_extension_word;
2154
2155 /* double-op insns:
2156 opcode:4 sreg:4 Ad:1 BW:1 As:2 Dreg:4
2157
2158 single-op insn:
2159 opcode:9 BW:1 Ad:2 DSreg:4
2160
2161 jumps:
2162 opcode:3 Cond:3 pcrel:10. */
2163
2164 /* Double-Operand "opcode" fields. */
2165
2166 }
2167 break;
2168 default: UNSUPPORTED(); break;
2169 }
2170 break;
2171 case 0x19:
2172 GETBYTE ();
2173 switch (op[1] & 0x30)
2174 {
2175 case 0x00:
2176 goto op_semantics_22;
2177 break;
2178 default: UNSUPPORTED(); break;
2179 }
2180 break;
2181 case 0x1a:
2182 GETBYTE ();
2183 switch (op[1] & 0x30)
2184 {
2185 case 0x00:
2186 goto op_semantics_22;
2187 break;
2188 default: UNSUPPORTED(); break;
2189 }
2190 break;
2191 case 0x1b:
2192 GETBYTE ();
2193 switch (op[1] & 0x30)
2194 {
2195 case 0x00:
2196 goto op_semantics_22;
2197 break;
2198 default: UNSUPPORTED(); break;
2199 }
2200 break;
2201 case 0x1c:
2202 GETBYTE ();
2203 switch (op[1] & 0x30)
2204 {
2205 case 0x00:
2206 goto op_semantics_22;
2207 break;
2208 default: UNSUPPORTED(); break;
2209 }
2210 break;
2211 case 0x1d:
2212 GETBYTE ();
2213 switch (op[1] & 0x30)
2214 {
2215 case 0x00:
2216 goto op_semantics_22;
2217 break;
2218 default: UNSUPPORTED(); break;
2219 }
2220 break;
2221 case 0x1e:
2222 GETBYTE ();
2223 switch (op[1] & 0x30)
2224 {
2225 case 0x00:
2226 goto op_semantics_22;
2227 break;
2228 default: UNSUPPORTED(); break;
2229 }
2230 break;
2231 case 0x1f:
2232 GETBYTE ();
2233 switch (op[1] & 0x30)
2234 {
2235 case 0x00:
2236 goto op_semantics_22;
2237 break;
2238 default: UNSUPPORTED(); break;
2239 }
2240 break;
2241 case 0x20:
2242 GETBYTE ();
2243 switch (op[1] & 0x00)
2244 {
2245 case 0x00:
2246 op_semantics_23:
2247 {
2248 /** 001jmp aa addrlsbs %J %1 */
2249 #line 424 "msp430-decode.opc"
2250 int jmp AU = (op[0] >> 2) & 0x07;
2251 #line 424 "msp430-decode.opc"
2252 int aa AU = op[0] & 0x03;
2253 #line 424 "msp430-decode.opc"
2254 int addrlsbs AU = op[1];
2255 if (trace)
2256 {
2257 printf ("\033[33m%s\033[0m %02x %02x\n",
2258 "/** 001jmp aa addrlsbs %J %1 */",
2259 op[0], op[1]);
2260 printf (" jmp = 0x%x,", jmp);
2261 printf (" aa = 0x%x,", aa);
2262 printf (" addrlsbs = 0x%x\n", addrlsbs);
2263 }
2264 SYNTAX("%J %1");
2265 #line 424 "msp430-decode.opc"
2266
2267 raddr = (aa << 9) | (addrlsbs << 1);
2268 if (raddr & 0x400)
2269 raddr = raddr - 0x800;
2270 /* This is a pc-relative jump, but we don't use SM because that
2271 would load the target address from the memory at X(PC), not use
2272 PC+X *as* the address. So we use SC to use the address, not the
2273 data at that address. */
2274 ID (MSO_jmp); SC (pc + raddr + msp430->n_bytes);
2275 msp430->cond = jmp;
2276
2277 /* Extended instructions. */
2278
2279 }
2280 break;
2281 }
2282 break;
2283 case 0x21:
2284 GETBYTE ();
2285 switch (op[1] & 0x00)
2286 {
2287 case 0x00:
2288 goto op_semantics_23;
2289 break;
2290 }
2291 break;
2292 case 0x22:
2293 GETBYTE ();
2294 switch (op[1] & 0x00)
2295 {
2296 case 0x00:
2297 goto op_semantics_23;
2298 break;
2299 }
2300 break;
2301 case 0x23:
2302 GETBYTE ();
2303 switch (op[1] & 0x00)
2304 {
2305 case 0x00:
2306 goto op_semantics_23;
2307 break;
2308 }
2309 break;
2310 case 0x24:
2311 GETBYTE ();
2312 switch (op[1] & 0x00)
2313 {
2314 case 0x00:
2315 goto op_semantics_23;
2316 break;
2317 }
2318 break;
2319 case 0x25:
2320 GETBYTE ();
2321 switch (op[1] & 0x00)
2322 {
2323 case 0x00:
2324 goto op_semantics_23;
2325 break;
2326 }
2327 break;
2328 case 0x26:
2329 GETBYTE ();
2330 switch (op[1] & 0x00)
2331 {
2332 case 0x00:
2333 goto op_semantics_23;
2334 break;
2335 }
2336 break;
2337 case 0x27:
2338 GETBYTE ();
2339 switch (op[1] & 0x00)
2340 {
2341 case 0x00:
2342 goto op_semantics_23;
2343 break;
2344 }
2345 break;
2346 case 0x28:
2347 GETBYTE ();
2348 switch (op[1] & 0x00)
2349 {
2350 case 0x00:
2351 goto op_semantics_23;
2352 break;
2353 }
2354 break;
2355 case 0x29:
2356 GETBYTE ();
2357 switch (op[1] & 0x00)
2358 {
2359 case 0x00:
2360 goto op_semantics_23;
2361 break;
2362 }
2363 break;
2364 case 0x2a:
2365 GETBYTE ();
2366 switch (op[1] & 0x00)
2367 {
2368 case 0x00:
2369 goto op_semantics_23;
2370 break;
2371 }
2372 break;
2373 case 0x2b:
2374 GETBYTE ();
2375 switch (op[1] & 0x00)
2376 {
2377 case 0x00:
2378 goto op_semantics_23;
2379 break;
2380 }
2381 break;
2382 case 0x2c:
2383 GETBYTE ();
2384 switch (op[1] & 0x00)
2385 {
2386 case 0x00:
2387 goto op_semantics_23;
2388 break;
2389 }
2390 break;
2391 case 0x2d:
2392 GETBYTE ();
2393 switch (op[1] & 0x00)
2394 {
2395 case 0x00:
2396 goto op_semantics_23;
2397 break;
2398 }
2399 break;
2400 case 0x2e:
2401 GETBYTE ();
2402 switch (op[1] & 0x00)
2403 {
2404 case 0x00:
2405 goto op_semantics_23;
2406 break;
2407 }
2408 break;
2409 case 0x2f:
2410 GETBYTE ();
2411 switch (op[1] & 0x00)
2412 {
2413 case 0x00:
2414 goto op_semantics_23;
2415 break;
2416 }
2417 break;
2418 case 0x30:
2419 GETBYTE ();
2420 switch (op[1] & 0x00)
2421 {
2422 case 0x00:
2423 goto op_semantics_23;
2424 break;
2425 }
2426 break;
2427 case 0x31:
2428 GETBYTE ();
2429 switch (op[1] & 0x00)
2430 {
2431 case 0x00:
2432 goto op_semantics_23;
2433 break;
2434 }
2435 break;
2436 case 0x32:
2437 GETBYTE ();
2438 switch (op[1] & 0x00)
2439 {
2440 case 0x00:
2441 goto op_semantics_23;
2442 break;
2443 }
2444 break;
2445 case 0x33:
2446 GETBYTE ();
2447 switch (op[1] & 0x00)
2448 {
2449 case 0x00:
2450 goto op_semantics_23;
2451 break;
2452 }
2453 break;
2454 case 0x34:
2455 GETBYTE ();
2456 switch (op[1] & 0x00)
2457 {
2458 case 0x00:
2459 goto op_semantics_23;
2460 break;
2461 }
2462 break;
2463 case 0x35:
2464 GETBYTE ();
2465 switch (op[1] & 0x00)
2466 {
2467 case 0x00:
2468 goto op_semantics_23;
2469 break;
2470 }
2471 break;
2472 case 0x36:
2473 GETBYTE ();
2474 switch (op[1] & 0x00)
2475 {
2476 case 0x00:
2477 goto op_semantics_23;
2478 break;
2479 }
2480 break;
2481 case 0x37:
2482 GETBYTE ();
2483 switch (op[1] & 0x00)
2484 {
2485 case 0x00:
2486 goto op_semantics_23;
2487 break;
2488 }
2489 break;
2490 case 0x38:
2491 GETBYTE ();
2492 switch (op[1] & 0x00)
2493 {
2494 case 0x00:
2495 goto op_semantics_23;
2496 break;
2497 }
2498 break;
2499 case 0x39:
2500 GETBYTE ();
2501 switch (op[1] & 0x00)
2502 {
2503 case 0x00:
2504 goto op_semantics_23;
2505 break;
2506 }
2507 break;
2508 case 0x3a:
2509 GETBYTE ();
2510 switch (op[1] & 0x00)
2511 {
2512 case 0x00:
2513 goto op_semantics_23;
2514 break;
2515 }
2516 break;
2517 case 0x3b:
2518 GETBYTE ();
2519 switch (op[1] & 0x00)
2520 {
2521 case 0x00:
2522 goto op_semantics_23;
2523 break;
2524 }
2525 break;
2526 case 0x3c:
2527 GETBYTE ();
2528 switch (op[1] & 0x00)
2529 {
2530 case 0x00:
2531 goto op_semantics_23;
2532 break;
2533 }
2534 break;
2535 case 0x3d:
2536 GETBYTE ();
2537 switch (op[1] & 0x00)
2538 {
2539 case 0x00:
2540 goto op_semantics_23;
2541 break;
2542 }
2543 break;
2544 case 0x3e:
2545 GETBYTE ();
2546 switch (op[1] & 0x00)
2547 {
2548 case 0x00:
2549 goto op_semantics_23;
2550 break;
2551 }
2552 break;
2553 case 0x3f:
2554 GETBYTE ();
2555 switch (op[1] & 0x00)
2556 {
2557 case 0x00:
2558 goto op_semantics_23;
2559 break;
2560 }
2561 break;
2562 case 0x40:
2563 GETBYTE ();
2564 switch (op[1] & 0x00)
2565 {
2566 case 0x00:
2567 op_semantics_24:
2568 {
2569 /** dopc sreg a b as dreg %D%b %1,%0 */
2570 #line 371 "msp430-decode.opc"
2571 int dopc AU = (op[0] >> 4) & 0x0f;
2572 #line 371 "msp430-decode.opc"
2573 int sreg AU = op[0] & 0x0f;
2574 #line 371 "msp430-decode.opc"
2575 int a AU = (op[1] >> 7) & 0x01;
2576 #line 371 "msp430-decode.opc"
2577 int b AU = (op[1] >> 6) & 0x01;
2578 #line 371 "msp430-decode.opc"
2579 int as AU = (op[1] >> 4) & 0x03;
2580 #line 371 "msp430-decode.opc"
2581 int dreg AU = op[1] & 0x0f;
2582 if (trace)
2583 {
2584 printf ("\033[33m%s\033[0m %02x %02x\n",
2585 "/** dopc sreg a b as dreg %D%b %1,%0 */",
2586 op[0], op[1]);
2587 printf (" dopc = 0x%x,", dopc);
2588 printf (" sreg = 0x%x,", sreg);
2589 printf (" a = 0x%x,", a);
2590 printf (" b = 0x%x,", b);
2591 printf (" as = 0x%x,", as);
2592 printf (" dreg = 0x%x\n", dreg);
2593 }
2594 SYNTAX("%D%b %1,%0");
2595 #line 371 "msp430-decode.opc"
2596
2597 ID (dopc_to_id (dopc)); ASX (sreg, as, srxt_bits); ADX (dreg, a, dsxt_bits); ABW (al_bit, b);
2598 if (a == 0 && as == 0)
2599 REPZC (srxt_bits, dsxt_bits);
2600
2601 switch (msp430->id)
2602 {
2603 case MSO_mov: F_____; break;
2604 case MSO_add: F_VNZC; break;
2605 case MSO_addc: F_VNZC; break;
2606 case MSO_subc: F_VNZC; break;
2607 case MSO_sub: F_VNZC; break;
2608 case MSO_cmp: F_VNZC; break;
2609 case MSO_dadd: F_VNZC; break;
2610 case MSO_bit: F_0NZC; break;
2611 case MSO_bic: F_____; break;
2612 case MSO_bis: F_____; break;
2613 case MSO_xor: F_VNZC; break;
2614 case MSO_and: F_0NZC; break;
2615 default: break;
2616 }
2617
2618 }
2619 break;
2620 }
2621 break;
2622 case 0x41:
2623 GETBYTE ();
2624 switch (op[1] & 0x00)
2625 {
2626 case 0x00:
2627 goto op_semantics_24;
2628 break;
2629 }
2630 break;
2631 case 0x42:
2632 GETBYTE ();
2633 switch (op[1] & 0x00)
2634 {
2635 case 0x00:
2636 goto op_semantics_24;
2637 break;
2638 }
2639 break;
2640 case 0x43:
2641 GETBYTE ();
2642 switch (op[1] & 0x00)
2643 {
2644 case 0x00:
2645 goto op_semantics_24;
2646 break;
2647 }
2648 break;
2649 case 0x44:
2650 GETBYTE ();
2651 switch (op[1] & 0x00)
2652 {
2653 case 0x00:
2654 goto op_semantics_24;
2655 break;
2656 }
2657 break;
2658 case 0x45:
2659 GETBYTE ();
2660 switch (op[1] & 0x00)
2661 {
2662 case 0x00:
2663 goto op_semantics_24;
2664 break;
2665 }
2666 break;
2667 case 0x46:
2668 GETBYTE ();
2669 switch (op[1] & 0x00)
2670 {
2671 case 0x00:
2672 goto op_semantics_24;
2673 break;
2674 }
2675 break;
2676 case 0x47:
2677 GETBYTE ();
2678 switch (op[1] & 0x00)
2679 {
2680 case 0x00:
2681 goto op_semantics_24;
2682 break;
2683 }
2684 break;
2685 case 0x48:
2686 GETBYTE ();
2687 switch (op[1] & 0x00)
2688 {
2689 case 0x00:
2690 goto op_semantics_24;
2691 break;
2692 }
2693 break;
2694 case 0x49:
2695 GETBYTE ();
2696 switch (op[1] & 0x00)
2697 {
2698 case 0x00:
2699 goto op_semantics_24;
2700 break;
2701 }
2702 break;
2703 case 0x4a:
2704 GETBYTE ();
2705 switch (op[1] & 0x00)
2706 {
2707 case 0x00:
2708 goto op_semantics_24;
2709 break;
2710 }
2711 break;
2712 case 0x4b:
2713 GETBYTE ();
2714 switch (op[1] & 0x00)
2715 {
2716 case 0x00:
2717 goto op_semantics_24;
2718 break;
2719 }
2720 break;
2721 case 0x4c:
2722 GETBYTE ();
2723 switch (op[1] & 0x00)
2724 {
2725 case 0x00:
2726 goto op_semantics_24;
2727 break;
2728 }
2729 break;
2730 case 0x4d:
2731 GETBYTE ();
2732 switch (op[1] & 0x00)
2733 {
2734 case 0x00:
2735 goto op_semantics_24;
2736 break;
2737 }
2738 break;
2739 case 0x4e:
2740 GETBYTE ();
2741 switch (op[1] & 0x00)
2742 {
2743 case 0x00:
2744 goto op_semantics_24;
2745 break;
2746 }
2747 break;
2748 case 0x4f:
2749 GETBYTE ();
2750 switch (op[1] & 0x00)
2751 {
2752 case 0x00:
2753 goto op_semantics_24;
2754 break;
2755 }
2756 break;
2757 case 0x50:
2758 GETBYTE ();
2759 switch (op[1] & 0x00)
2760 {
2761 case 0x00:
2762 goto op_semantics_24;
2763 break;
2764 }
2765 break;
2766 case 0x51:
2767 GETBYTE ();
2768 switch (op[1] & 0x00)
2769 {
2770 case 0x00:
2771 goto op_semantics_24;
2772 break;
2773 }
2774 break;
2775 case 0x52:
2776 GETBYTE ();
2777 switch (op[1] & 0x00)
2778 {
2779 case 0x00:
2780 goto op_semantics_24;
2781 break;
2782 }
2783 break;
2784 case 0x53:
2785 GETBYTE ();
2786 switch (op[1] & 0x00)
2787 {
2788 case 0x00:
2789 goto op_semantics_24;
2790 break;
2791 }
2792 break;
2793 case 0x54:
2794 GETBYTE ();
2795 switch (op[1] & 0x00)
2796 {
2797 case 0x00:
2798 goto op_semantics_24;
2799 break;
2800 }
2801 break;
2802 case 0x55:
2803 GETBYTE ();
2804 switch (op[1] & 0x00)
2805 {
2806 case 0x00:
2807 goto op_semantics_24;
2808 break;
2809 }
2810 break;
2811 case 0x56:
2812 GETBYTE ();
2813 switch (op[1] & 0x00)
2814 {
2815 case 0x00:
2816 goto op_semantics_24;
2817 break;
2818 }
2819 break;
2820 case 0x57:
2821 GETBYTE ();
2822 switch (op[1] & 0x00)
2823 {
2824 case 0x00:
2825 goto op_semantics_24;
2826 break;
2827 }
2828 break;
2829 case 0x58:
2830 GETBYTE ();
2831 switch (op[1] & 0x00)
2832 {
2833 case 0x00:
2834 goto op_semantics_24;
2835 break;
2836 }
2837 break;
2838 case 0x59:
2839 GETBYTE ();
2840 switch (op[1] & 0x00)
2841 {
2842 case 0x00:
2843 goto op_semantics_24;
2844 break;
2845 }
2846 break;
2847 case 0x5a:
2848 GETBYTE ();
2849 switch (op[1] & 0x00)
2850 {
2851 case 0x00:
2852 goto op_semantics_24;
2853 break;
2854 }
2855 break;
2856 case 0x5b:
2857 GETBYTE ();
2858 switch (op[1] & 0x00)
2859 {
2860 case 0x00:
2861 goto op_semantics_24;
2862 break;
2863 }
2864 break;
2865 case 0x5c:
2866 GETBYTE ();
2867 switch (op[1] & 0x00)
2868 {
2869 case 0x00:
2870 goto op_semantics_24;
2871 break;
2872 }
2873 break;
2874 case 0x5d:
2875 GETBYTE ();
2876 switch (op[1] & 0x00)
2877 {
2878 case 0x00:
2879 goto op_semantics_24;
2880 break;
2881 }
2882 break;
2883 case 0x5e:
2884 GETBYTE ();
2885 switch (op[1] & 0x00)
2886 {
2887 case 0x00:
2888 goto op_semantics_24;
2889 break;
2890 }
2891 break;
2892 case 0x5f:
2893 GETBYTE ();
2894 switch (op[1] & 0x00)
2895 {
2896 case 0x00:
2897 goto op_semantics_24;
2898 break;
2899 }
2900 break;
2901 case 0x60:
2902 GETBYTE ();
2903 switch (op[1] & 0x00)
2904 {
2905 case 0x00:
2906 goto op_semantics_24;
2907 break;
2908 }
2909 break;
2910 case 0x61:
2911 GETBYTE ();
2912 switch (op[1] & 0x00)
2913 {
2914 case 0x00:
2915 goto op_semantics_24;
2916 break;
2917 }
2918 break;
2919 case 0x62:
2920 GETBYTE ();
2921 switch (op[1] & 0x00)
2922 {
2923 case 0x00:
2924 goto op_semantics_24;
2925 break;
2926 }
2927 break;
2928 case 0x63:
2929 GETBYTE ();
2930 switch (op[1] & 0x00)
2931 {
2932 case 0x00:
2933 goto op_semantics_24;
2934 break;
2935 }
2936 break;
2937 case 0x64:
2938 GETBYTE ();
2939 switch (op[1] & 0x00)
2940 {
2941 case 0x00:
2942 goto op_semantics_24;
2943 break;
2944 }
2945 break;
2946 case 0x65:
2947 GETBYTE ();
2948 switch (op[1] & 0x00)
2949 {
2950 case 0x00:
2951 goto op_semantics_24;
2952 break;
2953 }
2954 break;
2955 case 0x66:
2956 GETBYTE ();
2957 switch (op[1] & 0x00)
2958 {
2959 case 0x00:
2960 goto op_semantics_24;
2961 break;
2962 }
2963 break;
2964 case 0x67:
2965 GETBYTE ();
2966 switch (op[1] & 0x00)
2967 {
2968 case 0x00:
2969 goto op_semantics_24;
2970 break;
2971 }
2972 break;
2973 case 0x68:
2974 GETBYTE ();
2975 switch (op[1] & 0x00)
2976 {
2977 case 0x00:
2978 goto op_semantics_24;
2979 break;
2980 }
2981 break;
2982 case 0x69:
2983 GETBYTE ();
2984 switch (op[1] & 0x00)
2985 {
2986 case 0x00:
2987 goto op_semantics_24;
2988 break;
2989 }
2990 break;
2991 case 0x6a:
2992 GETBYTE ();
2993 switch (op[1] & 0x00)
2994 {
2995 case 0x00:
2996 goto op_semantics_24;
2997 break;
2998 }
2999 break;
3000 case 0x6b:
3001 GETBYTE ();
3002 switch (op[1] & 0x00)
3003 {
3004 case 0x00:
3005 goto op_semantics_24;
3006 break;
3007 }
3008 break;
3009 case 0x6c:
3010 GETBYTE ();
3011 switch (op[1] & 0x00)
3012 {
3013 case 0x00:
3014 goto op_semantics_24;
3015 break;
3016 }
3017 break;
3018 case 0x6d:
3019 GETBYTE ();
3020 switch (op[1] & 0x00)
3021 {
3022 case 0x00:
3023 goto op_semantics_24;
3024 break;
3025 }
3026 break;
3027 case 0x6e:
3028 GETBYTE ();
3029 switch (op[1] & 0x00)
3030 {
3031 case 0x00:
3032 goto op_semantics_24;
3033 break;
3034 }
3035 break;
3036 case 0x6f:
3037 GETBYTE ();
3038 switch (op[1] & 0x00)
3039 {
3040 case 0x00:
3041 goto op_semantics_24;
3042 break;
3043 }
3044 break;
3045 case 0x70:
3046 GETBYTE ();
3047 switch (op[1] & 0x00)
3048 {
3049 case 0x00:
3050 goto op_semantics_24;
3051 break;
3052 }
3053 break;
3054 case 0x71:
3055 GETBYTE ();
3056 switch (op[1] & 0x00)
3057 {
3058 case 0x00:
3059 goto op_semantics_24;
3060 break;
3061 }
3062 break;
3063 case 0x72:
3064 GETBYTE ();
3065 switch (op[1] & 0x00)
3066 {
3067 case 0x00:
3068 goto op_semantics_24;
3069 break;
3070 }
3071 break;
3072 case 0x73:
3073 GETBYTE ();
3074 switch (op[1] & 0x00)
3075 {
3076 case 0x00:
3077 goto op_semantics_24;
3078 break;
3079 }
3080 break;
3081 case 0x74:
3082 GETBYTE ();
3083 switch (op[1] & 0x00)
3084 {
3085 case 0x00:
3086 goto op_semantics_24;
3087 break;
3088 }
3089 break;
3090 case 0x75:
3091 GETBYTE ();
3092 switch (op[1] & 0x00)
3093 {
3094 case 0x00:
3095 goto op_semantics_24;
3096 break;
3097 }
3098 break;
3099 case 0x76:
3100 GETBYTE ();
3101 switch (op[1] & 0x00)
3102 {
3103 case 0x00:
3104 goto op_semantics_24;
3105 break;
3106 }
3107 break;
3108 case 0x77:
3109 GETBYTE ();
3110 switch (op[1] & 0x00)
3111 {
3112 case 0x00:
3113 goto op_semantics_24;
3114 break;
3115 }
3116 break;
3117 case 0x78:
3118 GETBYTE ();
3119 switch (op[1] & 0x00)
3120 {
3121 case 0x00:
3122 goto op_semantics_24;
3123 break;
3124 }
3125 break;
3126 case 0x79:
3127 GETBYTE ();
3128 switch (op[1] & 0x00)
3129 {
3130 case 0x00:
3131 goto op_semantics_24;
3132 break;
3133 }
3134 break;
3135 case 0x7a:
3136 GETBYTE ();
3137 switch (op[1] & 0x00)
3138 {
3139 case 0x00:
3140 goto op_semantics_24;
3141 break;
3142 }
3143 break;
3144 case 0x7b:
3145 GETBYTE ();
3146 switch (op[1] & 0x00)
3147 {
3148 case 0x00:
3149 goto op_semantics_24;
3150 break;
3151 }
3152 break;
3153 case 0x7c:
3154 GETBYTE ();
3155 switch (op[1] & 0x00)
3156 {
3157 case 0x00:
3158 goto op_semantics_24;
3159 break;
3160 }
3161 break;
3162 case 0x7d:
3163 GETBYTE ();
3164 switch (op[1] & 0x00)
3165 {
3166 case 0x00:
3167 goto op_semantics_24;
3168 break;
3169 }
3170 break;
3171 case 0x7e:
3172 GETBYTE ();
3173 switch (op[1] & 0x00)
3174 {
3175 case 0x00:
3176 goto op_semantics_24;
3177 break;
3178 }
3179 break;
3180 case 0x7f:
3181 GETBYTE ();
3182 switch (op[1] & 0x00)
3183 {
3184 case 0x00:
3185 goto op_semantics_24;
3186 break;
3187 }
3188 break;
3189 case 0x80:
3190 GETBYTE ();
3191 switch (op[1] & 0x00)
3192 {
3193 case 0x00:
3194 goto op_semantics_24;
3195 break;
3196 }
3197 break;
3198 case 0x81:
3199 GETBYTE ();
3200 switch (op[1] & 0x00)
3201 {
3202 case 0x00:
3203 goto op_semantics_24;
3204 break;
3205 }
3206 break;
3207 case 0x82:
3208 GETBYTE ();
3209 switch (op[1] & 0x00)
3210 {
3211 case 0x00:
3212 goto op_semantics_24;
3213 break;
3214 }
3215 break;
3216 case 0x83:
3217 GETBYTE ();
3218 switch (op[1] & 0x00)
3219 {
3220 case 0x00:
3221 goto op_semantics_24;
3222 break;
3223 }
3224 break;
3225 case 0x84:
3226 GETBYTE ();
3227 switch (op[1] & 0x00)
3228 {
3229 case 0x00:
3230 goto op_semantics_24;
3231 break;
3232 }
3233 break;
3234 case 0x85:
3235 GETBYTE ();
3236 switch (op[1] & 0x00)
3237 {
3238 case 0x00:
3239 goto op_semantics_24;
3240 break;
3241 }
3242 break;
3243 case 0x86:
3244 GETBYTE ();
3245 switch (op[1] & 0x00)
3246 {
3247 case 0x00:
3248 goto op_semantics_24;
3249 break;
3250 }
3251 break;
3252 case 0x87:
3253 GETBYTE ();
3254 switch (op[1] & 0x00)
3255 {
3256 case 0x00:
3257 goto op_semantics_24;
3258 break;
3259 }
3260 break;
3261 case 0x88:
3262 GETBYTE ();
3263 switch (op[1] & 0x00)
3264 {
3265 case 0x00:
3266 goto op_semantics_24;
3267 break;
3268 }
3269 break;
3270 case 0x89:
3271 GETBYTE ();
3272 switch (op[1] & 0x00)
3273 {
3274 case 0x00:
3275 goto op_semantics_24;
3276 break;
3277 }
3278 break;
3279 case 0x8a:
3280 GETBYTE ();
3281 switch (op[1] & 0x00)
3282 {
3283 case 0x00:
3284 goto op_semantics_24;
3285 break;
3286 }
3287 break;
3288 case 0x8b:
3289 GETBYTE ();
3290 switch (op[1] & 0x00)
3291 {
3292 case 0x00:
3293 goto op_semantics_24;
3294 break;
3295 }
3296 break;
3297 case 0x8c:
3298 GETBYTE ();
3299 switch (op[1] & 0x00)
3300 {
3301 case 0x00:
3302 goto op_semantics_24;
3303 break;
3304 }
3305 break;
3306 case 0x8d:
3307 GETBYTE ();
3308 switch (op[1] & 0x00)
3309 {
3310 case 0x00:
3311 goto op_semantics_24;
3312 break;
3313 }
3314 break;
3315 case 0x8e:
3316 GETBYTE ();
3317 switch (op[1] & 0x00)
3318 {
3319 case 0x00:
3320 goto op_semantics_24;
3321 break;
3322 }
3323 break;
3324 case 0x8f:
3325 GETBYTE ();
3326 switch (op[1] & 0x00)
3327 {
3328 case 0x00:
3329 goto op_semantics_24;
3330 break;
3331 }
3332 break;
3333 case 0x90:
3334 GETBYTE ();
3335 switch (op[1] & 0x00)
3336 {
3337 case 0x00:
3338 goto op_semantics_24;
3339 break;
3340 }
3341 break;
3342 case 0x91:
3343 GETBYTE ();
3344 switch (op[1] & 0x00)
3345 {
3346 case 0x00:
3347 goto op_semantics_24;
3348 break;
3349 }
3350 break;
3351 case 0x92:
3352 GETBYTE ();
3353 switch (op[1] & 0x00)
3354 {
3355 case 0x00:
3356 goto op_semantics_24;
3357 break;
3358 }
3359 break;
3360 case 0x93:
3361 GETBYTE ();
3362 switch (op[1] & 0x00)
3363 {
3364 case 0x00:
3365 goto op_semantics_24;
3366 break;
3367 }
3368 break;
3369 case 0x94:
3370 GETBYTE ();
3371 switch (op[1] & 0x00)
3372 {
3373 case 0x00:
3374 goto op_semantics_24;
3375 break;
3376 }
3377 break;
3378 case 0x95:
3379 GETBYTE ();
3380 switch (op[1] & 0x00)
3381 {
3382 case 0x00:
3383 goto op_semantics_24;
3384 break;
3385 }
3386 break;
3387 case 0x96:
3388 GETBYTE ();
3389 switch (op[1] & 0x00)
3390 {
3391 case 0x00:
3392 goto op_semantics_24;
3393 break;
3394 }
3395 break;
3396 case 0x97:
3397 GETBYTE ();
3398 switch (op[1] & 0x00)
3399 {
3400 case 0x00:
3401 goto op_semantics_24;
3402 break;
3403 }
3404 break;
3405 case 0x98:
3406 GETBYTE ();
3407 switch (op[1] & 0x00)
3408 {
3409 case 0x00:
3410 goto op_semantics_24;
3411 break;
3412 }
3413 break;
3414 case 0x99:
3415 GETBYTE ();
3416 switch (op[1] & 0x00)
3417 {
3418 case 0x00:
3419 goto op_semantics_24;
3420 break;
3421 }
3422 break;
3423 case 0x9a:
3424 GETBYTE ();
3425 switch (op[1] & 0x00)
3426 {
3427 case 0x00:
3428 goto op_semantics_24;
3429 break;
3430 }
3431 break;
3432 case 0x9b:
3433 GETBYTE ();
3434 switch (op[1] & 0x00)
3435 {
3436 case 0x00:
3437 goto op_semantics_24;
3438 break;
3439 }
3440 break;
3441 case 0x9c:
3442 GETBYTE ();
3443 switch (op[1] & 0x00)
3444 {
3445 case 0x00:
3446 goto op_semantics_24;
3447 break;
3448 }
3449 break;
3450 case 0x9d:
3451 GETBYTE ();
3452 switch (op[1] & 0x00)
3453 {
3454 case 0x00:
3455 goto op_semantics_24;
3456 break;
3457 }
3458 break;
3459 case 0x9e:
3460 GETBYTE ();
3461 switch (op[1] & 0x00)
3462 {
3463 case 0x00:
3464 goto op_semantics_24;
3465 break;
3466 }
3467 break;
3468 case 0x9f:
3469 GETBYTE ();
3470 switch (op[1] & 0x00)
3471 {
3472 case 0x00:
3473 goto op_semantics_24;
3474 break;
3475 }
3476 break;
3477 case 0xa0:
3478 GETBYTE ();
3479 switch (op[1] & 0x00)
3480 {
3481 case 0x00:
3482 goto op_semantics_24;
3483 break;
3484 }
3485 break;
3486 case 0xa1:
3487 GETBYTE ();
3488 switch (op[1] & 0x00)
3489 {
3490 case 0x00:
3491 goto op_semantics_24;
3492 break;
3493 }
3494 break;
3495 case 0xa2:
3496 GETBYTE ();
3497 switch (op[1] & 0x00)
3498 {
3499 case 0x00:
3500 goto op_semantics_24;
3501 break;
3502 }
3503 break;
3504 case 0xa3:
3505 GETBYTE ();
3506 switch (op[1] & 0x00)
3507 {
3508 case 0x00:
3509 goto op_semantics_24;
3510 break;
3511 }
3512 break;
3513 case 0xa4:
3514 GETBYTE ();
3515 switch (op[1] & 0x00)
3516 {
3517 case 0x00:
3518 goto op_semantics_24;
3519 break;
3520 }
3521 break;
3522 case 0xa5:
3523 GETBYTE ();
3524 switch (op[1] & 0x00)
3525 {
3526 case 0x00:
3527 goto op_semantics_24;
3528 break;
3529 }
3530 break;
3531 case 0xa6:
3532 GETBYTE ();
3533 switch (op[1] & 0x00)
3534 {
3535 case 0x00:
3536 goto op_semantics_24;
3537 break;
3538 }
3539 break;
3540 case 0xa7:
3541 GETBYTE ();
3542 switch (op[1] & 0x00)
3543 {
3544 case 0x00:
3545 goto op_semantics_24;
3546 break;
3547 }
3548 break;
3549 case 0xa8:
3550 GETBYTE ();
3551 switch (op[1] & 0x00)
3552 {
3553 case 0x00:
3554 goto op_semantics_24;
3555 break;
3556 }
3557 break;
3558 case 0xa9:
3559 GETBYTE ();
3560 switch (op[1] & 0x00)
3561 {
3562 case 0x00:
3563 goto op_semantics_24;
3564 break;
3565 }
3566 break;
3567 case 0xaa:
3568 GETBYTE ();
3569 switch (op[1] & 0x00)
3570 {
3571 case 0x00:
3572 goto op_semantics_24;
3573 break;
3574 }
3575 break;
3576 case 0xab:
3577 GETBYTE ();
3578 switch (op[1] & 0x00)
3579 {
3580 case 0x00:
3581 goto op_semantics_24;
3582 break;
3583 }
3584 break;
3585 case 0xac:
3586 GETBYTE ();
3587 switch (op[1] & 0x00)
3588 {
3589 case 0x00:
3590 goto op_semantics_24;
3591 break;
3592 }
3593 break;
3594 case 0xad:
3595 GETBYTE ();
3596 switch (op[1] & 0x00)
3597 {
3598 case 0x00:
3599 goto op_semantics_24;
3600 break;
3601 }
3602 break;
3603 case 0xae:
3604 GETBYTE ();
3605 switch (op[1] & 0x00)
3606 {
3607 case 0x00:
3608 goto op_semantics_24;
3609 break;
3610 }
3611 break;
3612 case 0xaf:
3613 GETBYTE ();
3614 switch (op[1] & 0x00)
3615 {
3616 case 0x00:
3617 goto op_semantics_24;
3618 break;
3619 }
3620 break;
3621 case 0xb0:
3622 GETBYTE ();
3623 switch (op[1] & 0x00)
3624 {
3625 case 0x00:
3626 goto op_semantics_24;
3627 break;
3628 }
3629 break;
3630 case 0xb1:
3631 GETBYTE ();
3632 switch (op[1] & 0x00)
3633 {
3634 case 0x00:
3635 goto op_semantics_24;
3636 break;
3637 }
3638 break;
3639 case 0xb2:
3640 GETBYTE ();
3641 switch (op[1] & 0x00)
3642 {
3643 case 0x00:
3644 goto op_semantics_24;
3645 break;
3646 }
3647 break;
3648 case 0xb3:
3649 GETBYTE ();
3650 switch (op[1] & 0x00)
3651 {
3652 case 0x00:
3653 goto op_semantics_24;
3654 break;
3655 }
3656 break;
3657 case 0xb4:
3658 GETBYTE ();
3659 switch (op[1] & 0x00)
3660 {
3661 case 0x00:
3662 goto op_semantics_24;
3663 break;
3664 }
3665 break;
3666 case 0xb5:
3667 GETBYTE ();
3668 switch (op[1] & 0x00)
3669 {
3670 case 0x00:
3671 goto op_semantics_24;
3672 break;
3673 }
3674 break;
3675 case 0xb6:
3676 GETBYTE ();
3677 switch (op[1] & 0x00)
3678 {
3679 case 0x00:
3680 goto op_semantics_24;
3681 break;
3682 }
3683 break;
3684 case 0xb7:
3685 GETBYTE ();
3686 switch (op[1] & 0x00)
3687 {
3688 case 0x00:
3689 goto op_semantics_24;
3690 break;
3691 }
3692 break;
3693 case 0xb8:
3694 GETBYTE ();
3695 switch (op[1] & 0x00)
3696 {
3697 case 0x00:
3698 goto op_semantics_24;
3699 break;
3700 }
3701 break;
3702 case 0xb9:
3703 GETBYTE ();
3704 switch (op[1] & 0x00)
3705 {
3706 case 0x00:
3707 goto op_semantics_24;
3708 break;
3709 }
3710 break;
3711 case 0xba:
3712 GETBYTE ();
3713 switch (op[1] & 0x00)
3714 {
3715 case 0x00:
3716 goto op_semantics_24;
3717 break;
3718 }
3719 break;
3720 case 0xbb:
3721 GETBYTE ();
3722 switch (op[1] & 0x00)
3723 {
3724 case 0x00:
3725 goto op_semantics_24;
3726 break;
3727 }
3728 break;
3729 case 0xbc:
3730 GETBYTE ();
3731 switch (op[1] & 0x00)
3732 {
3733 case 0x00:
3734 goto op_semantics_24;
3735 break;
3736 }
3737 break;
3738 case 0xbd:
3739 GETBYTE ();
3740 switch (op[1] & 0x00)
3741 {
3742 case 0x00:
3743 goto op_semantics_24;
3744 break;
3745 }
3746 break;
3747 case 0xbe:
3748 GETBYTE ();
3749 switch (op[1] & 0x00)
3750 {
3751 case 0x00:
3752 goto op_semantics_24;
3753 break;
3754 }
3755 break;
3756 case 0xbf:
3757 GETBYTE ();
3758 switch (op[1] & 0x00)
3759 {
3760 case 0x00:
3761 goto op_semantics_24;
3762 break;
3763 }
3764 break;
3765 case 0xc0:
3766 GETBYTE ();
3767 switch (op[1] & 0x00)
3768 {
3769 case 0x00:
3770 goto op_semantics_24;
3771 break;
3772 }
3773 break;
3774 case 0xc1:
3775 GETBYTE ();
3776 switch (op[1] & 0x00)
3777 {
3778 case 0x00:
3779 goto op_semantics_24;
3780 break;
3781 }
3782 break;
3783 case 0xc2:
3784 GETBYTE ();
3785 switch (op[1] & 0x00)
3786 {
3787 case 0x00:
3788 goto op_semantics_24;
3789 break;
3790 }
3791 break;
3792 case 0xc3:
3793 GETBYTE ();
3794 switch (op[1] & 0x00)
3795 {
3796 case 0x00:
3797 goto op_semantics_24;
3798 break;
3799 }
3800 break;
3801 case 0xc4:
3802 GETBYTE ();
3803 switch (op[1] & 0x00)
3804 {
3805 case 0x00:
3806 goto op_semantics_24;
3807 break;
3808 }
3809 break;
3810 case 0xc5:
3811 GETBYTE ();
3812 switch (op[1] & 0x00)
3813 {
3814 case 0x00:
3815 goto op_semantics_24;
3816 break;
3817 }
3818 break;
3819 case 0xc6:
3820 GETBYTE ();
3821 switch (op[1] & 0x00)
3822 {
3823 case 0x00:
3824 goto op_semantics_24;
3825 break;
3826 }
3827 break;
3828 case 0xc7:
3829 GETBYTE ();
3830 switch (op[1] & 0x00)
3831 {
3832 case 0x00:
3833 goto op_semantics_24;
3834 break;
3835 }
3836 break;
3837 case 0xc8:
3838 GETBYTE ();
3839 switch (op[1] & 0x00)
3840 {
3841 case 0x00:
3842 goto op_semantics_24;
3843 break;
3844 }
3845 break;
3846 case 0xc9:
3847 GETBYTE ();
3848 switch (op[1] & 0x00)
3849 {
3850 case 0x00:
3851 goto op_semantics_24;
3852 break;
3853 }
3854 break;
3855 case 0xca:
3856 GETBYTE ();
3857 switch (op[1] & 0x00)
3858 {
3859 case 0x00:
3860 goto op_semantics_24;
3861 break;
3862 }
3863 break;
3864 case 0xcb:
3865 GETBYTE ();
3866 switch (op[1] & 0x00)
3867 {
3868 case 0x00:
3869 goto op_semantics_24;
3870 break;
3871 }
3872 break;
3873 case 0xcc:
3874 GETBYTE ();
3875 switch (op[1] & 0x00)
3876 {
3877 case 0x00:
3878 goto op_semantics_24;
3879 break;
3880 }
3881 break;
3882 case 0xcd:
3883 GETBYTE ();
3884 switch (op[1] & 0x00)
3885 {
3886 case 0x00:
3887 goto op_semantics_24;
3888 break;
3889 }
3890 break;
3891 case 0xce:
3892 GETBYTE ();
3893 switch (op[1] & 0x00)
3894 {
3895 case 0x00:
3896 goto op_semantics_24;
3897 break;
3898 }
3899 break;
3900 case 0xcf:
3901 GETBYTE ();
3902 switch (op[1] & 0x00)
3903 {
3904 case 0x00:
3905 goto op_semantics_24;
3906 break;
3907 }
3908 break;
3909 case 0xd0:
3910 GETBYTE ();
3911 switch (op[1] & 0x00)
3912 {
3913 case 0x00:
3914 goto op_semantics_24;
3915 break;
3916 }
3917 break;
3918 case 0xd1:
3919 GETBYTE ();
3920 switch (op[1] & 0x00)
3921 {
3922 case 0x00:
3923 goto op_semantics_24;
3924 break;
3925 }
3926 break;
3927 case 0xd2:
3928 GETBYTE ();
3929 switch (op[1] & 0x00)
3930 {
3931 case 0x00:
3932 goto op_semantics_24;
3933 break;
3934 }
3935 break;
3936 case 0xd3:
3937 GETBYTE ();
3938 switch (op[1] & 0x00)
3939 {
3940 case 0x00:
3941 goto op_semantics_24;
3942 break;
3943 }
3944 break;
3945 case 0xd4:
3946 GETBYTE ();
3947 switch (op[1] & 0x00)
3948 {
3949 case 0x00:
3950 goto op_semantics_24;
3951 break;
3952 }
3953 break;
3954 case 0xd5:
3955 GETBYTE ();
3956 switch (op[1] & 0x00)
3957 {
3958 case 0x00:
3959 goto op_semantics_24;
3960 break;
3961 }
3962 break;
3963 case 0xd6:
3964 GETBYTE ();
3965 switch (op[1] & 0x00)
3966 {
3967 case 0x00:
3968 goto op_semantics_24;
3969 break;
3970 }
3971 break;
3972 case 0xd7:
3973 GETBYTE ();
3974 switch (op[1] & 0x00)
3975 {
3976 case 0x00:
3977 goto op_semantics_24;
3978 break;
3979 }
3980 break;
3981 case 0xd8:
3982 GETBYTE ();
3983 switch (op[1] & 0x00)
3984 {
3985 case 0x00:
3986 goto op_semantics_24;
3987 break;
3988 }
3989 break;
3990 case 0xd9:
3991 GETBYTE ();
3992 switch (op[1] & 0x00)
3993 {
3994 case 0x00:
3995 goto op_semantics_24;
3996 break;
3997 }
3998 break;
3999 case 0xda:
4000 GETBYTE ();
4001 switch (op[1] & 0x00)
4002 {
4003 case 0x00:
4004 goto op_semantics_24;
4005 break;
4006 }
4007 break;
4008 case 0xdb:
4009 GETBYTE ();
4010 switch (op[1] & 0x00)
4011 {
4012 case 0x00:
4013 goto op_semantics_24;
4014 break;
4015 }
4016 break;
4017 case 0xdc:
4018 GETBYTE ();
4019 switch (op[1] & 0x00)
4020 {
4021 case 0x00:
4022 goto op_semantics_24;
4023 break;
4024 }
4025 break;
4026 case 0xdd:
4027 GETBYTE ();
4028 switch (op[1] & 0x00)
4029 {
4030 case 0x00:
4031 goto op_semantics_24;
4032 break;
4033 }
4034 break;
4035 case 0xde:
4036 GETBYTE ();
4037 switch (op[1] & 0x00)
4038 {
4039 case 0x00:
4040 goto op_semantics_24;
4041 break;
4042 }
4043 break;
4044 case 0xdf:
4045 GETBYTE ();
4046 switch (op[1] & 0x00)
4047 {
4048 case 0x00:
4049 goto op_semantics_24;
4050 break;
4051 }
4052 break;
4053 case 0xe0:
4054 GETBYTE ();
4055 switch (op[1] & 0x00)
4056 {
4057 case 0x00:
4058 goto op_semantics_24;
4059 break;
4060 }
4061 break;
4062 case 0xe1:
4063 GETBYTE ();
4064 switch (op[1] & 0x00)
4065 {
4066 case 0x00:
4067 goto op_semantics_24;
4068 break;
4069 }
4070 break;
4071 case 0xe2:
4072 GETBYTE ();
4073 switch (op[1] & 0x00)
4074 {
4075 case 0x00:
4076 goto op_semantics_24;
4077 break;
4078 }
4079 break;
4080 case 0xe3:
4081 GETBYTE ();
4082 switch (op[1] & 0x00)
4083 {
4084 case 0x00:
4085 goto op_semantics_24;
4086 break;
4087 }
4088 break;
4089 case 0xe4:
4090 GETBYTE ();
4091 switch (op[1] & 0x00)
4092 {
4093 case 0x00:
4094 goto op_semantics_24;
4095 break;
4096 }
4097 break;
4098 case 0xe5:
4099 GETBYTE ();
4100 switch (op[1] & 0x00)
4101 {
4102 case 0x00:
4103 goto op_semantics_24;
4104 break;
4105 }
4106 break;
4107 case 0xe6:
4108 GETBYTE ();
4109 switch (op[1] & 0x00)
4110 {
4111 case 0x00:
4112 goto op_semantics_24;
4113 break;
4114 }
4115 break;
4116 case 0xe7:
4117 GETBYTE ();
4118 switch (op[1] & 0x00)
4119 {
4120 case 0x00:
4121 goto op_semantics_24;
4122 break;
4123 }
4124 break;
4125 case 0xe8:
4126 GETBYTE ();
4127 switch (op[1] & 0x00)
4128 {
4129 case 0x00:
4130 goto op_semantics_24;
4131 break;
4132 }
4133 break;
4134 case 0xe9:
4135 GETBYTE ();
4136 switch (op[1] & 0x00)
4137 {
4138 case 0x00:
4139 goto op_semantics_24;
4140 break;
4141 }
4142 break;
4143 case 0xea:
4144 GETBYTE ();
4145 switch (op[1] & 0x00)
4146 {
4147 case 0x00:
4148 goto op_semantics_24;
4149 break;
4150 }
4151 break;
4152 case 0xeb:
4153 GETBYTE ();
4154 switch (op[1] & 0x00)
4155 {
4156 case 0x00:
4157 goto op_semantics_24;
4158 break;
4159 }
4160 break;
4161 case 0xec:
4162 GETBYTE ();
4163 switch (op[1] & 0x00)
4164 {
4165 case 0x00:
4166 goto op_semantics_24;
4167 break;
4168 }
4169 break;
4170 case 0xed:
4171 GETBYTE ();
4172 switch (op[1] & 0x00)
4173 {
4174 case 0x00:
4175 goto op_semantics_24;
4176 break;
4177 }
4178 break;
4179 case 0xee:
4180 GETBYTE ();
4181 switch (op[1] & 0x00)
4182 {
4183 case 0x00:
4184 goto op_semantics_24;
4185 break;
4186 }
4187 break;
4188 case 0xef:
4189 GETBYTE ();
4190 switch (op[1] & 0x00)
4191 {
4192 case 0x00:
4193 goto op_semantics_24;
4194 break;
4195 }
4196 break;
4197 case 0xf0:
4198 GETBYTE ();
4199 switch (op[1] & 0x00)
4200 {
4201 case 0x00:
4202 goto op_semantics_24;
4203 break;
4204 }
4205 break;
4206 case 0xf1:
4207 GETBYTE ();
4208 switch (op[1] & 0x00)
4209 {
4210 case 0x00:
4211 goto op_semantics_24;
4212 break;
4213 }
4214 break;
4215 case 0xf2:
4216 GETBYTE ();
4217 switch (op[1] & 0x00)
4218 {
4219 case 0x00:
4220 goto op_semantics_24;
4221 break;
4222 }
4223 break;
4224 case 0xf3:
4225 GETBYTE ();
4226 switch (op[1] & 0x00)
4227 {
4228 case 0x00:
4229 goto op_semantics_24;
4230 break;
4231 }
4232 break;
4233 case 0xf4:
4234 GETBYTE ();
4235 switch (op[1] & 0x00)
4236 {
4237 case 0x00:
4238 goto op_semantics_24;
4239 break;
4240 }
4241 break;
4242 case 0xf5:
4243 GETBYTE ();
4244 switch (op[1] & 0x00)
4245 {
4246 case 0x00:
4247 goto op_semantics_24;
4248 break;
4249 }
4250 break;
4251 case 0xf6:
4252 GETBYTE ();
4253 switch (op[1] & 0x00)
4254 {
4255 case 0x00:
4256 goto op_semantics_24;
4257 break;
4258 }
4259 break;
4260 case 0xf7:
4261 GETBYTE ();
4262 switch (op[1] & 0x00)
4263 {
4264 case 0x00:
4265 goto op_semantics_24;
4266 break;
4267 }
4268 break;
4269 case 0xf8:
4270 GETBYTE ();
4271 switch (op[1] & 0x00)
4272 {
4273 case 0x00:
4274 goto op_semantics_24;
4275 break;
4276 }
4277 break;
4278 case 0xf9:
4279 GETBYTE ();
4280 switch (op[1] & 0x00)
4281 {
4282 case 0x00:
4283 goto op_semantics_24;
4284 break;
4285 }
4286 break;
4287 case 0xfa:
4288 GETBYTE ();
4289 switch (op[1] & 0x00)
4290 {
4291 case 0x00:
4292 goto op_semantics_24;
4293 break;
4294 }
4295 break;
4296 case 0xfb:
4297 GETBYTE ();
4298 switch (op[1] & 0x00)
4299 {
4300 case 0x00:
4301 goto op_semantics_24;
4302 break;
4303 }
4304 break;
4305 case 0xfc:
4306 GETBYTE ();
4307 switch (op[1] & 0x00)
4308 {
4309 case 0x00:
4310 goto op_semantics_24;
4311 break;
4312 }
4313 break;
4314 case 0xfd:
4315 GETBYTE ();
4316 switch (op[1] & 0x00)
4317 {
4318 case 0x00:
4319 goto op_semantics_24;
4320 break;
4321 }
4322 break;
4323 case 0xfe:
4324 GETBYTE ();
4325 switch (op[1] & 0x00)
4326 {
4327 case 0x00:
4328 goto op_semantics_24;
4329 break;
4330 }
4331 break;
4332 case 0xff:
4333 GETBYTE ();
4334 switch (op[1] & 0x00)
4335 {
4336 case 0x00:
4337 goto op_semantics_24;
4338 break;
4339 }
4340 break;
4341 }
4342 #line 588 "msp430-decode.opc"
4343
4344 return msp430->n_bytes;
4345 }
4346