Make varobj::children an std::vector
[deliverable/binutils-gdb.git] / opcodes / rl78-decode.c
CommitLineData
99c513f6
DD
1#line 1 "rl78-decode.opc"
2/* -*- c -*- */
2571583a 3/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
5bf135a7
NC
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
df7b86aa 24#include "sysdep.h"
99c513f6
DD
25#include <stdio.h>
26#include <stdlib.h>
27#include <string.h>
99c513f6
DD
28#include "ansidecl.h"
29#include "opcode/rl78.h"
30
31static int trace = 0;
32
33typedef struct
34{
35 RL78_Opcode_Decoded * rl78;
36 int (* getbyte)(void *);
37 void * ptr;
38 unsigned char * op;
39} LocalData;
40
41#define ID(x) rl78->id = RLO_##x, rl78->lineno = __LINE__
42#define OP(n,t,r,a) (rl78->op[n].type = t, \
43 rl78->op[n].reg = r, \
44 rl78->op[n].addend = a )
45#define OPX(n,t,r1,r2,a) \
46 (rl78->op[n].type = t, \
47 rl78->op[n].reg = r1, \
48 rl78->op[n].reg2 = r2, \
49 rl78->op[n].addend = a )
50
51#define W() rl78->size = RL78_Word
52
53#define AU ATTRIBUTE_UNUSED
63323b5b
NC
54
55#define OP_BUF_LEN 20
56#define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0)
99c513f6
DD
57#define B ((unsigned long) GETBYTE())
58
59#define SYNTAX(x) rl78->syntax = x
60
61#define UNSUPPORTED() \
62 rl78->syntax = "*unknown*"
63
64#define RB(x) ((x)+RL78_Reg_X)
65#define RW(x) ((x)+RL78_Reg_AX)
66
67#define Fz rl78->flags = RL78_PSW_Z
68#define Fza rl78->flags = RL78_PSW_Z | RL78_PSW_AC
69#define Fzc rl78->flags = RL78_PSW_Z | RL78_PSW_CY
70#define Fzac rl78->flags = RL78_PSW_Z | RL78_PSW_AC | RL78_PSW_CY
71#define Fa rl78->flags = RL78_PSW_AC
72#define Fc rl78->flags = RL78_PSW_CY
73#define Fac rl78->flags = RL78_PSW_AC | RL78_PSW_CY
74
75#define IMMU(bytes) immediate (bytes, 0, ld)
76#define IMMS(bytes) immediate (bytes, 1, ld)
77
78static int
79immediate (int bytes, int sign_extend, LocalData * ld)
80{
81 unsigned long i = 0;
82
83 switch (bytes)
84 {
85 case 1:
86 i |= B;
87 if (sign_extend && (i & 0x80))
88 i -= 0x100;
89 break;
90 case 2:
91 i |= B;
92 i |= B << 8;
93 if (sign_extend && (i & 0x8000))
94 i -= 0x10000;
95 break;
96 case 3:
97 i |= B;
98 i |= B << 8;
99 i |= B << 16;
100 if (sign_extend && (i & 0x800000))
101 i -= 0x1000000;
102 break;
103 default:
104 fprintf (stderr, "Programmer error: immediate() called with invalid byte count %d\n", bytes);
105 abort();
106 }
107 return i;
108}
109
110#define DC(c) OP (0, RL78_Operand_Immediate, 0, c)
111#define DR(r) OP (0, RL78_Operand_Register, RL78_Reg_##r, 0)
112#define DRB(r) OP (0, RL78_Operand_Register, RB(r), 0)
113#define DRW(r) OP (0, RL78_Operand_Register, RW(r), 0)
114#define DM(r,a) OP (0, RL78_Operand_Indirect, RL78_Reg_##r, a)
115#define DM2(r1,r2,a) OPX (0, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
116#define DE() rl78->op[0].use_es = 1
117#define DB(b) set_bit (rl78->op, b)
118#define DCY() DR(PSW); DB(0)
119#define DPUSH() OP (0, RL78_Operand_PreDec, RL78_Reg_SP, 0);
120
121#define SC(c) OP (1, RL78_Operand_Immediate, 0, c)
122#define SR(r) OP (1, RL78_Operand_Register, RL78_Reg_##r, 0)
123#define SRB(r) OP (1, RL78_Operand_Register, RB(r), 0)
124#define SRW(r) OP (1, RL78_Operand_Register, RW(r), 0)
125#define SM(r,a) OP (1, RL78_Operand_Indirect, RL78_Reg_##r, a)
126#define SM2(r1,r2,a) OPX (1, RL78_Operand_Indirect, RL78_Reg_##r1, RL78_Reg_##r2, a)
127#define SE() rl78->op[1].use_es = 1
128#define SB(b) set_bit (rl78->op+1, b)
129#define SCY() SR(PSW); SB(0)
130#define COND(c) rl78->op[1].condition = RL78_Condition_##c
131#define SPOP() OP (1, RL78_Operand_PostInc, RL78_Reg_SP, 0);
132
133static void
134set_bit (RL78_Opcode_Operand *op, int bit)
135{
136 op->bit_number = bit;
137 switch (op->type) {
138 case RL78_Operand_Register:
139 op->type = RL78_Operand_Bit;
140 break;
141 case RL78_Operand_Indirect:
142 op->type = RL78_Operand_BitIndirect;
143 break;
144 default:
145 break;
146 }
147}
148
149static int
150saddr (int x)
151{
152 if (x < 0x20)
153 return 0xfff00 + x;
154 return 0xffe00 + x;
155}
156
157static int
158sfr (int x)
159{
160 return 0xfff00 + x;
161}
162
163#define SADDR saddr (IMMU (1))
164#define SFR sfr (IMMU (1))
165
166int
167rl78_decode_opcode (unsigned long pc AU,
168 RL78_Opcode_Decoded * rl78,
169 int (* getbyte)(void *),
0952813b
DD
170 void * ptr,
171 RL78_Dis_Isa isa)
99c513f6
DD
172{
173 LocalData lds, * ld = &lds;
63323b5b 174 unsigned char op_buf[OP_BUF_LEN] = {0};
99c513f6
DD
175 unsigned char *op = op_buf;
176 int op0, op1;
177
178 lds.rl78 = rl78;
179 lds.getbyte = getbyte;
180 lds.ptr = ptr;
181 lds.op = op;
182
183 memset (rl78, 0, sizeof (*rl78));
184
185 start_again:
186
187/* Byte registers, not including A. */
188/* Word registers, not including AX. */
189
190/*----------------------------------------------------------------------*/
191/* ES: prefix */
192
193 GETBYTE ();
194 switch (op[0] & 0xff)
195 {
196 case 0x00:
197 {
198 /** 0000 0000 nop */
199 if (trace)
200 {
201 printf ("\033[33m%s\033[0m %02x\n",
202 "/** 0000 0000 nop */",
203 op[0]);
204 }
205 SYNTAX("nop");
63323b5b 206#line 913 "rl78-decode.opc"
99c513f6 207 ID(nop);
43e65147 208
99c513f6 209 /*----------------------------------------------------------------------*/
43e65147 210
99c513f6
DD
211 }
212 break;
213 case 0x01:
214 case 0x03:
215 case 0x05:
216 case 0x07:
217 {
218 /** 0000 0rw1 addw %0, %1 */
63323b5b 219#line 276 "rl78-decode.opc"
99c513f6
DD
220 int rw AU = (op[0] >> 1) & 0x03;
221 if (trace)
222 {
223 printf ("\033[33m%s\033[0m %02x\n",
224 "/** 0000 0rw1 addw %0, %1 */",
225 op[0]);
226 printf (" rw = 0x%x\n", rw);
227 }
228 SYNTAX("addw %0, %1");
63323b5b 229#line 276 "rl78-decode.opc"
99c513f6 230 ID(add); W(); DR(AX); SRW(rw); Fzac;
43e65147 231
99c513f6
DD
232 }
233 break;
234 case 0x02:
235 {
1d43092d 236 /** 0000 0010 addw %0, %e!1 */
99c513f6
DD
237 if (trace)
238 {
239 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 240 "/** 0000 0010 addw %0, %e!1 */",
99c513f6
DD
241 op[0]);
242 }
1d43092d 243 SYNTAX("addw %0, %e!1");
63323b5b 244#line 267 "rl78-decode.opc"
99c513f6 245 ID(add); W(); DR(AX); SM(None, IMMU(2)); Fzac;
43e65147 246
99c513f6
DD
247 }
248 break;
249 case 0x04:
250 {
251 /** 0000 0100 addw %0, #%1 */
252 if (trace)
253 {
254 printf ("\033[33m%s\033[0m %02x\n",
255 "/** 0000 0100 addw %0, #%1 */",
256 op[0]);
257 }
258 SYNTAX("addw %0, #%1");
63323b5b 259#line 273 "rl78-decode.opc"
99c513f6 260 ID(add); W(); DR(AX); SC(IMMU(2)); Fzac;
43e65147 261
99c513f6
DD
262 }
263 break;
264 case 0x06:
265 {
266 /** 0000 0110 addw %0, %1 */
267 if (trace)
268 {
269 printf ("\033[33m%s\033[0m %02x\n",
270 "/** 0000 0110 addw %0, %1 */",
271 op[0]);
272 }
273 SYNTAX("addw %0, %1");
63323b5b 274#line 279 "rl78-decode.opc"
99c513f6 275 ID(add); W(); DR(AX); SM(None, SADDR); Fzac;
43e65147 276
99c513f6
DD
277 }
278 break;
279 case 0x08:
280 {
281 /** 0000 1000 xch a, x */
282 if (trace)
283 {
284 printf ("\033[33m%s\033[0m %02x\n",
285 "/** 0000 1000 xch a, x */",
286 op[0]);
287 }
288 SYNTAX("xch a, x");
63323b5b 289#line 1236 "rl78-decode.opc"
99c513f6 290 ID(xch); DR(A); SR(X);
43e65147 291
99c513f6 292 /*----------------------------------------------------------------------*/
43e65147 293
99c513f6
DD
294 }
295 break;
296 case 0x09:
297 {
1d43092d 298 /** 0000 1001 mov %0, %e1 */
99c513f6
DD
299 if (trace)
300 {
301 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 302 "/** 0000 1001 mov %0, %e1 */",
99c513f6
DD
303 op[0]);
304 }
1d43092d 305 SYNTAX("mov %0, %e1");
63323b5b 306#line 680 "rl78-decode.opc"
99c513f6 307 ID(mov); DR(A); SM(B, IMMU(2));
43e65147 308
99c513f6
DD
309 }
310 break;
311 case 0x0a:
312 {
313 /** 0000 1010 add %0, #%1 */
314 if (trace)
315 {
316 printf ("\033[33m%s\033[0m %02x\n",
317 "/** 0000 1010 add %0, #%1 */",
318 op[0]);
319 }
320 SYNTAX("add %0, #%1");
63323b5b 321#line 230 "rl78-decode.opc"
99c513f6 322 ID(add); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 323
99c513f6 324 /*----------------------------------------------------------------------*/
43e65147 325
99c513f6
DD
326 }
327 break;
328 case 0x0b:
329 {
330 /** 0000 1011 add %0, %1 */
331 if (trace)
332 {
333 printf ("\033[33m%s\033[0m %02x\n",
334 "/** 0000 1011 add %0, %1 */",
335 op[0]);
336 }
337 SYNTAX("add %0, %1");
63323b5b 338#line 224 "rl78-decode.opc"
99c513f6 339 ID(add); DR(A); SM(None, SADDR); Fzac;
43e65147 340
99c513f6
DD
341 }
342 break;
343 case 0x0c:
344 {
345 /** 0000 1100 add %0, #%1 */
346 if (trace)
347 {
348 printf ("\033[33m%s\033[0m %02x\n",
349 "/** 0000 1100 add %0, #%1 */",
350 op[0]);
351 }
352 SYNTAX("add %0, #%1");
63323b5b 353#line 218 "rl78-decode.opc"
99c513f6 354 ID(add); DR(A); SC(IMMU(1)); Fzac;
43e65147 355
99c513f6
DD
356 }
357 break;
358 case 0x0d:
359 {
1d43092d 360 /** 0000 1101 add %0, %e1 */
99c513f6
DD
361 if (trace)
362 {
363 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 364 "/** 0000 1101 add %0, %e1 */",
99c513f6
DD
365 op[0]);
366 }
1d43092d 367 SYNTAX("add %0, %e1");
63323b5b 368#line 206 "rl78-decode.opc"
99c513f6 369 ID(add); DR(A); SM(HL, 0); Fzac;
43e65147 370
99c513f6
DD
371 }
372 break;
373 case 0x0e:
374 {
90092e73 375 /** 0000 1110 add %0, %ea1 */
99c513f6
DD
376 if (trace)
377 {
378 printf ("\033[33m%s\033[0m %02x\n",
90092e73 379 "/** 0000 1110 add %0, %ea1 */",
99c513f6
DD
380 op[0]);
381 }
90092e73 382 SYNTAX("add %0, %ea1");
63323b5b 383#line 212 "rl78-decode.opc"
99c513f6 384 ID(add); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 385
99c513f6
DD
386 }
387 break;
388 case 0x0f:
389 {
1d43092d 390 /** 0000 1111 add %0, %e!1 */
99c513f6
DD
391 if (trace)
392 {
393 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 394 "/** 0000 1111 add %0, %e!1 */",
99c513f6
DD
395 op[0]);
396 }
1d43092d 397 SYNTAX("add %0, %e!1");
63323b5b 398#line 203 "rl78-decode.opc"
99c513f6 399 ID(add); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 400
99c513f6
DD
401 }
402 break;
403 case 0x10:
404 {
405 /** 0001 0000 addw %0, #%1 */
406 if (trace)
407 {
408 printf ("\033[33m%s\033[0m %02x\n",
409 "/** 0001 0000 addw %0, #%1 */",
410 op[0]);
411 }
412 SYNTAX("addw %0, #%1");
63323b5b 413#line 282 "rl78-decode.opc"
99c513f6 414 ID(add); W(); DR(SP); SC(IMMU(1)); Fzac;
43e65147 415
99c513f6 416 /*----------------------------------------------------------------------*/
43e65147 417
99c513f6
DD
418 }
419 break;
420 case 0x11:
421 {
422 /** 0001 0001 es: */
423 if (trace)
424 {
425 printf ("\033[33m%s\033[0m %02x\n",
426 "/** 0001 0001 es: */",
427 op[0]);
428 }
429 SYNTAX("es:");
63323b5b 430#line 195 "rl78-decode.opc"
99c513f6
DD
431 DE(); SE();
432 op ++;
433 pc ++;
434 goto start_again;
43e65147 435
99c513f6 436 /*----------------------------------------------------------------------*/
43e65147 437
99c513f6
DD
438 }
439 break;
440 case 0x12:
441 case 0x14:
442 case 0x16:
443 {
444 /** 0001 0ra0 movw %0, %1 */
63323b5b 445#line 861 "rl78-decode.opc"
99c513f6
DD
446 int ra AU = (op[0] >> 1) & 0x03;
447 if (trace)
448 {
449 printf ("\033[33m%s\033[0m %02x\n",
450 "/** 0001 0ra0 movw %0, %1 */",
451 op[0]);
452 printf (" ra = 0x%x\n", ra);
453 }
454 SYNTAX("movw %0, %1");
63323b5b 455#line 861 "rl78-decode.opc"
99c513f6 456 ID(mov); W(); DRW(ra); SR(AX);
43e65147 457
99c513f6
DD
458 }
459 break;
460 case 0x13:
461 case 0x15:
462 case 0x17:
463 {
464 /** 0001 0ra1 movw %0, %1 */
63323b5b 465#line 858 "rl78-decode.opc"
99c513f6
DD
466 int ra AU = (op[0] >> 1) & 0x03;
467 if (trace)
468 {
469 printf ("\033[33m%s\033[0m %02x\n",
470 "/** 0001 0ra1 movw %0, %1 */",
471 op[0]);
472 printf (" ra = 0x%x\n", ra);
473 }
474 SYNTAX("movw %0, %1");
63323b5b 475#line 858 "rl78-decode.opc"
99c513f6 476 ID(mov); W(); DR(AX); SRW(ra);
43e65147 477
99c513f6
DD
478 }
479 break;
480 case 0x18:
481 {
1d43092d 482 /** 0001 1000 mov %e0, %1 */
99c513f6
DD
483 if (trace)
484 {
485 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 486 "/** 0001 1000 mov %e0, %1 */",
99c513f6
DD
487 op[0]);
488 }
1d43092d 489 SYNTAX("mov %e0, %1");
63323b5b 490#line 731 "rl78-decode.opc"
43e65147
L
491 ID(mov); DM(B, IMMU(2)); SR(A);
492
99c513f6
DD
493 }
494 break;
495 case 0x19:
496 {
1d43092d 497 /** 0001 1001 mov %e0, #%1 */
99c513f6
DD
498 if (trace)
499 {
500 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 501 "/** 0001 1001 mov %e0, #%1 */",
99c513f6
DD
502 op[0]);
503 }
1d43092d 504 SYNTAX("mov %e0, #%1");
63323b5b 505#line 728 "rl78-decode.opc"
43e65147
L
506 ID(mov); DM(B, IMMU(2)); SC(IMMU(1));
507
99c513f6
DD
508 }
509 break;
510 case 0x1a:
511 {
512 /** 0001 1010 addc %0, #%1 */
513 if (trace)
514 {
515 printf ("\033[33m%s\033[0m %02x\n",
516 "/** 0001 1010 addc %0, #%1 */",
517 op[0]);
518 }
519 SYNTAX("addc %0, #%1");
63323b5b 520#line 262 "rl78-decode.opc"
99c513f6 521 ID(addc); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 522
99c513f6 523 /*----------------------------------------------------------------------*/
43e65147 524
99c513f6
DD
525 }
526 break;
527 case 0x1b:
528 {
529 /** 0001 1011 addc %0, %1 */
530 if (trace)
531 {
532 printf ("\033[33m%s\033[0m %02x\n",
533 "/** 0001 1011 addc %0, %1 */",
534 op[0]);
535 }
536 SYNTAX("addc %0, %1");
63323b5b 537#line 259 "rl78-decode.opc"
99c513f6 538 ID(addc); DR(A); SM(None, SADDR); Fzac;
43e65147 539
99c513f6
DD
540 }
541 break;
542 case 0x1c:
543 {
544 /** 0001 1100 addc %0, #%1 */
545 if (trace)
546 {
547 printf ("\033[33m%s\033[0m %02x\n",
548 "/** 0001 1100 addc %0, #%1 */",
549 op[0]);
550 }
551 SYNTAX("addc %0, #%1");
63323b5b 552#line 250 "rl78-decode.opc"
99c513f6 553 ID(addc); DR(A); SC(IMMU(1)); Fzac;
43e65147 554
99c513f6
DD
555 }
556 break;
557 case 0x1d:
558 {
1d43092d 559 /** 0001 1101 addc %0, %e1 */
99c513f6
DD
560 if (trace)
561 {
562 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 563 "/** 0001 1101 addc %0, %e1 */",
99c513f6
DD
564 op[0]);
565 }
1d43092d 566 SYNTAX("addc %0, %e1");
63323b5b 567#line 238 "rl78-decode.opc"
99c513f6 568 ID(addc); DR(A); SM(HL, 0); Fzac;
43e65147 569
99c513f6
DD
570 }
571 break;
572 case 0x1e:
573 {
0952813b 574 /** 0001 1110 addc %0, %ea1 */
99c513f6
DD
575 if (trace)
576 {
577 printf ("\033[33m%s\033[0m %02x\n",
0952813b 578 "/** 0001 1110 addc %0, %ea1 */",
99c513f6
DD
579 op[0]);
580 }
90092e73 581 SYNTAX("addc %0, %ea1");
63323b5b 582#line 247 "rl78-decode.opc"
99c513f6 583 ID(addc); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 584
99c513f6
DD
585 }
586 break;
587 case 0x1f:
588 {
1d43092d 589 /** 0001 1111 addc %0, %e!1 */
99c513f6
DD
590 if (trace)
591 {
592 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 593 "/** 0001 1111 addc %0, %e!1 */",
99c513f6
DD
594 op[0]);
595 }
1d43092d 596 SYNTAX("addc %0, %e!1");
63323b5b 597#line 235 "rl78-decode.opc"
99c513f6 598 ID(addc); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 599
99c513f6
DD
600 }
601 break;
602 case 0x20:
603 {
604 /** 0010 0000 subw %0, #%1 */
605 if (trace)
606 {
607 printf ("\033[33m%s\033[0m %02x\n",
608 "/** 0010 0000 subw %0, #%1 */",
609 op[0]);
610 }
611 SYNTAX("subw %0, #%1");
63323b5b 612#line 1200 "rl78-decode.opc"
99c513f6 613 ID(sub); W(); DR(SP); SC(IMMU(1)); Fzac;
43e65147 614
99c513f6 615 /*----------------------------------------------------------------------*/
43e65147 616
99c513f6
DD
617 }
618 break;
619 case 0x21:
620 case 0x23:
621 case 0x25:
622 case 0x27:
623 {
624 /** 0010 0rw1 subw %0, %1 */
63323b5b 625#line 1194 "rl78-decode.opc"
99c513f6
DD
626 int rw AU = (op[0] >> 1) & 0x03;
627 if (trace)
628 {
629 printf ("\033[33m%s\033[0m %02x\n",
630 "/** 0010 0rw1 subw %0, %1 */",
631 op[0]);
632 printf (" rw = 0x%x\n", rw);
633 }
634 SYNTAX("subw %0, %1");
63323b5b 635#line 1194 "rl78-decode.opc"
99c513f6 636 ID(sub); W(); DR(AX); SRW(rw); Fzac;
43e65147 637
99c513f6
DD
638 }
639 break;
640 case 0x22:
641 {
1d43092d 642 /** 0010 0010 subw %0, %e!1 */
99c513f6
DD
643 if (trace)
644 {
645 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 646 "/** 0010 0010 subw %0, %e!1 */",
99c513f6
DD
647 op[0]);
648 }
1d43092d 649 SYNTAX("subw %0, %e!1");
63323b5b 650#line 1185 "rl78-decode.opc"
99c513f6 651 ID(sub); W(); DR(AX); SM(None, IMMU(2)); Fzac;
43e65147 652
99c513f6
DD
653 }
654 break;
655 case 0x24:
656 {
657 /** 0010 0100 subw %0, #%1 */
658 if (trace)
659 {
660 printf ("\033[33m%s\033[0m %02x\n",
661 "/** 0010 0100 subw %0, #%1 */",
662 op[0]);
663 }
664 SYNTAX("subw %0, #%1");
63323b5b 665#line 1191 "rl78-decode.opc"
99c513f6 666 ID(sub); W(); DR(AX); SC(IMMU(2)); Fzac;
43e65147 667
99c513f6
DD
668 }
669 break;
670 case 0x26:
671 {
672 /** 0010 0110 subw %0, %1 */
673 if (trace)
674 {
675 printf ("\033[33m%s\033[0m %02x\n",
676 "/** 0010 0110 subw %0, %1 */",
677 op[0]);
678 }
679 SYNTAX("subw %0, %1");
63323b5b 680#line 1197 "rl78-decode.opc"
99c513f6 681 ID(sub); W(); DR(AX); SM(None, SADDR); Fzac;
43e65147 682
99c513f6
DD
683 }
684 break;
685 case 0x28:
686 {
1d43092d 687 /** 0010 1000 mov %e0, %1 */
99c513f6
DD
688 if (trace)
689 {
690 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 691 "/** 0010 1000 mov %e0, %1 */",
99c513f6
DD
692 op[0]);
693 }
1d43092d 694 SYNTAX("mov %e0, %1");
63323b5b 695#line 743 "rl78-decode.opc"
99c513f6 696 ID(mov); DM(C, IMMU(2)); SR(A);
43e65147 697
99c513f6
DD
698 }
699 break;
700 case 0x29:
701 {
1d43092d 702 /** 0010 1001 mov %0, %e1 */
99c513f6
DD
703 if (trace)
704 {
705 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 706 "/** 0010 1001 mov %0, %e1 */",
99c513f6
DD
707 op[0]);
708 }
1d43092d 709 SYNTAX("mov %0, %e1");
63323b5b 710#line 686 "rl78-decode.opc"
99c513f6 711 ID(mov); DR(A); SM(C, IMMU(2));
43e65147 712
99c513f6
DD
713 }
714 break;
715 case 0x2a:
716 {
717 /** 0010 1010 sub %0, #%1 */
718 if (trace)
719 {
720 printf ("\033[33m%s\033[0m %02x\n",
721 "/** 0010 1010 sub %0, #%1 */",
722 op[0]);
723 }
724 SYNTAX("sub %0, #%1");
63323b5b 725#line 1148 "rl78-decode.opc"
99c513f6 726 ID(sub); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 727
99c513f6 728 /*----------------------------------------------------------------------*/
43e65147 729
99c513f6
DD
730 }
731 break;
732 case 0x2b:
733 {
734 /** 0010 1011 sub %0, %1 */
735 if (trace)
736 {
737 printf ("\033[33m%s\033[0m %02x\n",
738 "/** 0010 1011 sub %0, %1 */",
739 op[0]);
740 }
741 SYNTAX("sub %0, %1");
63323b5b 742#line 1142 "rl78-decode.opc"
99c513f6 743 ID(sub); DR(A); SM(None, SADDR); Fzac;
43e65147 744
99c513f6
DD
745 }
746 break;
747 case 0x2c:
748 {
749 /** 0010 1100 sub %0, #%1 */
750 if (trace)
751 {
752 printf ("\033[33m%s\033[0m %02x\n",
753 "/** 0010 1100 sub %0, #%1 */",
754 op[0]);
755 }
756 SYNTAX("sub %0, #%1");
63323b5b 757#line 1136 "rl78-decode.opc"
99c513f6 758 ID(sub); DR(A); SC(IMMU(1)); Fzac;
43e65147 759
99c513f6
DD
760 }
761 break;
762 case 0x2d:
763 {
1d43092d 764 /** 0010 1101 sub %0, %e1 */
99c513f6
DD
765 if (trace)
766 {
767 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 768 "/** 0010 1101 sub %0, %e1 */",
99c513f6
DD
769 op[0]);
770 }
1d43092d 771 SYNTAX("sub %0, %e1");
63323b5b 772#line 1124 "rl78-decode.opc"
99c513f6 773 ID(sub); DR(A); SM(HL, 0); Fzac;
43e65147 774
99c513f6
DD
775 }
776 break;
777 case 0x2e:
778 {
0952813b 779 /** 0010 1110 sub %0, %ea1 */
99c513f6
DD
780 if (trace)
781 {
782 printf ("\033[33m%s\033[0m %02x\n",
0952813b 783 "/** 0010 1110 sub %0, %ea1 */",
99c513f6
DD
784 op[0]);
785 }
90092e73 786 SYNTAX("sub %0, %ea1");
63323b5b 787#line 1130 "rl78-decode.opc"
99c513f6 788 ID(sub); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 789
99c513f6
DD
790 }
791 break;
792 case 0x2f:
793 {
1d43092d 794 /** 0010 1111 sub %0, %e!1 */
99c513f6
DD
795 if (trace)
796 {
797 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 798 "/** 0010 1111 sub %0, %e!1 */",
99c513f6
DD
799 op[0]);
800 }
1d43092d 801 SYNTAX("sub %0, %e!1");
63323b5b 802#line 1121 "rl78-decode.opc"
99c513f6 803 ID(sub); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 804
99c513f6
DD
805 }
806 break;
807 case 0x30:
808 case 0x32:
809 case 0x34:
810 case 0x36:
811 {
812 /** 0011 0rg0 movw %0, #%1 */
63323b5b 813#line 855 "rl78-decode.opc"
99c513f6
DD
814 int rg AU = (op[0] >> 1) & 0x03;
815 if (trace)
816 {
817 printf ("\033[33m%s\033[0m %02x\n",
818 "/** 0011 0rg0 movw %0, #%1 */",
819 op[0]);
820 printf (" rg = 0x%x\n", rg);
821 }
822 SYNTAX("movw %0, #%1");
63323b5b 823#line 855 "rl78-decode.opc"
99c513f6 824 ID(mov); W(); DRW(rg); SC(IMMU(2));
43e65147 825
99c513f6
DD
826 }
827 break;
828 case 0x31:
829 GETBYTE ();
830 switch (op[1] & 0x8f)
831 {
832 case 0x00:
833 {
834 /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
63323b5b 835#line 418 "rl78-decode.opc"
99c513f6
DD
836 int bit AU = (op[1] >> 4) & 0x07;
837 if (trace)
838 {
839 printf ("\033[33m%s\033[0m %02x %02x\n",
840 "/** 0011 0001 0bit 0000 btclr %s1, $%a0 */",
841 op[0], op[1]);
842 printf (" bit = 0x%x\n", bit);
843 }
844 SYNTAX("btclr %s1, $%a0");
63323b5b 845#line 418 "rl78-decode.opc"
99c513f6 846 ID(branch_cond_clear); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 847
99c513f6 848 /*----------------------------------------------------------------------*/
43e65147 849
99c513f6
DD
850 }
851 break;
852 case 0x01:
853 {
854 /** 0011 0001 0bit 0001 btclr %1, $%a0 */
63323b5b 855#line 412 "rl78-decode.opc"
99c513f6
DD
856 int bit AU = (op[1] >> 4) & 0x07;
857 if (trace)
858 {
859 printf ("\033[33m%s\033[0m %02x %02x\n",
860 "/** 0011 0001 0bit 0001 btclr %1, $%a0 */",
861 op[0], op[1]);
862 printf (" bit = 0x%x\n", bit);
863 }
864 SYNTAX("btclr %1, $%a0");
63323b5b 865#line 412 "rl78-decode.opc"
99c513f6 866 ID(branch_cond_clear); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T);
43e65147 867
99c513f6
DD
868 }
869 break;
870 case 0x02:
871 {
872 /** 0011 0001 0bit 0010 bt %s1, $%a0 */
63323b5b 873#line 404 "rl78-decode.opc"
99c513f6
DD
874 int bit AU = (op[1] >> 4) & 0x07;
875 if (trace)
876 {
877 printf ("\033[33m%s\033[0m %02x %02x\n",
878 "/** 0011 0001 0bit 0010 bt %s1, $%a0 */",
879 op[0], op[1]);
880 printf (" bit = 0x%x\n", bit);
881 }
882 SYNTAX("bt %s1, $%a0");
63323b5b 883#line 404 "rl78-decode.opc"
99c513f6 884 ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 885
99c513f6 886 /*----------------------------------------------------------------------*/
43e65147 887
99c513f6
DD
888 }
889 break;
890 case 0x03:
891 {
892 /** 0011 0001 0bit 0011 bt %1, $%a0 */
63323b5b 893#line 398 "rl78-decode.opc"
99c513f6
DD
894 int bit AU = (op[1] >> 4) & 0x07;
895 if (trace)
896 {
897 printf ("\033[33m%s\033[0m %02x %02x\n",
898 "/** 0011 0001 0bit 0011 bt %1, $%a0 */",
899 op[0], op[1]);
900 printf (" bit = 0x%x\n", bit);
901 }
902 SYNTAX("bt %1, $%a0");
63323b5b 903#line 398 "rl78-decode.opc"
99c513f6 904 ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T);
43e65147 905
99c513f6
DD
906 }
907 break;
908 case 0x04:
909 {
910 /** 0011 0001 0bit 0100 bf %s1, $%a0 */
63323b5b 911#line 365 "rl78-decode.opc"
99c513f6
DD
912 int bit AU = (op[1] >> 4) & 0x07;
913 if (trace)
914 {
915 printf ("\033[33m%s\033[0m %02x %02x\n",
916 "/** 0011 0001 0bit 0100 bf %s1, $%a0 */",
917 op[0], op[1]);
918 printf (" bit = 0x%x\n", bit);
919 }
920 SYNTAX("bf %s1, $%a0");
63323b5b 921#line 365 "rl78-decode.opc"
99c513f6 922 ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(F);
43e65147 923
99c513f6 924 /*----------------------------------------------------------------------*/
43e65147 925
99c513f6
DD
926 }
927 break;
928 case 0x05:
929 {
930 /** 0011 0001 0bit 0101 bf %1, $%a0 */
63323b5b 931#line 359 "rl78-decode.opc"
99c513f6
DD
932 int bit AU = (op[1] >> 4) & 0x07;
933 if (trace)
934 {
935 printf ("\033[33m%s\033[0m %02x %02x\n",
936 "/** 0011 0001 0bit 0101 bf %1, $%a0 */",
937 op[0], op[1]);
938 printf (" bit = 0x%x\n", bit);
939 }
940 SYNTAX("bf %1, $%a0");
63323b5b 941#line 359 "rl78-decode.opc"
99c513f6 942 ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(F);
43e65147 943
99c513f6
DD
944 }
945 break;
946 case 0x07:
947 {
948 /** 0011 0001 0cnt 0111 shl %0, %1 */
63323b5b 949#line 1077 "rl78-decode.opc"
99c513f6
DD
950 int cnt AU = (op[1] >> 4) & 0x07;
951 if (trace)
952 {
953 printf ("\033[33m%s\033[0m %02x %02x\n",
954 "/** 0011 0001 0cnt 0111 shl %0, %1 */",
955 op[0], op[1]);
956 printf (" cnt = 0x%x\n", cnt);
957 }
958 SYNTAX("shl %0, %1");
63323b5b 959#line 1077 "rl78-decode.opc"
99c513f6 960 ID(shl); DR(C); SC(cnt);
43e65147 961
99c513f6
DD
962 }
963 break;
964 case 0x08:
965 {
966 /** 0011 0001 0cnt 1000 shl %0, %1 */
63323b5b 967#line 1074 "rl78-decode.opc"
99c513f6
DD
968 int cnt AU = (op[1] >> 4) & 0x07;
969 if (trace)
970 {
971 printf ("\033[33m%s\033[0m %02x %02x\n",
972 "/** 0011 0001 0cnt 1000 shl %0, %1 */",
973 op[0], op[1]);
974 printf (" cnt = 0x%x\n", cnt);
975 }
976 SYNTAX("shl %0, %1");
63323b5b 977#line 1074 "rl78-decode.opc"
99c513f6 978 ID(shl); DR(B); SC(cnt);
43e65147 979
99c513f6
DD
980 }
981 break;
982 case 0x09:
983 {
984 /** 0011 0001 0cnt 1001 shl %0, %1 */
63323b5b 985#line 1071 "rl78-decode.opc"
99c513f6
DD
986 int cnt AU = (op[1] >> 4) & 0x07;
987 if (trace)
988 {
989 printf ("\033[33m%s\033[0m %02x %02x\n",
990 "/** 0011 0001 0cnt 1001 shl %0, %1 */",
991 op[0], op[1]);
992 printf (" cnt = 0x%x\n", cnt);
993 }
994 SYNTAX("shl %0, %1");
63323b5b 995#line 1071 "rl78-decode.opc"
99c513f6 996 ID(shl); DR(A); SC(cnt);
43e65147 997
99c513f6
DD
998 }
999 break;
1000 case 0x0a:
1001 {
1002 /** 0011 0001 0cnt 1010 shr %0, %1 */
63323b5b 1003#line 1088 "rl78-decode.opc"
99c513f6
DD
1004 int cnt AU = (op[1] >> 4) & 0x07;
1005 if (trace)
1006 {
1007 printf ("\033[33m%s\033[0m %02x %02x\n",
1008 "/** 0011 0001 0cnt 1010 shr %0, %1 */",
1009 op[0], op[1]);
1010 printf (" cnt = 0x%x\n", cnt);
1011 }
1012 SYNTAX("shr %0, %1");
63323b5b 1013#line 1088 "rl78-decode.opc"
99c513f6 1014 ID(shr); DR(A); SC(cnt);
43e65147 1015
99c513f6
DD
1016 }
1017 break;
1018 case 0x0b:
1019 {
1020 /** 0011 0001 0cnt 1011 sar %0, %1 */
63323b5b 1021#line 1035 "rl78-decode.opc"
99c513f6
DD
1022 int cnt AU = (op[1] >> 4) & 0x07;
1023 if (trace)
1024 {
1025 printf ("\033[33m%s\033[0m %02x %02x\n",
1026 "/** 0011 0001 0cnt 1011 sar %0, %1 */",
1027 op[0], op[1]);
1028 printf (" cnt = 0x%x\n", cnt);
1029 }
1030 SYNTAX("sar %0, %1");
63323b5b 1031#line 1035 "rl78-decode.opc"
99c513f6 1032 ID(sar); DR(A); SC(cnt);
43e65147 1033
99c513f6
DD
1034 }
1035 break;
1036 case 0x0c:
1037 case 0x8c:
1038 {
1039 /** 0011 0001 wcnt 1100 shlw %0, %1 */
63323b5b 1040#line 1083 "rl78-decode.opc"
99c513f6
DD
1041 int wcnt AU = (op[1] >> 4) & 0x0f;
1042 if (trace)
1043 {
1044 printf ("\033[33m%s\033[0m %02x %02x\n",
1045 "/** 0011 0001 wcnt 1100 shlw %0, %1 */",
1046 op[0], op[1]);
1047 printf (" wcnt = 0x%x\n", wcnt);
1048 }
1049 SYNTAX("shlw %0, %1");
63323b5b 1050#line 1083 "rl78-decode.opc"
99c513f6 1051 ID(shl); W(); DR(BC); SC(wcnt);
43e65147 1052
99c513f6 1053 /*----------------------------------------------------------------------*/
43e65147 1054
99c513f6
DD
1055 }
1056 break;
1057 case 0x0d:
1058 case 0x8d:
1059 {
1060 /** 0011 0001 wcnt 1101 shlw %0, %1 */
63323b5b 1061#line 1080 "rl78-decode.opc"
99c513f6
DD
1062 int wcnt AU = (op[1] >> 4) & 0x0f;
1063 if (trace)
1064 {
1065 printf ("\033[33m%s\033[0m %02x %02x\n",
1066 "/** 0011 0001 wcnt 1101 shlw %0, %1 */",
1067 op[0], op[1]);
1068 printf (" wcnt = 0x%x\n", wcnt);
1069 }
1070 SYNTAX("shlw %0, %1");
63323b5b 1071#line 1080 "rl78-decode.opc"
99c513f6 1072 ID(shl); W(); DR(AX); SC(wcnt);
43e65147 1073
99c513f6
DD
1074 }
1075 break;
1076 case 0x0e:
1077 case 0x8e:
1078 {
1079 /** 0011 0001 wcnt 1110 shrw %0, %1 */
63323b5b 1080#line 1091 "rl78-decode.opc"
99c513f6
DD
1081 int wcnt AU = (op[1] >> 4) & 0x0f;
1082 if (trace)
1083 {
1084 printf ("\033[33m%s\033[0m %02x %02x\n",
1085 "/** 0011 0001 wcnt 1110 shrw %0, %1 */",
1086 op[0], op[1]);
1087 printf (" wcnt = 0x%x\n", wcnt);
1088 }
1089 SYNTAX("shrw %0, %1");
63323b5b 1090#line 1091 "rl78-decode.opc"
99c513f6 1091 ID(shr); W(); DR(AX); SC(wcnt);
43e65147 1092
99c513f6 1093 /*----------------------------------------------------------------------*/
43e65147 1094
99c513f6
DD
1095 }
1096 break;
1097 case 0x0f:
1098 case 0x8f:
1099 {
1100 /** 0011 0001 wcnt 1111 sarw %0, %1 */
63323b5b 1101#line 1038 "rl78-decode.opc"
99c513f6
DD
1102 int wcnt AU = (op[1] >> 4) & 0x0f;
1103 if (trace)
1104 {
1105 printf ("\033[33m%s\033[0m %02x %02x\n",
1106 "/** 0011 0001 wcnt 1111 sarw %0, %1 */",
1107 op[0], op[1]);
1108 printf (" wcnt = 0x%x\n", wcnt);
1109 }
1110 SYNTAX("sarw %0, %1");
63323b5b 1111#line 1038 "rl78-decode.opc"
99c513f6 1112 ID(sar); W(); DR(AX); SC(wcnt);
43e65147 1113
99c513f6 1114 /*----------------------------------------------------------------------*/
43e65147 1115
99c513f6
DD
1116 }
1117 break;
1118 case 0x80:
1119 {
1120 /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
63323b5b 1121#line 415 "rl78-decode.opc"
99c513f6
DD
1122 int bit AU = (op[1] >> 4) & 0x07;
1123 if (trace)
1124 {
1125 printf ("\033[33m%s\033[0m %02x %02x\n",
1126 "/** 0011 0001 1bit 0000 btclr %s1, $%a0 */",
1127 op[0], op[1]);
1128 printf (" bit = 0x%x\n", bit);
1129 }
1130 SYNTAX("btclr %s1, $%a0");
63323b5b 1131#line 415 "rl78-decode.opc"
99c513f6 1132 ID(branch_cond_clear); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 1133
99c513f6
DD
1134 }
1135 break;
1136 case 0x81:
1137 {
1d43092d 1138 /** 0011 0001 1bit 0001 btclr %e1, $%a0 */
63323b5b 1139#line 409 "rl78-decode.opc"
99c513f6
DD
1140 int bit AU = (op[1] >> 4) & 0x07;
1141 if (trace)
1142 {
1143 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 1144 "/** 0011 0001 1bit 0001 btclr %e1, $%a0 */",
99c513f6
DD
1145 op[0], op[1]);
1146 printf (" bit = 0x%x\n", bit);
1147 }
1d43092d 1148 SYNTAX("btclr %e1, $%a0");
63323b5b 1149#line 409 "rl78-decode.opc"
99c513f6 1150 ID(branch_cond_clear); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T);
43e65147 1151
99c513f6
DD
1152 }
1153 break;
1154 case 0x82:
1155 {
1156 /** 0011 0001 1bit 0010 bt %s1, $%a0 */
63323b5b 1157#line 401 "rl78-decode.opc"
99c513f6
DD
1158 int bit AU = (op[1] >> 4) & 0x07;
1159 if (trace)
1160 {
1161 printf ("\033[33m%s\033[0m %02x %02x\n",
1162 "/** 0011 0001 1bit 0010 bt %s1, $%a0 */",
1163 op[0], op[1]);
1164 printf (" bit = 0x%x\n", bit);
1165 }
1166 SYNTAX("bt %s1, $%a0");
63323b5b 1167#line 401 "rl78-decode.opc"
99c513f6 1168 ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
43e65147 1169
99c513f6
DD
1170 }
1171 break;
1172 case 0x83:
1173 {
1d43092d 1174 /** 0011 0001 1bit 0011 bt %e1, $%a0 */
63323b5b 1175#line 395 "rl78-decode.opc"
99c513f6
DD
1176 int bit AU = (op[1] >> 4) & 0x07;
1177 if (trace)
1178 {
1179 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 1180 "/** 0011 0001 1bit 0011 bt %e1, $%a0 */",
99c513f6
DD
1181 op[0], op[1]);
1182 printf (" bit = 0x%x\n", bit);
1183 }
1d43092d 1184 SYNTAX("bt %e1, $%a0");
63323b5b 1185#line 395 "rl78-decode.opc"
99c513f6 1186 ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T);
43e65147 1187
99c513f6
DD
1188 }
1189 break;
1190 case 0x84:
1191 {
1192 /** 0011 0001 1bit 0100 bf %s1, $%a0 */
63323b5b 1193#line 362 "rl78-decode.opc"
99c513f6
DD
1194 int bit AU = (op[1] >> 4) & 0x07;
1195 if (trace)
1196 {
1197 printf ("\033[33m%s\033[0m %02x %02x\n",
1198 "/** 0011 0001 1bit 0100 bf %s1, $%a0 */",
1199 op[0], op[1]);
1200 printf (" bit = 0x%x\n", bit);
1201 }
1202 SYNTAX("bf %s1, $%a0");
63323b5b 1203#line 362 "rl78-decode.opc"
99c513f6 1204 ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(F);
43e65147 1205
99c513f6
DD
1206 }
1207 break;
1208 case 0x85:
1209 {
1d43092d 1210 /** 0011 0001 1bit 0101 bf %e1, $%a0 */
63323b5b 1211#line 356 "rl78-decode.opc"
99c513f6
DD
1212 int bit AU = (op[1] >> 4) & 0x07;
1213 if (trace)
1214 {
1215 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 1216 "/** 0011 0001 1bit 0101 bf %e1, $%a0 */",
99c513f6
DD
1217 op[0], op[1]);
1218 printf (" bit = 0x%x\n", bit);
1219 }
1d43092d 1220 SYNTAX("bf %e1, $%a0");
63323b5b 1221#line 356 "rl78-decode.opc"
99c513f6 1222 ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(F);
43e65147 1223
99c513f6
DD
1224 }
1225 break;
1226 default: UNSUPPORTED(); break;
1227 }
1228 break;
1229 case 0x33:
1230 case 0x35:
1231 case 0x37:
1232 {
1233 /** 0011 0ra1 xchw %0, %1 */
63323b5b 1234#line 1241 "rl78-decode.opc"
99c513f6
DD
1235 int ra AU = (op[0] >> 1) & 0x03;
1236 if (trace)
1237 {
1238 printf ("\033[33m%s\033[0m %02x\n",
1239 "/** 0011 0ra1 xchw %0, %1 */",
1240 op[0]);
1241 printf (" ra = 0x%x\n", ra);
1242 }
1243 SYNTAX("xchw %0, %1");
63323b5b 1244#line 1241 "rl78-decode.opc"
99c513f6 1245 ID(xch); W(); DR(AX); SRW(ra);
43e65147 1246
99c513f6 1247 /*----------------------------------------------------------------------*/
43e65147 1248
99c513f6
DD
1249 }
1250 break;
1251 case 0x38:
1252 {
1d43092d 1253 /** 0011 1000 mov %e0, #%1 */
99c513f6
DD
1254 if (trace)
1255 {
1256 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1257 "/** 0011 1000 mov %e0, #%1 */",
99c513f6
DD
1258 op[0]);
1259 }
1d43092d 1260 SYNTAX("mov %e0, #%1");
63323b5b 1261#line 740 "rl78-decode.opc"
43e65147
L
1262 ID(mov); DM(C, IMMU(2)); SC(IMMU(1));
1263
99c513f6
DD
1264 }
1265 break;
1266 case 0x39:
1267 {
1d43092d 1268 /** 0011 1001 mov %e0, #%1 */
99c513f6
DD
1269 if (trace)
1270 {
1271 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1272 "/** 0011 1001 mov %e0, #%1 */",
99c513f6
DD
1273 op[0]);
1274 }
1d43092d 1275 SYNTAX("mov %e0, #%1");
63323b5b 1276#line 734 "rl78-decode.opc"
43e65147
L
1277 ID(mov); DM(BC, IMMU(2)); SC(IMMU(1));
1278
99c513f6
DD
1279 }
1280 break;
1281 case 0x3a:
1282 {
1283 /** 0011 1010 subc %0, #%1 */
1284 if (trace)
1285 {
1286 printf ("\033[33m%s\033[0m %02x\n",
1287 "/** 0011 1010 subc %0, #%1 */",
1288 op[0]);
1289 }
1290 SYNTAX("subc %0, #%1");
63323b5b 1291#line 1180 "rl78-decode.opc"
99c513f6 1292 ID(subc); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 1293
99c513f6 1294 /*----------------------------------------------------------------------*/
43e65147 1295
99c513f6
DD
1296 }
1297 break;
1298 case 0x3b:
1299 {
1300 /** 0011 1011 subc %0, %1 */
1301 if (trace)
1302 {
1303 printf ("\033[33m%s\033[0m %02x\n",
1304 "/** 0011 1011 subc %0, %1 */",
1305 op[0]);
1306 }
1307 SYNTAX("subc %0, %1");
63323b5b 1308#line 1177 "rl78-decode.opc"
99c513f6 1309 ID(subc); DR(A); SM(None, SADDR); Fzac;
43e65147 1310
99c513f6
DD
1311 }
1312 break;
1313 case 0x3c:
1314 {
1315 /** 0011 1100 subc %0, #%1 */
1316 if (trace)
1317 {
1318 printf ("\033[33m%s\033[0m %02x\n",
1319 "/** 0011 1100 subc %0, #%1 */",
1320 op[0]);
1321 }
1322 SYNTAX("subc %0, #%1");
63323b5b 1323#line 1168 "rl78-decode.opc"
99c513f6 1324 ID(subc); DR(A); SC(IMMU(1)); Fzac;
43e65147 1325
99c513f6
DD
1326 }
1327 break;
1328 case 0x3d:
1329 {
1d43092d 1330 /** 0011 1101 subc %0, %e1 */
99c513f6
DD
1331 if (trace)
1332 {
1333 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1334 "/** 0011 1101 subc %0, %e1 */",
99c513f6
DD
1335 op[0]);
1336 }
1d43092d 1337 SYNTAX("subc %0, %e1");
63323b5b 1338#line 1156 "rl78-decode.opc"
99c513f6 1339 ID(subc); DR(A); SM(HL, 0); Fzac;
43e65147 1340
99c513f6
DD
1341 }
1342 break;
1343 case 0x3e:
1344 {
0952813b 1345 /** 0011 1110 subc %0, %ea1 */
99c513f6
DD
1346 if (trace)
1347 {
1348 printf ("\033[33m%s\033[0m %02x\n",
0952813b 1349 "/** 0011 1110 subc %0, %ea1 */",
99c513f6
DD
1350 op[0]);
1351 }
90092e73 1352 SYNTAX("subc %0, %ea1");
63323b5b 1353#line 1165 "rl78-decode.opc"
99c513f6 1354 ID(subc); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 1355
99c513f6
DD
1356 }
1357 break;
1358 case 0x3f:
1359 {
1d43092d 1360 /** 0011 1111 subc %0, %e!1 */
99c513f6
DD
1361 if (trace)
1362 {
1363 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1364 "/** 0011 1111 subc %0, %e!1 */",
99c513f6
DD
1365 op[0]);
1366 }
1d43092d 1367 SYNTAX("subc %0, %e!1");
63323b5b 1368#line 1153 "rl78-decode.opc"
99c513f6 1369 ID(subc); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 1370
99c513f6
DD
1371 }
1372 break;
1373 case 0x40:
1374 {
1d43092d 1375 /** 0100 0000 cmp %e!0, #%1 */
99c513f6
DD
1376 if (trace)
1377 {
1378 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1379 "/** 0100 0000 cmp %e!0, #%1 */",
99c513f6
DD
1380 op[0]);
1381 }
1d43092d 1382 SYNTAX("cmp %e!0, #%1");
63323b5b 1383#line 482 "rl78-decode.opc"
99c513f6 1384 ID(cmp); DM(None, IMMU(2)); SC(IMMU(1)); Fzac;
43e65147 1385
99c513f6
DD
1386 }
1387 break;
1388 case 0x41:
1389 {
1390 /** 0100 0001 mov %0, #%1 */
1391 if (trace)
1392 {
1393 printf ("\033[33m%s\033[0m %02x\n",
1394 "/** 0100 0001 mov %0, #%1 */",
1395 op[0]);
1396 }
1397 SYNTAX("mov %0, #%1");
63323b5b 1398#line 719 "rl78-decode.opc"
43e65147
L
1399 ID(mov); DR(ES); SC(IMMU(1));
1400
99c513f6
DD
1401 }
1402 break;
1403 case 0x42:
1404 {
1d43092d 1405 /** 0100 0010 cmpw %0, %e!1 */
99c513f6
DD
1406 if (trace)
1407 {
1408 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1409 "/** 0100 0010 cmpw %0, %e!1 */",
99c513f6
DD
1410 op[0]);
1411 }
1d43092d 1412 SYNTAX("cmpw %0, %e!1");
63323b5b 1413#line 533 "rl78-decode.opc"
99c513f6 1414 ID(cmp); W(); DR(AX); SM(None, IMMU(2)); Fzac;
43e65147 1415
99c513f6
DD
1416 }
1417 break;
1418 case 0x43:
1419 case 0x45:
1420 case 0x47:
1421 {
1422 /** 0100 0ra1 cmpw %0, %1 */
63323b5b 1423#line 542 "rl78-decode.opc"
99c513f6
DD
1424 int ra AU = (op[0] >> 1) & 0x03;
1425 if (trace)
1426 {
1427 printf ("\033[33m%s\033[0m %02x\n",
1428 "/** 0100 0ra1 cmpw %0, %1 */",
1429 op[0]);
1430 printf (" ra = 0x%x\n", ra);
1431 }
1432 SYNTAX("cmpw %0, %1");
63323b5b 1433#line 542 "rl78-decode.opc"
99c513f6 1434 ID(cmp); W(); DR(AX); SRW(ra); Fzac;
43e65147 1435
99c513f6
DD
1436 }
1437 break;
1438 case 0x44:
1439 {
1440 /** 0100 0100 cmpw %0, #%1 */
1441 if (trace)
1442 {
1443 printf ("\033[33m%s\033[0m %02x\n",
1444 "/** 0100 0100 cmpw %0, #%1 */",
1445 op[0]);
1446 }
1447 SYNTAX("cmpw %0, #%1");
63323b5b 1448#line 539 "rl78-decode.opc"
99c513f6 1449 ID(cmp); W(); DR(AX); SC(IMMU(2)); Fzac;
43e65147 1450
99c513f6
DD
1451 }
1452 break;
1453 case 0x46:
1454 {
1455 /** 0100 0110 cmpw %0, %1 */
1456 if (trace)
1457 {
1458 printf ("\033[33m%s\033[0m %02x\n",
1459 "/** 0100 0110 cmpw %0, %1 */",
1460 op[0]);
1461 }
1462 SYNTAX("cmpw %0, %1");
63323b5b 1463#line 545 "rl78-decode.opc"
99c513f6 1464 ID(cmp); W(); DR(AX); SM(None, SADDR); Fzac;
43e65147 1465
99c513f6 1466 /*----------------------------------------------------------------------*/
43e65147 1467
99c513f6
DD
1468 }
1469 break;
1470 case 0x48:
1471 {
1d43092d 1472 /** 0100 1000 mov %e0, %1 */
99c513f6
DD
1473 if (trace)
1474 {
1475 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1476 "/** 0100 1000 mov %e0, %1 */",
99c513f6
DD
1477 op[0]);
1478 }
1d43092d 1479 SYNTAX("mov %e0, %1");
63323b5b 1480#line 737 "rl78-decode.opc"
43e65147
L
1481 ID(mov); DM(BC, IMMU(2)); SR(A);
1482
99c513f6
DD
1483 }
1484 break;
1485 case 0x49:
1486 {
1d43092d 1487 /** 0100 1001 mov %0, %e1 */
99c513f6
DD
1488 if (trace)
1489 {
1490 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1491 "/** 0100 1001 mov %0, %e1 */",
99c513f6
DD
1492 op[0]);
1493 }
1d43092d 1494 SYNTAX("mov %0, %e1");
63323b5b 1495#line 683 "rl78-decode.opc"
99c513f6 1496 ID(mov); DR(A); SM(BC, IMMU(2));
43e65147 1497
99c513f6
DD
1498 }
1499 break;
1500 case 0x4a:
1501 {
1502 /** 0100 1010 cmp %0, #%1 */
1503 if (trace)
1504 {
1505 printf ("\033[33m%s\033[0m %02x\n",
1506 "/** 0100 1010 cmp %0, #%1 */",
1507 op[0]);
1508 }
1509 SYNTAX("cmp %0, #%1");
63323b5b 1510#line 485 "rl78-decode.opc"
99c513f6 1511 ID(cmp); DM(None, SADDR); SC(IMMU(1)); Fzac;
43e65147 1512
99c513f6
DD
1513 }
1514 break;
1515 case 0x4b:
1516 {
1517 /** 0100 1011 cmp %0, %1 */
1518 if (trace)
1519 {
1520 printf ("\033[33m%s\033[0m %02x\n",
1521 "/** 0100 1011 cmp %0, %1 */",
1522 op[0]);
1523 }
1524 SYNTAX("cmp %0, %1");
63323b5b 1525#line 512 "rl78-decode.opc"
99c513f6 1526 ID(cmp); DR(A); SM(None, SADDR); Fzac;
43e65147 1527
99c513f6 1528 /*----------------------------------------------------------------------*/
43e65147 1529
99c513f6
DD
1530 }
1531 break;
1532 case 0x4c:
1533 {
1534 /** 0100 1100 cmp %0, #%1 */
1535 if (trace)
1536 {
1537 printf ("\033[33m%s\033[0m %02x\n",
1538 "/** 0100 1100 cmp %0, #%1 */",
1539 op[0]);
1540 }
1541 SYNTAX("cmp %0, #%1");
63323b5b 1542#line 503 "rl78-decode.opc"
99c513f6 1543 ID(cmp); DR(A); SC(IMMU(1)); Fzac;
43e65147 1544
99c513f6
DD
1545 }
1546 break;
1547 case 0x4d:
1548 {
1d43092d 1549 /** 0100 1101 cmp %0, %e1 */
99c513f6
DD
1550 if (trace)
1551 {
1552 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1553 "/** 0100 1101 cmp %0, %e1 */",
99c513f6
DD
1554 op[0]);
1555 }
1d43092d 1556 SYNTAX("cmp %0, %e1");
63323b5b 1557#line 491 "rl78-decode.opc"
99c513f6 1558 ID(cmp); DR(A); SM(HL, 0); Fzac;
43e65147 1559
99c513f6
DD
1560 }
1561 break;
1562 case 0x4e:
1563 {
0952813b 1564 /** 0100 1110 cmp %0, %ea1 */
99c513f6
DD
1565 if (trace)
1566 {
1567 printf ("\033[33m%s\033[0m %02x\n",
0952813b 1568 "/** 0100 1110 cmp %0, %ea1 */",
99c513f6
DD
1569 op[0]);
1570 }
90092e73 1571 SYNTAX("cmp %0, %ea1");
63323b5b 1572#line 500 "rl78-decode.opc"
99c513f6 1573 ID(cmp); DR(A); SM(HL, IMMU(1)); Fzac;
43e65147 1574
99c513f6
DD
1575 }
1576 break;
1577 case 0x4f:
1578 {
1d43092d 1579 /** 0100 1111 cmp %0, %e!1 */
99c513f6
DD
1580 if (trace)
1581 {
1582 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1583 "/** 0100 1111 cmp %0, %e!1 */",
99c513f6
DD
1584 op[0]);
1585 }
1d43092d 1586 SYNTAX("cmp %0, %e!1");
63323b5b 1587#line 488 "rl78-decode.opc"
99c513f6 1588 ID(cmp); DR(A); SM(None, IMMU(2)); Fzac;
43e65147 1589
99c513f6
DD
1590 }
1591 break;
1592 case 0x50:
1593 case 0x51:
1594 case 0x52:
1595 case 0x53:
1596 case 0x54:
1597 case 0x55:
1598 case 0x56:
1599 case 0x57:
1600 {
1601 /** 0101 0reg mov %0, #%1 */
63323b5b 1602#line 671 "rl78-decode.opc"
99c513f6
DD
1603 int reg AU = op[0] & 0x07;
1604 if (trace)
1605 {
1606 printf ("\033[33m%s\033[0m %02x\n",
1607 "/** 0101 0reg mov %0, #%1 */",
1608 op[0]);
1609 printf (" reg = 0x%x\n", reg);
1610 }
1611 SYNTAX("mov %0, #%1");
63323b5b 1612#line 671 "rl78-decode.opc"
99c513f6 1613 ID(mov); DRB(reg); SC(IMMU(1));
43e65147 1614
99c513f6
DD
1615 }
1616 break;
1617 case 0x58:
1618 {
1d43092d 1619 /** 0101 1000 movw %e0, %1 */
99c513f6
DD
1620 if (trace)
1621 {
1622 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1623 "/** 0101 1000 movw %e0, %1 */",
99c513f6
DD
1624 op[0]);
1625 }
1d43092d 1626 SYNTAX("movw %e0, %1");
63323b5b 1627#line 873 "rl78-decode.opc"
99c513f6 1628 ID(mov); W(); DM(B, IMMU(2)); SR(AX);
43e65147 1629
99c513f6
DD
1630 }
1631 break;
1632 case 0x59:
1633 {
1d43092d 1634 /** 0101 1001 movw %0, %e1 */
99c513f6
DD
1635 if (trace)
1636 {
1637 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1638 "/** 0101 1001 movw %0, %e1 */",
99c513f6
DD
1639 op[0]);
1640 }
1d43092d 1641 SYNTAX("movw %0, %e1");
63323b5b 1642#line 864 "rl78-decode.opc"
99c513f6 1643 ID(mov); W(); DR(AX); SM(B, IMMU(2));
43e65147 1644
99c513f6
DD
1645 }
1646 break;
1647 case 0x5a:
1648 {
1649 /** 0101 1010 and %0, #%1 */
1650 if (trace)
1651 {
1652 printf ("\033[33m%s\033[0m %02x\n",
1653 "/** 0101 1010 and %0, #%1 */",
1654 op[0]);
1655 }
1656 SYNTAX("and %0, #%1");
63323b5b 1657#line 314 "rl78-decode.opc"
99c513f6 1658 ID(and); DM(None, SADDR); SC(IMMU(1)); Fz;
43e65147 1659
99c513f6 1660 /*----------------------------------------------------------------------*/
43e65147 1661
99c513f6
DD
1662 }
1663 break;
1664 case 0x5b:
1665 {
1666 /** 0101 1011 and %0, %1 */
1667 if (trace)
1668 {
1669 printf ("\033[33m%s\033[0m %02x\n",
1670 "/** 0101 1011 and %0, %1 */",
1671 op[0]);
1672 }
1673 SYNTAX("and %0, %1");
63323b5b 1674#line 311 "rl78-decode.opc"
99c513f6 1675 ID(and); DR(A); SM(None, SADDR); Fz;
43e65147 1676
99c513f6
DD
1677 }
1678 break;
1679 case 0x5c:
1680 {
1681 /** 0101 1100 and %0, #%1 */
1682 if (trace)
1683 {
1684 printf ("\033[33m%s\033[0m %02x\n",
1685 "/** 0101 1100 and %0, #%1 */",
1686 op[0]);
1687 }
1688 SYNTAX("and %0, #%1");
63323b5b 1689#line 302 "rl78-decode.opc"
99c513f6 1690 ID(and); DR(A); SC(IMMU(1)); Fz;
43e65147 1691
99c513f6
DD
1692 }
1693 break;
1694 case 0x5d:
1695 {
1d43092d 1696 /** 0101 1101 and %0, %e1 */
99c513f6
DD
1697 if (trace)
1698 {
1699 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1700 "/** 0101 1101 and %0, %e1 */",
99c513f6
DD
1701 op[0]);
1702 }
1d43092d 1703 SYNTAX("and %0, %e1");
63323b5b 1704#line 290 "rl78-decode.opc"
99c513f6 1705 ID(and); DR(A); SM(HL, 0); Fz;
43e65147 1706
99c513f6
DD
1707 }
1708 break;
1709 case 0x5e:
1710 {
90092e73 1711 /** 0101 1110 and %0, %ea1 */
99c513f6
DD
1712 if (trace)
1713 {
1714 printf ("\033[33m%s\033[0m %02x\n",
90092e73 1715 "/** 0101 1110 and %0, %ea1 */",
99c513f6
DD
1716 op[0]);
1717 }
90092e73 1718 SYNTAX("and %0, %ea1");
63323b5b 1719#line 296 "rl78-decode.opc"
99c513f6 1720 ID(and); DR(A); SM(HL, IMMU(1)); Fz;
43e65147 1721
99c513f6
DD
1722 }
1723 break;
1724 case 0x5f:
1725 {
1d43092d 1726 /** 0101 1111 and %0, %e!1 */
99c513f6
DD
1727 if (trace)
1728 {
1729 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 1730 "/** 0101 1111 and %0, %e!1 */",
99c513f6
DD
1731 op[0]);
1732 }
1d43092d 1733 SYNTAX("and %0, %e!1");
63323b5b 1734#line 287 "rl78-decode.opc"
99c513f6 1735 ID(and); DR(A); SM(None, IMMU(2)); Fz;
43e65147 1736
99c513f6
DD
1737 }
1738 break;
1739 case 0x60:
1740 case 0x62:
1741 case 0x63:
1742 case 0x64:
1743 case 0x65:
1744 case 0x66:
1745 case 0x67:
1746 {
1747 /** 0110 0rba mov %0, %1 */
63323b5b 1748#line 674 "rl78-decode.opc"
99c513f6
DD
1749 int rba AU = op[0] & 0x07;
1750 if (trace)
1751 {
1752 printf ("\033[33m%s\033[0m %02x\n",
1753 "/** 0110 0rba mov %0, %1 */",
1754 op[0]);
1755 printf (" rba = 0x%x\n", rba);
1756 }
1757 SYNTAX("mov %0, %1");
63323b5b 1758#line 674 "rl78-decode.opc"
99c513f6 1759 ID(mov); DR(A); SRB(rba);
43e65147 1760
99c513f6
DD
1761 }
1762 break;
1763 case 0x61:
1764 GETBYTE ();
1765 switch (op[1] & 0xff)
1766 {
1767 case 0x00:
1768 case 0x01:
1769 case 0x02:
1770 case 0x03:
1771 case 0x04:
1772 case 0x05:
1773 case 0x06:
1774 case 0x07:
1775 {
1776 /** 0110 0001 0000 0reg add %0, %1 */
63323b5b 1777#line 227 "rl78-decode.opc"
99c513f6
DD
1778 int reg AU = op[1] & 0x07;
1779 if (trace)
1780 {
1781 printf ("\033[33m%s\033[0m %02x %02x\n",
1782 "/** 0110 0001 0000 0reg add %0, %1 */",
1783 op[0], op[1]);
1784 printf (" reg = 0x%x\n", reg);
1785 }
1786 SYNTAX("add %0, %1");
63323b5b 1787#line 227 "rl78-decode.opc"
99c513f6 1788 ID(add); DRB(reg); SR(A); Fzac;
43e65147 1789
99c513f6
DD
1790 }
1791 break;
1792 case 0x08:
1793 case 0x0a:
1794 case 0x0b:
1795 case 0x0c:
1796 case 0x0d:
1797 case 0x0e:
1798 case 0x0f:
1799 {
1800 /** 0110 0001 0000 1rba add %0, %1 */
63323b5b 1801#line 221 "rl78-decode.opc"
99c513f6
DD
1802 int rba AU = op[1] & 0x07;
1803 if (trace)
1804 {
1805 printf ("\033[33m%s\033[0m %02x %02x\n",
1806 "/** 0110 0001 0000 1rba add %0, %1 */",
1807 op[0], op[1]);
1808 printf (" rba = 0x%x\n", rba);
1809 }
1810 SYNTAX("add %0, %1");
63323b5b 1811#line 221 "rl78-decode.opc"
99c513f6 1812 ID(add); DR(A); SRB(rba); Fzac;
43e65147 1813
99c513f6
DD
1814 }
1815 break;
1816 case 0x09:
1817 {
90092e73 1818 /** 0110 0001 0000 1001 addw %0, %ea1 */
99c513f6
DD
1819 if (trace)
1820 {
1821 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 1822 "/** 0110 0001 0000 1001 addw %0, %ea1 */",
99c513f6
DD
1823 op[0], op[1]);
1824 }
90092e73 1825 SYNTAX("addw %0, %ea1");
63323b5b 1826#line 270 "rl78-decode.opc"
99c513f6 1827 ID(add); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
43e65147 1828
99c513f6
DD
1829 }
1830 break;
1831 case 0x10:
1832 case 0x11:
1833 case 0x12:
1834 case 0x13:
1835 case 0x14:
1836 case 0x15:
1837 case 0x16:
1838 case 0x17:
1839 {
1840 /** 0110 0001 0001 0reg addc %0, %1 */
63323b5b 1841#line 256 "rl78-decode.opc"
99c513f6
DD
1842 int reg AU = op[1] & 0x07;
1843 if (trace)
1844 {
1845 printf ("\033[33m%s\033[0m %02x %02x\n",
1846 "/** 0110 0001 0001 0reg addc %0, %1 */",
1847 op[0], op[1]);
1848 printf (" reg = 0x%x\n", reg);
1849 }
1850 SYNTAX("addc %0, %1");
63323b5b 1851#line 256 "rl78-decode.opc"
99c513f6 1852 ID(addc); DRB(reg); SR(A); Fzac;
43e65147 1853
99c513f6
DD
1854 }
1855 break;
1856 case 0x18:
1857 case 0x1a:
1858 case 0x1b:
1859 case 0x1c:
1860 case 0x1d:
1861 case 0x1e:
1862 case 0x1f:
1863 {
1864 /** 0110 0001 0001 1rba addc %0, %1 */
63323b5b 1865#line 253 "rl78-decode.opc"
99c513f6
DD
1866 int rba AU = op[1] & 0x07;
1867 if (trace)
1868 {
1869 printf ("\033[33m%s\033[0m %02x %02x\n",
1870 "/** 0110 0001 0001 1rba addc %0, %1 */",
1871 op[0], op[1]);
1872 printf (" rba = 0x%x\n", rba);
1873 }
1874 SYNTAX("addc %0, %1");
63323b5b 1875#line 253 "rl78-decode.opc"
99c513f6 1876 ID(addc); DR(A); SRB(rba); Fzac;
43e65147 1877
99c513f6
DD
1878 }
1879 break;
1880 case 0x20:
1881 case 0x21:
1882 case 0x22:
1883 case 0x23:
1884 case 0x24:
1885 case 0x25:
1886 case 0x26:
1887 case 0x27:
1888 {
1889 /** 0110 0001 0010 0reg sub %0, %1 */
63323b5b 1890#line 1145 "rl78-decode.opc"
99c513f6
DD
1891 int reg AU = op[1] & 0x07;
1892 if (trace)
1893 {
1894 printf ("\033[33m%s\033[0m %02x %02x\n",
1895 "/** 0110 0001 0010 0reg sub %0, %1 */",
1896 op[0], op[1]);
1897 printf (" reg = 0x%x\n", reg);
1898 }
1899 SYNTAX("sub %0, %1");
63323b5b 1900#line 1145 "rl78-decode.opc"
99c513f6 1901 ID(sub); DRB(reg); SR(A); Fzac;
43e65147 1902
99c513f6
DD
1903 }
1904 break;
1905 case 0x28:
1906 case 0x2a:
1907 case 0x2b:
1908 case 0x2c:
1909 case 0x2d:
1910 case 0x2e:
1911 case 0x2f:
1912 {
1913 /** 0110 0001 0010 1rba sub %0, %1 */
63323b5b 1914#line 1139 "rl78-decode.opc"
99c513f6
DD
1915 int rba AU = op[1] & 0x07;
1916 if (trace)
1917 {
1918 printf ("\033[33m%s\033[0m %02x %02x\n",
1919 "/** 0110 0001 0010 1rba sub %0, %1 */",
1920 op[0], op[1]);
1921 printf (" rba = 0x%x\n", rba);
1922 }
1923 SYNTAX("sub %0, %1");
63323b5b 1924#line 1139 "rl78-decode.opc"
99c513f6 1925 ID(sub); DR(A); SRB(rba); Fzac;
43e65147 1926
99c513f6
DD
1927 }
1928 break;
1929 case 0x29:
1930 {
0952813b 1931 /** 0110 0001 0010 1001 subw %0, %ea1 */
99c513f6
DD
1932 if (trace)
1933 {
1934 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 1935 "/** 0110 0001 0010 1001 subw %0, %ea1 */",
99c513f6
DD
1936 op[0], op[1]);
1937 }
90092e73 1938 SYNTAX("subw %0, %ea1");
63323b5b 1939#line 1188 "rl78-decode.opc"
99c513f6 1940 ID(sub); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
43e65147 1941
99c513f6
DD
1942 }
1943 break;
1944 case 0x30:
1945 case 0x31:
1946 case 0x32:
1947 case 0x33:
1948 case 0x34:
1949 case 0x35:
1950 case 0x36:
1951 case 0x37:
1952 {
1953 /** 0110 0001 0011 0reg subc %0, %1 */
63323b5b 1954#line 1174 "rl78-decode.opc"
99c513f6
DD
1955 int reg AU = op[1] & 0x07;
1956 if (trace)
1957 {
1958 printf ("\033[33m%s\033[0m %02x %02x\n",
1959 "/** 0110 0001 0011 0reg subc %0, %1 */",
1960 op[0], op[1]);
1961 printf (" reg = 0x%x\n", reg);
1962 }
1963 SYNTAX("subc %0, %1");
63323b5b 1964#line 1174 "rl78-decode.opc"
99c513f6 1965 ID(subc); DRB(reg); SR(A); Fzac;
43e65147 1966
99c513f6
DD
1967 }
1968 break;
1969 case 0x38:
1970 case 0x3a:
1971 case 0x3b:
1972 case 0x3c:
1973 case 0x3d:
1974 case 0x3e:
1975 case 0x3f:
1976 {
1977 /** 0110 0001 0011 1rba subc %0, %1 */
63323b5b 1978#line 1171 "rl78-decode.opc"
99c513f6
DD
1979 int rba AU = op[1] & 0x07;
1980 if (trace)
1981 {
1982 printf ("\033[33m%s\033[0m %02x %02x\n",
1983 "/** 0110 0001 0011 1rba subc %0, %1 */",
1984 op[0], op[1]);
1985 printf (" rba = 0x%x\n", rba);
1986 }
1987 SYNTAX("subc %0, %1");
63323b5b 1988#line 1171 "rl78-decode.opc"
99c513f6 1989 ID(subc); DR(A); SRB(rba); Fzac;
43e65147 1990
99c513f6
DD
1991 }
1992 break;
1993 case 0x40:
1994 case 0x41:
1995 case 0x42:
1996 case 0x43:
1997 case 0x44:
1998 case 0x45:
1999 case 0x46:
2000 case 0x47:
2001 {
2002 /** 0110 0001 0100 0reg cmp %0, %1 */
63323b5b 2003#line 509 "rl78-decode.opc"
99c513f6
DD
2004 int reg AU = op[1] & 0x07;
2005 if (trace)
2006 {
2007 printf ("\033[33m%s\033[0m %02x %02x\n",
2008 "/** 0110 0001 0100 0reg cmp %0, %1 */",
2009 op[0], op[1]);
2010 printf (" reg = 0x%x\n", reg);
2011 }
2012 SYNTAX("cmp %0, %1");
63323b5b 2013#line 509 "rl78-decode.opc"
99c513f6 2014 ID(cmp); DRB(reg); SR(A); Fzac;
43e65147 2015
99c513f6
DD
2016 }
2017 break;
2018 case 0x48:
2019 case 0x4a:
2020 case 0x4b:
2021 case 0x4c:
2022 case 0x4d:
2023 case 0x4e:
2024 case 0x4f:
2025 {
2026 /** 0110 0001 0100 1rba cmp %0, %1 */
63323b5b 2027#line 506 "rl78-decode.opc"
99c513f6
DD
2028 int rba AU = op[1] & 0x07;
2029 if (trace)
2030 {
2031 printf ("\033[33m%s\033[0m %02x %02x\n",
2032 "/** 0110 0001 0100 1rba cmp %0, %1 */",
2033 op[0], op[1]);
2034 printf (" rba = 0x%x\n", rba);
2035 }
2036 SYNTAX("cmp %0, %1");
63323b5b 2037#line 506 "rl78-decode.opc"
99c513f6 2038 ID(cmp); DR(A); SRB(rba); Fzac;
43e65147 2039
99c513f6
DD
2040 }
2041 break;
2042 case 0x49:
2043 {
0952813b 2044 /** 0110 0001 0100 1001 cmpw %0, %ea1 */
99c513f6
DD
2045 if (trace)
2046 {
2047 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2048 "/** 0110 0001 0100 1001 cmpw %0, %ea1 */",
99c513f6
DD
2049 op[0], op[1]);
2050 }
90092e73 2051 SYNTAX("cmpw %0, %ea1");
63323b5b 2052#line 536 "rl78-decode.opc"
99c513f6 2053 ID(cmp); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
43e65147 2054
99c513f6
DD
2055 }
2056 break;
2057 case 0x50:
2058 case 0x51:
2059 case 0x52:
2060 case 0x53:
2061 case 0x54:
2062 case 0x55:
2063 case 0x56:
2064 case 0x57:
2065 {
2066 /** 0110 0001 0101 0reg and %0, %1 */
63323b5b 2067#line 308 "rl78-decode.opc"
99c513f6
DD
2068 int reg AU = op[1] & 0x07;
2069 if (trace)
2070 {
2071 printf ("\033[33m%s\033[0m %02x %02x\n",
2072 "/** 0110 0001 0101 0reg and %0, %1 */",
2073 op[0], op[1]);
2074 printf (" reg = 0x%x\n", reg);
2075 }
2076 SYNTAX("and %0, %1");
63323b5b 2077#line 308 "rl78-decode.opc"
99c513f6 2078 ID(and); DRB(reg); SR(A); Fz;
43e65147 2079
99c513f6
DD
2080 }
2081 break;
2082 case 0x58:
2083 case 0x5a:
2084 case 0x5b:
2085 case 0x5c:
2086 case 0x5d:
2087 case 0x5e:
2088 case 0x5f:
2089 {
2090 /** 0110 0001 0101 1rba and %0, %1 */
63323b5b 2091#line 305 "rl78-decode.opc"
99c513f6
DD
2092 int rba AU = op[1] & 0x07;
2093 if (trace)
2094 {
2095 printf ("\033[33m%s\033[0m %02x %02x\n",
2096 "/** 0110 0001 0101 1rba and %0, %1 */",
2097 op[0], op[1]);
2098 printf (" rba = 0x%x\n", rba);
2099 }
2100 SYNTAX("and %0, %1");
63323b5b 2101#line 305 "rl78-decode.opc"
99c513f6 2102 ID(and); DR(A); SRB(rba); Fz;
43e65147 2103
99c513f6
DD
2104 }
2105 break;
2106 case 0x59:
2107 {
90092e73 2108 /** 0110 0001 0101 1001 inc %ea0 */
99c513f6
DD
2109 if (trace)
2110 {
2111 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2112 "/** 0110 0001 0101 1001 inc %ea0 */",
99c513f6
DD
2113 op[0], op[1]);
2114 }
90092e73 2115 SYNTAX("inc %ea0");
63323b5b 2116#line 586 "rl78-decode.opc"
99c513f6 2117 ID(add); DM(HL, IMMU(1)); SC(1); Fza;
43e65147 2118
99c513f6
DD
2119 }
2120 break;
2121 case 0x60:
2122 case 0x61:
2123 case 0x62:
2124 case 0x63:
2125 case 0x64:
2126 case 0x65:
2127 case 0x66:
2128 case 0x67:
2129 {
2130 /** 0110 0001 0110 0reg or %0, %1 */
63323b5b 2131#line 963 "rl78-decode.opc"
99c513f6
DD
2132 int reg AU = op[1] & 0x07;
2133 if (trace)
2134 {
2135 printf ("\033[33m%s\033[0m %02x %02x\n",
2136 "/** 0110 0001 0110 0reg or %0, %1 */",
2137 op[0], op[1]);
2138 printf (" reg = 0x%x\n", reg);
2139 }
2140 SYNTAX("or %0, %1");
63323b5b 2141#line 963 "rl78-decode.opc"
99c513f6 2142 ID(or); DRB(reg); SR(A); Fz;
43e65147 2143
99c513f6
DD
2144 }
2145 break;
2146 case 0x68:
2147 case 0x6a:
2148 case 0x6b:
2149 case 0x6c:
2150 case 0x6d:
2151 case 0x6e:
2152 case 0x6f:
2153 {
2154 /** 0110 0001 0110 1rba or %0, %1 */
63323b5b 2155#line 960 "rl78-decode.opc"
99c513f6
DD
2156 int rba AU = op[1] & 0x07;
2157 if (trace)
2158 {
2159 printf ("\033[33m%s\033[0m %02x %02x\n",
2160 "/** 0110 0001 0110 1rba or %0, %1 */",
2161 op[0], op[1]);
2162 printf (" rba = 0x%x\n", rba);
2163 }
2164 SYNTAX("or %0, %1");
63323b5b 2165#line 960 "rl78-decode.opc"
99c513f6 2166 ID(or); DR(A); SRB(rba); Fz;
43e65147 2167
99c513f6
DD
2168 }
2169 break;
2170 case 0x69:
2171 {
90092e73 2172 /** 0110 0001 0110 1001 dec %ea0 */
99c513f6
DD
2173 if (trace)
2174 {
2175 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2176 "/** 0110 0001 0110 1001 dec %ea0 */",
99c513f6
DD
2177 op[0], op[1]);
2178 }
90092e73 2179 SYNTAX("dec %ea0");
63323b5b 2180#line 553 "rl78-decode.opc"
99c513f6 2181 ID(sub); DM(HL, IMMU(1)); SC(1); Fza;
43e65147 2182
99c513f6
DD
2183 }
2184 break;
2185 case 0x70:
2186 case 0x71:
2187 case 0x72:
2188 case 0x73:
2189 case 0x74:
2190 case 0x75:
2191 case 0x76:
2192 case 0x77:
2193 {
2194 /** 0110 0001 0111 0reg xor %0, %1 */
63323b5b 2195#line 1267 "rl78-decode.opc"
99c513f6
DD
2196 int reg AU = op[1] & 0x07;
2197 if (trace)
2198 {
2199 printf ("\033[33m%s\033[0m %02x %02x\n",
2200 "/** 0110 0001 0111 0reg xor %0, %1 */",
2201 op[0], op[1]);
2202 printf (" reg = 0x%x\n", reg);
2203 }
2204 SYNTAX("xor %0, %1");
63323b5b 2205#line 1267 "rl78-decode.opc"
99c513f6 2206 ID(xor); DRB(reg); SR(A); Fz;
43e65147 2207
99c513f6
DD
2208 }
2209 break;
2210 case 0x78:
2211 case 0x7a:
2212 case 0x7b:
2213 case 0x7c:
2214 case 0x7d:
2215 case 0x7e:
2216 case 0x7f:
2217 {
2218 /** 0110 0001 0111 1rba xor %0, %1 */
63323b5b 2219#line 1264 "rl78-decode.opc"
99c513f6
DD
2220 int rba AU = op[1] & 0x07;
2221 if (trace)
2222 {
2223 printf ("\033[33m%s\033[0m %02x %02x\n",
2224 "/** 0110 0001 0111 1rba xor %0, %1 */",
2225 op[0], op[1]);
2226 printf (" rba = 0x%x\n", rba);
2227 }
2228 SYNTAX("xor %0, %1");
63323b5b 2229#line 1264 "rl78-decode.opc"
99c513f6 2230 ID(xor); DR(A); SRB(rba); Fz;
43e65147 2231
99c513f6
DD
2232 }
2233 break;
2234 case 0x79:
2235 {
90092e73 2236 /** 0110 0001 0111 1001 incw %ea0 */
99c513f6
DD
2237 if (trace)
2238 {
2239 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2240 "/** 0110 0001 0111 1001 incw %ea0 */",
99c513f6
DD
2241 op[0], op[1]);
2242 }
90092e73 2243 SYNTAX("incw %ea0");
63323b5b 2244#line 600 "rl78-decode.opc"
99c513f6 2245 ID(add); W(); DM(HL, IMMU(1)); SC(1);
43e65147 2246
99c513f6
DD
2247 }
2248 break;
2249 case 0x80:
2250 case 0x81:
2251 {
1d43092d 2252 /** 0110 0001 1000 000 add %0, %e1 */
99c513f6
DD
2253 if (trace)
2254 {
2255 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2256 "/** 0110 0001 1000 000 add %0, %e1 */",
99c513f6
DD
2257 op[0], op[1]);
2258 }
1d43092d 2259 SYNTAX("add %0, %e1");
63323b5b 2260#line 209 "rl78-decode.opc"
99c513f6 2261 ID(add); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2262
99c513f6
DD
2263 }
2264 break;
2265 case 0x82:
2266 {
1d43092d 2267 /** 0110 0001 1000 0010 add %0, %e1 */
99c513f6
DD
2268 if (trace)
2269 {
2270 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2271 "/** 0110 0001 1000 0010 add %0, %e1 */",
99c513f6
DD
2272 op[0], op[1]);
2273 }
1d43092d 2274 SYNTAX("add %0, %e1");
63323b5b 2275#line 215 "rl78-decode.opc"
99c513f6 2276 ID(add); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2277
99c513f6
DD
2278 }
2279 break;
2280 case 0x84:
2281 case 0x85:
2282 case 0x86:
2283 case 0x87:
2284 case 0x94:
2285 case 0x95:
2286 case 0x96:
2287 case 0x97:
2288 case 0xa4:
2289 case 0xa5:
2290 case 0xa6:
2291 case 0xa7:
2292 case 0xb4:
2293 case 0xb5:
2294 case 0xb6:
2295 case 0xb7:
2296 case 0xc4:
2297 case 0xc5:
2298 case 0xc6:
2299 case 0xc7:
2300 case 0xd4:
2301 case 0xd5:
2302 case 0xd6:
2303 case 0xd7:
2304 case 0xe4:
2305 case 0xe5:
2306 case 0xe6:
2307 case 0xe7:
2308 case 0xf4:
2309 case 0xf5:
2310 case 0xf6:
2311 case 0xf7:
2312 {
2313 /** 0110 0001 1nnn 01mm callt [%x0] */
63323b5b 2314#line 435 "rl78-decode.opc"
99c513f6 2315 int nnn AU = (op[1] >> 4) & 0x07;
63323b5b 2316#line 435 "rl78-decode.opc"
99c513f6
DD
2317 int mm AU = op[1] & 0x03;
2318 if (trace)
2319 {
2320 printf ("\033[33m%s\033[0m %02x %02x\n",
2321 "/** 0110 0001 1nnn 01mm callt [%x0] */",
2322 op[0], op[1]);
2323 printf (" nnn = 0x%x,", nnn);
2324 printf (" mm = 0x%x\n", mm);
2325 }
2326 SYNTAX("callt [%x0]");
63323b5b 2327#line 435 "rl78-decode.opc"
99c513f6 2328 ID(call); DM(None, 0x80 + mm*16 + nnn*2);
43e65147 2329
99c513f6 2330 /*----------------------------------------------------------------------*/
43e65147 2331
99c513f6
DD
2332 }
2333 break;
2334 case 0x88:
2335 case 0x8a:
2336 case 0x8b:
2337 case 0x8c:
2338 case 0x8d:
2339 case 0x8e:
2340 case 0x8f:
2341 {
2342 /** 0110 0001 1000 1reg xch %0, %1 */
63323b5b 2343#line 1226 "rl78-decode.opc"
99c513f6
DD
2344 int reg AU = op[1] & 0x07;
2345 if (trace)
2346 {
2347 printf ("\033[33m%s\033[0m %02x %02x\n",
2348 "/** 0110 0001 1000 1reg xch %0, %1 */",
2349 op[0], op[1]);
2350 printf (" reg = 0x%x\n", reg);
2351 }
2352 SYNTAX("xch %0, %1");
63323b5b 2353#line 1226 "rl78-decode.opc"
99c513f6
DD
2354 /* Note: DECW uses reg == X, so this must follow DECW */
2355 ID(xch); DR(A); SRB(reg);
43e65147 2356
99c513f6
DD
2357 }
2358 break;
2359 case 0x89:
2360 {
90092e73 2361 /** 0110 0001 1000 1001 decw %ea0 */
99c513f6
DD
2362 if (trace)
2363 {
2364 printf ("\033[33m%s\033[0m %02x %02x\n",
90092e73 2365 "/** 0110 0001 1000 1001 decw %ea0 */",
99c513f6
DD
2366 op[0], op[1]);
2367 }
90092e73 2368 SYNTAX("decw %ea0");
63323b5b 2369#line 567 "rl78-decode.opc"
99c513f6 2370 ID(sub); W(); DM(HL, IMMU(1)); SC(1);
43e65147 2371
99c513f6
DD
2372 }
2373 break;
2374 case 0x90:
2375 {
1d43092d 2376 /** 0110 0001 1001 0000 addc %0, %e1 */
99c513f6
DD
2377 if (trace)
2378 {
2379 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2380 "/** 0110 0001 1001 0000 addc %0, %e1 */",
99c513f6
DD
2381 op[0], op[1]);
2382 }
1d43092d 2383 SYNTAX("addc %0, %e1");
63323b5b 2384#line 241 "rl78-decode.opc"
99c513f6 2385 ID(addc); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2386
99c513f6
DD
2387 }
2388 break;
2389 case 0x92:
2390 {
1d43092d 2391 /** 0110 0001 1001 0010 addc %0, %e1 */
99c513f6
DD
2392 if (trace)
2393 {
2394 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2395 "/** 0110 0001 1001 0010 addc %0, %e1 */",
99c513f6
DD
2396 op[0], op[1]);
2397 }
1d43092d 2398 SYNTAX("addc %0, %e1");
63323b5b 2399#line 244 "rl78-decode.opc"
99c513f6 2400 ID(addc); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2401
99c513f6
DD
2402 }
2403 break;
2404 case 0xa0:
2405 case 0xa1:
2406 {
1d43092d 2407 /** 0110 0001 1010 000 sub %0, %e1 */
99c513f6
DD
2408 if (trace)
2409 {
2410 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2411 "/** 0110 0001 1010 000 sub %0, %e1 */",
99c513f6
DD
2412 op[0], op[1]);
2413 }
1d43092d 2414 SYNTAX("sub %0, %e1");
63323b5b 2415#line 1127 "rl78-decode.opc"
99c513f6 2416 ID(sub); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2417
99c513f6
DD
2418 }
2419 break;
2420 case 0xa2:
2421 {
1d43092d 2422 /** 0110 0001 1010 0010 sub %0, %e1 */
99c513f6
DD
2423 if (trace)
2424 {
2425 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2426 "/** 0110 0001 1010 0010 sub %0, %e1 */",
99c513f6
DD
2427 op[0], op[1]);
2428 }
1d43092d 2429 SYNTAX("sub %0, %e1");
63323b5b 2430#line 1133 "rl78-decode.opc"
99c513f6 2431 ID(sub); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2432
99c513f6
DD
2433 }
2434 break;
2435 case 0xa8:
2436 {
2437 /** 0110 0001 1010 1000 xch %0, %1 */
2438 if (trace)
2439 {
2440 printf ("\033[33m%s\033[0m %02x %02x\n",
2441 "/** 0110 0001 1010 1000 xch %0, %1 */",
2442 op[0], op[1]);
2443 }
2444 SYNTAX("xch %0, %1");
63323b5b 2445#line 1230 "rl78-decode.opc"
99c513f6 2446 ID(xch); DR(A); SM(None, SADDR);
43e65147 2447
99c513f6
DD
2448 }
2449 break;
2450 case 0xa9:
2451 {
1d43092d 2452 /** 0110 0001 1010 1001 xch %0, %e1 */
99c513f6
DD
2453 if (trace)
2454 {
2455 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2456 "/** 0110 0001 1010 1001 xch %0, %e1 */",
99c513f6
DD
2457 op[0], op[1]);
2458 }
1d43092d 2459 SYNTAX("xch %0, %e1");
63323b5b 2460#line 1223 "rl78-decode.opc"
99c513f6 2461 ID(xch); DR(A); SM2(HL, C, 0);
43e65147 2462
99c513f6
DD
2463 }
2464 break;
2465 case 0xaa:
2466 {
1d43092d 2467 /** 0110 0001 1010 1010 xch %0, %e!1 */
99c513f6
DD
2468 if (trace)
2469 {
2470 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2471 "/** 0110 0001 1010 1010 xch %0, %e!1 */",
99c513f6
DD
2472 op[0], op[1]);
2473 }
1d43092d 2474 SYNTAX("xch %0, %e!1");
63323b5b 2475#line 1205 "rl78-decode.opc"
99c513f6 2476 ID(xch); DR(A); SM(None, IMMU(2));
43e65147 2477
99c513f6
DD
2478 }
2479 break;
2480 case 0xab:
2481 {
46662804 2482 /** 0110 0001 1010 1011 xch %0, %s1 */
99c513f6
DD
2483 if (trace)
2484 {
2485 printf ("\033[33m%s\033[0m %02x %02x\n",
1eac08cc 2486 "/** 0110 0001 1010 1011 xch %0, %s1 */",
99c513f6
DD
2487 op[0], op[1]);
2488 }
46662804 2489 SYNTAX("xch %0, %s1");
63323b5b 2490#line 1233 "rl78-decode.opc"
99c513f6 2491 ID(xch); DR(A); SM(None, SFR);
43e65147 2492
99c513f6
DD
2493 }
2494 break;
2495 case 0xac:
2496 {
1d43092d 2497 /** 0110 0001 1010 1100 xch %0, %e1 */
99c513f6
DD
2498 if (trace)
2499 {
2500 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2501 "/** 0110 0001 1010 1100 xch %0, %e1 */",
99c513f6
DD
2502 op[0], op[1]);
2503 }
1d43092d 2504 SYNTAX("xch %0, %e1");
63323b5b 2505#line 1214 "rl78-decode.opc"
99c513f6 2506 ID(xch); DR(A); SM(HL, 0);
43e65147 2507
99c513f6
DD
2508 }
2509 break;
2510 case 0xad:
2511 {
0952813b 2512 /** 0110 0001 1010 1101 xch %0, %ea1 */
99c513f6
DD
2513 if (trace)
2514 {
2515 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2516 "/** 0110 0001 1010 1101 xch %0, %ea1 */",
99c513f6
DD
2517 op[0], op[1]);
2518 }
90092e73 2519 SYNTAX("xch %0, %ea1");
63323b5b 2520#line 1220 "rl78-decode.opc"
99c513f6 2521 ID(xch); DR(A); SM(HL, IMMU(1));
43e65147 2522
99c513f6
DD
2523 }
2524 break;
2525 case 0xae:
2526 {
1d43092d 2527 /** 0110 0001 1010 1110 xch %0, %e1 */
99c513f6
DD
2528 if (trace)
2529 {
2530 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2531 "/** 0110 0001 1010 1110 xch %0, %e1 */",
99c513f6
DD
2532 op[0], op[1]);
2533 }
1d43092d 2534 SYNTAX("xch %0, %e1");
63323b5b 2535#line 1208 "rl78-decode.opc"
99c513f6 2536 ID(xch); DR(A); SM(DE, 0);
43e65147 2537
99c513f6
DD
2538 }
2539 break;
2540 case 0xaf:
2541 {
1eac08cc 2542 /** 0110 0001 1010 1111 xch %0, %ea1 */
99c513f6
DD
2543 if (trace)
2544 {
2545 printf ("\033[33m%s\033[0m %02x %02x\n",
1eac08cc 2546 "/** 0110 0001 1010 1111 xch %0, %ea1 */",
99c513f6
DD
2547 op[0], op[1]);
2548 }
c2f28758 2549 SYNTAX("xch %0, %ea1");
63323b5b 2550#line 1211 "rl78-decode.opc"
99c513f6 2551 ID(xch); DR(A); SM(DE, IMMU(1));
43e65147 2552
99c513f6
DD
2553 }
2554 break;
2555 case 0xb0:
2556 {
1d43092d 2557 /** 0110 0001 1011 0000 subc %0, %e1 */
99c513f6
DD
2558 if (trace)
2559 {
2560 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2561 "/** 0110 0001 1011 0000 subc %0, %e1 */",
99c513f6
DD
2562 op[0], op[1]);
2563 }
1d43092d 2564 SYNTAX("subc %0, %e1");
63323b5b 2565#line 1159 "rl78-decode.opc"
99c513f6 2566 ID(subc); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2567
99c513f6
DD
2568 }
2569 break;
2570 case 0xb2:
2571 {
1d43092d 2572 /** 0110 0001 1011 0010 subc %0, %e1 */
99c513f6
DD
2573 if (trace)
2574 {
2575 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2576 "/** 0110 0001 1011 0010 subc %0, %e1 */",
99c513f6
DD
2577 op[0], op[1]);
2578 }
1d43092d 2579 SYNTAX("subc %0, %e1");
63323b5b 2580#line 1162 "rl78-decode.opc"
99c513f6 2581 ID(subc); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2582
99c513f6
DD
2583 }
2584 break;
2585 case 0xb8:
2586 {
2587 /** 0110 0001 1011 1000 mov %0, %1 */
2588 if (trace)
2589 {
2590 printf ("\033[33m%s\033[0m %02x %02x\n",
2591 "/** 0110 0001 1011 1000 mov %0, %1 */",
2592 op[0], op[1]);
2593 }
2594 SYNTAX("mov %0, %1");
63323b5b 2595#line 725 "rl78-decode.opc"
43e65147
L
2596 ID(mov); DR(ES); SM(None, SADDR);
2597
99c513f6
DD
2598 }
2599 break;
2600 case 0xb9:
2601 {
1d43092d 2602 /** 0110 0001 1011 1001 xch %0, %e1 */
99c513f6
DD
2603 if (trace)
2604 {
2605 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2606 "/** 0110 0001 1011 1001 xch %0, %e1 */",
99c513f6
DD
2607 op[0], op[1]);
2608 }
1d43092d 2609 SYNTAX("xch %0, %e1");
63323b5b 2610#line 1217 "rl78-decode.opc"
99c513f6 2611 ID(xch); DR(A); SM2(HL, B, 0);
43e65147 2612
99c513f6
DD
2613 }
2614 break;
2615 case 0xc0:
2616 {
1d43092d 2617 /** 0110 0001 1100 0000 cmp %0, %e1 */
99c513f6
DD
2618 if (trace)
2619 {
2620 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2621 "/** 0110 0001 1100 0000 cmp %0, %e1 */",
99c513f6
DD
2622 op[0], op[1]);
2623 }
1d43092d 2624 SYNTAX("cmp %0, %e1");
63323b5b 2625#line 494 "rl78-decode.opc"
99c513f6 2626 ID(cmp); DR(A); SM2(HL, B, 0); Fzac;
43e65147 2627
99c513f6
DD
2628 }
2629 break;
2630 case 0xc2:
2631 {
1d43092d 2632 /** 0110 0001 1100 0010 cmp %0, %e1 */
99c513f6
DD
2633 if (trace)
2634 {
2635 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2636 "/** 0110 0001 1100 0010 cmp %0, %e1 */",
99c513f6
DD
2637 op[0], op[1]);
2638 }
1d43092d 2639 SYNTAX("cmp %0, %e1");
63323b5b 2640#line 497 "rl78-decode.opc"
99c513f6 2641 ID(cmp); DR(A); SM2(HL, C, 0); Fzac;
43e65147 2642
99c513f6
DD
2643 }
2644 break;
2645 case 0xc3:
2646 {
2647 /** 0110 0001 1100 0011 bh $%a0 */
2648 if (trace)
2649 {
2650 printf ("\033[33m%s\033[0m %02x %02x\n",
2651 "/** 0110 0001 1100 0011 bh $%a0 */",
2652 op[0], op[1]);
2653 }
2654 SYNTAX("bh $%a0");
63323b5b 2655#line 342 "rl78-decode.opc"
99c513f6 2656 ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(H);
43e65147 2657
99c513f6
DD
2658 }
2659 break;
2660 case 0xc8:
2661 {
2662 /** 0110 0001 1100 1000 sk%c1 */
2663 if (trace)
2664 {
2665 printf ("\033[33m%s\033[0m %02x %02x\n",
2666 "/** 0110 0001 1100 1000 sk%c1 */",
2667 op[0], op[1]);
2668 }
2669 SYNTAX("sk%c1");
63323b5b 2670#line 1096 "rl78-decode.opc"
99c513f6 2671 ID(skip); COND(C);
43e65147 2672
99c513f6
DD
2673 }
2674 break;
2675 case 0xc9:
2676 {
1d43092d 2677 /** 0110 0001 1100 1001 mov %0, %e1 */
99c513f6
DD
2678 if (trace)
2679 {
2680 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2681 "/** 0110 0001 1100 1001 mov %0, %e1 */",
99c513f6
DD
2682 op[0], op[1]);
2683 }
1d43092d 2684 SYNTAX("mov %0, %e1");
63323b5b 2685#line 662 "rl78-decode.opc"
99c513f6 2686 ID(mov); DR(A); SM2(HL, B, 0);
43e65147 2687
99c513f6
DD
2688 }
2689 break;
2690 case 0xca:
2691 case 0xda:
2692 case 0xea:
2693 case 0xfa:
2694 {
2695 /** 0110 0001 11rg 1010 call %0 */
63323b5b 2696#line 432 "rl78-decode.opc"
99c513f6
DD
2697 int rg AU = (op[1] >> 4) & 0x03;
2698 if (trace)
2699 {
2700 printf ("\033[33m%s\033[0m %02x %02x\n",
2701 "/** 0110 0001 11rg 1010 call %0 */",
2702 op[0], op[1]);
2703 printf (" rg = 0x%x\n", rg);
2704 }
2705 SYNTAX("call %0");
63323b5b 2706#line 432 "rl78-decode.opc"
99c513f6 2707 ID(call); DRW(rg);
43e65147 2708
99c513f6
DD
2709 }
2710 break;
2711 case 0xcb:
2712 {
2713 /** 0110 0001 1100 1011 br ax */
2714 if (trace)
2715 {
2716 printf ("\033[33m%s\033[0m %02x %02x\n",
2717 "/** 0110 0001 1100 1011 br ax */",
2718 op[0], op[1]);
2719 }
2720 SYNTAX("br ax");
63323b5b 2721#line 382 "rl78-decode.opc"
99c513f6 2722 ID(branch); DR(AX);
43e65147 2723
99c513f6 2724 /*----------------------------------------------------------------------*/
43e65147 2725
99c513f6
DD
2726 }
2727 break;
2728 case 0xcc:
2729 {
2730 /** 0110 0001 1100 1100 brk */
2731 if (trace)
2732 {
2733 printf ("\033[33m%s\033[0m %02x %02x\n",
2734 "/** 0110 0001 1100 1100 brk */",
2735 op[0], op[1]);
2736 }
2737 SYNTAX("brk");
63323b5b 2738#line 390 "rl78-decode.opc"
99c513f6 2739 ID(break);
43e65147 2740
99c513f6 2741 /*----------------------------------------------------------------------*/
43e65147 2742
99c513f6
DD
2743 }
2744 break;
2745 case 0xcd:
2746 {
2747 /** 0110 0001 1100 1101 pop %s0 */
2748 if (trace)
2749 {
2750 printf ("\033[33m%s\033[0m %02x %02x\n",
2751 "/** 0110 0001 1100 1101 pop %s0 */",
2752 op[0], op[1]);
2753 }
2754 SYNTAX("pop %s0");
63323b5b 2755#line 991 "rl78-decode.opc"
99c513f6 2756 ID(mov); W(); DR(PSW); SPOP();
43e65147 2757
99c513f6 2758 /*----------------------------------------------------------------------*/
43e65147 2759
99c513f6
DD
2760 }
2761 break;
2762 case 0xce:
2763 {
0952813b 2764 /** 0110 0001 1100 1110 movs %ea0, %1 */
99c513f6
DD
2765 if (trace)
2766 {
2767 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2768 "/** 0110 0001 1100 1110 movs %ea0, %1 */",
99c513f6
DD
2769 op[0], op[1]);
2770 }
90092e73 2771 SYNTAX("movs %ea0, %1");
63323b5b 2772#line 813 "rl78-decode.opc"
99c513f6 2773 ID(mov); DM(HL, IMMU(1)); SR(X); Fzc;
43e65147 2774
99c513f6 2775 /*----------------------------------------------------------------------*/
43e65147 2776
99c513f6
DD
2777 }
2778 break;
2779 case 0xcf:
2780 case 0xdf:
2781 case 0xef:
2782 case 0xff:
2783 {
2784 /** 0110 0001 11rb 1111 sel rb%1 */
63323b5b 2785#line 1043 "rl78-decode.opc"
99c513f6
DD
2786 int rb AU = (op[1] >> 4) & 0x03;
2787 if (trace)
2788 {
2789 printf ("\033[33m%s\033[0m %02x %02x\n",
2790 "/** 0110 0001 11rb 1111 sel rb%1 */",
2791 op[0], op[1]);
2792 printf (" rb = 0x%x\n", rb);
2793 }
2794 SYNTAX("sel rb%1");
63323b5b 2795#line 1043 "rl78-decode.opc"
99c513f6 2796 ID(sel); SC(rb);
43e65147 2797
99c513f6 2798 /*----------------------------------------------------------------------*/
43e65147 2799
99c513f6
DD
2800 }
2801 break;
2802 case 0xd0:
2803 {
1d43092d 2804 /** 0110 0001 1101 0000 and %0, %e1 */
99c513f6
DD
2805 if (trace)
2806 {
2807 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2808 "/** 0110 0001 1101 0000 and %0, %e1 */",
99c513f6
DD
2809 op[0], op[1]);
2810 }
1d43092d 2811 SYNTAX("and %0, %e1");
63323b5b 2812#line 293 "rl78-decode.opc"
99c513f6 2813 ID(and); DR(A); SM2(HL, B, 0); Fz;
43e65147 2814
99c513f6
DD
2815 }
2816 break;
2817 case 0xd2:
2818 {
1d43092d 2819 /** 0110 0001 1101 0010 and %0, %e1 */
99c513f6
DD
2820 if (trace)
2821 {
2822 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2823 "/** 0110 0001 1101 0010 and %0, %e1 */",
99c513f6
DD
2824 op[0], op[1]);
2825 }
1d43092d 2826 SYNTAX("and %0, %e1");
63323b5b 2827#line 299 "rl78-decode.opc"
99c513f6 2828 ID(and); DR(A); SM2(HL, C, 0); Fz;
43e65147 2829
99c513f6
DD
2830 }
2831 break;
2832 case 0xd3:
2833 {
2834 /** 0110 0001 1101 0011 bnh $%a0 */
2835 if (trace)
2836 {
2837 printf ("\033[33m%s\033[0m %02x %02x\n",
2838 "/** 0110 0001 1101 0011 bnh $%a0 */",
2839 op[0], op[1]);
2840 }
2841 SYNTAX("bnh $%a0");
63323b5b 2842#line 345 "rl78-decode.opc"
99c513f6 2843 ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(NH);
43e65147 2844
99c513f6
DD
2845 }
2846 break;
2847 case 0xd8:
2848 {
2849 /** 0110 0001 1101 1000 sk%c1 */
2850 if (trace)
2851 {
2852 printf ("\033[33m%s\033[0m %02x %02x\n",
2853 "/** 0110 0001 1101 1000 sk%c1 */",
2854 op[0], op[1]);
2855 }
2856 SYNTAX("sk%c1");
63323b5b 2857#line 1102 "rl78-decode.opc"
99c513f6 2858 ID(skip); COND(NC);
43e65147 2859
99c513f6
DD
2860 }
2861 break;
2862 case 0xd9:
2863 {
1d43092d 2864 /** 0110 0001 1101 1001 mov %e0, %1 */
99c513f6
DD
2865 if (trace)
2866 {
2867 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2868 "/** 0110 0001 1101 1001 mov %e0, %1 */",
99c513f6
DD
2869 op[0], op[1]);
2870 }
1d43092d 2871 SYNTAX("mov %e0, %1");
63323b5b 2872#line 629 "rl78-decode.opc"
99c513f6 2873 ID(mov); DM2(HL, B, 0); SR(A);
43e65147 2874
99c513f6
DD
2875 }
2876 break;
2877 case 0xdb:
2878 {
2879 /** 0110 0001 1101 1011 ror %0, %1 */
2880 if (trace)
2881 {
2882 printf ("\033[33m%s\033[0m %02x %02x\n",
2883 "/** 0110 0001 1101 1011 ror %0, %1 */",
2884 op[0], op[1]);
2885 }
2886 SYNTAX("ror %0, %1");
63323b5b 2887#line 1024 "rl78-decode.opc"
99c513f6 2888 ID(ror); DR(A); SC(1);
43e65147 2889
99c513f6
DD
2890 }
2891 break;
2892 case 0xdc:
2893 {
2894 /** 0110 0001 1101 1100 rolc %0, %1 */
2895 if (trace)
2896 {
2897 printf ("\033[33m%s\033[0m %02x %02x\n",
2898 "/** 0110 0001 1101 1100 rolc %0, %1 */",
2899 op[0], op[1]);
2900 }
2901 SYNTAX("rolc %0, %1");
63323b5b 2902#line 1018 "rl78-decode.opc"
99c513f6 2903 ID(rolc); DR(A); SC(1);
43e65147 2904
99c513f6
DD
2905 }
2906 break;
2907 case 0xdd:
2908 {
2909 /** 0110 0001 1101 1101 push %s1 */
2910 if (trace)
2911 {
2912 printf ("\033[33m%s\033[0m %02x %02x\n",
2913 "/** 0110 0001 1101 1101 push %s1 */",
2914 op[0], op[1]);
2915 }
2916 SYNTAX("push %s1");
63323b5b 2917#line 999 "rl78-decode.opc"
99c513f6 2918 ID(mov); W(); DPUSH(); SR(PSW);
43e65147 2919
99c513f6 2920 /*----------------------------------------------------------------------*/
43e65147 2921
99c513f6
DD
2922 }
2923 break;
2924 case 0xde:
2925 {
0952813b 2926 /** 0110 0001 1101 1110 cmps %0, %ea1 */
99c513f6
DD
2927 if (trace)
2928 {
2929 printf ("\033[33m%s\033[0m %02x %02x\n",
0952813b 2930 "/** 0110 0001 1101 1110 cmps %0, %ea1 */",
99c513f6
DD
2931 op[0], op[1]);
2932 }
90092e73 2933 SYNTAX("cmps %0, %ea1");
63323b5b 2934#line 528 "rl78-decode.opc"
99c513f6 2935 ID(cmp); DR(X); SM(HL, IMMU(1)); Fzac;
43e65147 2936
99c513f6 2937 /*----------------------------------------------------------------------*/
43e65147 2938
99c513f6
DD
2939 }
2940 break;
2941 case 0xe0:
2942 {
1d43092d 2943 /** 0110 0001 1110 0000 or %0, %e1 */
99c513f6
DD
2944 if (trace)
2945 {
2946 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2947 "/** 0110 0001 1110 0000 or %0, %e1 */",
99c513f6
DD
2948 op[0], op[1]);
2949 }
1d43092d 2950 SYNTAX("or %0, %e1");
63323b5b 2951#line 948 "rl78-decode.opc"
99c513f6 2952 ID(or); DR(A); SM2(HL, B, 0); Fz;
43e65147 2953
99c513f6
DD
2954 }
2955 break;
2956 case 0xe2:
2957 {
1d43092d 2958 /** 0110 0001 1110 0010 or %0, %e1 */
99c513f6
DD
2959 if (trace)
2960 {
2961 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 2962 "/** 0110 0001 1110 0010 or %0, %e1 */",
99c513f6
DD
2963 op[0], op[1]);
2964 }
1d43092d 2965 SYNTAX("or %0, %e1");
63323b5b 2966#line 954 "rl78-decode.opc"
99c513f6 2967 ID(or); DR(A); SM2(HL, C, 0); Fz;
43e65147 2968
99c513f6
DD
2969 }
2970 break;
2971 case 0xe3:
2972 {
2973 /** 0110 0001 1110 0011 sk%c1 */
2974 if (trace)
2975 {
2976 printf ("\033[33m%s\033[0m %02x %02x\n",
2977 "/** 0110 0001 1110 0011 sk%c1 */",
2978 op[0], op[1]);
2979 }
2980 SYNTAX("sk%c1");
63323b5b 2981#line 1099 "rl78-decode.opc"
99c513f6 2982 ID(skip); COND(H);
43e65147 2983
99c513f6
DD
2984 }
2985 break;
2986 case 0xe8:
2987 {
2988 /** 0110 0001 1110 1000 sk%c1 */
2989 if (trace)
2990 {
2991 printf ("\033[33m%s\033[0m %02x %02x\n",
2992 "/** 0110 0001 1110 1000 sk%c1 */",
2993 op[0], op[1]);
2994 }
2995 SYNTAX("sk%c1");
63323b5b 2996#line 1111 "rl78-decode.opc"
99c513f6 2997 ID(skip); COND(Z);
43e65147 2998
99c513f6 2999 /*----------------------------------------------------------------------*/
43e65147 3000
99c513f6
DD
3001 }
3002 break;
3003 case 0xe9:
3004 {
1d43092d 3005 /** 0110 0001 1110 1001 mov %0, %e1 */
99c513f6
DD
3006 if (trace)
3007 {
3008 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3009 "/** 0110 0001 1110 1001 mov %0, %e1 */",
99c513f6
DD
3010 op[0], op[1]);
3011 }
1d43092d 3012 SYNTAX("mov %0, %e1");
63323b5b 3013#line 665 "rl78-decode.opc"
99c513f6 3014 ID(mov); DR(A); SM2(HL, C, 0);
43e65147 3015
99c513f6
DD
3016 }
3017 break;
3018 case 0xeb:
3019 {
3020 /** 0110 0001 1110 1011 rol %0, %1 */
3021 if (trace)
3022 {
3023 printf ("\033[33m%s\033[0m %02x %02x\n",
3024 "/** 0110 0001 1110 1011 rol %0, %1 */",
3025 op[0], op[1]);
3026 }
3027 SYNTAX("rol %0, %1");
63323b5b 3028#line 1015 "rl78-decode.opc"
99c513f6 3029 ID(rol); DR(A); SC(1);
43e65147 3030
99c513f6
DD
3031 }
3032 break;
3033 case 0xec:
3034 {
3035 /** 0110 0001 1110 1100 retb */
3036 if (trace)
3037 {
3038 printf ("\033[33m%s\033[0m %02x %02x\n",
3039 "/** 0110 0001 1110 1100 retb */",
3040 op[0], op[1]);
3041 }
3042 SYNTAX("retb");
63323b5b 3043#line 1010 "rl78-decode.opc"
99c513f6 3044 ID(reti);
43e65147 3045
99c513f6 3046 /*----------------------------------------------------------------------*/
43e65147 3047
99c513f6
DD
3048 }
3049 break;
3050 case 0xed:
3051 {
3052 /** 0110 0001 1110 1101 halt */
3053 if (trace)
3054 {
3055 printf ("\033[33m%s\033[0m %02x %02x\n",
3056 "/** 0110 0001 1110 1101 halt */",
3057 op[0], op[1]);
3058 }
3059 SYNTAX("halt");
63323b5b 3060#line 578 "rl78-decode.opc"
99c513f6 3061 ID(halt);
43e65147 3062
99c513f6 3063 /*----------------------------------------------------------------------*/
43e65147 3064
99c513f6
DD
3065 }
3066 break;
3067 case 0xee:
3068 case 0xfe:
3069 {
3070 /** 0110 0001 111r 1110 rolwc %0, %1 */
63323b5b 3071#line 1021 "rl78-decode.opc"
99c513f6
DD
3072 int r AU = (op[1] >> 4) & 0x01;
3073 if (trace)
3074 {
3075 printf ("\033[33m%s\033[0m %02x %02x\n",
3076 "/** 0110 0001 111r 1110 rolwc %0, %1 */",
3077 op[0], op[1]);
3078 printf (" r = 0x%x\n", r);
3079 }
3080 SYNTAX("rolwc %0, %1");
63323b5b 3081#line 1021 "rl78-decode.opc"
99c513f6 3082 ID(rolc); W(); DRW(r); SC(1);
43e65147 3083
99c513f6
DD
3084 }
3085 break;
3086 case 0xf0:
3087 {
1d43092d 3088 /** 0110 0001 1111 0000 xor %0, %e1 */
99c513f6
DD
3089 if (trace)
3090 {
3091 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3092 "/** 0110 0001 1111 0000 xor %0, %e1 */",
99c513f6
DD
3093 op[0], op[1]);
3094 }
1d43092d 3095 SYNTAX("xor %0, %e1");
63323b5b 3096#line 1252 "rl78-decode.opc"
99c513f6 3097 ID(xor); DR(A); SM2(HL, B, 0); Fz;
43e65147 3098
99c513f6
DD
3099 }
3100 break;
3101 case 0xf2:
3102 {
1d43092d 3103 /** 0110 0001 1111 0010 xor %0, %e1 */
99c513f6
DD
3104 if (trace)
3105 {
3106 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3107 "/** 0110 0001 1111 0010 xor %0, %e1 */",
99c513f6
DD
3108 op[0], op[1]);
3109 }
1d43092d 3110 SYNTAX("xor %0, %e1");
63323b5b 3111#line 1258 "rl78-decode.opc"
99c513f6 3112 ID(xor); DR(A); SM2(HL, C, 0); Fz;
43e65147 3113
99c513f6
DD
3114 }
3115 break;
3116 case 0xf3:
3117 {
3118 /** 0110 0001 1111 0011 sk%c1 */
3119 if (trace)
3120 {
3121 printf ("\033[33m%s\033[0m %02x %02x\n",
3122 "/** 0110 0001 1111 0011 sk%c1 */",
3123 op[0], op[1]);
3124 }
3125 SYNTAX("sk%c1");
63323b5b 3126#line 1105 "rl78-decode.opc"
99c513f6 3127 ID(skip); COND(NH);
43e65147 3128
99c513f6
DD
3129 }
3130 break;
3131 case 0xf8:
3132 {
3133 /** 0110 0001 1111 1000 sk%c1 */
3134 if (trace)
3135 {
3136 printf ("\033[33m%s\033[0m %02x %02x\n",
3137 "/** 0110 0001 1111 1000 sk%c1 */",
3138 op[0], op[1]);
3139 }
3140 SYNTAX("sk%c1");
63323b5b 3141#line 1108 "rl78-decode.opc"
99c513f6 3142 ID(skip); COND(NZ);
43e65147 3143
99c513f6
DD
3144 }
3145 break;
3146 case 0xf9:
3147 {
1d43092d 3148 /** 0110 0001 1111 1001 mov %e0, %1 */
99c513f6
DD
3149 if (trace)
3150 {
3151 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3152 "/** 0110 0001 1111 1001 mov %e0, %1 */",
99c513f6
DD
3153 op[0], op[1]);
3154 }
1d43092d 3155 SYNTAX("mov %e0, %1");
63323b5b 3156#line 638 "rl78-decode.opc"
99c513f6 3157 ID(mov); DM2(HL, C, 0); SR(A);
43e65147 3158
99c513f6
DD
3159 }
3160 break;
3161 case 0xfb:
3162 {
3163 /** 0110 0001 1111 1011 rorc %0, %1 */
3164 if (trace)
3165 {
3166 printf ("\033[33m%s\033[0m %02x %02x\n",
3167 "/** 0110 0001 1111 1011 rorc %0, %1 */",
3168 op[0], op[1]);
3169 }
3170 SYNTAX("rorc %0, %1");
63323b5b 3171#line 1027 "rl78-decode.opc"
99c513f6 3172 ID(rorc); DR(A); SC(1);
43e65147 3173
99c513f6 3174 /*----------------------------------------------------------------------*/
43e65147 3175
99c513f6
DD
3176 /* Note that the branch insns need to be listed before the shift
3177 ones, as "shift count of zero" means "branch insn" */
43e65147 3178
99c513f6
DD
3179 }
3180 break;
3181 case 0xfc:
3182 {
3183 /** 0110 0001 1111 1100 reti */
3184 if (trace)
3185 {
3186 printf ("\033[33m%s\033[0m %02x %02x\n",
3187 "/** 0110 0001 1111 1100 reti */",
3188 op[0], op[1]);
3189 }
3190 SYNTAX("reti");
63323b5b 3191#line 1007 "rl78-decode.opc"
99c513f6 3192 ID(reti);
43e65147 3193
99c513f6
DD
3194 }
3195 break;
3196 case 0xfd:
3197 {
1d43092d 3198 /** 0110 0001 1111 1101 stop */
99c513f6
DD
3199 if (trace)
3200 {
3201 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3202 "/** 0110 0001 1111 1101 stop */",
99c513f6
DD
3203 op[0], op[1]);
3204 }
3205 SYNTAX("stop");
63323b5b 3206#line 1116 "rl78-decode.opc"
99c513f6 3207 ID(stop);
43e65147 3208
99c513f6 3209 /*----------------------------------------------------------------------*/
43e65147 3210
99c513f6
DD
3211 }
3212 break;
3213 default: UNSUPPORTED(); break;
3214 }
3215 break;
3216 case 0x68:
3217 {
1d43092d 3218 /** 0110 1000 movw %e0, %1 */
99c513f6
DD
3219 if (trace)
3220 {
3221 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3222 "/** 0110 1000 movw %e0, %1 */",
99c513f6
DD
3223 op[0]);
3224 }
1d43092d 3225 SYNTAX("movw %e0, %1");
63323b5b 3226#line 876 "rl78-decode.opc"
99c513f6 3227 ID(mov); W(); DM(C, IMMU(2)); SR(AX);
43e65147 3228
99c513f6
DD
3229 }
3230 break;
3231 case 0x69:
3232 {
1d43092d 3233 /** 0110 1001 movw %0, %e1 */
99c513f6
DD
3234 if (trace)
3235 {
3236 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3237 "/** 0110 1001 movw %0, %e1 */",
99c513f6
DD
3238 op[0]);
3239 }
1d43092d 3240 SYNTAX("movw %0, %e1");
63323b5b 3241#line 867 "rl78-decode.opc"
99c513f6 3242 ID(mov); W(); DR(AX); SM(C, IMMU(2));
43e65147 3243
99c513f6
DD
3244 }
3245 break;
3246 case 0x6a:
3247 {
3248 /** 0110 1010 or %0, #%1 */
3249 if (trace)
3250 {
3251 printf ("\033[33m%s\033[0m %02x\n",
3252 "/** 0110 1010 or %0, #%1 */",
3253 op[0]);
3254 }
3255 SYNTAX("or %0, #%1");
63323b5b 3256#line 969 "rl78-decode.opc"
99c513f6 3257 ID(or); DM(None, SADDR); SC(IMMU(1)); Fz;
43e65147 3258
99c513f6 3259 /*----------------------------------------------------------------------*/
43e65147 3260
99c513f6
DD
3261 }
3262 break;
3263 case 0x6b:
3264 {
3265 /** 0110 1011 or %0, %1 */
3266 if (trace)
3267 {
3268 printf ("\033[33m%s\033[0m %02x\n",
3269 "/** 0110 1011 or %0, %1 */",
3270 op[0]);
3271 }
3272 SYNTAX("or %0, %1");
63323b5b 3273#line 966 "rl78-decode.opc"
99c513f6 3274 ID(or); DR(A); SM(None, SADDR); Fz;
43e65147 3275
99c513f6
DD
3276 }
3277 break;
3278 case 0x6c:
3279 {
3280 /** 0110 1100 or %0, #%1 */
3281 if (trace)
3282 {
3283 printf ("\033[33m%s\033[0m %02x\n",
3284 "/** 0110 1100 or %0, #%1 */",
3285 op[0]);
3286 }
3287 SYNTAX("or %0, #%1");
63323b5b 3288#line 957 "rl78-decode.opc"
99c513f6 3289 ID(or); DR(A); SC(IMMU(1)); Fz;
43e65147 3290
99c513f6
DD
3291 }
3292 break;
3293 case 0x6d:
3294 {
1d43092d 3295 /** 0110 1101 or %0, %e1 */
99c513f6
DD
3296 if (trace)
3297 {
3298 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3299 "/** 0110 1101 or %0, %e1 */",
99c513f6
DD
3300 op[0]);
3301 }
1d43092d 3302 SYNTAX("or %0, %e1");
63323b5b 3303#line 945 "rl78-decode.opc"
99c513f6 3304 ID(or); DR(A); SM(HL, 0); Fz;
43e65147 3305
99c513f6
DD
3306 }
3307 break;
3308 case 0x6e:
3309 {
0952813b 3310 /** 0110 1110 or %0, %ea1 */
99c513f6
DD
3311 if (trace)
3312 {
3313 printf ("\033[33m%s\033[0m %02x\n",
0952813b 3314 "/** 0110 1110 or %0, %ea1 */",
99c513f6
DD
3315 op[0]);
3316 }
90092e73 3317 SYNTAX("or %0, %ea1");
63323b5b 3318#line 951 "rl78-decode.opc"
99c513f6 3319 ID(or); DR(A); SM(HL, IMMU(1)); Fz;
43e65147 3320
99c513f6
DD
3321 }
3322 break;
3323 case 0x6f:
3324 {
1d43092d 3325 /** 0110 1111 or %0, %e!1 */
99c513f6
DD
3326 if (trace)
3327 {
3328 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 3329 "/** 0110 1111 or %0, %e!1 */",
99c513f6
DD
3330 op[0]);
3331 }
1d43092d 3332 SYNTAX("or %0, %e!1");
63323b5b 3333#line 942 "rl78-decode.opc"
99c513f6 3334 ID(or); DR(A); SM(None, IMMU(2)); Fz;
43e65147 3335
99c513f6
DD
3336 }
3337 break;
3338 case 0x70:
3339 case 0x72:
3340 case 0x73:
3341 case 0x74:
3342 case 0x75:
3343 case 0x76:
3344 case 0x77:
3345 {
3346 /** 0111 0rba mov %0, %1 */
63323b5b 3347#line 698 "rl78-decode.opc"
99c513f6
DD
3348 int rba AU = op[0] & 0x07;
3349 if (trace)
3350 {
3351 printf ("\033[33m%s\033[0m %02x\n",
3352 "/** 0111 0rba mov %0, %1 */",
3353 op[0]);
3354 printf (" rba = 0x%x\n", rba);
3355 }
3356 SYNTAX("mov %0, %1");
63323b5b 3357#line 698 "rl78-decode.opc"
99c513f6 3358 ID(mov); DRB(rba); SR(A);
43e65147 3359
99c513f6
DD
3360 }
3361 break;
3362 case 0x71:
3363 GETBYTE ();
3364 switch (op[1] & 0xff)
3365 {
3366 case 0x00:
3367 case 0x10:
3368 case 0x20:
3369 case 0x30:
3370 case 0x40:
3371 case 0x50:
3372 case 0x60:
3373 case 0x70:
3374 {
1d43092d 3375 /** 0111 0001 0bit 0000 set1 %e!0 */
63323b5b 3376#line 1048 "rl78-decode.opc"
99c513f6
DD
3377 int bit AU = (op[1] >> 4) & 0x07;
3378 if (trace)
3379 {
3380 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3381 "/** 0111 0001 0bit 0000 set1 %e!0 */",
99c513f6
DD
3382 op[0], op[1]);
3383 printf (" bit = 0x%x\n", bit);
3384 }
1d43092d 3385 SYNTAX("set1 %e!0");
63323b5b 3386#line 1048 "rl78-decode.opc"
99c513f6 3387 ID(mov); DM(None, IMMU(2)); DB(bit); SC(1);
43e65147 3388
99c513f6
DD
3389 }
3390 break;
3391 case 0x01:
3392 case 0x11:
3393 case 0x21:
3394 case 0x31:
3395 case 0x41:
3396 case 0x51:
3397 case 0x61:
3398 case 0x71:
3399 {
3400 /** 0111 0001 0bit 0001 mov1 %0, cy */
63323b5b 3401#line 805 "rl78-decode.opc"
99c513f6
DD
3402 int bit AU = (op[1] >> 4) & 0x07;
3403 if (trace)
3404 {
3405 printf ("\033[33m%s\033[0m %02x %02x\n",
3406 "/** 0111 0001 0bit 0001 mov1 %0, cy */",
3407 op[0], op[1]);
3408 printf (" bit = 0x%x\n", bit);
3409 }
3410 SYNTAX("mov1 %0, cy");
63323b5b 3411#line 805 "rl78-decode.opc"
99c513f6 3412 ID(mov); DM(None, SADDR); DB(bit); SCY();
43e65147 3413
99c513f6
DD
3414 }
3415 break;
3416 case 0x02:
3417 case 0x12:
3418 case 0x22:
3419 case 0x32:
3420 case 0x42:
3421 case 0x52:
3422 case 0x62:
3423 case 0x72:
3424 {
3425 /** 0111 0001 0bit 0010 set1 %0 */
63323b5b 3426#line 1066 "rl78-decode.opc"
99c513f6
DD
3427 int bit AU = (op[1] >> 4) & 0x07;
3428 if (trace)
3429 {
3430 printf ("\033[33m%s\033[0m %02x %02x\n",
3431 "/** 0111 0001 0bit 0010 set1 %0 */",
3432 op[0], op[1]);
3433 printf (" bit = 0x%x\n", bit);
3434 }
3435 SYNTAX("set1 %0");
63323b5b 3436#line 1066 "rl78-decode.opc"
99c513f6 3437 ID(mov); DM(None, SADDR); DB(bit); SC(1);
43e65147 3438
99c513f6 3439 /*----------------------------------------------------------------------*/
43e65147 3440
99c513f6
DD
3441 }
3442 break;
3443 case 0x03:
3444 case 0x13:
3445 case 0x23:
3446 case 0x33:
3447 case 0x43:
3448 case 0x53:
3449 case 0x63:
3450 case 0x73:
3451 {
3452 /** 0111 0001 0bit 0011 clr1 %0 */
63323b5b 3453#line 458 "rl78-decode.opc"
99c513f6
DD
3454 int bit AU = (op[1] >> 4) & 0x07;
3455 if (trace)
3456 {
3457 printf ("\033[33m%s\033[0m %02x %02x\n",
3458 "/** 0111 0001 0bit 0011 clr1 %0 */",
3459 op[0], op[1]);
3460 printf (" bit = 0x%x\n", bit);
3461 }
3462 SYNTAX("clr1 %0");
63323b5b 3463#line 458 "rl78-decode.opc"
99c513f6 3464 ID(mov); DM(None, SADDR); DB(bit); SC(0);
43e65147 3465
99c513f6 3466 /*----------------------------------------------------------------------*/
43e65147 3467
99c513f6
DD
3468 }
3469 break;
3470 case 0x04:
3471 case 0x14:
3472 case 0x24:
3473 case 0x34:
3474 case 0x44:
3475 case 0x54:
3476 case 0x64:
3477 case 0x74:
3478 {
3479 /** 0111 0001 0bit 0100 mov1 cy, %1 */
63323b5b 3480#line 799 "rl78-decode.opc"
99c513f6
DD
3481 int bit AU = (op[1] >> 4) & 0x07;
3482 if (trace)
3483 {
3484 printf ("\033[33m%s\033[0m %02x %02x\n",
3485 "/** 0111 0001 0bit 0100 mov1 cy, %1 */",
3486 op[0], op[1]);
3487 printf (" bit = 0x%x\n", bit);
3488 }
3489 SYNTAX("mov1 cy, %1");
63323b5b 3490#line 799 "rl78-decode.opc"
99c513f6 3491 ID(mov); DCY(); SM(None, SADDR); SB(bit);
43e65147 3492
99c513f6
DD
3493 }
3494 break;
3495 case 0x05:
3496 case 0x15:
3497 case 0x25:
3498 case 0x35:
3499 case 0x45:
3500 case 0x55:
3501 case 0x65:
3502 case 0x75:
3503 {
3504 /** 0111 0001 0bit 0101 and1 cy, %s1 */
63323b5b 3505#line 328 "rl78-decode.opc"
99c513f6
DD
3506 int bit AU = (op[1] >> 4) & 0x07;
3507 if (trace)
3508 {
3509 printf ("\033[33m%s\033[0m %02x %02x\n",
3510 "/** 0111 0001 0bit 0101 and1 cy, %s1 */",
3511 op[0], op[1]);
3512 printf (" bit = 0x%x\n", bit);
3513 }
3514 SYNTAX("and1 cy, %s1");
63323b5b 3515#line 328 "rl78-decode.opc"
99c513f6 3516 ID(and); DCY(); SM(None, SADDR); SB(bit);
43e65147 3517
99c513f6 3518 /*----------------------------------------------------------------------*/
43e65147 3519
99c513f6
DD
3520 /* Note that the branch insns need to be listed before the shift
3521 ones, as "shift count of zero" means "branch insn" */
43e65147 3522
99c513f6
DD
3523 }
3524 break;
3525 case 0x06:
3526 case 0x16:
3527 case 0x26:
3528 case 0x36:
3529 case 0x46:
3530 case 0x56:
3531 case 0x66:
3532 case 0x76:
3533 {
3534 /** 0111 0001 0bit 0110 or1 cy, %s1 */
63323b5b 3535#line 983 "rl78-decode.opc"
99c513f6
DD
3536 int bit AU = (op[1] >> 4) & 0x07;
3537 if (trace)
3538 {
3539 printf ("\033[33m%s\033[0m %02x %02x\n",
3540 "/** 0111 0001 0bit 0110 or1 cy, %s1 */",
3541 op[0], op[1]);
3542 printf (" bit = 0x%x\n", bit);
3543 }
3544 SYNTAX("or1 cy, %s1");
63323b5b 3545#line 983 "rl78-decode.opc"
99c513f6 3546 ID(or); DCY(); SM(None, SADDR); SB(bit);
43e65147 3547
99c513f6 3548 /*----------------------------------------------------------------------*/
43e65147 3549
99c513f6
DD
3550 }
3551 break;
3552 case 0x07:
3553 case 0x17:
3554 case 0x27:
3555 case 0x37:
3556 case 0x47:
3557 case 0x57:
3558 case 0x67:
3559 case 0x77:
3560 {
3561 /** 0111 0001 0bit 0111 xor1 cy, %s1 */
63323b5b 3562#line 1287 "rl78-decode.opc"
99c513f6
DD
3563 int bit AU = (op[1] >> 4) & 0x07;
3564 if (trace)
3565 {
3566 printf ("\033[33m%s\033[0m %02x %02x\n",
3567 "/** 0111 0001 0bit 0111 xor1 cy, %s1 */",
3568 op[0], op[1]);
3569 printf (" bit = 0x%x\n", bit);
3570 }
3571 SYNTAX("xor1 cy, %s1");
63323b5b 3572#line 1287 "rl78-decode.opc"
99c513f6 3573 ID(xor); DCY(); SM(None, SADDR); SB(bit);
43e65147 3574
99c513f6 3575 /*----------------------------------------------------------------------*/
43e65147 3576
99c513f6
DD
3577 }
3578 break;
3579 case 0x08:
3580 case 0x18:
3581 case 0x28:
3582 case 0x38:
3583 case 0x48:
3584 case 0x58:
3585 case 0x68:
3586 case 0x78:
3587 {
1d43092d 3588 /** 0111 0001 0bit 1000 clr1 %e!0 */
63323b5b 3589#line 440 "rl78-decode.opc"
99c513f6
DD
3590 int bit AU = (op[1] >> 4) & 0x07;
3591 if (trace)
3592 {
3593 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3594 "/** 0111 0001 0bit 1000 clr1 %e!0 */",
99c513f6
DD
3595 op[0], op[1]);
3596 printf (" bit = 0x%x\n", bit);
3597 }
1d43092d 3598 SYNTAX("clr1 %e!0");
63323b5b 3599#line 440 "rl78-decode.opc"
99c513f6 3600 ID(mov); DM(None, IMMU(2)); DB(bit); SC(0);
43e65147 3601
99c513f6
DD
3602 }
3603 break;
3604 case 0x09:
3605 case 0x19:
3606 case 0x29:
3607 case 0x39:
3608 case 0x49:
3609 case 0x59:
3610 case 0x69:
3611 case 0x79:
3612 {
3613 /** 0111 0001 0bit 1001 mov1 %s0, cy */
63323b5b 3614#line 808 "rl78-decode.opc"
99c513f6
DD
3615 int bit AU = (op[1] >> 4) & 0x07;
3616 if (trace)
3617 {
3618 printf ("\033[33m%s\033[0m %02x %02x\n",
3619 "/** 0111 0001 0bit 1001 mov1 %s0, cy */",
3620 op[0], op[1]);
3621 printf (" bit = 0x%x\n", bit);
3622 }
3623 SYNTAX("mov1 %s0, cy");
63323b5b 3624#line 808 "rl78-decode.opc"
99c513f6 3625 ID(mov); DM(None, SFR); DB(bit); SCY();
43e65147 3626
99c513f6 3627 /*----------------------------------------------------------------------*/
43e65147 3628
99c513f6
DD
3629 }
3630 break;
3631 case 0x0a:
3632 case 0x1a:
3633 case 0x2a:
3634 case 0x3a:
3635 case 0x4a:
3636 case 0x5a:
3637 case 0x6a:
3638 case 0x7a:
3639 {
3640 /** 0111 0001 0bit 1010 set1 %s0 */
63323b5b 3641#line 1060 "rl78-decode.opc"
99c513f6
DD
3642 int bit AU = (op[1] >> 4) & 0x07;
3643 if (trace)
3644 {
3645 printf ("\033[33m%s\033[0m %02x %02x\n",
3646 "/** 0111 0001 0bit 1010 set1 %s0 */",
3647 op[0], op[1]);
3648 printf (" bit = 0x%x\n", bit);
3649 }
3650 SYNTAX("set1 %s0");
63323b5b 3651#line 1060 "rl78-decode.opc"
99c513f6
DD
3652 op0 = SFR;
3653 ID(mov); DM(None, op0); DB(bit); SC(1);
3654 if (op0 == RL78_SFR_PSW && bit == 7)
3655 rl78->syntax = "ei";
43e65147 3656
99c513f6
DD
3657 }
3658 break;
3659 case 0x0b:
3660 case 0x1b:
3661 case 0x2b:
3662 case 0x3b:
3663 case 0x4b:
3664 case 0x5b:
3665 case 0x6b:
3666 case 0x7b:
3667 {
3668 /** 0111 0001 0bit 1011 clr1 %s0 */
63323b5b 3669#line 452 "rl78-decode.opc"
99c513f6
DD
3670 int bit AU = (op[1] >> 4) & 0x07;
3671 if (trace)
3672 {
3673 printf ("\033[33m%s\033[0m %02x %02x\n",
3674 "/** 0111 0001 0bit 1011 clr1 %s0 */",
3675 op[0], op[1]);
3676 printf (" bit = 0x%x\n", bit);
3677 }
3678 SYNTAX("clr1 %s0");
63323b5b 3679#line 452 "rl78-decode.opc"
99c513f6
DD
3680 op0 = SFR;
3681 ID(mov); DM(None, op0); DB(bit); SC(0);
3682 if (op0 == RL78_SFR_PSW && bit == 7)
3683 rl78->syntax = "di";
43e65147 3684
99c513f6
DD
3685 }
3686 break;
3687 case 0x0c:
3688 case 0x1c:
3689 case 0x2c:
3690 case 0x3c:
3691 case 0x4c:
3692 case 0x5c:
3693 case 0x6c:
3694 case 0x7c:
3695 {
3696 /** 0111 0001 0bit 1100 mov1 cy, %s1 */
63323b5b 3697#line 802 "rl78-decode.opc"
99c513f6
DD
3698 int bit AU = (op[1] >> 4) & 0x07;
3699 if (trace)
3700 {
3701 printf ("\033[33m%s\033[0m %02x %02x\n",
3702 "/** 0111 0001 0bit 1100 mov1 cy, %s1 */",
3703 op[0], op[1]);
3704 printf (" bit = 0x%x\n", bit);
3705 }
3706 SYNTAX("mov1 cy, %s1");
63323b5b 3707#line 802 "rl78-decode.opc"
99c513f6 3708 ID(mov); DCY(); SM(None, SFR); SB(bit);
43e65147 3709
99c513f6
DD
3710 }
3711 break;
3712 case 0x0d:
3713 case 0x1d:
3714 case 0x2d:
3715 case 0x3d:
3716 case 0x4d:
3717 case 0x5d:
3718 case 0x6d:
3719 case 0x7d:
3720 {
3721 /** 0111 0001 0bit 1101 and1 cy, %s1 */
63323b5b 3722#line 325 "rl78-decode.opc"
99c513f6
DD
3723 int bit AU = (op[1] >> 4) & 0x07;
3724 if (trace)
3725 {
3726 printf ("\033[33m%s\033[0m %02x %02x\n",
3727 "/** 0111 0001 0bit 1101 and1 cy, %s1 */",
3728 op[0], op[1]);
3729 printf (" bit = 0x%x\n", bit);
3730 }
3731 SYNTAX("and1 cy, %s1");
63323b5b 3732#line 325 "rl78-decode.opc"
99c513f6 3733 ID(and); DCY(); SM(None, SFR); SB(bit);
43e65147 3734
99c513f6
DD
3735 }
3736 break;
3737 case 0x0e:
3738 case 0x1e:
3739 case 0x2e:
3740 case 0x3e:
3741 case 0x4e:
3742 case 0x5e:
3743 case 0x6e:
3744 case 0x7e:
3745 {
3746 /** 0111 0001 0bit 1110 or1 cy, %s1 */
63323b5b 3747#line 980 "rl78-decode.opc"
99c513f6
DD
3748 int bit AU = (op[1] >> 4) & 0x07;
3749 if (trace)
3750 {
3751 printf ("\033[33m%s\033[0m %02x %02x\n",
3752 "/** 0111 0001 0bit 1110 or1 cy, %s1 */",
3753 op[0], op[1]);
3754 printf (" bit = 0x%x\n", bit);
3755 }
3756 SYNTAX("or1 cy, %s1");
63323b5b 3757#line 980 "rl78-decode.opc"
99c513f6 3758 ID(or); DCY(); SM(None, SFR); SB(bit);
43e65147 3759
99c513f6
DD
3760 }
3761 break;
3762 case 0x0f:
3763 case 0x1f:
3764 case 0x2f:
3765 case 0x3f:
3766 case 0x4f:
3767 case 0x5f:
3768 case 0x6f:
3769 case 0x7f:
3770 {
3771 /** 0111 0001 0bit 1111 xor1 cy, %s1 */
63323b5b 3772#line 1284 "rl78-decode.opc"
99c513f6
DD
3773 int bit AU = (op[1] >> 4) & 0x07;
3774 if (trace)
3775 {
3776 printf ("\033[33m%s\033[0m %02x %02x\n",
3777 "/** 0111 0001 0bit 1111 xor1 cy, %s1 */",
3778 op[0], op[1]);
3779 printf (" bit = 0x%x\n", bit);
3780 }
3781 SYNTAX("xor1 cy, %s1");
63323b5b 3782#line 1284 "rl78-decode.opc"
99c513f6 3783 ID(xor); DCY(); SM(None, SFR); SB(bit);
43e65147 3784
99c513f6
DD
3785 }
3786 break;
3787 case 0x80:
3788 {
3789 /** 0111 0001 1000 0000 set1 cy */
3790 if (trace)
3791 {
3792 printf ("\033[33m%s\033[0m %02x %02x\n",
3793 "/** 0111 0001 1000 0000 set1 cy */",
3794 op[0], op[1]);
3795 }
3796 SYNTAX("set1 cy");
63323b5b 3797#line 1057 "rl78-decode.opc"
99c513f6 3798 ID(mov); DCY(); SC(1);
43e65147 3799
99c513f6
DD
3800 }
3801 break;
3802 case 0x81:
3803 case 0x91:
3804 case 0xa1:
3805 case 0xb1:
3806 case 0xc1:
3807 case 0xd1:
3808 case 0xe1:
3809 case 0xf1:
3810 {
1d43092d 3811 /** 0111 0001 1bit 0001 mov1 %e0, cy */
63323b5b 3812#line 787 "rl78-decode.opc"
99c513f6
DD
3813 int bit AU = (op[1] >> 4) & 0x07;
3814 if (trace)
3815 {
3816 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3817 "/** 0111 0001 1bit 0001 mov1 %e0, cy */",
99c513f6
DD
3818 op[0], op[1]);
3819 printf (" bit = 0x%x\n", bit);
3820 }
1d43092d 3821 SYNTAX("mov1 %e0, cy");
63323b5b 3822#line 787 "rl78-decode.opc"
99c513f6 3823 ID(mov); DM(HL, 0); DB(bit); SCY();
43e65147 3824
99c513f6
DD
3825 }
3826 break;
3827 case 0x82:
3828 case 0x92:
3829 case 0xa2:
3830 case 0xb2:
3831 case 0xc2:
3832 case 0xd2:
3833 case 0xe2:
3834 case 0xf2:
3835 {
1d43092d 3836 /** 0111 0001 1bit 0010 set1 %e0 */
63323b5b 3837#line 1051 "rl78-decode.opc"
99c513f6
DD
3838 int bit AU = (op[1] >> 4) & 0x07;
3839 if (trace)
3840 {
3841 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3842 "/** 0111 0001 1bit 0010 set1 %e0 */",
99c513f6
DD
3843 op[0], op[1]);
3844 printf (" bit = 0x%x\n", bit);
3845 }
1d43092d 3846 SYNTAX("set1 %e0");
63323b5b 3847#line 1051 "rl78-decode.opc"
99c513f6 3848 ID(mov); DM(HL, 0); DB(bit); SC(1);
43e65147 3849
99c513f6
DD
3850 }
3851 break;
3852 case 0x83:
3853 case 0x93:
3854 case 0xa3:
3855 case 0xb3:
3856 case 0xc3:
3857 case 0xd3:
3858 case 0xe3:
3859 case 0xf3:
3860 {
1d43092d 3861 /** 0111 0001 1bit 0011 clr1 %e0 */
63323b5b 3862#line 443 "rl78-decode.opc"
99c513f6
DD
3863 int bit AU = (op[1] >> 4) & 0x07;
3864 if (trace)
3865 {
3866 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3867 "/** 0111 0001 1bit 0011 clr1 %e0 */",
99c513f6
DD
3868 op[0], op[1]);
3869 printf (" bit = 0x%x\n", bit);
3870 }
1d43092d 3871 SYNTAX("clr1 %e0");
63323b5b 3872#line 443 "rl78-decode.opc"
99c513f6 3873 ID(mov); DM(HL, 0); DB(bit); SC(0);
43e65147 3874
99c513f6
DD
3875 }
3876 break;
3877 case 0x84:
3878 case 0x94:
3879 case 0xa4:
3880 case 0xb4:
3881 case 0xc4:
3882 case 0xd4:
3883 case 0xe4:
3884 case 0xf4:
3885 {
1d43092d 3886 /** 0111 0001 1bit 0100 mov1 cy, %e1 */
63323b5b 3887#line 793 "rl78-decode.opc"
99c513f6
DD
3888 int bit AU = (op[1] >> 4) & 0x07;
3889 if (trace)
3890 {
3891 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3892 "/** 0111 0001 1bit 0100 mov1 cy, %e1 */",
99c513f6
DD
3893 op[0], op[1]);
3894 printf (" bit = 0x%x\n", bit);
3895 }
1d43092d 3896 SYNTAX("mov1 cy, %e1");
63323b5b 3897#line 793 "rl78-decode.opc"
99c513f6 3898 ID(mov); DCY(); SM(HL, 0); SB(bit);
43e65147 3899
99c513f6
DD
3900 }
3901 break;
3902 case 0x85:
3903 case 0x95:
3904 case 0xa5:
3905 case 0xb5:
3906 case 0xc5:
3907 case 0xd5:
3908 case 0xe5:
3909 case 0xf5:
3910 {
1d43092d 3911 /** 0111 0001 1bit 0101 and1 cy, %e1 */
63323b5b 3912#line 319 "rl78-decode.opc"
99c513f6
DD
3913 int bit AU = (op[1] >> 4) & 0x07;
3914 if (trace)
3915 {
3916 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3917 "/** 0111 0001 1bit 0101 and1 cy, %e1 */",
99c513f6
DD
3918 op[0], op[1]);
3919 printf (" bit = 0x%x\n", bit);
3920 }
1d43092d 3921 SYNTAX("and1 cy, %e1");
63323b5b 3922#line 319 "rl78-decode.opc"
99c513f6 3923 ID(and); DCY(); SM(HL, 0); SB(bit);
43e65147 3924
99c513f6
DD
3925 }
3926 break;
3927 case 0x86:
3928 case 0x96:
3929 case 0xa6:
3930 case 0xb6:
3931 case 0xc6:
3932 case 0xd6:
3933 case 0xe6:
3934 case 0xf6:
3935 {
1d43092d 3936 /** 0111 0001 1bit 0110 or1 cy, %e1 */
63323b5b 3937#line 974 "rl78-decode.opc"
99c513f6
DD
3938 int bit AU = (op[1] >> 4) & 0x07;
3939 if (trace)
3940 {
3941 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3942 "/** 0111 0001 1bit 0110 or1 cy, %e1 */",
99c513f6
DD
3943 op[0], op[1]);
3944 printf (" bit = 0x%x\n", bit);
3945 }
1d43092d 3946 SYNTAX("or1 cy, %e1");
63323b5b 3947#line 974 "rl78-decode.opc"
99c513f6 3948 ID(or); DCY(); SM(HL, 0); SB(bit);
43e65147 3949
99c513f6
DD
3950 }
3951 break;
3952 case 0x87:
3953 case 0x97:
3954 case 0xa7:
3955 case 0xb7:
3956 case 0xc7:
3957 case 0xd7:
3958 case 0xe7:
3959 case 0xf7:
3960 {
1d43092d 3961 /** 0111 0001 1bit 0111 xor1 cy, %e1 */
63323b5b 3962#line 1278 "rl78-decode.opc"
99c513f6
DD
3963 int bit AU = (op[1] >> 4) & 0x07;
3964 if (trace)
3965 {
3966 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 3967 "/** 0111 0001 1bit 0111 xor1 cy, %e1 */",
99c513f6
DD
3968 op[0], op[1]);
3969 printf (" bit = 0x%x\n", bit);
3970 }
1d43092d 3971 SYNTAX("xor1 cy, %e1");
63323b5b 3972#line 1278 "rl78-decode.opc"
99c513f6 3973 ID(xor); DCY(); SM(HL, 0); SB(bit);
43e65147 3974
99c513f6
DD
3975 }
3976 break;
3977 case 0x88:
3978 {
3979 /** 0111 0001 1000 1000 clr1 cy */
3980 if (trace)
3981 {
3982 printf ("\033[33m%s\033[0m %02x %02x\n",
3983 "/** 0111 0001 1000 1000 clr1 cy */",
3984 op[0], op[1]);
3985 }
3986 SYNTAX("clr1 cy");
63323b5b 3987#line 449 "rl78-decode.opc"
99c513f6 3988 ID(mov); DCY(); SC(0);
43e65147 3989
99c513f6
DD
3990 }
3991 break;
3992 case 0x89:
3993 case 0x99:
3994 case 0xa9:
3995 case 0xb9:
3996 case 0xc9:
3997 case 0xd9:
3998 case 0xe9:
3999 case 0xf9:
4000 {
1d43092d 4001 /** 0111 0001 1bit 1001 mov1 %e0, cy */
63323b5b 4002#line 790 "rl78-decode.opc"
99c513f6
DD
4003 int bit AU = (op[1] >> 4) & 0x07;
4004 if (trace)
4005 {
4006 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 4007 "/** 0111 0001 1bit 1001 mov1 %e0, cy */",
99c513f6
DD
4008 op[0], op[1]);
4009 printf (" bit = 0x%x\n", bit);
4010 }
1d43092d 4011 SYNTAX("mov1 %e0, cy");
63323b5b 4012#line 790 "rl78-decode.opc"
99c513f6 4013 ID(mov); DR(A); DB(bit); SCY();
43e65147 4014
99c513f6
DD
4015 }
4016 break;
4017 case 0x8a:
4018 case 0x9a:
4019 case 0xaa:
4020 case 0xba:
4021 case 0xca:
4022 case 0xda:
4023 case 0xea:
4024 case 0xfa:
4025 {
4026 /** 0111 0001 1bit 1010 set1 %0 */
63323b5b 4027#line 1054 "rl78-decode.opc"
99c513f6
DD
4028 int bit AU = (op[1] >> 4) & 0x07;
4029 if (trace)
4030 {
4031 printf ("\033[33m%s\033[0m %02x %02x\n",
4032 "/** 0111 0001 1bit 1010 set1 %0 */",
4033 op[0], op[1]);
4034 printf (" bit = 0x%x\n", bit);
4035 }
4036 SYNTAX("set1 %0");
63323b5b 4037#line 1054 "rl78-decode.opc"
99c513f6 4038 ID(mov); DR(A); DB(bit); SC(1);
43e65147 4039
99c513f6
DD
4040 }
4041 break;
4042 case 0x8b:
4043 case 0x9b:
4044 case 0xab:
4045 case 0xbb:
4046 case 0xcb:
4047 case 0xdb:
4048 case 0xeb:
4049 case 0xfb:
4050 {
4051 /** 0111 0001 1bit 1011 clr1 %0 */
63323b5b 4052#line 446 "rl78-decode.opc"
99c513f6
DD
4053 int bit AU = (op[1] >> 4) & 0x07;
4054 if (trace)
4055 {
4056 printf ("\033[33m%s\033[0m %02x %02x\n",
4057 "/** 0111 0001 1bit 1011 clr1 %0 */",
4058 op[0], op[1]);
4059 printf (" bit = 0x%x\n", bit);
4060 }
4061 SYNTAX("clr1 %0");
63323b5b 4062#line 446 "rl78-decode.opc"
99c513f6 4063 ID(mov); DR(A); DB(bit); SC(0);
43e65147 4064
99c513f6
DD
4065 }
4066 break;
4067 case 0x8c:
4068 case 0x9c:
4069 case 0xac:
4070 case 0xbc:
4071 case 0xcc:
4072 case 0xdc:
4073 case 0xec:
4074 case 0xfc:
4075 {
1d43092d 4076 /** 0111 0001 1bit 1100 mov1 cy, %e1 */
63323b5b 4077#line 796 "rl78-decode.opc"
99c513f6
DD
4078 int bit AU = (op[1] >> 4) & 0x07;
4079 if (trace)
4080 {
4081 printf ("\033[33m%s\033[0m %02x %02x\n",
1d43092d 4082 "/** 0111 0001 1bit 1100 mov1 cy, %e1 */",
99c513f6
DD
4083 op[0], op[1]);
4084 printf (" bit = 0x%x\n", bit);
4085 }
1d43092d 4086 SYNTAX("mov1 cy, %e1");
63323b5b 4087#line 796 "rl78-decode.opc"
99c513f6 4088 ID(mov); DCY(); SR(A); SB(bit);
43e65147 4089
99c513f6
DD
4090 }
4091 break;
4092 case 0x8d:
4093 case 0x9d:
4094 case 0xad:
4095 case 0xbd:
4096 case 0xcd:
4097 case 0xdd:
4098 case 0xed:
4099 case 0xfd:
4100 {
4101 /** 0111 0001 1bit 1101 and1 cy, %1 */
63323b5b 4102#line 322 "rl78-decode.opc"
99c513f6
DD
4103 int bit AU = (op[1] >> 4) & 0x07;
4104 if (trace)
4105 {
4106 printf ("\033[33m%s\033[0m %02x %02x\n",
4107 "/** 0111 0001 1bit 1101 and1 cy, %1 */",
4108 op[0], op[1]);
4109 printf (" bit = 0x%x\n", bit);
4110 }
4111 SYNTAX("and1 cy, %1");
63323b5b 4112#line 322 "rl78-decode.opc"
99c513f6 4113 ID(and); DCY(); SR(A); SB(bit);
43e65147 4114
99c513f6
DD
4115 }
4116 break;
4117 case 0x8e:
4118 case 0x9e:
4119 case 0xae:
4120 case 0xbe:
4121 case 0xce:
4122 case 0xde:
4123 case 0xee:
4124 case 0xfe:
4125 {
4126 /** 0111 0001 1bit 1110 or1 cy, %1 */
63323b5b 4127#line 977 "rl78-decode.opc"
99c513f6
DD
4128 int bit AU = (op[1] >> 4) & 0x07;
4129 if (trace)
4130 {
4131 printf ("\033[33m%s\033[0m %02x %02x\n",
4132 "/** 0111 0001 1bit 1110 or1 cy, %1 */",
4133 op[0], op[1]);
4134 printf (" bit = 0x%x\n", bit);
4135 }
4136 SYNTAX("or1 cy, %1");
63323b5b 4137#line 977 "rl78-decode.opc"
99c513f6 4138 ID(or); DCY(); SR(A); SB(bit);
43e65147 4139
99c513f6
DD
4140 }
4141 break;
4142 case 0x8f:
4143 case 0x9f:
4144 case 0xaf:
4145 case 0xbf:
4146 case 0xcf:
4147 case 0xdf:
4148 case 0xef:
4149 case 0xff:
4150 {
4151 /** 0111 0001 1bit 1111 xor1 cy, %1 */
63323b5b 4152#line 1281 "rl78-decode.opc"
99c513f6
DD
4153 int bit AU = (op[1] >> 4) & 0x07;
4154 if (trace)
4155 {
4156 printf ("\033[33m%s\033[0m %02x %02x\n",
4157 "/** 0111 0001 1bit 1111 xor1 cy, %1 */",
4158 op[0], op[1]);
4159 printf (" bit = 0x%x\n", bit);
4160 }
4161 SYNTAX("xor1 cy, %1");
63323b5b 4162#line 1281 "rl78-decode.opc"
99c513f6 4163 ID(xor); DCY(); SR(A); SB(bit);
43e65147 4164
ce9cb534
DD
4165 }
4166 break;
4167 case 0xc0:
4168 {
4169 /** 0111 0001 1100 0000 not1 cy */
4170 if (trace)
4171 {
4172 printf ("\033[33m%s\033[0m %02x %02x\n",
4173 "/** 0111 0001 1100 0000 not1 cy */",
4174 op[0], op[1]);
4175 }
4176 SYNTAX("not1 cy");
63323b5b 4177#line 918 "rl78-decode.opc"
ce9cb534 4178 ID(xor); DCY(); SC(1);
43e65147 4179
ce9cb534 4180 /*----------------------------------------------------------------------*/
43e65147 4181
99c513f6
DD
4182 }
4183 break;
4184 default: UNSUPPORTED(); break;
4185 }
4186 break;
4187 case 0x78:
4188 {
1d43092d 4189 /** 0111 1000 movw %e0, %1 */
99c513f6
DD
4190 if (trace)
4191 {
4192 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4193 "/** 0111 1000 movw %e0, %1 */",
99c513f6
DD
4194 op[0]);
4195 }
1d43092d 4196 SYNTAX("movw %e0, %1");
63323b5b 4197#line 879 "rl78-decode.opc"
99c513f6 4198 ID(mov); W(); DM(BC, IMMU(2)); SR(AX);
43e65147 4199
99c513f6
DD
4200 }
4201 break;
4202 case 0x79:
4203 {
1d43092d 4204 /** 0111 1001 movw %0, %e1 */
99c513f6
DD
4205 if (trace)
4206 {
4207 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4208 "/** 0111 1001 movw %0, %e1 */",
99c513f6
DD
4209 op[0]);
4210 }
1d43092d 4211 SYNTAX("movw %0, %e1");
63323b5b 4212#line 870 "rl78-decode.opc"
99c513f6 4213 ID(mov); W(); DR(AX); SM(BC, IMMU(2));
43e65147 4214
99c513f6
DD
4215 }
4216 break;
4217 case 0x7a:
4218 {
4219 /** 0111 1010 xor %0, #%1 */
4220 if (trace)
4221 {
4222 printf ("\033[33m%s\033[0m %02x\n",
4223 "/** 0111 1010 xor %0, #%1 */",
4224 op[0]);
4225 }
4226 SYNTAX("xor %0, #%1");
63323b5b 4227#line 1273 "rl78-decode.opc"
99c513f6 4228 ID(xor); DM(None, SADDR); SC(IMMU(1)); Fz;
43e65147 4229
99c513f6 4230 /*----------------------------------------------------------------------*/
43e65147 4231
99c513f6
DD
4232 }
4233 break;
4234 case 0x7b:
4235 {
4236 /** 0111 1011 xor %0, %1 */
4237 if (trace)
4238 {
4239 printf ("\033[33m%s\033[0m %02x\n",
4240 "/** 0111 1011 xor %0, %1 */",
4241 op[0]);
4242 }
4243 SYNTAX("xor %0, %1");
63323b5b 4244#line 1270 "rl78-decode.opc"
99c513f6 4245 ID(xor); DR(A); SM(None, SADDR); Fz;
43e65147 4246
99c513f6
DD
4247 }
4248 break;
4249 case 0x7c:
4250 {
4251 /** 0111 1100 xor %0, #%1 */
4252 if (trace)
4253 {
4254 printf ("\033[33m%s\033[0m %02x\n",
4255 "/** 0111 1100 xor %0, #%1 */",
4256 op[0]);
4257 }
4258 SYNTAX("xor %0, #%1");
63323b5b 4259#line 1261 "rl78-decode.opc"
99c513f6 4260 ID(xor); DR(A); SC(IMMU(1)); Fz;
43e65147 4261
99c513f6
DD
4262 }
4263 break;
4264 case 0x7d:
4265 {
1d43092d 4266 /** 0111 1101 xor %0, %e1 */
99c513f6
DD
4267 if (trace)
4268 {
4269 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4270 "/** 0111 1101 xor %0, %e1 */",
99c513f6
DD
4271 op[0]);
4272 }
1d43092d 4273 SYNTAX("xor %0, %e1");
63323b5b 4274#line 1249 "rl78-decode.opc"
99c513f6 4275 ID(xor); DR(A); SM(HL, 0); Fz;
43e65147 4276
99c513f6
DD
4277 }
4278 break;
4279 case 0x7e:
4280 {
0952813b 4281 /** 0111 1110 xor %0, %ea1 */
99c513f6
DD
4282 if (trace)
4283 {
4284 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4285 "/** 0111 1110 xor %0, %ea1 */",
99c513f6
DD
4286 op[0]);
4287 }
90092e73 4288 SYNTAX("xor %0, %ea1");
63323b5b 4289#line 1255 "rl78-decode.opc"
99c513f6 4290 ID(xor); DR(A); SM(HL, IMMU(1)); Fz;
43e65147 4291
99c513f6
DD
4292 }
4293 break;
4294 case 0x7f:
4295 {
1d43092d 4296 /** 0111 1111 xor %0, %e!1 */
99c513f6
DD
4297 if (trace)
4298 {
4299 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4300 "/** 0111 1111 xor %0, %e!1 */",
99c513f6
DD
4301 op[0]);
4302 }
1d43092d 4303 SYNTAX("xor %0, %e!1");
63323b5b 4304#line 1246 "rl78-decode.opc"
99c513f6 4305 ID(xor); DR(A); SM(None, IMMU(2)); Fz;
43e65147 4306
99c513f6
DD
4307 }
4308 break;
4309 case 0x80:
4310 case 0x81:
4311 case 0x82:
4312 case 0x83:
4313 case 0x84:
4314 case 0x85:
4315 case 0x86:
4316 case 0x87:
4317 {
4318 /** 1000 0reg inc %0 */
63323b5b 4319#line 589 "rl78-decode.opc"
99c513f6
DD
4320 int reg AU = op[0] & 0x07;
4321 if (trace)
4322 {
4323 printf ("\033[33m%s\033[0m %02x\n",
4324 "/** 1000 0reg inc %0 */",
4325 op[0]);
4326 printf (" reg = 0x%x\n", reg);
4327 }
4328 SYNTAX("inc %0");
63323b5b 4329#line 589 "rl78-decode.opc"
99c513f6 4330 ID(add); DRB(reg); SC(1); Fza;
43e65147 4331
99c513f6
DD
4332 }
4333 break;
4334 case 0x88:
4335 {
02f12cd4 4336 /** 1000 1000 mov %0, %ea1 */
99c513f6
DD
4337 if (trace)
4338 {
4339 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4340 "/** 1000 1000 mov %0, %ea1 */",
99c513f6
DD
4341 op[0]);
4342 }
02f12cd4 4343 SYNTAX("mov %0, %ea1");
63323b5b 4344#line 668 "rl78-decode.opc"
99c513f6 4345 ID(mov); DR(A); SM(SP, IMMU(1));
43e65147 4346
99c513f6
DD
4347 }
4348 break;
4349 case 0x89:
4350 {
1d43092d 4351 /** 1000 1001 mov %0, %e1 */
99c513f6
DD
4352 if (trace)
4353 {
4354 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4355 "/** 1000 1001 mov %0, %e1 */",
99c513f6
DD
4356 op[0]);
4357 }
1d43092d 4358 SYNTAX("mov %0, %e1");
63323b5b 4359#line 650 "rl78-decode.opc"
99c513f6 4360 ID(mov); DR(A); SM(DE, 0);
43e65147 4361
99c513f6
DD
4362 }
4363 break;
4364 case 0x8a:
4365 {
c2f28758 4366 /** 1000 1010 mov %0, %ea1 */
99c513f6
DD
4367 if (trace)
4368 {
4369 printf ("\033[33m%s\033[0m %02x\n",
c2f28758 4370 "/** 1000 1010 mov %0, %ea1 */",
99c513f6
DD
4371 op[0]);
4372 }
c2f28758 4373 SYNTAX("mov %0, %ea1");
63323b5b 4374#line 653 "rl78-decode.opc"
99c513f6 4375 ID(mov); DR(A); SM(DE, IMMU(1));
43e65147 4376
99c513f6
DD
4377 }
4378 break;
4379 case 0x8b:
4380 {
1d43092d 4381 /** 1000 1011 mov %0, %e1 */
99c513f6
DD
4382 if (trace)
4383 {
4384 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4385 "/** 1000 1011 mov %0, %e1 */",
99c513f6
DD
4386 op[0]);
4387 }
1d43092d 4388 SYNTAX("mov %0, %e1");
63323b5b 4389#line 656 "rl78-decode.opc"
99c513f6 4390 ID(mov); DR(A); SM(HL, 0);
43e65147 4391
99c513f6
DD
4392 }
4393 break;
4394 case 0x8c:
4395 {
0952813b 4396 /** 1000 1100 mov %0, %ea1 */
99c513f6
DD
4397 if (trace)
4398 {
4399 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4400 "/** 1000 1100 mov %0, %ea1 */",
99c513f6
DD
4401 op[0]);
4402 }
90092e73 4403 SYNTAX("mov %0, %ea1");
63323b5b 4404#line 659 "rl78-decode.opc"
99c513f6 4405 ID(mov); DR(A); SM(HL, IMMU(1));
43e65147 4406
99c513f6
DD
4407 }
4408 break;
4409 case 0x8d:
4410 {
4411 /** 1000 1101 mov %0, %1 */
4412 if (trace)
4413 {
4414 printf ("\033[33m%s\033[0m %02x\n",
4415 "/** 1000 1101 mov %0, %1 */",
4416 op[0]);
4417 }
4418 SYNTAX("mov %0, %1");
63323b5b 4419#line 692 "rl78-decode.opc"
99c513f6 4420 ID(mov); DR(A); SM(None, SADDR);
43e65147 4421
99c513f6
DD
4422 }
4423 break;
4424 case 0x8e:
4425 {
4426 /** 1000 1110 mov %0, %s1 */
4427 if (trace)
4428 {
4429 printf ("\033[33m%s\033[0m %02x\n",
4430 "/** 1000 1110 mov %0, %s1 */",
4431 op[0]);
4432 }
4433 SYNTAX("mov %0, %s1");
63323b5b 4434#line 689 "rl78-decode.opc"
99c513f6 4435 ID(mov); DR(A); SM(None, SFR);
43e65147 4436
99c513f6
DD
4437 }
4438 break;
4439 case 0x8f:
4440 {
1d43092d 4441 /** 1000 1111 mov %0, %e!1 */
99c513f6
DD
4442 if (trace)
4443 {
4444 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4445 "/** 1000 1111 mov %0, %e!1 */",
99c513f6
DD
4446 op[0]);
4447 }
1d43092d 4448 SYNTAX("mov %0, %e!1");
63323b5b 4449#line 647 "rl78-decode.opc"
99c513f6 4450 ID(mov); DR(A); SM(None, IMMU(2));
43e65147 4451
99c513f6
DD
4452 }
4453 break;
4454 case 0x90:
4455 case 0x91:
4456 case 0x92:
4457 case 0x93:
4458 case 0x94:
4459 case 0x95:
4460 case 0x96:
4461 case 0x97:
4462 {
4463 /** 1001 0reg dec %0 */
63323b5b 4464#line 556 "rl78-decode.opc"
99c513f6
DD
4465 int reg AU = op[0] & 0x07;
4466 if (trace)
4467 {
4468 printf ("\033[33m%s\033[0m %02x\n",
4469 "/** 1001 0reg dec %0 */",
4470 op[0]);
4471 printf (" reg = 0x%x\n", reg);
4472 }
4473 SYNTAX("dec %0");
63323b5b 4474#line 556 "rl78-decode.opc"
99c513f6 4475 ID(sub); DRB(reg); SC(1); Fza;
43e65147 4476
99c513f6
DD
4477 }
4478 break;
4479 case 0x98:
4480 {
02f12cd4 4481 /** 1001 1000 mov %a0, %1 */
99c513f6
DD
4482 if (trace)
4483 {
4484 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4485 "/** 1001 1000 mov %a0, %1 */",
99c513f6
DD
4486 op[0]);
4487 }
02f12cd4 4488 SYNTAX("mov %a0, %1");
63323b5b 4489#line 644 "rl78-decode.opc"
99c513f6 4490 ID(mov); DM(SP, IMMU(1)); SR(A);
43e65147 4491
99c513f6
DD
4492 }
4493 break;
4494 case 0x99:
4495 {
fd63f640 4496 /** 1001 1001 mov %e0, %1 */
99c513f6
DD
4497 if (trace)
4498 {
4499 printf ("\033[33m%s\033[0m %02x\n",
fd63f640 4500 "/** 1001 1001 mov %e0, %1 */",
99c513f6
DD
4501 op[0]);
4502 }
fd63f640 4503 SYNTAX("mov %e0, %1");
63323b5b 4504#line 617 "rl78-decode.opc"
99c513f6 4505 ID(mov); DM(DE, 0); SR(A);
43e65147 4506
99c513f6
DD
4507 }
4508 break;
4509 case 0x9a:
4510 {
1eac08cc 4511 /** 1001 1010 mov %ea0, %1 */
99c513f6
DD
4512 if (trace)
4513 {
4514 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4515 "/** 1001 1010 mov %ea0, %1 */",
99c513f6
DD
4516 op[0]);
4517 }
c2f28758 4518 SYNTAX("mov %ea0, %1");
63323b5b 4519#line 623 "rl78-decode.opc"
99c513f6 4520 ID(mov); DM(DE, IMMU(1)); SR(A);
43e65147 4521
99c513f6
DD
4522 }
4523 break;
4524 case 0x9b:
4525 {
fd63f640 4526 /** 1001 1011 mov %e0, %1 */
99c513f6
DD
4527 if (trace)
4528 {
4529 printf ("\033[33m%s\033[0m %02x\n",
fd63f640 4530 "/** 1001 1011 mov %e0, %1 */",
99c513f6
DD
4531 op[0]);
4532 }
fd63f640 4533 SYNTAX("mov %e0, %1");
63323b5b 4534#line 626 "rl78-decode.opc"
99c513f6 4535 ID(mov); DM(HL, 0); SR(A);
43e65147 4536
99c513f6
DD
4537 }
4538 break;
4539 case 0x9c:
4540 {
0952813b 4541 /** 1001 1100 mov %ea0, %1 */
99c513f6
DD
4542 if (trace)
4543 {
4544 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4545 "/** 1001 1100 mov %ea0, %1 */",
99c513f6
DD
4546 op[0]);
4547 }
90092e73 4548 SYNTAX("mov %ea0, %1");
63323b5b 4549#line 635 "rl78-decode.opc"
99c513f6 4550 ID(mov); DM(HL, IMMU(1)); SR(A);
43e65147 4551
99c513f6
DD
4552 }
4553 break;
4554 case 0x9d:
4555 {
4556 /** 1001 1101 mov %0, %1 */
4557 if (trace)
4558 {
4559 printf ("\033[33m%s\033[0m %02x\n",
4560 "/** 1001 1101 mov %0, %1 */",
4561 op[0]);
4562 }
4563 SYNTAX("mov %0, %1");
63323b5b 4564#line 749 "rl78-decode.opc"
99c513f6 4565 ID(mov); DM(None, SADDR); SR(A);
43e65147 4566
99c513f6
DD
4567 }
4568 break;
4569 case 0x9e:
4570 {
46662804 4571 /** 1001 1110 mov %s0, %1 */
99c513f6
DD
4572 if (trace)
4573 {
4574 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4575 "/** 1001 1110 mov %s0, %1 */",
99c513f6
DD
4576 op[0]);
4577 }
46662804 4578 SYNTAX("mov %s0, %1");
63323b5b 4579#line 782 "rl78-decode.opc"
99c513f6 4580 ID(mov); DM(None, SFR); SR(A);
43e65147 4581
99c513f6 4582 /*----------------------------------------------------------------------*/
43e65147 4583
99c513f6
DD
4584 }
4585 break;
4586 case 0x9f:
4587 {
1d43092d 4588 /** 1001 1111 mov %e!0, %1 */
99c513f6
DD
4589 if (trace)
4590 {
4591 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4592 "/** 1001 1111 mov %e!0, %1 */",
99c513f6
DD
4593 op[0]);
4594 }
1d43092d 4595 SYNTAX("mov %e!0, %1");
63323b5b 4596#line 614 "rl78-decode.opc"
99c513f6 4597 ID(mov); DM(None, IMMU(2)); SR(A);
43e65147 4598
99c513f6
DD
4599 }
4600 break;
4601 case 0xa0:
4602 {
1d43092d 4603 /** 1010 0000 inc %e!0 */
99c513f6
DD
4604 if (trace)
4605 {
4606 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4607 "/** 1010 0000 inc %e!0 */",
99c513f6
DD
4608 op[0]);
4609 }
1d43092d 4610 SYNTAX("inc %e!0");
63323b5b 4611#line 583 "rl78-decode.opc"
99c513f6 4612 ID(add); DM(None, IMMU(2)); SC(1); Fza;
43e65147 4613
99c513f6
DD
4614 }
4615 break;
4616 case 0xa1:
4617 case 0xa3:
4618 case 0xa5:
4619 case 0xa7:
4620 {
4621 /** 1010 0rg1 incw %0 */
63323b5b 4622#line 603 "rl78-decode.opc"
99c513f6
DD
4623 int rg AU = (op[0] >> 1) & 0x03;
4624 if (trace)
4625 {
4626 printf ("\033[33m%s\033[0m %02x\n",
4627 "/** 1010 0rg1 incw %0 */",
4628 op[0]);
4629 printf (" rg = 0x%x\n", rg);
4630 }
4631 SYNTAX("incw %0");
63323b5b 4632#line 603 "rl78-decode.opc"
99c513f6 4633 ID(add); W(); DRW(rg); SC(1);
43e65147 4634
99c513f6
DD
4635 }
4636 break;
4637 case 0xa2:
4638 {
1d43092d 4639 /** 1010 0010 incw %e!0 */
99c513f6
DD
4640 if (trace)
4641 {
4642 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4643 "/** 1010 0010 incw %e!0 */",
99c513f6
DD
4644 op[0]);
4645 }
1d43092d 4646 SYNTAX("incw %e!0");
63323b5b 4647#line 597 "rl78-decode.opc"
99c513f6 4648 ID(add); W(); DM(None, IMMU(2)); SC(1);
43e65147 4649
99c513f6
DD
4650 }
4651 break;
4652 case 0xa4:
4653 {
4654 /** 1010 0100 inc %0 */
4655 if (trace)
4656 {
4657 printf ("\033[33m%s\033[0m %02x\n",
4658 "/** 1010 0100 inc %0 */",
4659 op[0]);
4660 }
4661 SYNTAX("inc %0");
63323b5b 4662#line 592 "rl78-decode.opc"
99c513f6 4663 ID(add); DM(None, SADDR); SC(1); Fza;
43e65147 4664
99c513f6 4665 /*----------------------------------------------------------------------*/
43e65147 4666
99c513f6
DD
4667 }
4668 break;
4669 case 0xa6:
4670 {
4671 /** 1010 0110 incw %0 */
4672 if (trace)
4673 {
4674 printf ("\033[33m%s\033[0m %02x\n",
4675 "/** 1010 0110 incw %0 */",
4676 op[0]);
4677 }
4678 SYNTAX("incw %0");
63323b5b 4679#line 606 "rl78-decode.opc"
99c513f6 4680 ID(add); W(); DM(None, SADDR); SC(1);
43e65147 4681
99c513f6 4682 /*----------------------------------------------------------------------*/
43e65147 4683
99c513f6
DD
4684 }
4685 break;
4686 case 0xa8:
4687 {
02f12cd4 4688 /** 1010 1000 movw %0, %a1 */
99c513f6
DD
4689 if (trace)
4690 {
4691 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4692 "/** 1010 1000 movw %0, %a1 */",
99c513f6
DD
4693 op[0]);
4694 }
02f12cd4 4695 SYNTAX("movw %0, %a1");
63323b5b 4696#line 852 "rl78-decode.opc"
99c513f6 4697 ID(mov); W(); DR(AX); SM(SP, IMMU(1));
43e65147 4698
99c513f6
DD
4699 }
4700 break;
4701 case 0xa9:
4702 {
1d43092d 4703 /** 1010 1001 movw %0, %e1 */
99c513f6
DD
4704 if (trace)
4705 {
4706 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4707 "/** 1010 1001 movw %0, %e1 */",
99c513f6
DD
4708 op[0]);
4709 }
1d43092d 4710 SYNTAX("movw %0, %e1");
63323b5b 4711#line 840 "rl78-decode.opc"
99c513f6 4712 ID(mov); W(); DR(AX); SM(DE, 0);
43e65147 4713
99c513f6
DD
4714 }
4715 break;
4716 case 0xaa:
4717 {
1eac08cc 4718 /** 1010 1010 movw %0, %ea1 */
99c513f6
DD
4719 if (trace)
4720 {
4721 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4722 "/** 1010 1010 movw %0, %ea1 */",
99c513f6
DD
4723 op[0]);
4724 }
c2f28758 4725 SYNTAX("movw %0, %ea1");
63323b5b 4726#line 843 "rl78-decode.opc"
99c513f6 4727 ID(mov); W(); DR(AX); SM(DE, IMMU(1));
43e65147 4728
99c513f6
DD
4729 }
4730 break;
4731 case 0xab:
4732 {
1d43092d 4733 /** 1010 1011 movw %0, %e1 */
99c513f6
DD
4734 if (trace)
4735 {
4736 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4737 "/** 1010 1011 movw %0, %e1 */",
99c513f6
DD
4738 op[0]);
4739 }
1d43092d 4740 SYNTAX("movw %0, %e1");
63323b5b 4741#line 846 "rl78-decode.opc"
99c513f6 4742 ID(mov); W(); DR(AX); SM(HL, 0);
43e65147 4743
99c513f6
DD
4744 }
4745 break;
4746 case 0xac:
4747 {
0952813b 4748 /** 1010 1100 movw %0, %ea1 */
99c513f6
DD
4749 if (trace)
4750 {
4751 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4752 "/** 1010 1100 movw %0, %ea1 */",
99c513f6
DD
4753 op[0]);
4754 }
90092e73 4755 SYNTAX("movw %0, %ea1");
63323b5b 4756#line 849 "rl78-decode.opc"
99c513f6 4757 ID(mov); W(); DR(AX); SM(HL, IMMU(1));
43e65147 4758
99c513f6
DD
4759 }
4760 break;
4761 case 0xad:
4762 {
4763 /** 1010 1101 movw %0, %1 */
4764 if (trace)
4765 {
4766 printf ("\033[33m%s\033[0m %02x\n",
4767 "/** 1010 1101 movw %0, %1 */",
4768 op[0]);
4769 }
4770 SYNTAX("movw %0, %1");
63323b5b 4771#line 882 "rl78-decode.opc"
99c513f6 4772 ID(mov); W(); DR(AX); SM(None, SADDR);
43e65147 4773
99c513f6
DD
4774 }
4775 break;
4776 case 0xae:
4777 {
4778 /** 1010 1110 movw %0, %s1 */
4779 if (trace)
4780 {
4781 printf ("\033[33m%s\033[0m %02x\n",
4782 "/** 1010 1110 movw %0, %s1 */",
4783 op[0]);
4784 }
4785 SYNTAX("movw %0, %s1");
63323b5b 4786#line 885 "rl78-decode.opc"
99c513f6 4787 ID(mov); W(); DR(AX); SM(None, SFR);
43e65147 4788
99c513f6
DD
4789 }
4790 break;
4791 case 0xaf:
4792 {
1d43092d 4793 /** 1010 1111 movw %0, %e!1 */
99c513f6
DD
4794 if (trace)
4795 {
4796 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4797 "/** 1010 1111 movw %0, %e!1 */",
99c513f6
DD
4798 op[0]);
4799 }
1d43092d 4800 SYNTAX("movw %0, %e!1");
63323b5b 4801#line 836 "rl78-decode.opc"
99c513f6 4802 ID(mov); W(); DR(AX); SM(None, IMMU(2));
43e65147
L
4803
4804
99c513f6
DD
4805 }
4806 break;
4807 case 0xb0:
4808 {
1d43092d 4809 /** 1011 0000 dec %e!0 */
99c513f6
DD
4810 if (trace)
4811 {
4812 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4813 "/** 1011 0000 dec %e!0 */",
99c513f6
DD
4814 op[0]);
4815 }
1d43092d 4816 SYNTAX("dec %e!0");
63323b5b 4817#line 550 "rl78-decode.opc"
99c513f6 4818 ID(sub); DM(None, IMMU(2)); SC(1); Fza;
43e65147 4819
99c513f6
DD
4820 }
4821 break;
4822 case 0xb1:
4823 case 0xb3:
4824 case 0xb5:
4825 case 0xb7:
4826 {
4827 /** 1011 0rg1 decw %0 */
63323b5b 4828#line 570 "rl78-decode.opc"
99c513f6
DD
4829 int rg AU = (op[0] >> 1) & 0x03;
4830 if (trace)
4831 {
4832 printf ("\033[33m%s\033[0m %02x\n",
4833 "/** 1011 0rg1 decw %0 */",
4834 op[0]);
4835 printf (" rg = 0x%x\n", rg);
4836 }
4837 SYNTAX("decw %0");
63323b5b 4838#line 570 "rl78-decode.opc"
99c513f6 4839 ID(sub); W(); DRW(rg); SC(1);
43e65147 4840
99c513f6
DD
4841 }
4842 break;
4843 case 0xb2:
4844 {
1d43092d 4845 /** 1011 0010 decw %e!0 */
99c513f6
DD
4846 if (trace)
4847 {
4848 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4849 "/** 1011 0010 decw %e!0 */",
99c513f6
DD
4850 op[0]);
4851 }
1d43092d 4852 SYNTAX("decw %e!0");
63323b5b 4853#line 564 "rl78-decode.opc"
99c513f6 4854 ID(sub); W(); DM(None, IMMU(2)); SC(1);
43e65147 4855
99c513f6
DD
4856 }
4857 break;
4858 case 0xb4:
4859 {
4860 /** 1011 0100 dec %0 */
4861 if (trace)
4862 {
4863 printf ("\033[33m%s\033[0m %02x\n",
4864 "/** 1011 0100 dec %0 */",
4865 op[0]);
4866 }
4867 SYNTAX("dec %0");
63323b5b 4868#line 559 "rl78-decode.opc"
99c513f6 4869 ID(sub); DM(None, SADDR); SC(1); Fza;
43e65147 4870
99c513f6 4871 /*----------------------------------------------------------------------*/
43e65147 4872
99c513f6
DD
4873 }
4874 break;
4875 case 0xb6:
4876 {
4877 /** 1011 0110 decw %0 */
4878 if (trace)
4879 {
4880 printf ("\033[33m%s\033[0m %02x\n",
4881 "/** 1011 0110 decw %0 */",
4882 op[0]);
4883 }
4884 SYNTAX("decw %0");
63323b5b 4885#line 573 "rl78-decode.opc"
99c513f6 4886 ID(sub); W(); DM(None, SADDR); SC(1);
43e65147 4887
99c513f6 4888 /*----------------------------------------------------------------------*/
43e65147 4889
99c513f6
DD
4890 }
4891 break;
4892 case 0xb8:
4893 {
02f12cd4 4894 /** 1011 1000 movw %a0, %1 */
99c513f6
DD
4895 if (trace)
4896 {
4897 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 4898 "/** 1011 1000 movw %a0, %1 */",
99c513f6
DD
4899 op[0]);
4900 }
02f12cd4 4901 SYNTAX("movw %a0, %1");
63323b5b 4902#line 833 "rl78-decode.opc"
99c513f6 4903 ID(mov); W(); DM(SP, IMMU(1)); SR(AX);
43e65147 4904
99c513f6
DD
4905 }
4906 break;
4907 case 0xb9:
4908 {
1d43092d 4909 /** 1011 1001 movw %e0, %1 */
99c513f6
DD
4910 if (trace)
4911 {
4912 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4913 "/** 1011 1001 movw %e0, %1 */",
99c513f6
DD
4914 op[0]);
4915 }
1d43092d 4916 SYNTAX("movw %e0, %1");
63323b5b 4917#line 821 "rl78-decode.opc"
99c513f6 4918 ID(mov); W(); DM(DE, 0); SR(AX);
43e65147 4919
99c513f6
DD
4920 }
4921 break;
4922 case 0xba:
4923 {
1eac08cc 4924 /** 1011 1010 movw %ea0, %1 */
99c513f6
DD
4925 if (trace)
4926 {
4927 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 4928 "/** 1011 1010 movw %ea0, %1 */",
99c513f6
DD
4929 op[0]);
4930 }
c2f28758 4931 SYNTAX("movw %ea0, %1");
63323b5b 4932#line 824 "rl78-decode.opc"
99c513f6 4933 ID(mov); W(); DM(DE, IMMU(1)); SR(AX);
43e65147 4934
99c513f6
DD
4935 }
4936 break;
4937 case 0xbb:
4938 {
1d43092d 4939 /** 1011 1011 movw %e0, %1 */
99c513f6
DD
4940 if (trace)
4941 {
4942 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 4943 "/** 1011 1011 movw %e0, %1 */",
99c513f6
DD
4944 op[0]);
4945 }
1d43092d 4946 SYNTAX("movw %e0, %1");
63323b5b 4947#line 827 "rl78-decode.opc"
99c513f6 4948 ID(mov); W(); DM(HL, 0); SR(AX);
43e65147 4949
99c513f6
DD
4950 }
4951 break;
4952 case 0xbc:
4953 {
0952813b 4954 /** 1011 1100 movw %ea0, %1 */
99c513f6
DD
4955 if (trace)
4956 {
4957 printf ("\033[33m%s\033[0m %02x\n",
0952813b 4958 "/** 1011 1100 movw %ea0, %1 */",
99c513f6
DD
4959 op[0]);
4960 }
90092e73 4961 SYNTAX("movw %ea0, %1");
63323b5b 4962#line 830 "rl78-decode.opc"
99c513f6 4963 ID(mov); W(); DM(HL, IMMU(1)); SR(AX);
43e65147 4964
99c513f6
DD
4965 }
4966 break;
4967 case 0xbd:
4968 {
4969 /** 1011 1101 movw %0, %1 */
4970 if (trace)
4971 {
4972 printf ("\033[33m%s\033[0m %02x\n",
4973 "/** 1011 1101 movw %0, %1 */",
4974 op[0]);
4975 }
4976 SYNTAX("movw %0, %1");
63323b5b 4977#line 897 "rl78-decode.opc"
99c513f6 4978 ID(mov); W(); DM(None, SADDR); SR(AX);
43e65147 4979
99c513f6
DD
4980 }
4981 break;
4982 case 0xbe:
4983 {
46662804 4984 /** 1011 1110 movw %s0, %1 */
99c513f6
DD
4985 if (trace)
4986 {
4987 printf ("\033[33m%s\033[0m %02x\n",
46662804 4988 "/** 1011 1110 movw %s0, %1 */",
99c513f6
DD
4989 op[0]);
4990 }
46662804 4991 SYNTAX("movw %s0, %1");
63323b5b 4992#line 903 "rl78-decode.opc"
99c513f6 4993 ID(mov); W(); DM(None, SFR); SR(AX);
43e65147 4994
99c513f6 4995 /*----------------------------------------------------------------------*/
43e65147 4996
99c513f6
DD
4997 }
4998 break;
4999 case 0xbf:
5000 {
1d43092d 5001 /** 1011 1111 movw %e!0, %1 */
99c513f6
DD
5002 if (trace)
5003 {
5004 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5005 "/** 1011 1111 movw %e!0, %1 */",
99c513f6
DD
5006 op[0]);
5007 }
1d43092d 5008 SYNTAX("movw %e!0, %1");
63323b5b 5009#line 818 "rl78-decode.opc"
99c513f6 5010 ID(mov); W(); DM(None, IMMU(2)); SR(AX);
43e65147 5011
99c513f6
DD
5012 }
5013 break;
5014 case 0xc0:
5015 case 0xc2:
5016 case 0xc4:
5017 case 0xc6:
5018 {
5019 /** 1100 0rg0 pop %0 */
63323b5b 5020#line 988 "rl78-decode.opc"
99c513f6
DD
5021 int rg AU = (op[0] >> 1) & 0x03;
5022 if (trace)
5023 {
5024 printf ("\033[33m%s\033[0m %02x\n",
5025 "/** 1100 0rg0 pop %0 */",
5026 op[0]);
5027 printf (" rg = 0x%x\n", rg);
5028 }
5029 SYNTAX("pop %0");
63323b5b 5030#line 988 "rl78-decode.opc"
99c513f6 5031 ID(mov); W(); DRW(rg); SPOP();
43e65147 5032
99c513f6
DD
5033 }
5034 break;
5035 case 0xc1:
5036 case 0xc3:
5037 case 0xc5:
5038 case 0xc7:
5039 {
5040 /** 1100 0rg1 push %1 */
63323b5b 5041#line 996 "rl78-decode.opc"
99c513f6
DD
5042 int rg AU = (op[0] >> 1) & 0x03;
5043 if (trace)
5044 {
5045 printf ("\033[33m%s\033[0m %02x\n",
5046 "/** 1100 0rg1 push %1 */",
5047 op[0]);
5048 printf (" rg = 0x%x\n", rg);
5049 }
5050 SYNTAX("push %1");
63323b5b 5051#line 996 "rl78-decode.opc"
99c513f6 5052 ID(mov); W(); DPUSH(); SRW(rg);
43e65147 5053
99c513f6
DD
5054 }
5055 break;
5056 case 0xc8:
5057 {
02f12cd4 5058 /** 1100 1000 mov %a0, #%1 */
99c513f6
DD
5059 if (trace)
5060 {
5061 printf ("\033[33m%s\033[0m %02x\n",
02f12cd4 5062 "/** 1100 1000 mov %a0, #%1 */",
99c513f6
DD
5063 op[0]);
5064 }
02f12cd4 5065 SYNTAX("mov %a0, #%1");
63323b5b 5066#line 641 "rl78-decode.opc"
99c513f6 5067 ID(mov); DM(SP, IMMU(1)); SC(IMMU(1));
43e65147 5068
99c513f6
DD
5069 }
5070 break;
5071 case 0xc9:
5072 {
5073 /** 1100 1001 movw %0, #%1 */
5074 if (trace)
5075 {
5076 printf ("\033[33m%s\033[0m %02x\n",
5077 "/** 1100 1001 movw %0, #%1 */",
5078 op[0]);
5079 }
5080 SYNTAX("movw %0, #%1");
63323b5b 5081#line 894 "rl78-decode.opc"
99c513f6 5082 ID(mov); W(); DM(None, SADDR); SC(IMMU(2));
43e65147 5083
99c513f6
DD
5084 }
5085 break;
5086 case 0xca:
5087 {
c2f28758 5088 /** 1100 1010 mov %ea0, #%1 */
99c513f6
DD
5089 if (trace)
5090 {
5091 printf ("\033[33m%s\033[0m %02x\n",
c2f28758 5092 "/** 1100 1010 mov %ea0, #%1 */",
99c513f6
DD
5093 op[0]);
5094 }
c2f28758 5095 SYNTAX("mov %ea0, #%1");
63323b5b 5096#line 620 "rl78-decode.opc"
99c513f6 5097 ID(mov); DM(DE, IMMU(1)); SC(IMMU(1));
43e65147 5098
99c513f6
DD
5099 }
5100 break;
5101 case 0xcb:
5102 {
46662804 5103 /** 1100 1011 movw %s0, #%1 */
99c513f6
DD
5104 if (trace)
5105 {
5106 printf ("\033[33m%s\033[0m %02x\n",
1eac08cc 5107 "/** 1100 1011 movw %s0, #%1 */",
99c513f6
DD
5108 op[0]);
5109 }
46662804 5110 SYNTAX("movw %s0, #%1");
63323b5b 5111#line 900 "rl78-decode.opc"
99c513f6 5112 ID(mov); W(); DM(None, SFR); SC(IMMU(2));
43e65147 5113
99c513f6
DD
5114 }
5115 break;
5116 case 0xcc:
5117 {
90092e73 5118 /** 1100 1100 mov %ea0, #%1 */
99c513f6
DD
5119 if (trace)
5120 {
5121 printf ("\033[33m%s\033[0m %02x\n",
90092e73 5122 "/** 1100 1100 mov %ea0, #%1 */",
99c513f6
DD
5123 op[0]);
5124 }
90092e73 5125 SYNTAX("mov %ea0, #%1");
63323b5b 5126#line 632 "rl78-decode.opc"
99c513f6 5127 ID(mov); DM(HL, IMMU(1)); SC(IMMU(1));
43e65147 5128
99c513f6
DD
5129 }
5130 break;
5131 case 0xcd:
5132 {
5133 /** 1100 1101 mov %0, #%1 */
5134 if (trace)
5135 {
5136 printf ("\033[33m%s\033[0m %02x\n",
5137 "/** 1100 1101 mov %0, #%1 */",
5138 op[0]);
5139 }
5140 SYNTAX("mov %0, #%1");
63323b5b 5141#line 746 "rl78-decode.opc"
99c513f6 5142 ID(mov); DM(None, SADDR); SC(IMMU(1));
43e65147 5143
99c513f6
DD
5144 }
5145 break;
5146 case 0xce:
5147 {
5148 /** 1100 1110 mov %s0, #%1 */
5149 if (trace)
5150 {
5151 printf ("\033[33m%s\033[0m %02x\n",
5152 "/** 1100 1110 mov %s0, #%1 */",
5153 op[0]);
5154 }
5155 SYNTAX("mov %s0, #%1");
63323b5b 5156#line 752 "rl78-decode.opc"
99c513f6
DD
5157 op0 = SFR;
5158 op1 = IMMU(1);
5159 ID(mov); DM(None, op0); SC(op1);
0952813b 5160 if (op0 == 0xffffb && isa == RL78_ISA_G14)
99c513f6
DD
5161 switch (op1)
5162 {
5163 case 0x01:
5164 rl78->syntax = "mulhu"; ID(mulhu);
5165 break;
5166 case 0x02:
5167 rl78->syntax = "mulh"; ID(mulh);
5168 break;
5169 case 0x03:
5170 rl78->syntax = "divhu"; ID(divhu);
5171 break;
5172 case 0x04:
151fa98f 5173 rl78->syntax = "divwu <old-encoding>"; ID(divwu);
99c513f6
DD
5174 break;
5175 case 0x05:
5176 rl78->syntax = "machu"; ID(machu);
5177 break;
5178 case 0x06:
5179 rl78->syntax = "mach"; ID(mach);
5180 break;
151fa98f
NC
5181 case 0x0b:
5182 rl78->syntax = "divwu"; ID(divwu);
5183 break;
99c513f6 5184 }
43e65147 5185
c7570fcd 5186 }
99c513f6
DD
5187 break;
5188 case 0xcf:
5189 {
1d43092d 5190 /** 1100 1111 mov %e!0, #%1 */
99c513f6
DD
5191 if (trace)
5192 {
5193 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5194 "/** 1100 1111 mov %e!0, #%1 */",
99c513f6
DD
5195 op[0]);
5196 }
1d43092d 5197 SYNTAX("mov %e!0, #%1");
63323b5b 5198#line 611 "rl78-decode.opc"
99c513f6 5199 ID(mov); DM(None, IMMU(2)); SC(IMMU(1));
43e65147 5200
99c513f6
DD
5201 }
5202 break;
5203 case 0xd0:
5204 case 0xd1:
5205 case 0xd2:
5206 case 0xd3:
5207 {
5208 /** 1101 00rg cmp0 %0 */
63323b5b 5209#line 520 "rl78-decode.opc"
99c513f6
DD
5210 int rg AU = op[0] & 0x03;
5211 if (trace)
5212 {
5213 printf ("\033[33m%s\033[0m %02x\n",
5214 "/** 1101 00rg cmp0 %0 */",
5215 op[0]);
5216 printf (" rg = 0x%x\n", rg);
5217 }
5218 SYNTAX("cmp0 %0");
63323b5b 5219#line 520 "rl78-decode.opc"
99c513f6 5220 ID(cmp); DRB(rg); SC(0); Fzac;
43e65147 5221
99c513f6
DD
5222 }
5223 break;
5224 case 0xd4:
5225 {
5226 /** 1101 0100 cmp0 %0 */
5227 if (trace)
5228 {
5229 printf ("\033[33m%s\033[0m %02x\n",
5230 "/** 1101 0100 cmp0 %0 */",
5231 op[0]);
5232 }
5233 SYNTAX("cmp0 %0");
63323b5b 5234#line 523 "rl78-decode.opc"
99c513f6 5235 ID(cmp); DM(None, SADDR); SC(0); Fzac;
43e65147 5236
99c513f6 5237 /*----------------------------------------------------------------------*/
43e65147 5238
99c513f6
DD
5239 }
5240 break;
5241 case 0xd5:
5242 {
1d43092d 5243 /** 1101 0101 cmp0 %e!0 */
99c513f6
DD
5244 if (trace)
5245 {
5246 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5247 "/** 1101 0101 cmp0 %e!0 */",
99c513f6
DD
5248 op[0]);
5249 }
1d43092d 5250 SYNTAX("cmp0 %e!0");
63323b5b 5251#line 517 "rl78-decode.opc"
99c513f6 5252 ID(cmp); DM(None, IMMU(2)); SC(0); Fzac;
43e65147 5253
99c513f6
DD
5254 }
5255 break;
5256 case 0xd6:
5257 {
5258 /** 1101 0110 mulu x */
5259 if (trace)
5260 {
5261 printf ("\033[33m%s\033[0m %02x\n",
5262 "/** 1101 0110 mulu x */",
5263 op[0]);
5264 }
5265 SYNTAX("mulu x");
63323b5b 5266#line 908 "rl78-decode.opc"
1eac08cc 5267 ID(mulu);
43e65147 5268
99c513f6 5269 /*----------------------------------------------------------------------*/
43e65147 5270
99c513f6
DD
5271 }
5272 break;
5273 case 0xd7:
5274 {
5275 /** 1101 0111 ret */
5276 if (trace)
5277 {
5278 printf ("\033[33m%s\033[0m %02x\n",
5279 "/** 1101 0111 ret */",
5280 op[0]);
5281 }
5282 SYNTAX("ret");
63323b5b 5283#line 1004 "rl78-decode.opc"
99c513f6 5284 ID(ret);
43e65147 5285
99c513f6
DD
5286 }
5287 break;
5288 case 0xd8:
5289 {
5290 /** 1101 1000 mov %0, %1 */
5291 if (trace)
5292 {
5293 printf ("\033[33m%s\033[0m %02x\n",
5294 "/** 1101 1000 mov %0, %1 */",
5295 op[0]);
5296 }
5297 SYNTAX("mov %0, %1");
63323b5b 5298#line 713 "rl78-decode.opc"
99c513f6 5299 ID(mov); DR(X); SM(None, SADDR);
43e65147 5300
99c513f6
DD
5301 }
5302 break;
5303 case 0xd9:
5304 {
1d43092d 5305 /** 1101 1001 mov %0, %e!1 */
99c513f6
DD
5306 if (trace)
5307 {
5308 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5309 "/** 1101 1001 mov %0, %e!1 */",
99c513f6
DD
5310 op[0]);
5311 }
1d43092d 5312 SYNTAX("mov %0, %e!1");
63323b5b 5313#line 710 "rl78-decode.opc"
99c513f6 5314 ID(mov); DR(X); SM(None, IMMU(2));
43e65147 5315
99c513f6
DD
5316 }
5317 break;
5318 case 0xda:
5319 case 0xea:
5320 case 0xfa:
5321 {
5322 /** 11ra 1010 movw %0, %1 */
63323b5b 5323#line 891 "rl78-decode.opc"
99c513f6
DD
5324 int ra AU = (op[0] >> 4) & 0x03;
5325 if (trace)
5326 {
5327 printf ("\033[33m%s\033[0m %02x\n",
5328 "/** 11ra 1010 movw %0, %1 */",
5329 op[0]);
5330 printf (" ra = 0x%x\n", ra);
5331 }
5332 SYNTAX("movw %0, %1");
63323b5b 5333#line 891 "rl78-decode.opc"
99c513f6 5334 ID(mov); W(); DRW(ra); SM(None, SADDR);
43e65147 5335
99c513f6
DD
5336 }
5337 break;
5338 case 0xdb:
5339 case 0xeb:
5340 case 0xfb:
5341 {
c697cf0b 5342 /** 11ra 1011 movw %0, %es!1 */
63323b5b 5343#line 888 "rl78-decode.opc"
99c513f6
DD
5344 int ra AU = (op[0] >> 4) & 0x03;
5345 if (trace)
5346 {
5347 printf ("\033[33m%s\033[0m %02x\n",
c697cf0b 5348 "/** 11ra 1011 movw %0, %es!1 */",
99c513f6
DD
5349 op[0]);
5350 printf (" ra = 0x%x\n", ra);
5351 }
4d82fe66 5352 SYNTAX("movw %0, %es!1");
63323b5b 5353#line 888 "rl78-decode.opc"
99c513f6 5354 ID(mov); W(); DRW(ra); SM(None, IMMU(2));
43e65147 5355
99c513f6
DD
5356 }
5357 break;
5358 case 0xdc:
5359 {
5360 /** 1101 1100 bc $%a0 */
5361 if (trace)
5362 {
5363 printf ("\033[33m%s\033[0m %02x\n",
5364 "/** 1101 1100 bc $%a0 */",
5365 op[0]);
5366 }
5367 SYNTAX("bc $%a0");
63323b5b 5368#line 336 "rl78-decode.opc"
99c513f6 5369 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(C);
43e65147 5370
99c513f6
DD
5371 }
5372 break;
5373 case 0xdd:
5374 {
5375 /** 1101 1101 bz $%a0 */
5376 if (trace)
5377 {
5378 printf ("\033[33m%s\033[0m %02x\n",
5379 "/** 1101 1101 bz $%a0 */",
5380 op[0]);
5381 }
5382 SYNTAX("bz $%a0");
63323b5b 5383#line 348 "rl78-decode.opc"
99c513f6 5384 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(Z);
43e65147 5385
99c513f6
DD
5386 }
5387 break;
5388 case 0xde:
5389 {
5390 /** 1101 1110 bnc $%a0 */
5391 if (trace)
5392 {
5393 printf ("\033[33m%s\033[0m %02x\n",
5394 "/** 1101 1110 bnc $%a0 */",
5395 op[0]);
5396 }
5397 SYNTAX("bnc $%a0");
63323b5b 5398#line 339 "rl78-decode.opc"
99c513f6 5399 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NC);
43e65147 5400
99c513f6
DD
5401 }
5402 break;
5403 case 0xdf:
5404 {
5405 /** 1101 1111 bnz $%a0 */
5406 if (trace)
5407 {
5408 printf ("\033[33m%s\033[0m %02x\n",
5409 "/** 1101 1111 bnz $%a0 */",
5410 op[0]);
5411 }
5412 SYNTAX("bnz $%a0");
63323b5b 5413#line 351 "rl78-decode.opc"
99c513f6 5414 ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NZ);
43e65147 5415
99c513f6 5416 /*----------------------------------------------------------------------*/
43e65147 5417
99c513f6
DD
5418 }
5419 break;
5420 case 0xe0:
5421 case 0xe1:
5422 case 0xe2:
5423 case 0xe3:
5424 {
5425 /** 1110 00rg oneb %0 */
63323b5b 5426#line 926 "rl78-decode.opc"
99c513f6
DD
5427 int rg AU = op[0] & 0x03;
5428 if (trace)
5429 {
5430 printf ("\033[33m%s\033[0m %02x\n",
5431 "/** 1110 00rg oneb %0 */",
5432 op[0]);
5433 printf (" rg = 0x%x\n", rg);
5434 }
5435 SYNTAX("oneb %0");
63323b5b 5436#line 926 "rl78-decode.opc"
99c513f6 5437 ID(mov); DRB(rg); SC(1);
43e65147 5438
99c513f6
DD
5439 }
5440 break;
5441 case 0xe4:
5442 {
5443 /** 1110 0100 oneb %0 */
5444 if (trace)
5445 {
5446 printf ("\033[33m%s\033[0m %02x\n",
5447 "/** 1110 0100 oneb %0 */",
5448 op[0]);
5449 }
5450 SYNTAX("oneb %0");
63323b5b 5451#line 929 "rl78-decode.opc"
99c513f6 5452 ID(mov); DM(None, SADDR); SC(1);
43e65147 5453
99c513f6 5454 /*----------------------------------------------------------------------*/
43e65147 5455
99c513f6
DD
5456 }
5457 break;
5458 case 0xe5:
5459 {
1d43092d 5460 /** 1110 0101 oneb %e!0 */
99c513f6
DD
5461 if (trace)
5462 {
5463 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5464 "/** 1110 0101 oneb %e!0 */",
99c513f6
DD
5465 op[0]);
5466 }
1d43092d 5467 SYNTAX("oneb %e!0");
63323b5b 5468#line 923 "rl78-decode.opc"
99c513f6 5469 ID(mov); DM(None, IMMU(2)); SC(1);
43e65147 5470
99c513f6
DD
5471 }
5472 break;
5473 case 0xe6:
5474 {
5475 /** 1110 0110 onew %0 */
5476 if (trace)
5477 {
5478 printf ("\033[33m%s\033[0m %02x\n",
5479 "/** 1110 0110 onew %0 */",
5480 op[0]);
5481 }
5482 SYNTAX("onew %0");
63323b5b 5483#line 934 "rl78-decode.opc"
99c513f6 5484 ID(mov); DR(AX); SC(1);
43e65147 5485
99c513f6
DD
5486 }
5487 break;
5488 case 0xe7:
5489 {
5490 /** 1110 0111 onew %0 */
5491 if (trace)
5492 {
5493 printf ("\033[33m%s\033[0m %02x\n",
5494 "/** 1110 0111 onew %0 */",
5495 op[0]);
5496 }
5497 SYNTAX("onew %0");
63323b5b 5498#line 937 "rl78-decode.opc"
99c513f6 5499 ID(mov); DR(BC); SC(1);
43e65147 5500
99c513f6 5501 /*----------------------------------------------------------------------*/
43e65147 5502
99c513f6
DD
5503 }
5504 break;
5505 case 0xe8:
5506 {
5507 /** 1110 1000 mov %0, %1 */
5508 if (trace)
5509 {
5510 printf ("\033[33m%s\033[0m %02x\n",
5511 "/** 1110 1000 mov %0, %1 */",
5512 op[0]);
5513 }
5514 SYNTAX("mov %0, %1");
63323b5b 5515#line 701 "rl78-decode.opc"
99c513f6 5516 ID(mov); DR(B); SM(None, SADDR);
43e65147 5517
99c513f6
DD
5518 }
5519 break;
5520 case 0xe9:
5521 {
1d43092d 5522 /** 1110 1001 mov %0, %e!1 */
99c513f6
DD
5523 if (trace)
5524 {
5525 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5526 "/** 1110 1001 mov %0, %e!1 */",
99c513f6
DD
5527 op[0]);
5528 }
1d43092d 5529 SYNTAX("mov %0, %e!1");
63323b5b 5530#line 695 "rl78-decode.opc"
99c513f6 5531 ID(mov); DR(B); SM(None, IMMU(2));
43e65147 5532
99c513f6
DD
5533 }
5534 break;
5535 case 0xec:
5536 {
5537 /** 1110 1100 br !%!a0 */
5538 if (trace)
5539 {
5540 printf ("\033[33m%s\033[0m %02x\n",
5541 "/** 1110 1100 br !%!a0 */",
5542 op[0]);
5543 }
5544 SYNTAX("br !%!a0");
63323b5b 5545#line 370 "rl78-decode.opc"
99c513f6 5546 ID(branch); DC(IMMU(3));
43e65147 5547
99c513f6
DD
5548 }
5549 break;
5550 case 0xed:
5551 {
5552 /** 1110 1101 br %!a0 */
5553 if (trace)
5554 {
5555 printf ("\033[33m%s\033[0m %02x\n",
5556 "/** 1110 1101 br %!a0 */",
5557 op[0]);
5558 }
5559 SYNTAX("br %!a0");
63323b5b 5560#line 373 "rl78-decode.opc"
99c513f6 5561 ID(branch); DC(IMMU(2));
43e65147 5562
99c513f6
DD
5563 }
5564 break;
5565 case 0xee:
5566 {
5567 /** 1110 1110 br $%!a0 */
5568 if (trace)
5569 {
5570 printf ("\033[33m%s\033[0m %02x\n",
5571 "/** 1110 1110 br $%!a0 */",
5572 op[0]);
5573 }
5574 SYNTAX("br $%!a0");
63323b5b 5575#line 376 "rl78-decode.opc"
99c513f6 5576 ID(branch); DC(pc+IMMS(2)+3);
43e65147 5577
99c513f6
DD
5578 }
5579 break;
5580 case 0xef:
5581 {
5582 /** 1110 1111 br $%a0 */
5583 if (trace)
5584 {
5585 printf ("\033[33m%s\033[0m %02x\n",
5586 "/** 1110 1111 br $%a0 */",
5587 op[0]);
5588 }
5589 SYNTAX("br $%a0");
63323b5b 5590#line 379 "rl78-decode.opc"
99c513f6 5591 ID(branch); DC(pc+IMMS(1)+2);
43e65147 5592
99c513f6
DD
5593 }
5594 break;
5595 case 0xf0:
5596 case 0xf1:
5597 case 0xf2:
5598 case 0xf3:
5599 {
5600 /** 1111 00rg clrb %0 */
63323b5b 5601#line 466 "rl78-decode.opc"
99c513f6
DD
5602 int rg AU = op[0] & 0x03;
5603 if (trace)
5604 {
5605 printf ("\033[33m%s\033[0m %02x\n",
5606 "/** 1111 00rg clrb %0 */",
5607 op[0]);
5608 printf (" rg = 0x%x\n", rg);
5609 }
5610 SYNTAX("clrb %0");
63323b5b 5611#line 466 "rl78-decode.opc"
99c513f6 5612 ID(mov); DRB(rg); SC(0);
43e65147 5613
99c513f6
DD
5614 }
5615 break;
5616 case 0xf4:
5617 {
5618 /** 1111 0100 clrb %0 */
5619 if (trace)
5620 {
5621 printf ("\033[33m%s\033[0m %02x\n",
5622 "/** 1111 0100 clrb %0 */",
5623 op[0]);
5624 }
5625 SYNTAX("clrb %0");
63323b5b 5626#line 469 "rl78-decode.opc"
99c513f6 5627 ID(mov); DM(None, SADDR); SC(0);
43e65147 5628
99c513f6 5629 /*----------------------------------------------------------------------*/
43e65147 5630
99c513f6
DD
5631 }
5632 break;
5633 case 0xf5:
5634 {
1d43092d 5635 /** 1111 0101 clrb %e!0 */
99c513f6
DD
5636 if (trace)
5637 {
5638 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5639 "/** 1111 0101 clrb %e!0 */",
99c513f6
DD
5640 op[0]);
5641 }
1d43092d 5642 SYNTAX("clrb %e!0");
63323b5b 5643#line 463 "rl78-decode.opc"
99c513f6 5644 ID(mov); DM(None, IMMU(2)); SC(0);
43e65147 5645
99c513f6
DD
5646 }
5647 break;
5648 case 0xf6:
5649 {
5650 /** 1111 0110 clrw %0 */
5651 if (trace)
5652 {
5653 printf ("\033[33m%s\033[0m %02x\n",
5654 "/** 1111 0110 clrw %0 */",
5655 op[0]);
5656 }
5657 SYNTAX("clrw %0");
63323b5b 5658#line 474 "rl78-decode.opc"
99c513f6 5659 ID(mov); DR(AX); SC(0);
43e65147 5660
99c513f6
DD
5661 }
5662 break;
5663 case 0xf7:
5664 {
5665 /** 1111 0111 clrw %0 */
5666 if (trace)
5667 {
5668 printf ("\033[33m%s\033[0m %02x\n",
5669 "/** 1111 0111 clrw %0 */",
5670 op[0]);
5671 }
5672 SYNTAX("clrw %0");
63323b5b 5673#line 477 "rl78-decode.opc"
99c513f6 5674 ID(mov); DR(BC); SC(0);
43e65147 5675
99c513f6 5676 /*----------------------------------------------------------------------*/
43e65147 5677
99c513f6
DD
5678 }
5679 break;
5680 case 0xf8:
5681 {
5682 /** 1111 1000 mov %0, %1 */
5683 if (trace)
5684 {
5685 printf ("\033[33m%s\033[0m %02x\n",
5686 "/** 1111 1000 mov %0, %1 */",
5687 op[0]);
5688 }
5689 SYNTAX("mov %0, %1");
63323b5b 5690#line 707 "rl78-decode.opc"
99c513f6 5691 ID(mov); DR(C); SM(None, SADDR);
43e65147 5692
99c513f6
DD
5693 }
5694 break;
5695 case 0xf9:
5696 {
1d43092d 5697 /** 1111 1001 mov %0, %e!1 */
99c513f6
DD
5698 if (trace)
5699 {
5700 printf ("\033[33m%s\033[0m %02x\n",
1d43092d 5701 "/** 1111 1001 mov %0, %e!1 */",
99c513f6
DD
5702 op[0]);
5703 }
1d43092d 5704 SYNTAX("mov %0, %e!1");
63323b5b 5705#line 704 "rl78-decode.opc"
99c513f6 5706 ID(mov); DR(C); SM(None, IMMU(2));
43e65147 5707
99c513f6
DD
5708 }
5709 break;
5710 case 0xfc:
5711 {
5712 /** 1111 1100 call !%!a0 */
5713 if (trace)
5714 {
5715 printf ("\033[33m%s\033[0m %02x\n",
5716 "/** 1111 1100 call !%!a0 */",
5717 op[0]);
5718 }
5719 SYNTAX("call !%!a0");
63323b5b 5720#line 423 "rl78-decode.opc"
99c513f6 5721 ID(call); DC(IMMU(3));
43e65147 5722
99c513f6
DD
5723 }
5724 break;
5725 case 0xfd:
5726 {
5727 /** 1111 1101 call %!a0 */
5728 if (trace)
5729 {
5730 printf ("\033[33m%s\033[0m %02x\n",
5731 "/** 1111 1101 call %!a0 */",
5732 op[0]);
5733 }
5734 SYNTAX("call %!a0");
63323b5b 5735#line 426 "rl78-decode.opc"
99c513f6 5736 ID(call); DC(IMMU(2));
43e65147 5737
99c513f6
DD
5738 }
5739 break;
5740 case 0xfe:
5741 {
5742 /** 1111 1110 call $%!a0 */
5743 if (trace)
5744 {
5745 printf ("\033[33m%s\033[0m %02x\n",
5746 "/** 1111 1110 call $%!a0 */",
5747 op[0]);
5748 }
5749 SYNTAX("call $%!a0");
63323b5b 5750#line 429 "rl78-decode.opc"
99c513f6 5751 ID(call); DC(pc+IMMS(2)+3);
43e65147 5752
99c513f6
DD
5753 }
5754 break;
5755 case 0xff:
5756 {
5757 /** 1111 1111 brk1 */
5758 if (trace)
5759 {
5760 printf ("\033[33m%s\033[0m %02x\n",
5761 "/** 1111 1111 brk1 */",
5762 op[0]);
5763 }
5764 SYNTAX("brk1");
63323b5b 5765#line 387 "rl78-decode.opc"
99c513f6 5766 ID(break);
43e65147 5767
99c513f6
DD
5768 }
5769 break;
5770 }
63323b5b 5771#line 1292 "rl78-decode.opc"
99c513f6
DD
5772
5773 return rl78->n_bytes;
5774}
This page took 0.62131 seconds and 4 git commands to generate.