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