diff options
| author | Thiruvadi Rajaraman <trajaraman@mvista.com> | 2017-09-21 19:02:28 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-07 17:10:08 +0000 |
| commit | 321f980a1e35d34dbad5a28b29aa4ef951d08ddb (patch) | |
| tree | 3d3f23668155ffdad59d82acdb51dfaa33685d8c | |
| parent | 67d5e33d4f02c5c784338f736900df72129d1258 (diff) | |
| download | poky-321f980a1e35d34dbad5a28b29aa4ef951d08ddb.tar.gz | |
binutils: CVE-2017-9751
Source: git://sourceware.org/git/binutils-gdb.git
MR: 73984
Type: Security Fix
Disposition: Backport from binutils-2_29
ChangeID: b0488808caeeef072f9b00dd174c750da5e58b4b
Description:
Fix address violation when disassembling a corrupt RL78 binary.
PR binutils/21588
* rl78-decode.opc (OP_BUF_LEN): Define.
(GETBYTE): Check for the index exceeding OP_BUF_LEN.
(rl78_decode_opcode): Use OP_BUF_LEN as the length of the op_buf
array.
* rl78-decode.c: Regenerate.
Affects: <= 2.28
Author: Nick Clifton <nickc@redhat.com>
(From OE-Core rev: 40325ae2c4160fa99cebd5cef3f8df5063976076)
Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
Reviewed-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.27.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch | 3738 |
2 files changed, 3739 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.27.inc b/meta/recipes-devtools/binutils/binutils-2.27.inc index 1e55be69f7..5c3d3ca223 100644 --- a/meta/recipes-devtools/binutils/binutils-2.27.inc +++ b/meta/recipes-devtools/binutils/binutils-2.27.inc | |||
| @@ -78,6 +78,7 @@ SRC_URI = "\ | |||
| 78 | file://CVE-2017-8398.patch \ | 78 | file://CVE-2017-8398.patch \ |
| 79 | file://CVE-2017-7299_1.patch \ | 79 | file://CVE-2017-7299_1.patch \ |
| 80 | file://CVE-2017-7299_2.patch \ | 80 | file://CVE-2017-7299_2.patch \ |
| 81 | file://CVE-2017-9751.patch \ | ||
| 81 | " | 82 | " |
| 82 | S = "${WORKDIR}/git" | 83 | S = "${WORKDIR}/git" |
| 83 | 84 | ||
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch new file mode 100644 index 0000000000..0d525e8ac1 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch | |||
| @@ -0,0 +1,3738 @@ | |||
| 1 | commit 63323b5b23bd83fa7b04ea00dff593c933e9b0e3 | ||
| 2 | Author: Nick Clifton <nickc@redhat.com> | ||
| 3 | Date: Thu Jun 15 12:37:01 2017 +0100 | ||
| 4 | |||
| 5 | Fix address violation when disassembling a corrupt RL78 binary. | ||
| 6 | |||
| 7 | PR binutils/21588 | ||
| 8 | * rl78-decode.opc (OP_BUF_LEN): Define. | ||
| 9 | (GETBYTE): Check for the index exceeding OP_BUF_LEN. | ||
| 10 | (rl78_decode_opcode): Use OP_BUF_LEN as the length of the op_buf | ||
| 11 | array. | ||
| 12 | * rl78-decode.c: Regenerate. | ||
| 13 | |||
| 14 | Upstream-Status: Backport | ||
| 15 | |||
| 16 | CVE: CVE-2017-9751 | ||
| 17 | Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com> | ||
| 18 | |||
| 19 | Index: git/opcodes/rl78-decode.c | ||
| 20 | =================================================================== | ||
| 21 | --- git.orig/opcodes/rl78-decode.c 2017-09-21 13:14:42.256835775 +0530 | ||
| 22 | +++ git/opcodes/rl78-decode.c 2017-09-21 13:14:49.444888350 +0530 | ||
| 23 | @@ -51,7 +51,9 @@ | ||
| 24 | #define W() rl78->size = RL78_Word | ||
| 25 | |||
| 26 | #define AU ATTRIBUTE_UNUSED | ||
| 27 | -#define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr)) | ||
| 28 | + | ||
| 29 | +#define OP_BUF_LEN 20 | ||
| 30 | +#define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0) | ||
| 31 | #define B ((unsigned long) GETBYTE()) | ||
| 32 | |||
| 33 | #define SYNTAX(x) rl78->syntax = x | ||
| 34 | @@ -169,7 +171,7 @@ | ||
| 35 | RL78_Dis_Isa isa) | ||
| 36 | { | ||
| 37 | LocalData lds, * ld = &lds; | ||
| 38 | - unsigned char op_buf[20] = {0}; | ||
| 39 | + unsigned char op_buf[OP_BUF_LEN] = {0}; | ||
| 40 | unsigned char *op = op_buf; | ||
| 41 | int op0, op1; | ||
| 42 | |||
| 43 | @@ -201,7 +203,7 @@ | ||
| 44 | op[0]); | ||
| 45 | } | ||
| 46 | SYNTAX("nop"); | ||
| 47 | -#line 911 "rl78-decode.opc" | ||
| 48 | +#line 913 "rl78-decode.opc" | ||
| 49 | ID(nop); | ||
| 50 | |||
| 51 | /*----------------------------------------------------------------------*/ | ||
| 52 | @@ -214,7 +216,7 @@ | ||
| 53 | case 0x07: | ||
| 54 | { | ||
| 55 | /** 0000 0rw1 addw %0, %1 */ | ||
| 56 | -#line 274 "rl78-decode.opc" | ||
| 57 | +#line 276 "rl78-decode.opc" | ||
| 58 | int rw AU = (op[0] >> 1) & 0x03; | ||
| 59 | if (trace) | ||
| 60 | { | ||
| 61 | @@ -224,7 +226,7 @@ | ||
| 62 | printf (" rw = 0x%x\n", rw); | ||
| 63 | } | ||
| 64 | SYNTAX("addw %0, %1"); | ||
| 65 | -#line 274 "rl78-decode.opc" | ||
| 66 | +#line 276 "rl78-decode.opc" | ||
| 67 | ID(add); W(); DR(AX); SRW(rw); Fzac; | ||
| 68 | |||
| 69 | } | ||
| 70 | @@ -239,7 +241,7 @@ | ||
| 71 | op[0]); | ||
| 72 | } | ||
| 73 | SYNTAX("addw %0, %e!1"); | ||
| 74 | -#line 265 "rl78-decode.opc" | ||
| 75 | +#line 267 "rl78-decode.opc" | ||
| 76 | ID(add); W(); DR(AX); SM(None, IMMU(2)); Fzac; | ||
| 77 | |||
| 78 | } | ||
| 79 | @@ -254,7 +256,7 @@ | ||
| 80 | op[0]); | ||
| 81 | } | ||
| 82 | SYNTAX("addw %0, #%1"); | ||
| 83 | -#line 271 "rl78-decode.opc" | ||
| 84 | +#line 273 "rl78-decode.opc" | ||
| 85 | ID(add); W(); DR(AX); SC(IMMU(2)); Fzac; | ||
| 86 | |||
| 87 | } | ||
| 88 | @@ -269,7 +271,7 @@ | ||
| 89 | op[0]); | ||
| 90 | } | ||
| 91 | SYNTAX("addw %0, %1"); | ||
| 92 | -#line 277 "rl78-decode.opc" | ||
| 93 | +#line 279 "rl78-decode.opc" | ||
| 94 | ID(add); W(); DR(AX); SM(None, SADDR); Fzac; | ||
| 95 | |||
| 96 | } | ||
| 97 | @@ -284,7 +286,7 @@ | ||
| 98 | op[0]); | ||
| 99 | } | ||
| 100 | SYNTAX("xch a, x"); | ||
| 101 | -#line 1234 "rl78-decode.opc" | ||
| 102 | +#line 1236 "rl78-decode.opc" | ||
| 103 | ID(xch); DR(A); SR(X); | ||
| 104 | |||
| 105 | /*----------------------------------------------------------------------*/ | ||
| 106 | @@ -301,7 +303,7 @@ | ||
| 107 | op[0]); | ||
| 108 | } | ||
| 109 | SYNTAX("mov %0, %e1"); | ||
| 110 | -#line 678 "rl78-decode.opc" | ||
| 111 | +#line 680 "rl78-decode.opc" | ||
| 112 | ID(mov); DR(A); SM(B, IMMU(2)); | ||
| 113 | |||
| 114 | } | ||
| 115 | @@ -316,7 +318,7 @@ | ||
| 116 | op[0]); | ||
| 117 | } | ||
| 118 | SYNTAX("add %0, #%1"); | ||
| 119 | -#line 228 "rl78-decode.opc" | ||
| 120 | +#line 230 "rl78-decode.opc" | ||
| 121 | ID(add); DM(None, SADDR); SC(IMMU(1)); Fzac; | ||
| 122 | |||
| 123 | /*----------------------------------------------------------------------*/ | ||
| 124 | @@ -333,7 +335,7 @@ | ||
| 125 | op[0]); | ||
| 126 | } | ||
| 127 | SYNTAX("add %0, %1"); | ||
| 128 | -#line 222 "rl78-decode.opc" | ||
| 129 | +#line 224 "rl78-decode.opc" | ||
| 130 | ID(add); DR(A); SM(None, SADDR); Fzac; | ||
| 131 | |||
| 132 | } | ||
| 133 | @@ -348,7 +350,7 @@ | ||
| 134 | op[0]); | ||
| 135 | } | ||
| 136 | SYNTAX("add %0, #%1"); | ||
| 137 | -#line 216 "rl78-decode.opc" | ||
| 138 | +#line 218 "rl78-decode.opc" | ||
| 139 | ID(add); DR(A); SC(IMMU(1)); Fzac; | ||
| 140 | |||
| 141 | } | ||
| 142 | @@ -363,7 +365,7 @@ | ||
| 143 | op[0]); | ||
| 144 | } | ||
| 145 | SYNTAX("add %0, %e1"); | ||
| 146 | -#line 204 "rl78-decode.opc" | ||
| 147 | +#line 206 "rl78-decode.opc" | ||
| 148 | ID(add); DR(A); SM(HL, 0); Fzac; | ||
| 149 | |||
| 150 | } | ||
| 151 | @@ -378,7 +380,7 @@ | ||
| 152 | op[0]); | ||
| 153 | } | ||
| 154 | SYNTAX("add %0, %ea1"); | ||
| 155 | -#line 210 "rl78-decode.opc" | ||
| 156 | +#line 212 "rl78-decode.opc" | ||
| 157 | ID(add); DR(A); SM(HL, IMMU(1)); Fzac; | ||
| 158 | |||
| 159 | } | ||
| 160 | @@ -393,7 +395,7 @@ | ||
| 161 | op[0]); | ||
| 162 | } | ||
| 163 | SYNTAX("add %0, %e!1"); | ||
| 164 | -#line 201 "rl78-decode.opc" | ||
| 165 | +#line 203 "rl78-decode.opc" | ||
| 166 | ID(add); DR(A); SM(None, IMMU(2)); Fzac; | ||
| 167 | |||
| 168 | } | ||
| 169 | @@ -408,7 +410,7 @@ | ||
| 170 | op[0]); | ||
| 171 | } | ||
| 172 | SYNTAX("addw %0, #%1"); | ||
| 173 | -#line 280 "rl78-decode.opc" | ||
| 174 | +#line 282 "rl78-decode.opc" | ||
| 175 | ID(add); W(); DR(SP); SC(IMMU(1)); Fzac; | ||
| 176 | |||
| 177 | /*----------------------------------------------------------------------*/ | ||
| 178 | @@ -425,7 +427,7 @@ | ||
| 179 | op[0]); | ||
| 180 | } | ||
| 181 | SYNTAX("es:"); | ||
| 182 | -#line 193 "rl78-decode.opc" | ||
| 183 | +#line 195 "rl78-decode.opc" | ||
| 184 | DE(); SE(); | ||
| 185 | op ++; | ||
| 186 | pc ++; | ||
| 187 | @@ -440,7 +442,7 @@ | ||
| 188 | case 0x16: | ||
| 189 | { | ||
| 190 | /** 0001 0ra0 movw %0, %1 */ | ||
| 191 | -#line 859 "rl78-decode.opc" | ||
| 192 | +#line 861 "rl78-decode.opc" | ||
| 193 | int ra AU = (op[0] >> 1) & 0x03; | ||
| 194 | if (trace) | ||
| 195 | { | ||
| 196 | @@ -450,7 +452,7 @@ | ||
| 197 | printf (" ra = 0x%x\n", ra); | ||
| 198 | } | ||
| 199 | SYNTAX("movw %0, %1"); | ||
| 200 | -#line 859 "rl78-decode.opc" | ||
| 201 | +#line 861 "rl78-decode.opc" | ||
| 202 | ID(mov); W(); DRW(ra); SR(AX); | ||
| 203 | |||
| 204 | } | ||
| 205 | @@ -460,7 +462,7 @@ | ||
| 206 | case 0x17: | ||
| 207 | { | ||
| 208 | /** 0001 0ra1 movw %0, %1 */ | ||
| 209 | -#line 856 "rl78-decode.opc" | ||
| 210 | +#line 858 "rl78-decode.opc" | ||
| 211 | int ra AU = (op[0] >> 1) & 0x03; | ||
| 212 | if (trace) | ||
| 213 | { | ||
| 214 | @@ -470,7 +472,7 @@ | ||
| 215 | printf (" ra = 0x%x\n", ra); | ||
| 216 | } | ||
| 217 | SYNTAX("movw %0, %1"); | ||
| 218 | -#line 856 "rl78-decode.opc" | ||
| 219 | +#line 858 "rl78-decode.opc" | ||
| 220 | ID(mov); W(); DR(AX); SRW(ra); | ||
| 221 | |||
| 222 | } | ||
| 223 | @@ -485,7 +487,7 @@ | ||
| 224 | op[0]); | ||
| 225 | } | ||
| 226 | SYNTAX("mov %e0, %1"); | ||
| 227 | -#line 729 "rl78-decode.opc" | ||
| 228 | +#line 731 "rl78-decode.opc" | ||
| 229 | ID(mov); DM(B, IMMU(2)); SR(A); | ||
| 230 | |||
| 231 | } | ||
| 232 | @@ -500,7 +502,7 @@ | ||
| 233 | op[0]); | ||
| 234 | } | ||
| 235 | SYNTAX("mov %e0, #%1"); | ||
| 236 | -#line 726 "rl78-decode.opc" | ||
| 237 | +#line 728 "rl78-decode.opc" | ||
| 238 | ID(mov); DM(B, IMMU(2)); SC(IMMU(1)); | ||
| 239 | |||
| 240 | } | ||
| 241 | @@ -515,7 +517,7 @@ | ||
| 242 | op[0]); | ||
| 243 | } | ||
| 244 | SYNTAX("addc %0, #%1"); | ||
| 245 | -#line 260 "rl78-decode.opc" | ||
| 246 | +#line 262 "rl78-decode.opc" | ||
| 247 | ID(addc); DM(None, SADDR); SC(IMMU(1)); Fzac; | ||
| 248 | |||
| 249 | /*----------------------------------------------------------------------*/ | ||
| 250 | @@ -532,7 +534,7 @@ | ||
| 251 | op[0]); | ||
| 252 | } | ||
| 253 | SYNTAX("addc %0, %1"); | ||
| 254 | -#line 257 "rl78-decode.opc" | ||
| 255 | +#line 259 "rl78-decode.opc" | ||
| 256 | ID(addc); DR(A); SM(None, SADDR); Fzac; | ||
| 257 | |||
| 258 | } | ||
| 259 | @@ -547,7 +549,7 @@ | ||
| 260 | op[0]); | ||
| 261 | } | ||
| 262 | SYNTAX("addc %0, #%1"); | ||
| 263 | -#line 248 "rl78-decode.opc" | ||
| 264 | +#line 250 "rl78-decode.opc" | ||
| 265 | ID(addc); DR(A); SC(IMMU(1)); Fzac; | ||
| 266 | |||
| 267 | } | ||
| 268 | @@ -562,7 +564,7 @@ | ||
| 269 | op[0]); | ||
| 270 | } | ||
| 271 | SYNTAX("addc %0, %e1"); | ||
| 272 | -#line 236 "rl78-decode.opc" | ||
| 273 | +#line 238 "rl78-decode.opc" | ||
| 274 | ID(addc); DR(A); SM(HL, 0); Fzac; | ||
| 275 | |||
| 276 | } | ||
| 277 | @@ -577,7 +579,7 @@ | ||
| 278 | op[0]); | ||
| 279 | } | ||
| 280 | SYNTAX("addc %0, %ea1"); | ||
| 281 | -#line 245 "rl78-decode.opc" | ||
| 282 | +#line 247 "rl78-decode.opc" | ||
| 283 | ID(addc); DR(A); SM(HL, IMMU(1)); Fzac; | ||
| 284 | |||
| 285 | } | ||
| 286 | @@ -592,7 +594,7 @@ | ||
| 287 | op[0]); | ||
| 288 | } | ||
| 289 | SYNTAX("addc %0, %e!1"); | ||
| 290 | -#line 233 "rl78-decode.opc" | ||
| 291 | +#line 235 "rl78-decode.opc" | ||
| 292 | ID(addc); DR(A); SM(None, IMMU(2)); Fzac; | ||
| 293 | |||
| 294 | } | ||
| 295 | @@ -607,7 +609,7 @@ | ||
| 296 | op[0]); | ||
| 297 | } | ||
| 298 | SYNTAX("subw %0, #%1"); | ||
| 299 | -#line 1198 "rl78-decode.opc" | ||
| 300 | +#line 1200 "rl78-decode.opc" | ||
| 301 | ID(sub); W(); DR(SP); SC(IMMU(1)); Fzac; | ||
| 302 | |||
| 303 | /*----------------------------------------------------------------------*/ | ||
| 304 | @@ -620,7 +622,7 @@ | ||
| 305 | case 0x27: | ||
| 306 | { | ||
| 307 | /** 0010 0rw1 subw %0, %1 */ | ||
| 308 | -#line 1192 "rl78-decode.opc" | ||
| 309 | +#line 1194 "rl78-decode.opc" | ||
| 310 | int rw AU = (op[0] >> 1) & 0x03; | ||
| 311 | if (trace) | ||
| 312 | { | ||
| 313 | @@ -630,7 +632,7 @@ | ||
| 314 | printf (" rw = 0x%x\n", rw); | ||
| 315 | } | ||
| 316 | SYNTAX("subw %0, %1"); | ||
| 317 | -#line 1192 "rl78-decode.opc" | ||
| 318 | +#line 1194 "rl78-decode.opc" | ||
| 319 | ID(sub); W(); DR(AX); SRW(rw); Fzac; | ||
| 320 | |||
| 321 | } | ||
| 322 | @@ -645,7 +647,7 @@ | ||
| 323 | op[0]); | ||
| 324 | } | ||
| 325 | SYNTAX("subw %0, %e!1"); | ||
| 326 | -#line 1183 "rl78-decode.opc" | ||
| 327 | +#line 1185 "rl78-decode.opc" | ||
| 328 | ID(sub); W(); DR(AX); SM(None, IMMU(2)); Fzac; | ||
| 329 | |||
| 330 | } | ||
| 331 | @@ -660,7 +662,7 @@ | ||
| 332 | op[0]); | ||
| 333 | } | ||
| 334 | SYNTAX("subw %0, #%1"); | ||
| 335 | -#line 1189 "rl78-decode.opc" | ||
| 336 | +#line 1191 "rl78-decode.opc" | ||
| 337 | ID(sub); W(); DR(AX); SC(IMMU(2)); Fzac; | ||
| 338 | |||
| 339 | } | ||
| 340 | @@ -675,7 +677,7 @@ | ||
| 341 | op[0]); | ||
| 342 | } | ||
| 343 | SYNTAX("subw %0, %1"); | ||
| 344 | -#line 1195 "rl78-decode.opc" | ||
| 345 | +#line 1197 "rl78-decode.opc" | ||
| 346 | ID(sub); W(); DR(AX); SM(None, SADDR); Fzac; | ||
| 347 | |||
| 348 | } | ||
| 349 | @@ -690,7 +692,7 @@ | ||
| 350 | op[0]); | ||
| 351 | } | ||
| 352 | SYNTAX("mov %e0, %1"); | ||
| 353 | -#line 741 "rl78-decode.opc" | ||
| 354 | +#line 743 "rl78-decode.opc" | ||
| 355 | ID(mov); DM(C, IMMU(2)); SR(A); | ||
| 356 | |||
| 357 | } | ||
| 358 | @@ -705,7 +707,7 @@ | ||
| 359 | op[0]); | ||
| 360 | } | ||
| 361 | SYNTAX("mov %0, %e1"); | ||
| 362 | -#line 684 "rl78-decode.opc" | ||
| 363 | +#line 686 "rl78-decode.opc" | ||
| 364 | ID(mov); DR(A); SM(C, IMMU(2)); | ||
| 365 | |||
| 366 | } | ||
| 367 | @@ -720,7 +722,7 @@ | ||
| 368 | op[0]); | ||
| 369 | } | ||
| 370 | SYNTAX("sub %0, #%1"); | ||
| 371 | -#line 1146 "rl78-decode.opc" | ||
| 372 | +#line 1148 "rl78-decode.opc" | ||
| 373 | ID(sub); DM(None, SADDR); SC(IMMU(1)); Fzac; | ||
| 374 | |||
| 375 | /*----------------------------------------------------------------------*/ | ||
| 376 | @@ -737,7 +739,7 @@ | ||
| 377 | op[0]); | ||
| 378 | } | ||
| 379 | SYNTAX("sub %0, %1"); | ||
| 380 | -#line 1140 "rl78-decode.opc" | ||
| 381 | +#line 1142 "rl78-decode.opc" | ||
| 382 | ID(sub); DR(A); SM(None, SADDR); Fzac; | ||
| 383 | |||
| 384 | } | ||
| 385 | @@ -752,7 +754,7 @@ | ||
| 386 | op[0]); | ||
| 387 | } | ||
| 388 | SYNTAX("sub %0, #%1"); | ||
| 389 | -#line 1134 "rl78-decode.opc" | ||
| 390 | +#line 1136 "rl78-decode.opc" | ||
| 391 | ID(sub); DR(A); SC(IMMU(1)); Fzac; | ||
| 392 | |||
| 393 | } | ||
| 394 | @@ -767,7 +769,7 @@ | ||
| 395 | op[0]); | ||
| 396 | } | ||
| 397 | SYNTAX("sub %0, %e1"); | ||
| 398 | -#line 1122 "rl78-decode.opc" | ||
| 399 | +#line 1124 "rl78-decode.opc" | ||
| 400 | ID(sub); DR(A); SM(HL, 0); Fzac; | ||
| 401 | |||
| 402 | } | ||
| 403 | @@ -782,7 +784,7 @@ | ||
| 404 | op[0]); | ||
| 405 | } | ||
| 406 | SYNTAX("sub %0, %ea1"); | ||
| 407 | -#line 1128 "rl78-decode.opc" | ||
| 408 | +#line 1130 "rl78-decode.opc" | ||
| 409 | ID(sub); DR(A); SM(HL, IMMU(1)); Fzac; | ||
| 410 | |||
| 411 | } | ||
| 412 | @@ -797,7 +799,7 @@ | ||
| 413 | op[0]); | ||
| 414 | } | ||
| 415 | SYNTAX("sub %0, %e!1"); | ||
| 416 | -#line 1119 "rl78-decode.opc" | ||
| 417 | +#line 1121 "rl78-decode.opc" | ||
| 418 | ID(sub); DR(A); SM(None, IMMU(2)); Fzac; | ||
| 419 | |||
| 420 | } | ||
| 421 | @@ -808,7 +810,7 @@ | ||
| 422 | case 0x36: | ||
| 423 | { | ||
| 424 | /** 0011 0rg0 movw %0, #%1 */ | ||
| 425 | -#line 853 "rl78-decode.opc" | ||
| 426 | +#line 855 "rl78-decode.opc" | ||
| 427 | int rg AU = (op[0] >> 1) & 0x03; | ||
| 428 | if (trace) | ||
| 429 | { | ||
| 430 | @@ -818,7 +820,7 @@ | ||
| 431 | printf (" rg = 0x%x\n", rg); | ||
| 432 | } | ||
| 433 | SYNTAX("movw %0, #%1"); | ||
| 434 | -#line 853 "rl78-decode.opc" | ||
| 435 | +#line 855 "rl78-decode.opc" | ||
| 436 | ID(mov); W(); DRW(rg); SC(IMMU(2)); | ||
| 437 | |||
| 438 | } | ||
| 439 | @@ -830,7 +832,7 @@ | ||
| 440 | case 0x00: | ||
| 441 | { | ||
| 442 | /** 0011 0001 0bit 0000 btclr %s1, $%a0 */ | ||
| 443 | -#line 416 "rl78-decode.opc" | ||
| 444 | +#line 418 "rl78-decode.opc" | ||
| 445 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 446 | if (trace) | ||
| 447 | { | ||
| 448 | @@ -840,7 +842,7 @@ | ||
| 449 | printf (" bit = 0x%x\n", bit); | ||
| 450 | } | ||
| 451 | SYNTAX("btclr %s1, $%a0"); | ||
| 452 | -#line 416 "rl78-decode.opc" | ||
| 453 | +#line 418 "rl78-decode.opc" | ||
| 454 | ID(branch_cond_clear); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T); | ||
| 455 | |||
| 456 | /*----------------------------------------------------------------------*/ | ||
| 457 | @@ -850,7 +852,7 @@ | ||
| 458 | case 0x01: | ||
| 459 | { | ||
| 460 | /** 0011 0001 0bit 0001 btclr %1, $%a0 */ | ||
| 461 | -#line 410 "rl78-decode.opc" | ||
| 462 | +#line 412 "rl78-decode.opc" | ||
| 463 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 464 | if (trace) | ||
| 465 | { | ||
| 466 | @@ -860,7 +862,7 @@ | ||
| 467 | printf (" bit = 0x%x\n", bit); | ||
| 468 | } | ||
| 469 | SYNTAX("btclr %1, $%a0"); | ||
| 470 | -#line 410 "rl78-decode.opc" | ||
| 471 | +#line 412 "rl78-decode.opc" | ||
| 472 | ID(branch_cond_clear); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T); | ||
| 473 | |||
| 474 | } | ||
| 475 | @@ -868,7 +870,7 @@ | ||
| 476 | case 0x02: | ||
| 477 | { | ||
| 478 | /** 0011 0001 0bit 0010 bt %s1, $%a0 */ | ||
| 479 | -#line 402 "rl78-decode.opc" | ||
| 480 | +#line 404 "rl78-decode.opc" | ||
| 481 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 482 | if (trace) | ||
| 483 | { | ||
| 484 | @@ -878,7 +880,7 @@ | ||
| 485 | printf (" bit = 0x%x\n", bit); | ||
| 486 | } | ||
| 487 | SYNTAX("bt %s1, $%a0"); | ||
| 488 | -#line 402 "rl78-decode.opc" | ||
| 489 | +#line 404 "rl78-decode.opc" | ||
| 490 | ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T); | ||
| 491 | |||
| 492 | /*----------------------------------------------------------------------*/ | ||
| 493 | @@ -888,7 +890,7 @@ | ||
| 494 | case 0x03: | ||
| 495 | { | ||
| 496 | /** 0011 0001 0bit 0011 bt %1, $%a0 */ | ||
| 497 | -#line 396 "rl78-decode.opc" | ||
| 498 | +#line 398 "rl78-decode.opc" | ||
| 499 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 500 | if (trace) | ||
| 501 | { | ||
| 502 | @@ -898,7 +900,7 @@ | ||
| 503 | printf (" bit = 0x%x\n", bit); | ||
| 504 | } | ||
| 505 | SYNTAX("bt %1, $%a0"); | ||
| 506 | -#line 396 "rl78-decode.opc" | ||
| 507 | +#line 398 "rl78-decode.opc" | ||
| 508 | ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T); | ||
| 509 | |||
| 510 | } | ||
| 511 | @@ -906,7 +908,7 @@ | ||
| 512 | case 0x04: | ||
| 513 | { | ||
| 514 | /** 0011 0001 0bit 0100 bf %s1, $%a0 */ | ||
| 515 | -#line 363 "rl78-decode.opc" | ||
| 516 | +#line 365 "rl78-decode.opc" | ||
| 517 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 518 | if (trace) | ||
| 519 | { | ||
| 520 | @@ -916,7 +918,7 @@ | ||
| 521 | printf (" bit = 0x%x\n", bit); | ||
| 522 | } | ||
| 523 | SYNTAX("bf %s1, $%a0"); | ||
| 524 | -#line 363 "rl78-decode.opc" | ||
| 525 | +#line 365 "rl78-decode.opc" | ||
| 526 | ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(F); | ||
| 527 | |||
| 528 | /*----------------------------------------------------------------------*/ | ||
| 529 | @@ -926,7 +928,7 @@ | ||
| 530 | case 0x05: | ||
| 531 | { | ||
| 532 | /** 0011 0001 0bit 0101 bf %1, $%a0 */ | ||
| 533 | -#line 357 "rl78-decode.opc" | ||
| 534 | +#line 359 "rl78-decode.opc" | ||
| 535 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 536 | if (trace) | ||
| 537 | { | ||
| 538 | @@ -936,7 +938,7 @@ | ||
| 539 | printf (" bit = 0x%x\n", bit); | ||
| 540 | } | ||
| 541 | SYNTAX("bf %1, $%a0"); | ||
| 542 | -#line 357 "rl78-decode.opc" | ||
| 543 | +#line 359 "rl78-decode.opc" | ||
| 544 | ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(F); | ||
| 545 | |||
| 546 | } | ||
| 547 | @@ -944,7 +946,7 @@ | ||
| 548 | case 0x07: | ||
| 549 | { | ||
| 550 | /** 0011 0001 0cnt 0111 shl %0, %1 */ | ||
| 551 | -#line 1075 "rl78-decode.opc" | ||
| 552 | +#line 1077 "rl78-decode.opc" | ||
| 553 | int cnt AU = (op[1] >> 4) & 0x07; | ||
| 554 | if (trace) | ||
| 555 | { | ||
| 556 | @@ -954,7 +956,7 @@ | ||
| 557 | printf (" cnt = 0x%x\n", cnt); | ||
| 558 | } | ||
| 559 | SYNTAX("shl %0, %1"); | ||
| 560 | -#line 1075 "rl78-decode.opc" | ||
| 561 | +#line 1077 "rl78-decode.opc" | ||
| 562 | ID(shl); DR(C); SC(cnt); | ||
| 563 | |||
| 564 | } | ||
| 565 | @@ -962,7 +964,7 @@ | ||
| 566 | case 0x08: | ||
| 567 | { | ||
| 568 | /** 0011 0001 0cnt 1000 shl %0, %1 */ | ||
| 569 | -#line 1072 "rl78-decode.opc" | ||
| 570 | +#line 1074 "rl78-decode.opc" | ||
| 571 | int cnt AU = (op[1] >> 4) & 0x07; | ||
| 572 | if (trace) | ||
| 573 | { | ||
| 574 | @@ -972,7 +974,7 @@ | ||
| 575 | printf (" cnt = 0x%x\n", cnt); | ||
| 576 | } | ||
| 577 | SYNTAX("shl %0, %1"); | ||
| 578 | -#line 1072 "rl78-decode.opc" | ||
| 579 | +#line 1074 "rl78-decode.opc" | ||
| 580 | ID(shl); DR(B); SC(cnt); | ||
| 581 | |||
| 582 | } | ||
| 583 | @@ -980,7 +982,7 @@ | ||
| 584 | case 0x09: | ||
| 585 | { | ||
| 586 | /** 0011 0001 0cnt 1001 shl %0, %1 */ | ||
| 587 | -#line 1069 "rl78-decode.opc" | ||
| 588 | +#line 1071 "rl78-decode.opc" | ||
| 589 | int cnt AU = (op[1] >> 4) & 0x07; | ||
| 590 | if (trace) | ||
| 591 | { | ||
| 592 | @@ -990,7 +992,7 @@ | ||
| 593 | printf (" cnt = 0x%x\n", cnt); | ||
| 594 | } | ||
| 595 | SYNTAX("shl %0, %1"); | ||
| 596 | -#line 1069 "rl78-decode.opc" | ||
| 597 | +#line 1071 "rl78-decode.opc" | ||
| 598 | ID(shl); DR(A); SC(cnt); | ||
| 599 | |||
| 600 | } | ||
| 601 | @@ -998,7 +1000,7 @@ | ||
| 602 | case 0x0a: | ||
| 603 | { | ||
| 604 | /** 0011 0001 0cnt 1010 shr %0, %1 */ | ||
| 605 | -#line 1086 "rl78-decode.opc" | ||
| 606 | +#line 1088 "rl78-decode.opc" | ||
| 607 | int cnt AU = (op[1] >> 4) & 0x07; | ||
| 608 | if (trace) | ||
| 609 | { | ||
| 610 | @@ -1008,7 +1010,7 @@ | ||
| 611 | printf (" cnt = 0x%x\n", cnt); | ||
| 612 | } | ||
| 613 | SYNTAX("shr %0, %1"); | ||
| 614 | -#line 1086 "rl78-decode.opc" | ||
| 615 | +#line 1088 "rl78-decode.opc" | ||
| 616 | ID(shr); DR(A); SC(cnt); | ||
| 617 | |||
| 618 | } | ||
| 619 | @@ -1016,7 +1018,7 @@ | ||
| 620 | case 0x0b: | ||
| 621 | { | ||
| 622 | /** 0011 0001 0cnt 1011 sar %0, %1 */ | ||
| 623 | -#line 1033 "rl78-decode.opc" | ||
| 624 | +#line 1035 "rl78-decode.opc" | ||
| 625 | int cnt AU = (op[1] >> 4) & 0x07; | ||
| 626 | if (trace) | ||
| 627 | { | ||
| 628 | @@ -1026,7 +1028,7 @@ | ||
| 629 | printf (" cnt = 0x%x\n", cnt); | ||
| 630 | } | ||
| 631 | SYNTAX("sar %0, %1"); | ||
| 632 | -#line 1033 "rl78-decode.opc" | ||
| 633 | +#line 1035 "rl78-decode.opc" | ||
| 634 | ID(sar); DR(A); SC(cnt); | ||
| 635 | |||
| 636 | } | ||
| 637 | @@ -1035,7 +1037,7 @@ | ||
| 638 | case 0x8c: | ||
| 639 | { | ||
| 640 | /** 0011 0001 wcnt 1100 shlw %0, %1 */ | ||
| 641 | -#line 1081 "rl78-decode.opc" | ||
| 642 | +#line 1083 "rl78-decode.opc" | ||
| 643 | int wcnt AU = (op[1] >> 4) & 0x0f; | ||
| 644 | if (trace) | ||
| 645 | { | ||
| 646 | @@ -1045,7 +1047,7 @@ | ||
| 647 | printf (" wcnt = 0x%x\n", wcnt); | ||
| 648 | } | ||
| 649 | SYNTAX("shlw %0, %1"); | ||
| 650 | -#line 1081 "rl78-decode.opc" | ||
| 651 | +#line 1083 "rl78-decode.opc" | ||
| 652 | ID(shl); W(); DR(BC); SC(wcnt); | ||
| 653 | |||
| 654 | /*----------------------------------------------------------------------*/ | ||
| 655 | @@ -1056,7 +1058,7 @@ | ||
| 656 | case 0x8d: | ||
| 657 | { | ||
| 658 | /** 0011 0001 wcnt 1101 shlw %0, %1 */ | ||
| 659 | -#line 1078 "rl78-decode.opc" | ||
| 660 | +#line 1080 "rl78-decode.opc" | ||
| 661 | int wcnt AU = (op[1] >> 4) & 0x0f; | ||
| 662 | if (trace) | ||
| 663 | { | ||
| 664 | @@ -1066,7 +1068,7 @@ | ||
| 665 | printf (" wcnt = 0x%x\n", wcnt); | ||
| 666 | } | ||
| 667 | SYNTAX("shlw %0, %1"); | ||
| 668 | -#line 1078 "rl78-decode.opc" | ||
| 669 | +#line 1080 "rl78-decode.opc" | ||
| 670 | ID(shl); W(); DR(AX); SC(wcnt); | ||
| 671 | |||
| 672 | } | ||
| 673 | @@ -1075,7 +1077,7 @@ | ||
| 674 | case 0x8e: | ||
| 675 | { | ||
| 676 | /** 0011 0001 wcnt 1110 shrw %0, %1 */ | ||
| 677 | -#line 1089 "rl78-decode.opc" | ||
| 678 | +#line 1091 "rl78-decode.opc" | ||
| 679 | int wcnt AU = (op[1] >> 4) & 0x0f; | ||
| 680 | if (trace) | ||
| 681 | { | ||
| 682 | @@ -1085,7 +1087,7 @@ | ||
| 683 | printf (" wcnt = 0x%x\n", wcnt); | ||
| 684 | } | ||
| 685 | SYNTAX("shrw %0, %1"); | ||
| 686 | -#line 1089 "rl78-decode.opc" | ||
| 687 | +#line 1091 "rl78-decode.opc" | ||
| 688 | ID(shr); W(); DR(AX); SC(wcnt); | ||
| 689 | |||
| 690 | /*----------------------------------------------------------------------*/ | ||
| 691 | @@ -1096,7 +1098,7 @@ | ||
| 692 | case 0x8f: | ||
| 693 | { | ||
| 694 | /** 0011 0001 wcnt 1111 sarw %0, %1 */ | ||
| 695 | -#line 1036 "rl78-decode.opc" | ||
| 696 | +#line 1038 "rl78-decode.opc" | ||
| 697 | int wcnt AU = (op[1] >> 4) & 0x0f; | ||
| 698 | if (trace) | ||
| 699 | { | ||
| 700 | @@ -1106,7 +1108,7 @@ | ||
| 701 | printf (" wcnt = 0x%x\n", wcnt); | ||
| 702 | } | ||
| 703 | SYNTAX("sarw %0, %1"); | ||
| 704 | -#line 1036 "rl78-decode.opc" | ||
| 705 | +#line 1038 "rl78-decode.opc" | ||
| 706 | ID(sar); W(); DR(AX); SC(wcnt); | ||
| 707 | |||
| 708 | /*----------------------------------------------------------------------*/ | ||
| 709 | @@ -1116,7 +1118,7 @@ | ||
| 710 | case 0x80: | ||
| 711 | { | ||
| 712 | /** 0011 0001 1bit 0000 btclr %s1, $%a0 */ | ||
| 713 | -#line 413 "rl78-decode.opc" | ||
| 714 | +#line 415 "rl78-decode.opc" | ||
| 715 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 716 | if (trace) | ||
| 717 | { | ||
| 718 | @@ -1126,7 +1128,7 @@ | ||
| 719 | printf (" bit = 0x%x\n", bit); | ||
| 720 | } | ||
| 721 | SYNTAX("btclr %s1, $%a0"); | ||
| 722 | -#line 413 "rl78-decode.opc" | ||
| 723 | +#line 415 "rl78-decode.opc" | ||
| 724 | ID(branch_cond_clear); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T); | ||
| 725 | |||
| 726 | } | ||
| 727 | @@ -1134,7 +1136,7 @@ | ||
| 728 | case 0x81: | ||
| 729 | { | ||
| 730 | /** 0011 0001 1bit 0001 btclr %e1, $%a0 */ | ||
| 731 | -#line 407 "rl78-decode.opc" | ||
| 732 | +#line 409 "rl78-decode.opc" | ||
| 733 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 734 | if (trace) | ||
| 735 | { | ||
| 736 | @@ -1144,7 +1146,7 @@ | ||
| 737 | printf (" bit = 0x%x\n", bit); | ||
| 738 | } | ||
| 739 | SYNTAX("btclr %e1, $%a0"); | ||
| 740 | -#line 407 "rl78-decode.opc" | ||
| 741 | +#line 409 "rl78-decode.opc" | ||
| 742 | ID(branch_cond_clear); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T); | ||
| 743 | |||
| 744 | } | ||
| 745 | @@ -1152,7 +1154,7 @@ | ||
| 746 | case 0x82: | ||
| 747 | { | ||
| 748 | /** 0011 0001 1bit 0010 bt %s1, $%a0 */ | ||
| 749 | -#line 399 "rl78-decode.opc" | ||
| 750 | +#line 401 "rl78-decode.opc" | ||
| 751 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 752 | if (trace) | ||
| 753 | { | ||
| 754 | @@ -1162,7 +1164,7 @@ | ||
| 755 | printf (" bit = 0x%x\n", bit); | ||
| 756 | } | ||
| 757 | SYNTAX("bt %s1, $%a0"); | ||
| 758 | -#line 399 "rl78-decode.opc" | ||
| 759 | +#line 401 "rl78-decode.opc" | ||
| 760 | ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T); | ||
| 761 | |||
| 762 | } | ||
| 763 | @@ -1170,7 +1172,7 @@ | ||
| 764 | case 0x83: | ||
| 765 | { | ||
| 766 | /** 0011 0001 1bit 0011 bt %e1, $%a0 */ | ||
| 767 | -#line 393 "rl78-decode.opc" | ||
| 768 | +#line 395 "rl78-decode.opc" | ||
| 769 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 770 | if (trace) | ||
| 771 | { | ||
| 772 | @@ -1180,7 +1182,7 @@ | ||
| 773 | printf (" bit = 0x%x\n", bit); | ||
| 774 | } | ||
| 775 | SYNTAX("bt %e1, $%a0"); | ||
| 776 | -#line 393 "rl78-decode.opc" | ||
| 777 | +#line 395 "rl78-decode.opc" | ||
| 778 | ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T); | ||
| 779 | |||
| 780 | } | ||
| 781 | @@ -1188,7 +1190,7 @@ | ||
| 782 | case 0x84: | ||
| 783 | { | ||
| 784 | /** 0011 0001 1bit 0100 bf %s1, $%a0 */ | ||
| 785 | -#line 360 "rl78-decode.opc" | ||
| 786 | +#line 362 "rl78-decode.opc" | ||
| 787 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 788 | if (trace) | ||
| 789 | { | ||
| 790 | @@ -1198,7 +1200,7 @@ | ||
| 791 | printf (" bit = 0x%x\n", bit); | ||
| 792 | } | ||
| 793 | SYNTAX("bf %s1, $%a0"); | ||
| 794 | -#line 360 "rl78-decode.opc" | ||
| 795 | +#line 362 "rl78-decode.opc" | ||
| 796 | ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(F); | ||
| 797 | |||
| 798 | } | ||
| 799 | @@ -1206,7 +1208,7 @@ | ||
| 800 | case 0x85: | ||
| 801 | { | ||
| 802 | /** 0011 0001 1bit 0101 bf %e1, $%a0 */ | ||
| 803 | -#line 354 "rl78-decode.opc" | ||
| 804 | +#line 356 "rl78-decode.opc" | ||
| 805 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 806 | if (trace) | ||
| 807 | { | ||
| 808 | @@ -1216,7 +1218,7 @@ | ||
| 809 | printf (" bit = 0x%x\n", bit); | ||
| 810 | } | ||
| 811 | SYNTAX("bf %e1, $%a0"); | ||
| 812 | -#line 354 "rl78-decode.opc" | ||
| 813 | +#line 356 "rl78-decode.opc" | ||
| 814 | ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(F); | ||
| 815 | |||
| 816 | } | ||
| 817 | @@ -1229,7 +1231,7 @@ | ||
| 818 | case 0x37: | ||
| 819 | { | ||
| 820 | /** 0011 0ra1 xchw %0, %1 */ | ||
| 821 | -#line 1239 "rl78-decode.opc" | ||
| 822 | +#line 1241 "rl78-decode.opc" | ||
| 823 | int ra AU = (op[0] >> 1) & 0x03; | ||
| 824 | if (trace) | ||
| 825 | { | ||
| 826 | @@ -1239,7 +1241,7 @@ | ||
| 827 | printf (" ra = 0x%x\n", ra); | ||
| 828 | } | ||
| 829 | SYNTAX("xchw %0, %1"); | ||
| 830 | -#line 1239 "rl78-decode.opc" | ||
| 831 | +#line 1241 "rl78-decode.opc" | ||
| 832 | ID(xch); W(); DR(AX); SRW(ra); | ||
| 833 | |||
| 834 | /*----------------------------------------------------------------------*/ | ||
| 835 | @@ -1256,7 +1258,7 @@ | ||
| 836 | op[0]); | ||
| 837 | } | ||
| 838 | SYNTAX("mov %e0, #%1"); | ||
| 839 | -#line 738 "rl78-decode.opc" | ||
| 840 | +#line 740 "rl78-decode.opc" | ||
| 841 | ID(mov); DM(C, IMMU(2)); SC(IMMU(1)); | ||
| 842 | |||
| 843 | } | ||
| 844 | @@ -1271,7 +1273,7 @@ | ||
| 845 | op[0]); | ||
| 846 | } | ||
| 847 | SYNTAX("mov %e0, #%1"); | ||
| 848 | -#line 732 "rl78-decode.opc" | ||
| 849 | +#line 734 "rl78-decode.opc" | ||
| 850 | ID(mov); DM(BC, IMMU(2)); SC(IMMU(1)); | ||
| 851 | |||
| 852 | } | ||
| 853 | @@ -1286,7 +1288,7 @@ | ||
| 854 | op[0]); | ||
| 855 | } | ||
| 856 | SYNTAX("subc %0, #%1"); | ||
| 857 | -#line 1178 "rl78-decode.opc" | ||
| 858 | +#line 1180 "rl78-decode.opc" | ||
| 859 | ID(subc); DM(None, SADDR); SC(IMMU(1)); Fzac; | ||
| 860 | |||
| 861 | /*----------------------------------------------------------------------*/ | ||
| 862 | @@ -1303,7 +1305,7 @@ | ||
| 863 | op[0]); | ||
| 864 | } | ||
| 865 | SYNTAX("subc %0, %1"); | ||
| 866 | -#line 1175 "rl78-decode.opc" | ||
| 867 | +#line 1177 "rl78-decode.opc" | ||
| 868 | ID(subc); DR(A); SM(None, SADDR); Fzac; | ||
| 869 | |||
| 870 | } | ||
| 871 | @@ -1318,7 +1320,7 @@ | ||
| 872 | op[0]); | ||
| 873 | } | ||
| 874 | SYNTAX("subc %0, #%1"); | ||
| 875 | -#line 1166 "rl78-decode.opc" | ||
| 876 | +#line 1168 "rl78-decode.opc" | ||
| 877 | ID(subc); DR(A); SC(IMMU(1)); Fzac; | ||
| 878 | |||
| 879 | } | ||
| 880 | @@ -1333,7 +1335,7 @@ | ||
| 881 | op[0]); | ||
| 882 | } | ||
| 883 | SYNTAX("subc %0, %e1"); | ||
| 884 | -#line 1154 "rl78-decode.opc" | ||
| 885 | +#line 1156 "rl78-decode.opc" | ||
| 886 | ID(subc); DR(A); SM(HL, 0); Fzac; | ||
| 887 | |||
| 888 | } | ||
| 889 | @@ -1348,7 +1350,7 @@ | ||
| 890 | op[0]); | ||
| 891 | } | ||
| 892 | SYNTAX("subc %0, %ea1"); | ||
| 893 | -#line 1163 "rl78-decode.opc" | ||
| 894 | +#line 1165 "rl78-decode.opc" | ||
| 895 | ID(subc); DR(A); SM(HL, IMMU(1)); Fzac; | ||
| 896 | |||
| 897 | } | ||
| 898 | @@ -1363,7 +1365,7 @@ | ||
| 899 | op[0]); | ||
| 900 | } | ||
| 901 | SYNTAX("subc %0, %e!1"); | ||
| 902 | -#line 1151 "rl78-decode.opc" | ||
| 903 | +#line 1153 "rl78-decode.opc" | ||
| 904 | ID(subc); DR(A); SM(None, IMMU(2)); Fzac; | ||
| 905 | |||
| 906 | } | ||
| 907 | @@ -1378,7 +1380,7 @@ | ||
| 908 | op[0]); | ||
| 909 | } | ||
| 910 | SYNTAX("cmp %e!0, #%1"); | ||
| 911 | -#line 480 "rl78-decode.opc" | ||
| 912 | +#line 482 "rl78-decode.opc" | ||
| 913 | ID(cmp); DM(None, IMMU(2)); SC(IMMU(1)); Fzac; | ||
| 914 | |||
| 915 | } | ||
| 916 | @@ -1393,7 +1395,7 @@ | ||
| 917 | op[0]); | ||
| 918 | } | ||
| 919 | SYNTAX("mov %0, #%1"); | ||
| 920 | -#line 717 "rl78-decode.opc" | ||
| 921 | +#line 719 "rl78-decode.opc" | ||
| 922 | ID(mov); DR(ES); SC(IMMU(1)); | ||
| 923 | |||
| 924 | } | ||
| 925 | @@ -1408,7 +1410,7 @@ | ||
| 926 | op[0]); | ||
| 927 | } | ||
| 928 | SYNTAX("cmpw %0, %e!1"); | ||
| 929 | -#line 531 "rl78-decode.opc" | ||
| 930 | +#line 533 "rl78-decode.opc" | ||
| 931 | ID(cmp); W(); DR(AX); SM(None, IMMU(2)); Fzac; | ||
| 932 | |||
| 933 | } | ||
| 934 | @@ -1418,7 +1420,7 @@ | ||
| 935 | case 0x47: | ||
| 936 | { | ||
| 937 | /** 0100 0ra1 cmpw %0, %1 */ | ||
| 938 | -#line 540 "rl78-decode.opc" | ||
| 939 | +#line 542 "rl78-decode.opc" | ||
| 940 | int ra AU = (op[0] >> 1) & 0x03; | ||
| 941 | if (trace) | ||
| 942 | { | ||
| 943 | @@ -1428,7 +1430,7 @@ | ||
| 944 | printf (" ra = 0x%x\n", ra); | ||
| 945 | } | ||
| 946 | SYNTAX("cmpw %0, %1"); | ||
| 947 | -#line 540 "rl78-decode.opc" | ||
| 948 | +#line 542 "rl78-decode.opc" | ||
| 949 | ID(cmp); W(); DR(AX); SRW(ra); Fzac; | ||
| 950 | |||
| 951 | } | ||
| 952 | @@ -1443,7 +1445,7 @@ | ||
| 953 | op[0]); | ||
| 954 | } | ||
| 955 | SYNTAX("cmpw %0, #%1"); | ||
| 956 | -#line 537 "rl78-decode.opc" | ||
| 957 | +#line 539 "rl78-decode.opc" | ||
| 958 | ID(cmp); W(); DR(AX); SC(IMMU(2)); Fzac; | ||
| 959 | |||
| 960 | } | ||
| 961 | @@ -1458,7 +1460,7 @@ | ||
| 962 | op[0]); | ||
| 963 | } | ||
| 964 | SYNTAX("cmpw %0, %1"); | ||
| 965 | -#line 543 "rl78-decode.opc" | ||
| 966 | +#line 545 "rl78-decode.opc" | ||
| 967 | ID(cmp); W(); DR(AX); SM(None, SADDR); Fzac; | ||
| 968 | |||
| 969 | /*----------------------------------------------------------------------*/ | ||
| 970 | @@ -1475,7 +1477,7 @@ | ||
| 971 | op[0]); | ||
| 972 | } | ||
| 973 | SYNTAX("mov %e0, %1"); | ||
| 974 | -#line 735 "rl78-decode.opc" | ||
| 975 | +#line 737 "rl78-decode.opc" | ||
| 976 | ID(mov); DM(BC, IMMU(2)); SR(A); | ||
| 977 | |||
| 978 | } | ||
| 979 | @@ -1490,7 +1492,7 @@ | ||
| 980 | op[0]); | ||
| 981 | } | ||
| 982 | SYNTAX("mov %0, %e1"); | ||
| 983 | -#line 681 "rl78-decode.opc" | ||
| 984 | +#line 683 "rl78-decode.opc" | ||
| 985 | ID(mov); DR(A); SM(BC, IMMU(2)); | ||
| 986 | |||
| 987 | } | ||
| 988 | @@ -1505,7 +1507,7 @@ | ||
| 989 | op[0]); | ||
| 990 | } | ||
| 991 | SYNTAX("cmp %0, #%1"); | ||
| 992 | -#line 483 "rl78-decode.opc" | ||
| 993 | +#line 485 "rl78-decode.opc" | ||
| 994 | ID(cmp); DM(None, SADDR); SC(IMMU(1)); Fzac; | ||
| 995 | |||
| 996 | } | ||
| 997 | @@ -1520,7 +1522,7 @@ | ||
| 998 | op[0]); | ||
| 999 | } | ||
| 1000 | SYNTAX("cmp %0, %1"); | ||
| 1001 | -#line 510 "rl78-decode.opc" | ||
| 1002 | +#line 512 "rl78-decode.opc" | ||
| 1003 | ID(cmp); DR(A); SM(None, SADDR); Fzac; | ||
| 1004 | |||
| 1005 | /*----------------------------------------------------------------------*/ | ||
| 1006 | @@ -1537,7 +1539,7 @@ | ||
| 1007 | op[0]); | ||
| 1008 | } | ||
| 1009 | SYNTAX("cmp %0, #%1"); | ||
| 1010 | -#line 501 "rl78-decode.opc" | ||
| 1011 | +#line 503 "rl78-decode.opc" | ||
| 1012 | ID(cmp); DR(A); SC(IMMU(1)); Fzac; | ||
| 1013 | |||
| 1014 | } | ||
| 1015 | @@ -1552,7 +1554,7 @@ | ||
| 1016 | op[0]); | ||
| 1017 | } | ||
| 1018 | SYNTAX("cmp %0, %e1"); | ||
| 1019 | -#line 489 "rl78-decode.opc" | ||
| 1020 | +#line 491 "rl78-decode.opc" | ||
| 1021 | ID(cmp); DR(A); SM(HL, 0); Fzac; | ||
| 1022 | |||
| 1023 | } | ||
| 1024 | @@ -1567,7 +1569,7 @@ | ||
| 1025 | op[0]); | ||
| 1026 | } | ||
| 1027 | SYNTAX("cmp %0, %ea1"); | ||
| 1028 | -#line 498 "rl78-decode.opc" | ||
| 1029 | +#line 500 "rl78-decode.opc" | ||
| 1030 | ID(cmp); DR(A); SM(HL, IMMU(1)); Fzac; | ||
| 1031 | |||
| 1032 | } | ||
| 1033 | @@ -1582,7 +1584,7 @@ | ||
| 1034 | op[0]); | ||
| 1035 | } | ||
| 1036 | SYNTAX("cmp %0, %e!1"); | ||
| 1037 | -#line 486 "rl78-decode.opc" | ||
| 1038 | +#line 488 "rl78-decode.opc" | ||
| 1039 | ID(cmp); DR(A); SM(None, IMMU(2)); Fzac; | ||
| 1040 | |||
| 1041 | } | ||
| 1042 | @@ -1597,7 +1599,7 @@ | ||
| 1043 | case 0x57: | ||
| 1044 | { | ||
| 1045 | /** 0101 0reg mov %0, #%1 */ | ||
| 1046 | -#line 669 "rl78-decode.opc" | ||
| 1047 | +#line 671 "rl78-decode.opc" | ||
| 1048 | int reg AU = op[0] & 0x07; | ||
| 1049 | if (trace) | ||
| 1050 | { | ||
| 1051 | @@ -1607,7 +1609,7 @@ | ||
| 1052 | printf (" reg = 0x%x\n", reg); | ||
| 1053 | } | ||
| 1054 | SYNTAX("mov %0, #%1"); | ||
| 1055 | -#line 669 "rl78-decode.opc" | ||
| 1056 | +#line 671 "rl78-decode.opc" | ||
| 1057 | ID(mov); DRB(reg); SC(IMMU(1)); | ||
| 1058 | |||
| 1059 | } | ||
| 1060 | @@ -1622,7 +1624,7 @@ | ||
| 1061 | op[0]); | ||
| 1062 | } | ||
| 1063 | SYNTAX("movw %e0, %1"); | ||
| 1064 | -#line 871 "rl78-decode.opc" | ||
| 1065 | +#line 873 "rl78-decode.opc" | ||
| 1066 | ID(mov); W(); DM(B, IMMU(2)); SR(AX); | ||
| 1067 | |||
| 1068 | } | ||
| 1069 | @@ -1637,7 +1639,7 @@ | ||
| 1070 | op[0]); | ||
| 1071 | } | ||
| 1072 | SYNTAX("movw %0, %e1"); | ||
| 1073 | -#line 862 "rl78-decode.opc" | ||
| 1074 | +#line 864 "rl78-decode.opc" | ||
| 1075 | ID(mov); W(); DR(AX); SM(B, IMMU(2)); | ||
| 1076 | |||
| 1077 | } | ||
| 1078 | @@ -1652,7 +1654,7 @@ | ||
| 1079 | op[0]); | ||
| 1080 | } | ||
| 1081 | SYNTAX("and %0, #%1"); | ||
| 1082 | -#line 312 "rl78-decode.opc" | ||
| 1083 | +#line 314 "rl78-decode.opc" | ||
| 1084 | ID(and); DM(None, SADDR); SC(IMMU(1)); Fz; | ||
| 1085 | |||
| 1086 | /*----------------------------------------------------------------------*/ | ||
| 1087 | @@ -1669,7 +1671,7 @@ | ||
| 1088 | op[0]); | ||
| 1089 | } | ||
| 1090 | SYNTAX("and %0, %1"); | ||
| 1091 | -#line 309 "rl78-decode.opc" | ||
| 1092 | +#line 311 "rl78-decode.opc" | ||
| 1093 | ID(and); DR(A); SM(None, SADDR); Fz; | ||
| 1094 | |||
| 1095 | } | ||
| 1096 | @@ -1684,7 +1686,7 @@ | ||
| 1097 | op[0]); | ||
| 1098 | } | ||
| 1099 | SYNTAX("and %0, #%1"); | ||
| 1100 | -#line 300 "rl78-decode.opc" | ||
| 1101 | +#line 302 "rl78-decode.opc" | ||
| 1102 | ID(and); DR(A); SC(IMMU(1)); Fz; | ||
| 1103 | |||
| 1104 | } | ||
| 1105 | @@ -1699,7 +1701,7 @@ | ||
| 1106 | op[0]); | ||
| 1107 | } | ||
| 1108 | SYNTAX("and %0, %e1"); | ||
| 1109 | -#line 288 "rl78-decode.opc" | ||
| 1110 | +#line 290 "rl78-decode.opc" | ||
| 1111 | ID(and); DR(A); SM(HL, 0); Fz; | ||
| 1112 | |||
| 1113 | } | ||
| 1114 | @@ -1714,7 +1716,7 @@ | ||
| 1115 | op[0]); | ||
| 1116 | } | ||
| 1117 | SYNTAX("and %0, %ea1"); | ||
| 1118 | -#line 294 "rl78-decode.opc" | ||
| 1119 | +#line 296 "rl78-decode.opc" | ||
| 1120 | ID(and); DR(A); SM(HL, IMMU(1)); Fz; | ||
| 1121 | |||
| 1122 | } | ||
| 1123 | @@ -1729,7 +1731,7 @@ | ||
| 1124 | op[0]); | ||
| 1125 | } | ||
| 1126 | SYNTAX("and %0, %e!1"); | ||
| 1127 | -#line 285 "rl78-decode.opc" | ||
| 1128 | +#line 287 "rl78-decode.opc" | ||
| 1129 | ID(and); DR(A); SM(None, IMMU(2)); Fz; | ||
| 1130 | |||
| 1131 | } | ||
| 1132 | @@ -1743,7 +1745,7 @@ | ||
| 1133 | case 0x67: | ||
| 1134 | { | ||
| 1135 | /** 0110 0rba mov %0, %1 */ | ||
| 1136 | -#line 672 "rl78-decode.opc" | ||
| 1137 | +#line 674 "rl78-decode.opc" | ||
| 1138 | int rba AU = op[0] & 0x07; | ||
| 1139 | if (trace) | ||
| 1140 | { | ||
| 1141 | @@ -1753,7 +1755,7 @@ | ||
| 1142 | printf (" rba = 0x%x\n", rba); | ||
| 1143 | } | ||
| 1144 | SYNTAX("mov %0, %1"); | ||
| 1145 | -#line 672 "rl78-decode.opc" | ||
| 1146 | +#line 674 "rl78-decode.opc" | ||
| 1147 | ID(mov); DR(A); SRB(rba); | ||
| 1148 | |||
| 1149 | } | ||
| 1150 | @@ -1772,7 +1774,7 @@ | ||
| 1151 | case 0x07: | ||
| 1152 | { | ||
| 1153 | /** 0110 0001 0000 0reg add %0, %1 */ | ||
| 1154 | -#line 225 "rl78-decode.opc" | ||
| 1155 | +#line 227 "rl78-decode.opc" | ||
| 1156 | int reg AU = op[1] & 0x07; | ||
| 1157 | if (trace) | ||
| 1158 | { | ||
| 1159 | @@ -1782,7 +1784,7 @@ | ||
| 1160 | printf (" reg = 0x%x\n", reg); | ||
| 1161 | } | ||
| 1162 | SYNTAX("add %0, %1"); | ||
| 1163 | -#line 225 "rl78-decode.opc" | ||
| 1164 | +#line 227 "rl78-decode.opc" | ||
| 1165 | ID(add); DRB(reg); SR(A); Fzac; | ||
| 1166 | |||
| 1167 | } | ||
| 1168 | @@ -1796,7 +1798,7 @@ | ||
| 1169 | case 0x0f: | ||
| 1170 | { | ||
| 1171 | /** 0110 0001 0000 1rba add %0, %1 */ | ||
| 1172 | -#line 219 "rl78-decode.opc" | ||
| 1173 | +#line 221 "rl78-decode.opc" | ||
| 1174 | int rba AU = op[1] & 0x07; | ||
| 1175 | if (trace) | ||
| 1176 | { | ||
| 1177 | @@ -1806,7 +1808,7 @@ | ||
| 1178 | printf (" rba = 0x%x\n", rba); | ||
| 1179 | } | ||
| 1180 | SYNTAX("add %0, %1"); | ||
| 1181 | -#line 219 "rl78-decode.opc" | ||
| 1182 | +#line 221 "rl78-decode.opc" | ||
| 1183 | ID(add); DR(A); SRB(rba); Fzac; | ||
| 1184 | |||
| 1185 | } | ||
| 1186 | @@ -1821,7 +1823,7 @@ | ||
| 1187 | op[0], op[1]); | ||
| 1188 | } | ||
| 1189 | SYNTAX("addw %0, %ea1"); | ||
| 1190 | -#line 268 "rl78-decode.opc" | ||
| 1191 | +#line 270 "rl78-decode.opc" | ||
| 1192 | ID(add); W(); DR(AX); SM(HL, IMMU(1)); Fzac; | ||
| 1193 | |||
| 1194 | } | ||
| 1195 | @@ -1836,7 +1838,7 @@ | ||
| 1196 | case 0x17: | ||
| 1197 | { | ||
| 1198 | /** 0110 0001 0001 0reg addc %0, %1 */ | ||
| 1199 | -#line 254 "rl78-decode.opc" | ||
| 1200 | +#line 256 "rl78-decode.opc" | ||
| 1201 | int reg AU = op[1] & 0x07; | ||
| 1202 | if (trace) | ||
| 1203 | { | ||
| 1204 | @@ -1846,7 +1848,7 @@ | ||
| 1205 | printf (" reg = 0x%x\n", reg); | ||
| 1206 | } | ||
| 1207 | SYNTAX("addc %0, %1"); | ||
| 1208 | -#line 254 "rl78-decode.opc" | ||
| 1209 | +#line 256 "rl78-decode.opc" | ||
| 1210 | ID(addc); DRB(reg); SR(A); Fzac; | ||
| 1211 | |||
| 1212 | } | ||
| 1213 | @@ -1860,7 +1862,7 @@ | ||
| 1214 | case 0x1f: | ||
| 1215 | { | ||
| 1216 | /** 0110 0001 0001 1rba addc %0, %1 */ | ||
| 1217 | -#line 251 "rl78-decode.opc" | ||
| 1218 | +#line 253 "rl78-decode.opc" | ||
| 1219 | int rba AU = op[1] & 0x07; | ||
| 1220 | if (trace) | ||
| 1221 | { | ||
| 1222 | @@ -1870,7 +1872,7 @@ | ||
| 1223 | printf (" rba = 0x%x\n", rba); | ||
| 1224 | } | ||
| 1225 | SYNTAX("addc %0, %1"); | ||
| 1226 | -#line 251 "rl78-decode.opc" | ||
| 1227 | +#line 253 "rl78-decode.opc" | ||
| 1228 | ID(addc); DR(A); SRB(rba); Fzac; | ||
| 1229 | |||
| 1230 | } | ||
| 1231 | @@ -1885,7 +1887,7 @@ | ||
| 1232 | case 0x27: | ||
| 1233 | { | ||
| 1234 | /** 0110 0001 0010 0reg sub %0, %1 */ | ||
| 1235 | -#line 1143 "rl78-decode.opc" | ||
| 1236 | +#line 1145 "rl78-decode.opc" | ||
| 1237 | int reg AU = op[1] & 0x07; | ||
| 1238 | if (trace) | ||
| 1239 | { | ||
| 1240 | @@ -1895,7 +1897,7 @@ | ||
| 1241 | printf (" reg = 0x%x\n", reg); | ||
| 1242 | } | ||
| 1243 | SYNTAX("sub %0, %1"); | ||
| 1244 | -#line 1143 "rl78-decode.opc" | ||
| 1245 | +#line 1145 "rl78-decode.opc" | ||
| 1246 | ID(sub); DRB(reg); SR(A); Fzac; | ||
| 1247 | |||
| 1248 | } | ||
| 1249 | @@ -1909,7 +1911,7 @@ | ||
| 1250 | case 0x2f: | ||
| 1251 | { | ||
| 1252 | /** 0110 0001 0010 1rba sub %0, %1 */ | ||
| 1253 | -#line 1137 "rl78-decode.opc" | ||
| 1254 | +#line 1139 "rl78-decode.opc" | ||
| 1255 | int rba AU = op[1] & 0x07; | ||
| 1256 | if (trace) | ||
| 1257 | { | ||
| 1258 | @@ -1919,7 +1921,7 @@ | ||
| 1259 | printf (" rba = 0x%x\n", rba); | ||
| 1260 | } | ||
| 1261 | SYNTAX("sub %0, %1"); | ||
| 1262 | -#line 1137 "rl78-decode.opc" | ||
| 1263 | +#line 1139 "rl78-decode.opc" | ||
| 1264 | ID(sub); DR(A); SRB(rba); Fzac; | ||
| 1265 | |||
| 1266 | } | ||
| 1267 | @@ -1934,7 +1936,7 @@ | ||
| 1268 | op[0], op[1]); | ||
| 1269 | } | ||
| 1270 | SYNTAX("subw %0, %ea1"); | ||
| 1271 | -#line 1186 "rl78-decode.opc" | ||
| 1272 | +#line 1188 "rl78-decode.opc" | ||
| 1273 | ID(sub); W(); DR(AX); SM(HL, IMMU(1)); Fzac; | ||
| 1274 | |||
| 1275 | } | ||
| 1276 | @@ -1949,7 +1951,7 @@ | ||
| 1277 | case 0x37: | ||
| 1278 | { | ||
| 1279 | /** 0110 0001 0011 0reg subc %0, %1 */ | ||
| 1280 | -#line 1172 "rl78-decode.opc" | ||
| 1281 | +#line 1174 "rl78-decode.opc" | ||
| 1282 | int reg AU = op[1] & 0x07; | ||
| 1283 | if (trace) | ||
| 1284 | { | ||
| 1285 | @@ -1959,7 +1961,7 @@ | ||
| 1286 | printf (" reg = 0x%x\n", reg); | ||
| 1287 | } | ||
| 1288 | SYNTAX("subc %0, %1"); | ||
| 1289 | -#line 1172 "rl78-decode.opc" | ||
| 1290 | +#line 1174 "rl78-decode.opc" | ||
| 1291 | ID(subc); DRB(reg); SR(A); Fzac; | ||
| 1292 | |||
| 1293 | } | ||
| 1294 | @@ -1973,7 +1975,7 @@ | ||
| 1295 | case 0x3f: | ||
| 1296 | { | ||
| 1297 | /** 0110 0001 0011 1rba subc %0, %1 */ | ||
| 1298 | -#line 1169 "rl78-decode.opc" | ||
| 1299 | +#line 1171 "rl78-decode.opc" | ||
| 1300 | int rba AU = op[1] & 0x07; | ||
| 1301 | if (trace) | ||
| 1302 | { | ||
| 1303 | @@ -1983,7 +1985,7 @@ | ||
| 1304 | printf (" rba = 0x%x\n", rba); | ||
| 1305 | } | ||
| 1306 | SYNTAX("subc %0, %1"); | ||
| 1307 | -#line 1169 "rl78-decode.opc" | ||
| 1308 | +#line 1171 "rl78-decode.opc" | ||
| 1309 | ID(subc); DR(A); SRB(rba); Fzac; | ||
| 1310 | |||
| 1311 | } | ||
| 1312 | @@ -1998,7 +2000,7 @@ | ||
| 1313 | case 0x47: | ||
| 1314 | { | ||
| 1315 | /** 0110 0001 0100 0reg cmp %0, %1 */ | ||
| 1316 | -#line 507 "rl78-decode.opc" | ||
| 1317 | +#line 509 "rl78-decode.opc" | ||
| 1318 | int reg AU = op[1] & 0x07; | ||
| 1319 | if (trace) | ||
| 1320 | { | ||
| 1321 | @@ -2008,7 +2010,7 @@ | ||
| 1322 | printf (" reg = 0x%x\n", reg); | ||
| 1323 | } | ||
| 1324 | SYNTAX("cmp %0, %1"); | ||
| 1325 | -#line 507 "rl78-decode.opc" | ||
| 1326 | +#line 509 "rl78-decode.opc" | ||
| 1327 | ID(cmp); DRB(reg); SR(A); Fzac; | ||
| 1328 | |||
| 1329 | } | ||
| 1330 | @@ -2022,7 +2024,7 @@ | ||
| 1331 | case 0x4f: | ||
| 1332 | { | ||
| 1333 | /** 0110 0001 0100 1rba cmp %0, %1 */ | ||
| 1334 | -#line 504 "rl78-decode.opc" | ||
| 1335 | +#line 506 "rl78-decode.opc" | ||
| 1336 | int rba AU = op[1] & 0x07; | ||
| 1337 | if (trace) | ||
| 1338 | { | ||
| 1339 | @@ -2032,7 +2034,7 @@ | ||
| 1340 | printf (" rba = 0x%x\n", rba); | ||
| 1341 | } | ||
| 1342 | SYNTAX("cmp %0, %1"); | ||
| 1343 | -#line 504 "rl78-decode.opc" | ||
| 1344 | +#line 506 "rl78-decode.opc" | ||
| 1345 | ID(cmp); DR(A); SRB(rba); Fzac; | ||
| 1346 | |||
| 1347 | } | ||
| 1348 | @@ -2047,7 +2049,7 @@ | ||
| 1349 | op[0], op[1]); | ||
| 1350 | } | ||
| 1351 | SYNTAX("cmpw %0, %ea1"); | ||
| 1352 | -#line 534 "rl78-decode.opc" | ||
| 1353 | +#line 536 "rl78-decode.opc" | ||
| 1354 | ID(cmp); W(); DR(AX); SM(HL, IMMU(1)); Fzac; | ||
| 1355 | |||
| 1356 | } | ||
| 1357 | @@ -2062,7 +2064,7 @@ | ||
| 1358 | case 0x57: | ||
| 1359 | { | ||
| 1360 | /** 0110 0001 0101 0reg and %0, %1 */ | ||
| 1361 | -#line 306 "rl78-decode.opc" | ||
| 1362 | +#line 308 "rl78-decode.opc" | ||
| 1363 | int reg AU = op[1] & 0x07; | ||
| 1364 | if (trace) | ||
| 1365 | { | ||
| 1366 | @@ -2072,7 +2074,7 @@ | ||
| 1367 | printf (" reg = 0x%x\n", reg); | ||
| 1368 | } | ||
| 1369 | SYNTAX("and %0, %1"); | ||
| 1370 | -#line 306 "rl78-decode.opc" | ||
| 1371 | +#line 308 "rl78-decode.opc" | ||
| 1372 | ID(and); DRB(reg); SR(A); Fz; | ||
| 1373 | |||
| 1374 | } | ||
| 1375 | @@ -2086,7 +2088,7 @@ | ||
| 1376 | case 0x5f: | ||
| 1377 | { | ||
| 1378 | /** 0110 0001 0101 1rba and %0, %1 */ | ||
| 1379 | -#line 303 "rl78-decode.opc" | ||
| 1380 | +#line 305 "rl78-decode.opc" | ||
| 1381 | int rba AU = op[1] & 0x07; | ||
| 1382 | if (trace) | ||
| 1383 | { | ||
| 1384 | @@ -2096,7 +2098,7 @@ | ||
| 1385 | printf (" rba = 0x%x\n", rba); | ||
| 1386 | } | ||
| 1387 | SYNTAX("and %0, %1"); | ||
| 1388 | -#line 303 "rl78-decode.opc" | ||
| 1389 | +#line 305 "rl78-decode.opc" | ||
| 1390 | ID(and); DR(A); SRB(rba); Fz; | ||
| 1391 | |||
| 1392 | } | ||
| 1393 | @@ -2111,7 +2113,7 @@ | ||
| 1394 | op[0], op[1]); | ||
| 1395 | } | ||
| 1396 | SYNTAX("inc %ea0"); | ||
| 1397 | -#line 584 "rl78-decode.opc" | ||
| 1398 | +#line 586 "rl78-decode.opc" | ||
| 1399 | ID(add); DM(HL, IMMU(1)); SC(1); Fza; | ||
| 1400 | |||
| 1401 | } | ||
| 1402 | @@ -2126,7 +2128,7 @@ | ||
| 1403 | case 0x67: | ||
| 1404 | { | ||
| 1405 | /** 0110 0001 0110 0reg or %0, %1 */ | ||
| 1406 | -#line 961 "rl78-decode.opc" | ||
| 1407 | +#line 963 "rl78-decode.opc" | ||
| 1408 | int reg AU = op[1] & 0x07; | ||
| 1409 | if (trace) | ||
| 1410 | { | ||
| 1411 | @@ -2136,7 +2138,7 @@ | ||
| 1412 | printf (" reg = 0x%x\n", reg); | ||
| 1413 | } | ||
| 1414 | SYNTAX("or %0, %1"); | ||
| 1415 | -#line 961 "rl78-decode.opc" | ||
| 1416 | +#line 963 "rl78-decode.opc" | ||
| 1417 | ID(or); DRB(reg); SR(A); Fz; | ||
| 1418 | |||
| 1419 | } | ||
| 1420 | @@ -2150,7 +2152,7 @@ | ||
| 1421 | case 0x6f: | ||
| 1422 | { | ||
| 1423 | /** 0110 0001 0110 1rba or %0, %1 */ | ||
| 1424 | -#line 958 "rl78-decode.opc" | ||
| 1425 | +#line 960 "rl78-decode.opc" | ||
| 1426 | int rba AU = op[1] & 0x07; | ||
| 1427 | if (trace) | ||
| 1428 | { | ||
| 1429 | @@ -2160,7 +2162,7 @@ | ||
| 1430 | printf (" rba = 0x%x\n", rba); | ||
| 1431 | } | ||
| 1432 | SYNTAX("or %0, %1"); | ||
| 1433 | -#line 958 "rl78-decode.opc" | ||
| 1434 | +#line 960 "rl78-decode.opc" | ||
| 1435 | ID(or); DR(A); SRB(rba); Fz; | ||
| 1436 | |||
| 1437 | } | ||
| 1438 | @@ -2175,7 +2177,7 @@ | ||
| 1439 | op[0], op[1]); | ||
| 1440 | } | ||
| 1441 | SYNTAX("dec %ea0"); | ||
| 1442 | -#line 551 "rl78-decode.opc" | ||
| 1443 | +#line 553 "rl78-decode.opc" | ||
| 1444 | ID(sub); DM(HL, IMMU(1)); SC(1); Fza; | ||
| 1445 | |||
| 1446 | } | ||
| 1447 | @@ -2190,7 +2192,7 @@ | ||
| 1448 | case 0x77: | ||
| 1449 | { | ||
| 1450 | /** 0110 0001 0111 0reg xor %0, %1 */ | ||
| 1451 | -#line 1265 "rl78-decode.opc" | ||
| 1452 | +#line 1267 "rl78-decode.opc" | ||
| 1453 | int reg AU = op[1] & 0x07; | ||
| 1454 | if (trace) | ||
| 1455 | { | ||
| 1456 | @@ -2200,7 +2202,7 @@ | ||
| 1457 | printf (" reg = 0x%x\n", reg); | ||
| 1458 | } | ||
| 1459 | SYNTAX("xor %0, %1"); | ||
| 1460 | -#line 1265 "rl78-decode.opc" | ||
| 1461 | +#line 1267 "rl78-decode.opc" | ||
| 1462 | ID(xor); DRB(reg); SR(A); Fz; | ||
| 1463 | |||
| 1464 | } | ||
| 1465 | @@ -2214,7 +2216,7 @@ | ||
| 1466 | case 0x7f: | ||
| 1467 | { | ||
| 1468 | /** 0110 0001 0111 1rba xor %0, %1 */ | ||
| 1469 | -#line 1262 "rl78-decode.opc" | ||
| 1470 | +#line 1264 "rl78-decode.opc" | ||
| 1471 | int rba AU = op[1] & 0x07; | ||
| 1472 | if (trace) | ||
| 1473 | { | ||
| 1474 | @@ -2224,7 +2226,7 @@ | ||
| 1475 | printf (" rba = 0x%x\n", rba); | ||
| 1476 | } | ||
| 1477 | SYNTAX("xor %0, %1"); | ||
| 1478 | -#line 1262 "rl78-decode.opc" | ||
| 1479 | +#line 1264 "rl78-decode.opc" | ||
| 1480 | ID(xor); DR(A); SRB(rba); Fz; | ||
| 1481 | |||
| 1482 | } | ||
| 1483 | @@ -2239,7 +2241,7 @@ | ||
| 1484 | op[0], op[1]); | ||
| 1485 | } | ||
| 1486 | SYNTAX("incw %ea0"); | ||
| 1487 | -#line 598 "rl78-decode.opc" | ||
| 1488 | +#line 600 "rl78-decode.opc" | ||
| 1489 | ID(add); W(); DM(HL, IMMU(1)); SC(1); | ||
| 1490 | |||
| 1491 | } | ||
| 1492 | @@ -2255,7 +2257,7 @@ | ||
| 1493 | op[0], op[1]); | ||
| 1494 | } | ||
| 1495 | SYNTAX("add %0, %e1"); | ||
| 1496 | -#line 207 "rl78-decode.opc" | ||
| 1497 | +#line 209 "rl78-decode.opc" | ||
| 1498 | ID(add); DR(A); SM2(HL, B, 0); Fzac; | ||
| 1499 | |||
| 1500 | } | ||
| 1501 | @@ -2270,7 +2272,7 @@ | ||
| 1502 | op[0], op[1]); | ||
| 1503 | } | ||
| 1504 | SYNTAX("add %0, %e1"); | ||
| 1505 | -#line 213 "rl78-decode.opc" | ||
| 1506 | +#line 215 "rl78-decode.opc" | ||
| 1507 | ID(add); DR(A); SM2(HL, C, 0); Fzac; | ||
| 1508 | |||
| 1509 | } | ||
| 1510 | @@ -2309,9 +2311,9 @@ | ||
| 1511 | case 0xf7: | ||
| 1512 | { | ||
| 1513 | /** 0110 0001 1nnn 01mm callt [%x0] */ | ||
| 1514 | -#line 433 "rl78-decode.opc" | ||
| 1515 | +#line 435 "rl78-decode.opc" | ||
| 1516 | int nnn AU = (op[1] >> 4) & 0x07; | ||
| 1517 | -#line 433 "rl78-decode.opc" | ||
| 1518 | +#line 435 "rl78-decode.opc" | ||
| 1519 | int mm AU = op[1] & 0x03; | ||
| 1520 | if (trace) | ||
| 1521 | { | ||
| 1522 | @@ -2322,7 +2324,7 @@ | ||
| 1523 | printf (" mm = 0x%x\n", mm); | ||
| 1524 | } | ||
| 1525 | SYNTAX("callt [%x0]"); | ||
| 1526 | -#line 433 "rl78-decode.opc" | ||
| 1527 | +#line 435 "rl78-decode.opc" | ||
| 1528 | ID(call); DM(None, 0x80 + mm*16 + nnn*2); | ||
| 1529 | |||
| 1530 | /*----------------------------------------------------------------------*/ | ||
| 1531 | @@ -2338,7 +2340,7 @@ | ||
| 1532 | case 0x8f: | ||
| 1533 | { | ||
| 1534 | /** 0110 0001 1000 1reg xch %0, %1 */ | ||
| 1535 | -#line 1224 "rl78-decode.opc" | ||
| 1536 | +#line 1226 "rl78-decode.opc" | ||
| 1537 | int reg AU = op[1] & 0x07; | ||
| 1538 | if (trace) | ||
| 1539 | { | ||
| 1540 | @@ -2348,7 +2350,7 @@ | ||
| 1541 | printf (" reg = 0x%x\n", reg); | ||
| 1542 | } | ||
| 1543 | SYNTAX("xch %0, %1"); | ||
| 1544 | -#line 1224 "rl78-decode.opc" | ||
| 1545 | +#line 1226 "rl78-decode.opc" | ||
| 1546 | /* Note: DECW uses reg == X, so this must follow DECW */ | ||
| 1547 | ID(xch); DR(A); SRB(reg); | ||
| 1548 | |||
| 1549 | @@ -2364,7 +2366,7 @@ | ||
| 1550 | op[0], op[1]); | ||
| 1551 | } | ||
| 1552 | SYNTAX("decw %ea0"); | ||
| 1553 | -#line 565 "rl78-decode.opc" | ||
| 1554 | +#line 567 "rl78-decode.opc" | ||
| 1555 | ID(sub); W(); DM(HL, IMMU(1)); SC(1); | ||
| 1556 | |||
| 1557 | } | ||
| 1558 | @@ -2379,7 +2381,7 @@ | ||
| 1559 | op[0], op[1]); | ||
| 1560 | } | ||
| 1561 | SYNTAX("addc %0, %e1"); | ||
| 1562 | -#line 239 "rl78-decode.opc" | ||
| 1563 | +#line 241 "rl78-decode.opc" | ||
| 1564 | ID(addc); DR(A); SM2(HL, B, 0); Fzac; | ||
| 1565 | |||
| 1566 | } | ||
| 1567 | @@ -2394,7 +2396,7 @@ | ||
| 1568 | op[0], op[1]); | ||
| 1569 | } | ||
| 1570 | SYNTAX("addc %0, %e1"); | ||
| 1571 | -#line 242 "rl78-decode.opc" | ||
| 1572 | +#line 244 "rl78-decode.opc" | ||
| 1573 | ID(addc); DR(A); SM2(HL, C, 0); Fzac; | ||
| 1574 | |||
| 1575 | } | ||
| 1576 | @@ -2410,7 +2412,7 @@ | ||
| 1577 | op[0], op[1]); | ||
| 1578 | } | ||
| 1579 | SYNTAX("sub %0, %e1"); | ||
| 1580 | -#line 1125 "rl78-decode.opc" | ||
| 1581 | +#line 1127 "rl78-decode.opc" | ||
| 1582 | ID(sub); DR(A); SM2(HL, B, 0); Fzac; | ||
| 1583 | |||
| 1584 | } | ||
| 1585 | @@ -2425,7 +2427,7 @@ | ||
| 1586 | op[0], op[1]); | ||
| 1587 | } | ||
| 1588 | SYNTAX("sub %0, %e1"); | ||
| 1589 | -#line 1131 "rl78-decode.opc" | ||
| 1590 | +#line 1133 "rl78-decode.opc" | ||
| 1591 | ID(sub); DR(A); SM2(HL, C, 0); Fzac; | ||
| 1592 | |||
| 1593 | } | ||
| 1594 | @@ -2440,7 +2442,7 @@ | ||
| 1595 | op[0], op[1]); | ||
| 1596 | } | ||
| 1597 | SYNTAX("xch %0, %1"); | ||
| 1598 | -#line 1228 "rl78-decode.opc" | ||
| 1599 | +#line 1230 "rl78-decode.opc" | ||
| 1600 | ID(xch); DR(A); SM(None, SADDR); | ||
| 1601 | |||
| 1602 | } | ||
| 1603 | @@ -2455,7 +2457,7 @@ | ||
| 1604 | op[0], op[1]); | ||
| 1605 | } | ||
| 1606 | SYNTAX("xch %0, %e1"); | ||
| 1607 | -#line 1221 "rl78-decode.opc" | ||
| 1608 | +#line 1223 "rl78-decode.opc" | ||
| 1609 | ID(xch); DR(A); SM2(HL, C, 0); | ||
| 1610 | |||
| 1611 | } | ||
| 1612 | @@ -2470,7 +2472,7 @@ | ||
| 1613 | op[0], op[1]); | ||
| 1614 | } | ||
| 1615 | SYNTAX("xch %0, %e!1"); | ||
| 1616 | -#line 1203 "rl78-decode.opc" | ||
| 1617 | +#line 1205 "rl78-decode.opc" | ||
| 1618 | ID(xch); DR(A); SM(None, IMMU(2)); | ||
| 1619 | |||
| 1620 | } | ||
| 1621 | @@ -2485,7 +2487,7 @@ | ||
| 1622 | op[0], op[1]); | ||
| 1623 | } | ||
| 1624 | SYNTAX("xch %0, %s1"); | ||
| 1625 | -#line 1231 "rl78-decode.opc" | ||
| 1626 | +#line 1233 "rl78-decode.opc" | ||
| 1627 | ID(xch); DR(A); SM(None, SFR); | ||
| 1628 | |||
| 1629 | } | ||
| 1630 | @@ -2500,7 +2502,7 @@ | ||
| 1631 | op[0], op[1]); | ||
| 1632 | } | ||
| 1633 | SYNTAX("xch %0, %e1"); | ||
| 1634 | -#line 1212 "rl78-decode.opc" | ||
| 1635 | +#line 1214 "rl78-decode.opc" | ||
| 1636 | ID(xch); DR(A); SM(HL, 0); | ||
| 1637 | |||
| 1638 | } | ||
| 1639 | @@ -2515,7 +2517,7 @@ | ||
| 1640 | op[0], op[1]); | ||
| 1641 | } | ||
| 1642 | SYNTAX("xch %0, %ea1"); | ||
| 1643 | -#line 1218 "rl78-decode.opc" | ||
| 1644 | +#line 1220 "rl78-decode.opc" | ||
| 1645 | ID(xch); DR(A); SM(HL, IMMU(1)); | ||
| 1646 | |||
| 1647 | } | ||
| 1648 | @@ -2530,7 +2532,7 @@ | ||
| 1649 | op[0], op[1]); | ||
| 1650 | } | ||
| 1651 | SYNTAX("xch %0, %e1"); | ||
| 1652 | -#line 1206 "rl78-decode.opc" | ||
| 1653 | +#line 1208 "rl78-decode.opc" | ||
| 1654 | ID(xch); DR(A); SM(DE, 0); | ||
| 1655 | |||
| 1656 | } | ||
| 1657 | @@ -2545,7 +2547,7 @@ | ||
| 1658 | op[0], op[1]); | ||
| 1659 | } | ||
| 1660 | SYNTAX("xch %0, %ea1"); | ||
| 1661 | -#line 1209 "rl78-decode.opc" | ||
| 1662 | +#line 1211 "rl78-decode.opc" | ||
| 1663 | ID(xch); DR(A); SM(DE, IMMU(1)); | ||
| 1664 | |||
| 1665 | } | ||
| 1666 | @@ -2560,7 +2562,7 @@ | ||
| 1667 | op[0], op[1]); | ||
| 1668 | } | ||
| 1669 | SYNTAX("subc %0, %e1"); | ||
| 1670 | -#line 1157 "rl78-decode.opc" | ||
| 1671 | +#line 1159 "rl78-decode.opc" | ||
| 1672 | ID(subc); DR(A); SM2(HL, B, 0); Fzac; | ||
| 1673 | |||
| 1674 | } | ||
| 1675 | @@ -2575,7 +2577,7 @@ | ||
| 1676 | op[0], op[1]); | ||
| 1677 | } | ||
| 1678 | SYNTAX("subc %0, %e1"); | ||
| 1679 | -#line 1160 "rl78-decode.opc" | ||
| 1680 | +#line 1162 "rl78-decode.opc" | ||
| 1681 | ID(subc); DR(A); SM2(HL, C, 0); Fzac; | ||
| 1682 | |||
| 1683 | } | ||
| 1684 | @@ -2590,7 +2592,7 @@ | ||
| 1685 | op[0], op[1]); | ||
| 1686 | } | ||
| 1687 | SYNTAX("mov %0, %1"); | ||
| 1688 | -#line 723 "rl78-decode.opc" | ||
| 1689 | +#line 725 "rl78-decode.opc" | ||
| 1690 | ID(mov); DR(ES); SM(None, SADDR); | ||
| 1691 | |||
| 1692 | } | ||
| 1693 | @@ -2605,7 +2607,7 @@ | ||
| 1694 | op[0], op[1]); | ||
| 1695 | } | ||
| 1696 | SYNTAX("xch %0, %e1"); | ||
| 1697 | -#line 1215 "rl78-decode.opc" | ||
| 1698 | +#line 1217 "rl78-decode.opc" | ||
| 1699 | ID(xch); DR(A); SM2(HL, B, 0); | ||
| 1700 | |||
| 1701 | } | ||
| 1702 | @@ -2620,7 +2622,7 @@ | ||
| 1703 | op[0], op[1]); | ||
| 1704 | } | ||
| 1705 | SYNTAX("cmp %0, %e1"); | ||
| 1706 | -#line 492 "rl78-decode.opc" | ||
| 1707 | +#line 494 "rl78-decode.opc" | ||
| 1708 | ID(cmp); DR(A); SM2(HL, B, 0); Fzac; | ||
| 1709 | |||
| 1710 | } | ||
| 1711 | @@ -2635,7 +2637,7 @@ | ||
| 1712 | op[0], op[1]); | ||
| 1713 | } | ||
| 1714 | SYNTAX("cmp %0, %e1"); | ||
| 1715 | -#line 495 "rl78-decode.opc" | ||
| 1716 | +#line 497 "rl78-decode.opc" | ||
| 1717 | ID(cmp); DR(A); SM2(HL, C, 0); Fzac; | ||
| 1718 | |||
| 1719 | } | ||
| 1720 | @@ -2650,7 +2652,7 @@ | ||
| 1721 | op[0], op[1]); | ||
| 1722 | } | ||
| 1723 | SYNTAX("bh $%a0"); | ||
| 1724 | -#line 340 "rl78-decode.opc" | ||
| 1725 | +#line 342 "rl78-decode.opc" | ||
| 1726 | ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(H); | ||
| 1727 | |||
| 1728 | } | ||
| 1729 | @@ -2665,7 +2667,7 @@ | ||
| 1730 | op[0], op[1]); | ||
| 1731 | } | ||
| 1732 | SYNTAX("sk%c1"); | ||
| 1733 | -#line 1094 "rl78-decode.opc" | ||
| 1734 | +#line 1096 "rl78-decode.opc" | ||
| 1735 | ID(skip); COND(C); | ||
| 1736 | |||
| 1737 | } | ||
| 1738 | @@ -2680,7 +2682,7 @@ | ||
| 1739 | op[0], op[1]); | ||
| 1740 | } | ||
| 1741 | SYNTAX("mov %0, %e1"); | ||
| 1742 | -#line 660 "rl78-decode.opc" | ||
| 1743 | +#line 662 "rl78-decode.opc" | ||
| 1744 | ID(mov); DR(A); SM2(HL, B, 0); | ||
| 1745 | |||
| 1746 | } | ||
| 1747 | @@ -2691,7 +2693,7 @@ | ||
| 1748 | case 0xfa: | ||
| 1749 | { | ||
| 1750 | /** 0110 0001 11rg 1010 call %0 */ | ||
| 1751 | -#line 430 "rl78-decode.opc" | ||
| 1752 | +#line 432 "rl78-decode.opc" | ||
| 1753 | int rg AU = (op[1] >> 4) & 0x03; | ||
| 1754 | if (trace) | ||
| 1755 | { | ||
| 1756 | @@ -2701,7 +2703,7 @@ | ||
| 1757 | printf (" rg = 0x%x\n", rg); | ||
| 1758 | } | ||
| 1759 | SYNTAX("call %0"); | ||
| 1760 | -#line 430 "rl78-decode.opc" | ||
| 1761 | +#line 432 "rl78-decode.opc" | ||
| 1762 | ID(call); DRW(rg); | ||
| 1763 | |||
| 1764 | } | ||
| 1765 | @@ -2716,7 +2718,7 @@ | ||
| 1766 | op[0], op[1]); | ||
| 1767 | } | ||
| 1768 | SYNTAX("br ax"); | ||
| 1769 | -#line 380 "rl78-decode.opc" | ||
| 1770 | +#line 382 "rl78-decode.opc" | ||
| 1771 | ID(branch); DR(AX); | ||
| 1772 | |||
| 1773 | /*----------------------------------------------------------------------*/ | ||
| 1774 | @@ -2733,7 +2735,7 @@ | ||
| 1775 | op[0], op[1]); | ||
| 1776 | } | ||
| 1777 | SYNTAX("brk"); | ||
| 1778 | -#line 388 "rl78-decode.opc" | ||
| 1779 | +#line 390 "rl78-decode.opc" | ||
| 1780 | ID(break); | ||
| 1781 | |||
| 1782 | /*----------------------------------------------------------------------*/ | ||
| 1783 | @@ -2750,7 +2752,7 @@ | ||
| 1784 | op[0], op[1]); | ||
| 1785 | } | ||
| 1786 | SYNTAX("pop %s0"); | ||
| 1787 | -#line 989 "rl78-decode.opc" | ||
| 1788 | +#line 991 "rl78-decode.opc" | ||
| 1789 | ID(mov); W(); DR(PSW); SPOP(); | ||
| 1790 | |||
| 1791 | /*----------------------------------------------------------------------*/ | ||
| 1792 | @@ -2767,7 +2769,7 @@ | ||
| 1793 | op[0], op[1]); | ||
| 1794 | } | ||
| 1795 | SYNTAX("movs %ea0, %1"); | ||
| 1796 | -#line 811 "rl78-decode.opc" | ||
| 1797 | +#line 813 "rl78-decode.opc" | ||
| 1798 | ID(mov); DM(HL, IMMU(1)); SR(X); Fzc; | ||
| 1799 | |||
| 1800 | /*----------------------------------------------------------------------*/ | ||
| 1801 | @@ -2780,7 +2782,7 @@ | ||
| 1802 | case 0xff: | ||
| 1803 | { | ||
| 1804 | /** 0110 0001 11rb 1111 sel rb%1 */ | ||
| 1805 | -#line 1041 "rl78-decode.opc" | ||
| 1806 | +#line 1043 "rl78-decode.opc" | ||
| 1807 | int rb AU = (op[1] >> 4) & 0x03; | ||
| 1808 | if (trace) | ||
| 1809 | { | ||
| 1810 | @@ -2790,7 +2792,7 @@ | ||
| 1811 | printf (" rb = 0x%x\n", rb); | ||
| 1812 | } | ||
| 1813 | SYNTAX("sel rb%1"); | ||
| 1814 | -#line 1041 "rl78-decode.opc" | ||
| 1815 | +#line 1043 "rl78-decode.opc" | ||
| 1816 | ID(sel); SC(rb); | ||
| 1817 | |||
| 1818 | /*----------------------------------------------------------------------*/ | ||
| 1819 | @@ -2807,7 +2809,7 @@ | ||
| 1820 | op[0], op[1]); | ||
| 1821 | } | ||
| 1822 | SYNTAX("and %0, %e1"); | ||
| 1823 | -#line 291 "rl78-decode.opc" | ||
| 1824 | +#line 293 "rl78-decode.opc" | ||
| 1825 | ID(and); DR(A); SM2(HL, B, 0); Fz; | ||
| 1826 | |||
| 1827 | } | ||
| 1828 | @@ -2822,7 +2824,7 @@ | ||
| 1829 | op[0], op[1]); | ||
| 1830 | } | ||
| 1831 | SYNTAX("and %0, %e1"); | ||
| 1832 | -#line 297 "rl78-decode.opc" | ||
| 1833 | +#line 299 "rl78-decode.opc" | ||
| 1834 | ID(and); DR(A); SM2(HL, C, 0); Fz; | ||
| 1835 | |||
| 1836 | } | ||
| 1837 | @@ -2837,7 +2839,7 @@ | ||
| 1838 | op[0], op[1]); | ||
| 1839 | } | ||
| 1840 | SYNTAX("bnh $%a0"); | ||
| 1841 | -#line 343 "rl78-decode.opc" | ||
| 1842 | +#line 345 "rl78-decode.opc" | ||
| 1843 | ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(NH); | ||
| 1844 | |||
| 1845 | } | ||
| 1846 | @@ -2852,7 +2854,7 @@ | ||
| 1847 | op[0], op[1]); | ||
| 1848 | } | ||
| 1849 | SYNTAX("sk%c1"); | ||
| 1850 | -#line 1100 "rl78-decode.opc" | ||
| 1851 | +#line 1102 "rl78-decode.opc" | ||
| 1852 | ID(skip); COND(NC); | ||
| 1853 | |||
| 1854 | } | ||
| 1855 | @@ -2867,7 +2869,7 @@ | ||
| 1856 | op[0], op[1]); | ||
| 1857 | } | ||
| 1858 | SYNTAX("mov %e0, %1"); | ||
| 1859 | -#line 627 "rl78-decode.opc" | ||
| 1860 | +#line 629 "rl78-decode.opc" | ||
| 1861 | ID(mov); DM2(HL, B, 0); SR(A); | ||
| 1862 | |||
| 1863 | } | ||
| 1864 | @@ -2882,7 +2884,7 @@ | ||
| 1865 | op[0], op[1]); | ||
| 1866 | } | ||
| 1867 | SYNTAX("ror %0, %1"); | ||
| 1868 | -#line 1022 "rl78-decode.opc" | ||
| 1869 | +#line 1024 "rl78-decode.opc" | ||
| 1870 | ID(ror); DR(A); SC(1); | ||
| 1871 | |||
| 1872 | } | ||
| 1873 | @@ -2897,7 +2899,7 @@ | ||
| 1874 | op[0], op[1]); | ||
| 1875 | } | ||
| 1876 | SYNTAX("rolc %0, %1"); | ||
| 1877 | -#line 1016 "rl78-decode.opc" | ||
| 1878 | +#line 1018 "rl78-decode.opc" | ||
| 1879 | ID(rolc); DR(A); SC(1); | ||
| 1880 | |||
| 1881 | } | ||
| 1882 | @@ -2912,7 +2914,7 @@ | ||
| 1883 | op[0], op[1]); | ||
| 1884 | } | ||
| 1885 | SYNTAX("push %s1"); | ||
| 1886 | -#line 997 "rl78-decode.opc" | ||
| 1887 | +#line 999 "rl78-decode.opc" | ||
| 1888 | ID(mov); W(); DPUSH(); SR(PSW); | ||
| 1889 | |||
| 1890 | /*----------------------------------------------------------------------*/ | ||
| 1891 | @@ -2929,7 +2931,7 @@ | ||
| 1892 | op[0], op[1]); | ||
| 1893 | } | ||
| 1894 | SYNTAX("cmps %0, %ea1"); | ||
| 1895 | -#line 526 "rl78-decode.opc" | ||
| 1896 | +#line 528 "rl78-decode.opc" | ||
| 1897 | ID(cmp); DR(X); SM(HL, IMMU(1)); Fzac; | ||
| 1898 | |||
| 1899 | /*----------------------------------------------------------------------*/ | ||
| 1900 | @@ -2946,7 +2948,7 @@ | ||
| 1901 | op[0], op[1]); | ||
| 1902 | } | ||
| 1903 | SYNTAX("or %0, %e1"); | ||
| 1904 | -#line 946 "rl78-decode.opc" | ||
| 1905 | +#line 948 "rl78-decode.opc" | ||
| 1906 | ID(or); DR(A); SM2(HL, B, 0); Fz; | ||
| 1907 | |||
| 1908 | } | ||
| 1909 | @@ -2961,7 +2963,7 @@ | ||
| 1910 | op[0], op[1]); | ||
| 1911 | } | ||
| 1912 | SYNTAX("or %0, %e1"); | ||
| 1913 | -#line 952 "rl78-decode.opc" | ||
| 1914 | +#line 954 "rl78-decode.opc" | ||
| 1915 | ID(or); DR(A); SM2(HL, C, 0); Fz; | ||
| 1916 | |||
| 1917 | } | ||
| 1918 | @@ -2976,7 +2978,7 @@ | ||
| 1919 | op[0], op[1]); | ||
| 1920 | } | ||
| 1921 | SYNTAX("sk%c1"); | ||
| 1922 | -#line 1097 "rl78-decode.opc" | ||
| 1923 | +#line 1099 "rl78-decode.opc" | ||
| 1924 | ID(skip); COND(H); | ||
| 1925 | |||
| 1926 | } | ||
| 1927 | @@ -2991,7 +2993,7 @@ | ||
| 1928 | op[0], op[1]); | ||
| 1929 | } | ||
| 1930 | SYNTAX("sk%c1"); | ||
| 1931 | -#line 1109 "rl78-decode.opc" | ||
| 1932 | +#line 1111 "rl78-decode.opc" | ||
| 1933 | ID(skip); COND(Z); | ||
| 1934 | |||
| 1935 | /*----------------------------------------------------------------------*/ | ||
| 1936 | @@ -3008,7 +3010,7 @@ | ||
| 1937 | op[0], op[1]); | ||
| 1938 | } | ||
| 1939 | SYNTAX("mov %0, %e1"); | ||
| 1940 | -#line 663 "rl78-decode.opc" | ||
| 1941 | +#line 665 "rl78-decode.opc" | ||
| 1942 | ID(mov); DR(A); SM2(HL, C, 0); | ||
| 1943 | |||
| 1944 | } | ||
| 1945 | @@ -3023,7 +3025,7 @@ | ||
| 1946 | op[0], op[1]); | ||
| 1947 | } | ||
| 1948 | SYNTAX("rol %0, %1"); | ||
| 1949 | -#line 1013 "rl78-decode.opc" | ||
| 1950 | +#line 1015 "rl78-decode.opc" | ||
| 1951 | ID(rol); DR(A); SC(1); | ||
| 1952 | |||
| 1953 | } | ||
| 1954 | @@ -3038,7 +3040,7 @@ | ||
| 1955 | op[0], op[1]); | ||
| 1956 | } | ||
| 1957 | SYNTAX("retb"); | ||
| 1958 | -#line 1008 "rl78-decode.opc" | ||
| 1959 | +#line 1010 "rl78-decode.opc" | ||
| 1960 | ID(reti); | ||
| 1961 | |||
| 1962 | /*----------------------------------------------------------------------*/ | ||
| 1963 | @@ -3055,7 +3057,7 @@ | ||
| 1964 | op[0], op[1]); | ||
| 1965 | } | ||
| 1966 | SYNTAX("halt"); | ||
| 1967 | -#line 576 "rl78-decode.opc" | ||
| 1968 | +#line 578 "rl78-decode.opc" | ||
| 1969 | ID(halt); | ||
| 1970 | |||
| 1971 | /*----------------------------------------------------------------------*/ | ||
| 1972 | @@ -3066,7 +3068,7 @@ | ||
| 1973 | case 0xfe: | ||
| 1974 | { | ||
| 1975 | /** 0110 0001 111r 1110 rolwc %0, %1 */ | ||
| 1976 | -#line 1019 "rl78-decode.opc" | ||
| 1977 | +#line 1021 "rl78-decode.opc" | ||
| 1978 | int r AU = (op[1] >> 4) & 0x01; | ||
| 1979 | if (trace) | ||
| 1980 | { | ||
| 1981 | @@ -3076,7 +3078,7 @@ | ||
| 1982 | printf (" r = 0x%x\n", r); | ||
| 1983 | } | ||
| 1984 | SYNTAX("rolwc %0, %1"); | ||
| 1985 | -#line 1019 "rl78-decode.opc" | ||
| 1986 | +#line 1021 "rl78-decode.opc" | ||
| 1987 | ID(rolc); W(); DRW(r); SC(1); | ||
| 1988 | |||
| 1989 | } | ||
| 1990 | @@ -3091,7 +3093,7 @@ | ||
| 1991 | op[0], op[1]); | ||
| 1992 | } | ||
| 1993 | SYNTAX("xor %0, %e1"); | ||
| 1994 | -#line 1250 "rl78-decode.opc" | ||
| 1995 | +#line 1252 "rl78-decode.opc" | ||
| 1996 | ID(xor); DR(A); SM2(HL, B, 0); Fz; | ||
| 1997 | |||
| 1998 | } | ||
| 1999 | @@ -3106,7 +3108,7 @@ | ||
| 2000 | op[0], op[1]); | ||
| 2001 | } | ||
| 2002 | SYNTAX("xor %0, %e1"); | ||
| 2003 | -#line 1256 "rl78-decode.opc" | ||
| 2004 | +#line 1258 "rl78-decode.opc" | ||
| 2005 | ID(xor); DR(A); SM2(HL, C, 0); Fz; | ||
| 2006 | |||
| 2007 | } | ||
| 2008 | @@ -3121,7 +3123,7 @@ | ||
| 2009 | op[0], op[1]); | ||
| 2010 | } | ||
| 2011 | SYNTAX("sk%c1"); | ||
| 2012 | -#line 1103 "rl78-decode.opc" | ||
| 2013 | +#line 1105 "rl78-decode.opc" | ||
| 2014 | ID(skip); COND(NH); | ||
| 2015 | |||
| 2016 | } | ||
| 2017 | @@ -3136,7 +3138,7 @@ | ||
| 2018 | op[0], op[1]); | ||
| 2019 | } | ||
| 2020 | SYNTAX("sk%c1"); | ||
| 2021 | -#line 1106 "rl78-decode.opc" | ||
| 2022 | +#line 1108 "rl78-decode.opc" | ||
| 2023 | ID(skip); COND(NZ); | ||
| 2024 | |||
| 2025 | } | ||
| 2026 | @@ -3151,7 +3153,7 @@ | ||
| 2027 | op[0], op[1]); | ||
| 2028 | } | ||
| 2029 | SYNTAX("mov %e0, %1"); | ||
| 2030 | -#line 636 "rl78-decode.opc" | ||
| 2031 | +#line 638 "rl78-decode.opc" | ||
| 2032 | ID(mov); DM2(HL, C, 0); SR(A); | ||
| 2033 | |||
| 2034 | } | ||
| 2035 | @@ -3166,7 +3168,7 @@ | ||
| 2036 | op[0], op[1]); | ||
| 2037 | } | ||
| 2038 | SYNTAX("rorc %0, %1"); | ||
| 2039 | -#line 1025 "rl78-decode.opc" | ||
| 2040 | +#line 1027 "rl78-decode.opc" | ||
| 2041 | ID(rorc); DR(A); SC(1); | ||
| 2042 | |||
| 2043 | /*----------------------------------------------------------------------*/ | ||
| 2044 | @@ -3186,7 +3188,7 @@ | ||
| 2045 | op[0], op[1]); | ||
| 2046 | } | ||
| 2047 | SYNTAX("reti"); | ||
| 2048 | -#line 1005 "rl78-decode.opc" | ||
| 2049 | +#line 1007 "rl78-decode.opc" | ||
| 2050 | ID(reti); | ||
| 2051 | |||
| 2052 | } | ||
| 2053 | @@ -3201,7 +3203,7 @@ | ||
| 2054 | op[0], op[1]); | ||
| 2055 | } | ||
| 2056 | SYNTAX("stop"); | ||
| 2057 | -#line 1114 "rl78-decode.opc" | ||
| 2058 | +#line 1116 "rl78-decode.opc" | ||
| 2059 | ID(stop); | ||
| 2060 | |||
| 2061 | /*----------------------------------------------------------------------*/ | ||
| 2062 | @@ -3221,7 +3223,7 @@ | ||
| 2063 | op[0]); | ||
| 2064 | } | ||
| 2065 | SYNTAX("movw %e0, %1"); | ||
| 2066 | -#line 874 "rl78-decode.opc" | ||
| 2067 | +#line 876 "rl78-decode.opc" | ||
| 2068 | ID(mov); W(); DM(C, IMMU(2)); SR(AX); | ||
| 2069 | |||
| 2070 | } | ||
| 2071 | @@ -3236,7 +3238,7 @@ | ||
| 2072 | op[0]); | ||
| 2073 | } | ||
| 2074 | SYNTAX("movw %0, %e1"); | ||
| 2075 | -#line 865 "rl78-decode.opc" | ||
| 2076 | +#line 867 "rl78-decode.opc" | ||
| 2077 | ID(mov); W(); DR(AX); SM(C, IMMU(2)); | ||
| 2078 | |||
| 2079 | } | ||
| 2080 | @@ -3251,7 +3253,7 @@ | ||
| 2081 | op[0]); | ||
| 2082 | } | ||
| 2083 | SYNTAX("or %0, #%1"); | ||
| 2084 | -#line 967 "rl78-decode.opc" | ||
| 2085 | +#line 969 "rl78-decode.opc" | ||
| 2086 | ID(or); DM(None, SADDR); SC(IMMU(1)); Fz; | ||
| 2087 | |||
| 2088 | /*----------------------------------------------------------------------*/ | ||
| 2089 | @@ -3268,7 +3270,7 @@ | ||
| 2090 | op[0]); | ||
| 2091 | } | ||
| 2092 | SYNTAX("or %0, %1"); | ||
| 2093 | -#line 964 "rl78-decode.opc" | ||
| 2094 | +#line 966 "rl78-decode.opc" | ||
| 2095 | ID(or); DR(A); SM(None, SADDR); Fz; | ||
| 2096 | |||
| 2097 | } | ||
| 2098 | @@ -3283,7 +3285,7 @@ | ||
| 2099 | op[0]); | ||
| 2100 | } | ||
| 2101 | SYNTAX("or %0, #%1"); | ||
| 2102 | -#line 955 "rl78-decode.opc" | ||
| 2103 | +#line 957 "rl78-decode.opc" | ||
| 2104 | ID(or); DR(A); SC(IMMU(1)); Fz; | ||
| 2105 | |||
| 2106 | } | ||
| 2107 | @@ -3298,7 +3300,7 @@ | ||
| 2108 | op[0]); | ||
| 2109 | } | ||
| 2110 | SYNTAX("or %0, %e1"); | ||
| 2111 | -#line 943 "rl78-decode.opc" | ||
| 2112 | +#line 945 "rl78-decode.opc" | ||
| 2113 | ID(or); DR(A); SM(HL, 0); Fz; | ||
| 2114 | |||
| 2115 | } | ||
| 2116 | @@ -3313,7 +3315,7 @@ | ||
| 2117 | op[0]); | ||
| 2118 | } | ||
| 2119 | SYNTAX("or %0, %ea1"); | ||
| 2120 | -#line 949 "rl78-decode.opc" | ||
| 2121 | +#line 951 "rl78-decode.opc" | ||
| 2122 | ID(or); DR(A); SM(HL, IMMU(1)); Fz; | ||
| 2123 | |||
| 2124 | } | ||
| 2125 | @@ -3328,7 +3330,7 @@ | ||
| 2126 | op[0]); | ||
| 2127 | } | ||
| 2128 | SYNTAX("or %0, %e!1"); | ||
| 2129 | -#line 940 "rl78-decode.opc" | ||
| 2130 | +#line 942 "rl78-decode.opc" | ||
| 2131 | ID(or); DR(A); SM(None, IMMU(2)); Fz; | ||
| 2132 | |||
| 2133 | } | ||
| 2134 | @@ -3342,7 +3344,7 @@ | ||
| 2135 | case 0x77: | ||
| 2136 | { | ||
| 2137 | /** 0111 0rba mov %0, %1 */ | ||
| 2138 | -#line 696 "rl78-decode.opc" | ||
| 2139 | +#line 698 "rl78-decode.opc" | ||
| 2140 | int rba AU = op[0] & 0x07; | ||
| 2141 | if (trace) | ||
| 2142 | { | ||
| 2143 | @@ -3352,7 +3354,7 @@ | ||
| 2144 | printf (" rba = 0x%x\n", rba); | ||
| 2145 | } | ||
| 2146 | SYNTAX("mov %0, %1"); | ||
| 2147 | -#line 696 "rl78-decode.opc" | ||
| 2148 | +#line 698 "rl78-decode.opc" | ||
| 2149 | ID(mov); DRB(rba); SR(A); | ||
| 2150 | |||
| 2151 | } | ||
| 2152 | @@ -3371,7 +3373,7 @@ | ||
| 2153 | case 0x70: | ||
| 2154 | { | ||
| 2155 | /** 0111 0001 0bit 0000 set1 %e!0 */ | ||
| 2156 | -#line 1046 "rl78-decode.opc" | ||
| 2157 | +#line 1048 "rl78-decode.opc" | ||
| 2158 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2159 | if (trace) | ||
| 2160 | { | ||
| 2161 | @@ -3381,7 +3383,7 @@ | ||
| 2162 | printf (" bit = 0x%x\n", bit); | ||
| 2163 | } | ||
| 2164 | SYNTAX("set1 %e!0"); | ||
| 2165 | -#line 1046 "rl78-decode.opc" | ||
| 2166 | +#line 1048 "rl78-decode.opc" | ||
| 2167 | ID(mov); DM(None, IMMU(2)); DB(bit); SC(1); | ||
| 2168 | |||
| 2169 | } | ||
| 2170 | @@ -3396,7 +3398,7 @@ | ||
| 2171 | case 0x71: | ||
| 2172 | { | ||
| 2173 | /** 0111 0001 0bit 0001 mov1 %0, cy */ | ||
| 2174 | -#line 803 "rl78-decode.opc" | ||
| 2175 | +#line 805 "rl78-decode.opc" | ||
| 2176 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2177 | if (trace) | ||
| 2178 | { | ||
| 2179 | @@ -3406,7 +3408,7 @@ | ||
| 2180 | printf (" bit = 0x%x\n", bit); | ||
| 2181 | } | ||
| 2182 | SYNTAX("mov1 %0, cy"); | ||
| 2183 | -#line 803 "rl78-decode.opc" | ||
| 2184 | +#line 805 "rl78-decode.opc" | ||
| 2185 | ID(mov); DM(None, SADDR); DB(bit); SCY(); | ||
| 2186 | |||
| 2187 | } | ||
| 2188 | @@ -3421,7 +3423,7 @@ | ||
| 2189 | case 0x72: | ||
| 2190 | { | ||
| 2191 | /** 0111 0001 0bit 0010 set1 %0 */ | ||
| 2192 | -#line 1064 "rl78-decode.opc" | ||
| 2193 | +#line 1066 "rl78-decode.opc" | ||
| 2194 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2195 | if (trace) | ||
| 2196 | { | ||
| 2197 | @@ -3431,7 +3433,7 @@ | ||
| 2198 | printf (" bit = 0x%x\n", bit); | ||
| 2199 | } | ||
| 2200 | SYNTAX("set1 %0"); | ||
| 2201 | -#line 1064 "rl78-decode.opc" | ||
| 2202 | +#line 1066 "rl78-decode.opc" | ||
| 2203 | ID(mov); DM(None, SADDR); DB(bit); SC(1); | ||
| 2204 | |||
| 2205 | /*----------------------------------------------------------------------*/ | ||
| 2206 | @@ -3448,7 +3450,7 @@ | ||
| 2207 | case 0x73: | ||
| 2208 | { | ||
| 2209 | /** 0111 0001 0bit 0011 clr1 %0 */ | ||
| 2210 | -#line 456 "rl78-decode.opc" | ||
| 2211 | +#line 458 "rl78-decode.opc" | ||
| 2212 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2213 | if (trace) | ||
| 2214 | { | ||
| 2215 | @@ -3458,7 +3460,7 @@ | ||
| 2216 | printf (" bit = 0x%x\n", bit); | ||
| 2217 | } | ||
| 2218 | SYNTAX("clr1 %0"); | ||
| 2219 | -#line 456 "rl78-decode.opc" | ||
| 2220 | +#line 458 "rl78-decode.opc" | ||
| 2221 | ID(mov); DM(None, SADDR); DB(bit); SC(0); | ||
| 2222 | |||
| 2223 | /*----------------------------------------------------------------------*/ | ||
| 2224 | @@ -3475,7 +3477,7 @@ | ||
| 2225 | case 0x74: | ||
| 2226 | { | ||
| 2227 | /** 0111 0001 0bit 0100 mov1 cy, %1 */ | ||
| 2228 | -#line 797 "rl78-decode.opc" | ||
| 2229 | +#line 799 "rl78-decode.opc" | ||
| 2230 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2231 | if (trace) | ||
| 2232 | { | ||
| 2233 | @@ -3485,7 +3487,7 @@ | ||
| 2234 | printf (" bit = 0x%x\n", bit); | ||
| 2235 | } | ||
| 2236 | SYNTAX("mov1 cy, %1"); | ||
| 2237 | -#line 797 "rl78-decode.opc" | ||
| 2238 | +#line 799 "rl78-decode.opc" | ||
| 2239 | ID(mov); DCY(); SM(None, SADDR); SB(bit); | ||
| 2240 | |||
| 2241 | } | ||
| 2242 | @@ -3500,7 +3502,7 @@ | ||
| 2243 | case 0x75: | ||
| 2244 | { | ||
| 2245 | /** 0111 0001 0bit 0101 and1 cy, %s1 */ | ||
| 2246 | -#line 326 "rl78-decode.opc" | ||
| 2247 | +#line 328 "rl78-decode.opc" | ||
| 2248 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2249 | if (trace) | ||
| 2250 | { | ||
| 2251 | @@ -3510,7 +3512,7 @@ | ||
| 2252 | printf (" bit = 0x%x\n", bit); | ||
| 2253 | } | ||
| 2254 | SYNTAX("and1 cy, %s1"); | ||
| 2255 | -#line 326 "rl78-decode.opc" | ||
| 2256 | +#line 328 "rl78-decode.opc" | ||
| 2257 | ID(and); DCY(); SM(None, SADDR); SB(bit); | ||
| 2258 | |||
| 2259 | /*----------------------------------------------------------------------*/ | ||
| 2260 | @@ -3530,7 +3532,7 @@ | ||
| 2261 | case 0x76: | ||
| 2262 | { | ||
| 2263 | /** 0111 0001 0bit 0110 or1 cy, %s1 */ | ||
| 2264 | -#line 981 "rl78-decode.opc" | ||
| 2265 | +#line 983 "rl78-decode.opc" | ||
| 2266 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2267 | if (trace) | ||
| 2268 | { | ||
| 2269 | @@ -3540,7 +3542,7 @@ | ||
| 2270 | printf (" bit = 0x%x\n", bit); | ||
| 2271 | } | ||
| 2272 | SYNTAX("or1 cy, %s1"); | ||
| 2273 | -#line 981 "rl78-decode.opc" | ||
| 2274 | +#line 983 "rl78-decode.opc" | ||
| 2275 | ID(or); DCY(); SM(None, SADDR); SB(bit); | ||
| 2276 | |||
| 2277 | /*----------------------------------------------------------------------*/ | ||
| 2278 | @@ -3557,7 +3559,7 @@ | ||
| 2279 | case 0x77: | ||
| 2280 | { | ||
| 2281 | /** 0111 0001 0bit 0111 xor1 cy, %s1 */ | ||
| 2282 | -#line 1285 "rl78-decode.opc" | ||
| 2283 | +#line 1287 "rl78-decode.opc" | ||
| 2284 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2285 | if (trace) | ||
| 2286 | { | ||
| 2287 | @@ -3567,7 +3569,7 @@ | ||
| 2288 | printf (" bit = 0x%x\n", bit); | ||
| 2289 | } | ||
| 2290 | SYNTAX("xor1 cy, %s1"); | ||
| 2291 | -#line 1285 "rl78-decode.opc" | ||
| 2292 | +#line 1287 "rl78-decode.opc" | ||
| 2293 | ID(xor); DCY(); SM(None, SADDR); SB(bit); | ||
| 2294 | |||
| 2295 | /*----------------------------------------------------------------------*/ | ||
| 2296 | @@ -3584,7 +3586,7 @@ | ||
| 2297 | case 0x78: | ||
| 2298 | { | ||
| 2299 | /** 0111 0001 0bit 1000 clr1 %e!0 */ | ||
| 2300 | -#line 438 "rl78-decode.opc" | ||
| 2301 | +#line 440 "rl78-decode.opc" | ||
| 2302 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2303 | if (trace) | ||
| 2304 | { | ||
| 2305 | @@ -3594,7 +3596,7 @@ | ||
| 2306 | printf (" bit = 0x%x\n", bit); | ||
| 2307 | } | ||
| 2308 | SYNTAX("clr1 %e!0"); | ||
| 2309 | -#line 438 "rl78-decode.opc" | ||
| 2310 | +#line 440 "rl78-decode.opc" | ||
| 2311 | ID(mov); DM(None, IMMU(2)); DB(bit); SC(0); | ||
| 2312 | |||
| 2313 | } | ||
| 2314 | @@ -3609,7 +3611,7 @@ | ||
| 2315 | case 0x79: | ||
| 2316 | { | ||
| 2317 | /** 0111 0001 0bit 1001 mov1 %s0, cy */ | ||
| 2318 | -#line 806 "rl78-decode.opc" | ||
| 2319 | +#line 808 "rl78-decode.opc" | ||
| 2320 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2321 | if (trace) | ||
| 2322 | { | ||
| 2323 | @@ -3619,7 +3621,7 @@ | ||
| 2324 | printf (" bit = 0x%x\n", bit); | ||
| 2325 | } | ||
| 2326 | SYNTAX("mov1 %s0, cy"); | ||
| 2327 | -#line 806 "rl78-decode.opc" | ||
| 2328 | +#line 808 "rl78-decode.opc" | ||
| 2329 | ID(mov); DM(None, SFR); DB(bit); SCY(); | ||
| 2330 | |||
| 2331 | /*----------------------------------------------------------------------*/ | ||
| 2332 | @@ -3636,7 +3638,7 @@ | ||
| 2333 | case 0x7a: | ||
| 2334 | { | ||
| 2335 | /** 0111 0001 0bit 1010 set1 %s0 */ | ||
| 2336 | -#line 1058 "rl78-decode.opc" | ||
| 2337 | +#line 1060 "rl78-decode.opc" | ||
| 2338 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2339 | if (trace) | ||
| 2340 | { | ||
| 2341 | @@ -3646,7 +3648,7 @@ | ||
| 2342 | printf (" bit = 0x%x\n", bit); | ||
| 2343 | } | ||
| 2344 | SYNTAX("set1 %s0"); | ||
| 2345 | -#line 1058 "rl78-decode.opc" | ||
| 2346 | +#line 1060 "rl78-decode.opc" | ||
| 2347 | op0 = SFR; | ||
| 2348 | ID(mov); DM(None, op0); DB(bit); SC(1); | ||
| 2349 | if (op0 == RL78_SFR_PSW && bit == 7) | ||
| 2350 | @@ -3664,7 +3666,7 @@ | ||
| 2351 | case 0x7b: | ||
| 2352 | { | ||
| 2353 | /** 0111 0001 0bit 1011 clr1 %s0 */ | ||
| 2354 | -#line 450 "rl78-decode.opc" | ||
| 2355 | +#line 452 "rl78-decode.opc" | ||
| 2356 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2357 | if (trace) | ||
| 2358 | { | ||
| 2359 | @@ -3674,7 +3676,7 @@ | ||
| 2360 | printf (" bit = 0x%x\n", bit); | ||
| 2361 | } | ||
| 2362 | SYNTAX("clr1 %s0"); | ||
| 2363 | -#line 450 "rl78-decode.opc" | ||
| 2364 | +#line 452 "rl78-decode.opc" | ||
| 2365 | op0 = SFR; | ||
| 2366 | ID(mov); DM(None, op0); DB(bit); SC(0); | ||
| 2367 | if (op0 == RL78_SFR_PSW && bit == 7) | ||
| 2368 | @@ -3692,7 +3694,7 @@ | ||
| 2369 | case 0x7c: | ||
| 2370 | { | ||
| 2371 | /** 0111 0001 0bit 1100 mov1 cy, %s1 */ | ||
| 2372 | -#line 800 "rl78-decode.opc" | ||
| 2373 | +#line 802 "rl78-decode.opc" | ||
| 2374 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2375 | if (trace) | ||
| 2376 | { | ||
| 2377 | @@ -3702,7 +3704,7 @@ | ||
| 2378 | printf (" bit = 0x%x\n", bit); | ||
| 2379 | } | ||
| 2380 | SYNTAX("mov1 cy, %s1"); | ||
| 2381 | -#line 800 "rl78-decode.opc" | ||
| 2382 | +#line 802 "rl78-decode.opc" | ||
| 2383 | ID(mov); DCY(); SM(None, SFR); SB(bit); | ||
| 2384 | |||
| 2385 | } | ||
| 2386 | @@ -3717,7 +3719,7 @@ | ||
| 2387 | case 0x7d: | ||
| 2388 | { | ||
| 2389 | /** 0111 0001 0bit 1101 and1 cy, %s1 */ | ||
| 2390 | -#line 323 "rl78-decode.opc" | ||
| 2391 | +#line 325 "rl78-decode.opc" | ||
| 2392 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2393 | if (trace) | ||
| 2394 | { | ||
| 2395 | @@ -3727,7 +3729,7 @@ | ||
| 2396 | printf (" bit = 0x%x\n", bit); | ||
| 2397 | } | ||
| 2398 | SYNTAX("and1 cy, %s1"); | ||
| 2399 | -#line 323 "rl78-decode.opc" | ||
| 2400 | +#line 325 "rl78-decode.opc" | ||
| 2401 | ID(and); DCY(); SM(None, SFR); SB(bit); | ||
| 2402 | |||
| 2403 | } | ||
| 2404 | @@ -3742,7 +3744,7 @@ | ||
| 2405 | case 0x7e: | ||
| 2406 | { | ||
| 2407 | /** 0111 0001 0bit 1110 or1 cy, %s1 */ | ||
| 2408 | -#line 978 "rl78-decode.opc" | ||
| 2409 | +#line 980 "rl78-decode.opc" | ||
| 2410 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2411 | if (trace) | ||
| 2412 | { | ||
| 2413 | @@ -3752,7 +3754,7 @@ | ||
| 2414 | printf (" bit = 0x%x\n", bit); | ||
| 2415 | } | ||
| 2416 | SYNTAX("or1 cy, %s1"); | ||
| 2417 | -#line 978 "rl78-decode.opc" | ||
| 2418 | +#line 980 "rl78-decode.opc" | ||
| 2419 | ID(or); DCY(); SM(None, SFR); SB(bit); | ||
| 2420 | |||
| 2421 | } | ||
| 2422 | @@ -3767,7 +3769,7 @@ | ||
| 2423 | case 0x7f: | ||
| 2424 | { | ||
| 2425 | /** 0111 0001 0bit 1111 xor1 cy, %s1 */ | ||
| 2426 | -#line 1282 "rl78-decode.opc" | ||
| 2427 | +#line 1284 "rl78-decode.opc" | ||
| 2428 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2429 | if (trace) | ||
| 2430 | { | ||
| 2431 | @@ -3777,7 +3779,7 @@ | ||
| 2432 | printf (" bit = 0x%x\n", bit); | ||
| 2433 | } | ||
| 2434 | SYNTAX("xor1 cy, %s1"); | ||
| 2435 | -#line 1282 "rl78-decode.opc" | ||
| 2436 | +#line 1284 "rl78-decode.opc" | ||
| 2437 | ID(xor); DCY(); SM(None, SFR); SB(bit); | ||
| 2438 | |||
| 2439 | } | ||
| 2440 | @@ -3792,7 +3794,7 @@ | ||
| 2441 | op[0], op[1]); | ||
| 2442 | } | ||
| 2443 | SYNTAX("set1 cy"); | ||
| 2444 | -#line 1055 "rl78-decode.opc" | ||
| 2445 | +#line 1057 "rl78-decode.opc" | ||
| 2446 | ID(mov); DCY(); SC(1); | ||
| 2447 | |||
| 2448 | } | ||
| 2449 | @@ -3807,7 +3809,7 @@ | ||
| 2450 | case 0xf1: | ||
| 2451 | { | ||
| 2452 | /** 0111 0001 1bit 0001 mov1 %e0, cy */ | ||
| 2453 | -#line 785 "rl78-decode.opc" | ||
| 2454 | +#line 787 "rl78-decode.opc" | ||
| 2455 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2456 | if (trace) | ||
| 2457 | { | ||
| 2458 | @@ -3817,7 +3819,7 @@ | ||
| 2459 | printf (" bit = 0x%x\n", bit); | ||
| 2460 | } | ||
| 2461 | SYNTAX("mov1 %e0, cy"); | ||
| 2462 | -#line 785 "rl78-decode.opc" | ||
| 2463 | +#line 787 "rl78-decode.opc" | ||
| 2464 | ID(mov); DM(HL, 0); DB(bit); SCY(); | ||
| 2465 | |||
| 2466 | } | ||
| 2467 | @@ -3832,7 +3834,7 @@ | ||
| 2468 | case 0xf2: | ||
| 2469 | { | ||
| 2470 | /** 0111 0001 1bit 0010 set1 %e0 */ | ||
| 2471 | -#line 1049 "rl78-decode.opc" | ||
| 2472 | +#line 1051 "rl78-decode.opc" | ||
| 2473 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2474 | if (trace) | ||
| 2475 | { | ||
| 2476 | @@ -3842,7 +3844,7 @@ | ||
| 2477 | printf (" bit = 0x%x\n", bit); | ||
| 2478 | } | ||
| 2479 | SYNTAX("set1 %e0"); | ||
| 2480 | -#line 1049 "rl78-decode.opc" | ||
| 2481 | +#line 1051 "rl78-decode.opc" | ||
| 2482 | ID(mov); DM(HL, 0); DB(bit); SC(1); | ||
| 2483 | |||
| 2484 | } | ||
| 2485 | @@ -3857,7 +3859,7 @@ | ||
| 2486 | case 0xf3: | ||
| 2487 | { | ||
| 2488 | /** 0111 0001 1bit 0011 clr1 %e0 */ | ||
| 2489 | -#line 441 "rl78-decode.opc" | ||
| 2490 | +#line 443 "rl78-decode.opc" | ||
| 2491 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2492 | if (trace) | ||
| 2493 | { | ||
| 2494 | @@ -3867,7 +3869,7 @@ | ||
| 2495 | printf (" bit = 0x%x\n", bit); | ||
| 2496 | } | ||
| 2497 | SYNTAX("clr1 %e0"); | ||
| 2498 | -#line 441 "rl78-decode.opc" | ||
| 2499 | +#line 443 "rl78-decode.opc" | ||
| 2500 | ID(mov); DM(HL, 0); DB(bit); SC(0); | ||
| 2501 | |||
| 2502 | } | ||
| 2503 | @@ -3882,7 +3884,7 @@ | ||
| 2504 | case 0xf4: | ||
| 2505 | { | ||
| 2506 | /** 0111 0001 1bit 0100 mov1 cy, %e1 */ | ||
| 2507 | -#line 791 "rl78-decode.opc" | ||
| 2508 | +#line 793 "rl78-decode.opc" | ||
| 2509 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2510 | if (trace) | ||
| 2511 | { | ||
| 2512 | @@ -3892,7 +3894,7 @@ | ||
| 2513 | printf (" bit = 0x%x\n", bit); | ||
| 2514 | } | ||
| 2515 | SYNTAX("mov1 cy, %e1"); | ||
| 2516 | -#line 791 "rl78-decode.opc" | ||
| 2517 | +#line 793 "rl78-decode.opc" | ||
| 2518 | ID(mov); DCY(); SM(HL, 0); SB(bit); | ||
| 2519 | |||
| 2520 | } | ||
| 2521 | @@ -3907,7 +3909,7 @@ | ||
| 2522 | case 0xf5: | ||
| 2523 | { | ||
| 2524 | /** 0111 0001 1bit 0101 and1 cy, %e1 */ | ||
| 2525 | -#line 317 "rl78-decode.opc" | ||
| 2526 | +#line 319 "rl78-decode.opc" | ||
| 2527 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2528 | if (trace) | ||
| 2529 | { | ||
| 2530 | @@ -3917,7 +3919,7 @@ | ||
| 2531 | printf (" bit = 0x%x\n", bit); | ||
| 2532 | } | ||
| 2533 | SYNTAX("and1 cy, %e1"); | ||
| 2534 | -#line 317 "rl78-decode.opc" | ||
| 2535 | +#line 319 "rl78-decode.opc" | ||
| 2536 | ID(and); DCY(); SM(HL, 0); SB(bit); | ||
| 2537 | |||
| 2538 | } | ||
| 2539 | @@ -3932,7 +3934,7 @@ | ||
| 2540 | case 0xf6: | ||
| 2541 | { | ||
| 2542 | /** 0111 0001 1bit 0110 or1 cy, %e1 */ | ||
| 2543 | -#line 972 "rl78-decode.opc" | ||
| 2544 | +#line 974 "rl78-decode.opc" | ||
| 2545 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2546 | if (trace) | ||
| 2547 | { | ||
| 2548 | @@ -3942,7 +3944,7 @@ | ||
| 2549 | printf (" bit = 0x%x\n", bit); | ||
| 2550 | } | ||
| 2551 | SYNTAX("or1 cy, %e1"); | ||
| 2552 | -#line 972 "rl78-decode.opc" | ||
| 2553 | +#line 974 "rl78-decode.opc" | ||
| 2554 | ID(or); DCY(); SM(HL, 0); SB(bit); | ||
| 2555 | |||
| 2556 | } | ||
| 2557 | @@ -3957,7 +3959,7 @@ | ||
| 2558 | case 0xf7: | ||
| 2559 | { | ||
| 2560 | /** 0111 0001 1bit 0111 xor1 cy, %e1 */ | ||
| 2561 | -#line 1276 "rl78-decode.opc" | ||
| 2562 | +#line 1278 "rl78-decode.opc" | ||
| 2563 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2564 | if (trace) | ||
| 2565 | { | ||
| 2566 | @@ -3967,7 +3969,7 @@ | ||
| 2567 | printf (" bit = 0x%x\n", bit); | ||
| 2568 | } | ||
| 2569 | SYNTAX("xor1 cy, %e1"); | ||
| 2570 | -#line 1276 "rl78-decode.opc" | ||
| 2571 | +#line 1278 "rl78-decode.opc" | ||
| 2572 | ID(xor); DCY(); SM(HL, 0); SB(bit); | ||
| 2573 | |||
| 2574 | } | ||
| 2575 | @@ -3982,7 +3984,7 @@ | ||
| 2576 | op[0], op[1]); | ||
| 2577 | } | ||
| 2578 | SYNTAX("clr1 cy"); | ||
| 2579 | -#line 447 "rl78-decode.opc" | ||
| 2580 | +#line 449 "rl78-decode.opc" | ||
| 2581 | ID(mov); DCY(); SC(0); | ||
| 2582 | |||
| 2583 | } | ||
| 2584 | @@ -3997,7 +3999,7 @@ | ||
| 2585 | case 0xf9: | ||
| 2586 | { | ||
| 2587 | /** 0111 0001 1bit 1001 mov1 %e0, cy */ | ||
| 2588 | -#line 788 "rl78-decode.opc" | ||
| 2589 | +#line 790 "rl78-decode.opc" | ||
| 2590 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2591 | if (trace) | ||
| 2592 | { | ||
| 2593 | @@ -4007,7 +4009,7 @@ | ||
| 2594 | printf (" bit = 0x%x\n", bit); | ||
| 2595 | } | ||
| 2596 | SYNTAX("mov1 %e0, cy"); | ||
| 2597 | -#line 788 "rl78-decode.opc" | ||
| 2598 | +#line 790 "rl78-decode.opc" | ||
| 2599 | ID(mov); DR(A); DB(bit); SCY(); | ||
| 2600 | |||
| 2601 | } | ||
| 2602 | @@ -4022,7 +4024,7 @@ | ||
| 2603 | case 0xfa: | ||
| 2604 | { | ||
| 2605 | /** 0111 0001 1bit 1010 set1 %0 */ | ||
| 2606 | -#line 1052 "rl78-decode.opc" | ||
| 2607 | +#line 1054 "rl78-decode.opc" | ||
| 2608 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2609 | if (trace) | ||
| 2610 | { | ||
| 2611 | @@ -4032,7 +4034,7 @@ | ||
| 2612 | printf (" bit = 0x%x\n", bit); | ||
| 2613 | } | ||
| 2614 | SYNTAX("set1 %0"); | ||
| 2615 | -#line 1052 "rl78-decode.opc" | ||
| 2616 | +#line 1054 "rl78-decode.opc" | ||
| 2617 | ID(mov); DR(A); DB(bit); SC(1); | ||
| 2618 | |||
| 2619 | } | ||
| 2620 | @@ -4047,7 +4049,7 @@ | ||
| 2621 | case 0xfb: | ||
| 2622 | { | ||
| 2623 | /** 0111 0001 1bit 1011 clr1 %0 */ | ||
| 2624 | -#line 444 "rl78-decode.opc" | ||
| 2625 | +#line 446 "rl78-decode.opc" | ||
| 2626 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2627 | if (trace) | ||
| 2628 | { | ||
| 2629 | @@ -4057,7 +4059,7 @@ | ||
| 2630 | printf (" bit = 0x%x\n", bit); | ||
| 2631 | } | ||
| 2632 | SYNTAX("clr1 %0"); | ||
| 2633 | -#line 444 "rl78-decode.opc" | ||
| 2634 | +#line 446 "rl78-decode.opc" | ||
| 2635 | ID(mov); DR(A); DB(bit); SC(0); | ||
| 2636 | |||
| 2637 | } | ||
| 2638 | @@ -4072,7 +4074,7 @@ | ||
| 2639 | case 0xfc: | ||
| 2640 | { | ||
| 2641 | /** 0111 0001 1bit 1100 mov1 cy, %e1 */ | ||
| 2642 | -#line 794 "rl78-decode.opc" | ||
| 2643 | +#line 796 "rl78-decode.opc" | ||
| 2644 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2645 | if (trace) | ||
| 2646 | { | ||
| 2647 | @@ -4082,7 +4084,7 @@ | ||
| 2648 | printf (" bit = 0x%x\n", bit); | ||
| 2649 | } | ||
| 2650 | SYNTAX("mov1 cy, %e1"); | ||
| 2651 | -#line 794 "rl78-decode.opc" | ||
| 2652 | +#line 796 "rl78-decode.opc" | ||
| 2653 | ID(mov); DCY(); SR(A); SB(bit); | ||
| 2654 | |||
| 2655 | } | ||
| 2656 | @@ -4097,7 +4099,7 @@ | ||
| 2657 | case 0xfd: | ||
| 2658 | { | ||
| 2659 | /** 0111 0001 1bit 1101 and1 cy, %1 */ | ||
| 2660 | -#line 320 "rl78-decode.opc" | ||
| 2661 | +#line 322 "rl78-decode.opc" | ||
| 2662 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2663 | if (trace) | ||
| 2664 | { | ||
| 2665 | @@ -4107,7 +4109,7 @@ | ||
| 2666 | printf (" bit = 0x%x\n", bit); | ||
| 2667 | } | ||
| 2668 | SYNTAX("and1 cy, %1"); | ||
| 2669 | -#line 320 "rl78-decode.opc" | ||
| 2670 | +#line 322 "rl78-decode.opc" | ||
| 2671 | ID(and); DCY(); SR(A); SB(bit); | ||
| 2672 | |||
| 2673 | } | ||
| 2674 | @@ -4122,7 +4124,7 @@ | ||
| 2675 | case 0xfe: | ||
| 2676 | { | ||
| 2677 | /** 0111 0001 1bit 1110 or1 cy, %1 */ | ||
| 2678 | -#line 975 "rl78-decode.opc" | ||
| 2679 | +#line 977 "rl78-decode.opc" | ||
| 2680 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2681 | if (trace) | ||
| 2682 | { | ||
| 2683 | @@ -4132,7 +4134,7 @@ | ||
| 2684 | printf (" bit = 0x%x\n", bit); | ||
| 2685 | } | ||
| 2686 | SYNTAX("or1 cy, %1"); | ||
| 2687 | -#line 975 "rl78-decode.opc" | ||
| 2688 | +#line 977 "rl78-decode.opc" | ||
| 2689 | ID(or); DCY(); SR(A); SB(bit); | ||
| 2690 | |||
| 2691 | } | ||
| 2692 | @@ -4147,7 +4149,7 @@ | ||
| 2693 | case 0xff: | ||
| 2694 | { | ||
| 2695 | /** 0111 0001 1bit 1111 xor1 cy, %1 */ | ||
| 2696 | -#line 1279 "rl78-decode.opc" | ||
| 2697 | +#line 1281 "rl78-decode.opc" | ||
| 2698 | int bit AU = (op[1] >> 4) & 0x07; | ||
| 2699 | if (trace) | ||
| 2700 | { | ||
| 2701 | @@ -4157,7 +4159,7 @@ | ||
| 2702 | printf (" bit = 0x%x\n", bit); | ||
| 2703 | } | ||
| 2704 | SYNTAX("xor1 cy, %1"); | ||
| 2705 | -#line 1279 "rl78-decode.opc" | ||
| 2706 | +#line 1281 "rl78-decode.opc" | ||
| 2707 | ID(xor); DCY(); SR(A); SB(bit); | ||
| 2708 | |||
| 2709 | } | ||
| 2710 | @@ -4172,7 +4174,7 @@ | ||
| 2711 | op[0], op[1]); | ||
| 2712 | } | ||
| 2713 | SYNTAX("not1 cy"); | ||
| 2714 | -#line 916 "rl78-decode.opc" | ||
| 2715 | +#line 918 "rl78-decode.opc" | ||
| 2716 | ID(xor); DCY(); SC(1); | ||
| 2717 | |||
| 2718 | /*----------------------------------------------------------------------*/ | ||
| 2719 | @@ -4192,7 +4194,7 @@ | ||
| 2720 | op[0]); | ||
| 2721 | } | ||
| 2722 | SYNTAX("movw %e0, %1"); | ||
| 2723 | -#line 877 "rl78-decode.opc" | ||
| 2724 | +#line 879 "rl78-decode.opc" | ||
| 2725 | ID(mov); W(); DM(BC, IMMU(2)); SR(AX); | ||
| 2726 | |||
| 2727 | } | ||
| 2728 | @@ -4207,7 +4209,7 @@ | ||
| 2729 | op[0]); | ||
| 2730 | } | ||
| 2731 | SYNTAX("movw %0, %e1"); | ||
| 2732 | -#line 868 "rl78-decode.opc" | ||
| 2733 | +#line 870 "rl78-decode.opc" | ||
| 2734 | ID(mov); W(); DR(AX); SM(BC, IMMU(2)); | ||
| 2735 | |||
| 2736 | } | ||
| 2737 | @@ -4222,7 +4224,7 @@ | ||
| 2738 | op[0]); | ||
| 2739 | } | ||
| 2740 | SYNTAX("xor %0, #%1"); | ||
| 2741 | -#line 1271 "rl78-decode.opc" | ||
| 2742 | +#line 1273 "rl78-decode.opc" | ||
| 2743 | ID(xor); DM(None, SADDR); SC(IMMU(1)); Fz; | ||
| 2744 | |||
| 2745 | /*----------------------------------------------------------------------*/ | ||
| 2746 | @@ -4239,7 +4241,7 @@ | ||
| 2747 | op[0]); | ||
| 2748 | } | ||
| 2749 | SYNTAX("xor %0, %1"); | ||
| 2750 | -#line 1268 "rl78-decode.opc" | ||
| 2751 | +#line 1270 "rl78-decode.opc" | ||
| 2752 | ID(xor); DR(A); SM(None, SADDR); Fz; | ||
| 2753 | |||
| 2754 | } | ||
| 2755 | @@ -4254,7 +4256,7 @@ | ||
| 2756 | op[0]); | ||
| 2757 | } | ||
| 2758 | SYNTAX("xor %0, #%1"); | ||
| 2759 | -#line 1259 "rl78-decode.opc" | ||
| 2760 | +#line 1261 "rl78-decode.opc" | ||
| 2761 | ID(xor); DR(A); SC(IMMU(1)); Fz; | ||
| 2762 | |||
| 2763 | } | ||
| 2764 | @@ -4269,7 +4271,7 @@ | ||
| 2765 | op[0]); | ||
| 2766 | } | ||
| 2767 | SYNTAX("xor %0, %e1"); | ||
| 2768 | -#line 1247 "rl78-decode.opc" | ||
| 2769 | +#line 1249 "rl78-decode.opc" | ||
| 2770 | ID(xor); DR(A); SM(HL, 0); Fz; | ||
| 2771 | |||
| 2772 | } | ||
| 2773 | @@ -4284,7 +4286,7 @@ | ||
| 2774 | op[0]); | ||
| 2775 | } | ||
| 2776 | SYNTAX("xor %0, %ea1"); | ||
| 2777 | -#line 1253 "rl78-decode.opc" | ||
| 2778 | +#line 1255 "rl78-decode.opc" | ||
| 2779 | ID(xor); DR(A); SM(HL, IMMU(1)); Fz; | ||
| 2780 | |||
| 2781 | } | ||
| 2782 | @@ -4299,7 +4301,7 @@ | ||
| 2783 | op[0]); | ||
| 2784 | } | ||
| 2785 | SYNTAX("xor %0, %e!1"); | ||
| 2786 | -#line 1244 "rl78-decode.opc" | ||
| 2787 | +#line 1246 "rl78-decode.opc" | ||
| 2788 | ID(xor); DR(A); SM(None, IMMU(2)); Fz; | ||
| 2789 | |||
| 2790 | } | ||
| 2791 | @@ -4314,7 +4316,7 @@ | ||
| 2792 | case 0x87: | ||
| 2793 | { | ||
| 2794 | /** 1000 0reg inc %0 */ | ||
| 2795 | -#line 587 "rl78-decode.opc" | ||
| 2796 | +#line 589 "rl78-decode.opc" | ||
| 2797 | int reg AU = op[0] & 0x07; | ||
| 2798 | if (trace) | ||
| 2799 | { | ||
| 2800 | @@ -4324,7 +4326,7 @@ | ||
| 2801 | printf (" reg = 0x%x\n", reg); | ||
| 2802 | } | ||
| 2803 | SYNTAX("inc %0"); | ||
| 2804 | -#line 587 "rl78-decode.opc" | ||
| 2805 | +#line 589 "rl78-decode.opc" | ||
| 2806 | ID(add); DRB(reg); SC(1); Fza; | ||
| 2807 | |||
| 2808 | } | ||
| 2809 | @@ -4339,7 +4341,7 @@ | ||
| 2810 | op[0]); | ||
| 2811 | } | ||
| 2812 | SYNTAX("mov %0, %ea1"); | ||
| 2813 | -#line 666 "rl78-decode.opc" | ||
| 2814 | +#line 668 "rl78-decode.opc" | ||
| 2815 | ID(mov); DR(A); SM(SP, IMMU(1)); | ||
| 2816 | |||
| 2817 | } | ||
| 2818 | @@ -4354,7 +4356,7 @@ | ||
| 2819 | op[0]); | ||
| 2820 | } | ||
| 2821 | SYNTAX("mov %0, %e1"); | ||
| 2822 | -#line 648 "rl78-decode.opc" | ||
| 2823 | +#line 650 "rl78-decode.opc" | ||
| 2824 | ID(mov); DR(A); SM(DE, 0); | ||
| 2825 | |||
| 2826 | } | ||
| 2827 | @@ -4369,7 +4371,7 @@ | ||
| 2828 | op[0]); | ||
| 2829 | } | ||
| 2830 | SYNTAX("mov %0, %ea1"); | ||
| 2831 | -#line 651 "rl78-decode.opc" | ||
| 2832 | +#line 653 "rl78-decode.opc" | ||
| 2833 | ID(mov); DR(A); SM(DE, IMMU(1)); | ||
| 2834 | |||
| 2835 | } | ||
| 2836 | @@ -4384,7 +4386,7 @@ | ||
| 2837 | op[0]); | ||
| 2838 | } | ||
| 2839 | SYNTAX("mov %0, %e1"); | ||
| 2840 | -#line 654 "rl78-decode.opc" | ||
| 2841 | +#line 656 "rl78-decode.opc" | ||
| 2842 | ID(mov); DR(A); SM(HL, 0); | ||
| 2843 | |||
| 2844 | } | ||
| 2845 | @@ -4399,7 +4401,7 @@ | ||
| 2846 | op[0]); | ||
| 2847 | } | ||
| 2848 | SYNTAX("mov %0, %ea1"); | ||
| 2849 | -#line 657 "rl78-decode.opc" | ||
| 2850 | +#line 659 "rl78-decode.opc" | ||
| 2851 | ID(mov); DR(A); SM(HL, IMMU(1)); | ||
| 2852 | |||
| 2853 | } | ||
| 2854 | @@ -4414,7 +4416,7 @@ | ||
| 2855 | op[0]); | ||
| 2856 | } | ||
| 2857 | SYNTAX("mov %0, %1"); | ||
| 2858 | -#line 690 "rl78-decode.opc" | ||
| 2859 | +#line 692 "rl78-decode.opc" | ||
| 2860 | ID(mov); DR(A); SM(None, SADDR); | ||
| 2861 | |||
| 2862 | } | ||
| 2863 | @@ -4429,7 +4431,7 @@ | ||
| 2864 | op[0]); | ||
| 2865 | } | ||
| 2866 | SYNTAX("mov %0, %s1"); | ||
| 2867 | -#line 687 "rl78-decode.opc" | ||
| 2868 | +#line 689 "rl78-decode.opc" | ||
| 2869 | ID(mov); DR(A); SM(None, SFR); | ||
| 2870 | |||
| 2871 | } | ||
| 2872 | @@ -4444,7 +4446,7 @@ | ||
| 2873 | op[0]); | ||
| 2874 | } | ||
| 2875 | SYNTAX("mov %0, %e!1"); | ||
| 2876 | -#line 645 "rl78-decode.opc" | ||
| 2877 | +#line 647 "rl78-decode.opc" | ||
| 2878 | ID(mov); DR(A); SM(None, IMMU(2)); | ||
| 2879 | |||
| 2880 | } | ||
| 2881 | @@ -4459,7 +4461,7 @@ | ||
| 2882 | case 0x97: | ||
| 2883 | { | ||
| 2884 | /** 1001 0reg dec %0 */ | ||
| 2885 | -#line 554 "rl78-decode.opc" | ||
| 2886 | +#line 556 "rl78-decode.opc" | ||
| 2887 | int reg AU = op[0] & 0x07; | ||
| 2888 | if (trace) | ||
| 2889 | { | ||
| 2890 | @@ -4469,7 +4471,7 @@ | ||
| 2891 | printf (" reg = 0x%x\n", reg); | ||
| 2892 | } | ||
| 2893 | SYNTAX("dec %0"); | ||
| 2894 | -#line 554 "rl78-decode.opc" | ||
| 2895 | +#line 556 "rl78-decode.opc" | ||
| 2896 | ID(sub); DRB(reg); SC(1); Fza; | ||
| 2897 | |||
| 2898 | } | ||
| 2899 | @@ -4484,7 +4486,7 @@ | ||
| 2900 | op[0]); | ||
| 2901 | } | ||
| 2902 | SYNTAX("mov %a0, %1"); | ||
| 2903 | -#line 642 "rl78-decode.opc" | ||
| 2904 | +#line 644 "rl78-decode.opc" | ||
| 2905 | ID(mov); DM(SP, IMMU(1)); SR(A); | ||
| 2906 | |||
| 2907 | } | ||
| 2908 | @@ -4499,7 +4501,7 @@ | ||
| 2909 | op[0]); | ||
| 2910 | } | ||
| 2911 | SYNTAX("mov %e0, %1"); | ||
| 2912 | -#line 615 "rl78-decode.opc" | ||
| 2913 | +#line 617 "rl78-decode.opc" | ||
| 2914 | ID(mov); DM(DE, 0); SR(A); | ||
| 2915 | |||
| 2916 | } | ||
| 2917 | @@ -4514,7 +4516,7 @@ | ||
| 2918 | op[0]); | ||
| 2919 | } | ||
| 2920 | SYNTAX("mov %ea0, %1"); | ||
| 2921 | -#line 621 "rl78-decode.opc" | ||
| 2922 | +#line 623 "rl78-decode.opc" | ||
| 2923 | ID(mov); DM(DE, IMMU(1)); SR(A); | ||
| 2924 | |||
| 2925 | } | ||
| 2926 | @@ -4529,7 +4531,7 @@ | ||
| 2927 | op[0]); | ||
| 2928 | } | ||
| 2929 | SYNTAX("mov %e0, %1"); | ||
| 2930 | -#line 624 "rl78-decode.opc" | ||
| 2931 | +#line 626 "rl78-decode.opc" | ||
| 2932 | ID(mov); DM(HL, 0); SR(A); | ||
| 2933 | |||
| 2934 | } | ||
| 2935 | @@ -4544,7 +4546,7 @@ | ||
| 2936 | op[0]); | ||
| 2937 | } | ||
| 2938 | SYNTAX("mov %ea0, %1"); | ||
| 2939 | -#line 633 "rl78-decode.opc" | ||
| 2940 | +#line 635 "rl78-decode.opc" | ||
| 2941 | ID(mov); DM(HL, IMMU(1)); SR(A); | ||
| 2942 | |||
| 2943 | } | ||
| 2944 | @@ -4559,7 +4561,7 @@ | ||
| 2945 | op[0]); | ||
| 2946 | } | ||
| 2947 | SYNTAX("mov %0, %1"); | ||
| 2948 | -#line 747 "rl78-decode.opc" | ||
| 2949 | +#line 749 "rl78-decode.opc" | ||
| 2950 | ID(mov); DM(None, SADDR); SR(A); | ||
| 2951 | |||
| 2952 | } | ||
| 2953 | @@ -4574,7 +4576,7 @@ | ||
| 2954 | op[0]); | ||
| 2955 | } | ||
| 2956 | SYNTAX("mov %s0, %1"); | ||
| 2957 | -#line 780 "rl78-decode.opc" | ||
| 2958 | +#line 782 "rl78-decode.opc" | ||
| 2959 | ID(mov); DM(None, SFR); SR(A); | ||
| 2960 | |||
| 2961 | /*----------------------------------------------------------------------*/ | ||
| 2962 | @@ -4591,7 +4593,7 @@ | ||
| 2963 | op[0]); | ||
| 2964 | } | ||
| 2965 | SYNTAX("mov %e!0, %1"); | ||
| 2966 | -#line 612 "rl78-decode.opc" | ||
| 2967 | +#line 614 "rl78-decode.opc" | ||
| 2968 | ID(mov); DM(None, IMMU(2)); SR(A); | ||
| 2969 | |||
| 2970 | } | ||
| 2971 | @@ -4606,7 +4608,7 @@ | ||
| 2972 | op[0]); | ||
| 2973 | } | ||
| 2974 | SYNTAX("inc %e!0"); | ||
| 2975 | -#line 581 "rl78-decode.opc" | ||
| 2976 | +#line 583 "rl78-decode.opc" | ||
| 2977 | ID(add); DM(None, IMMU(2)); SC(1); Fza; | ||
| 2978 | |||
| 2979 | } | ||
| 2980 | @@ -4617,7 +4619,7 @@ | ||
| 2981 | case 0xa7: | ||
| 2982 | { | ||
| 2983 | /** 1010 0rg1 incw %0 */ | ||
| 2984 | -#line 601 "rl78-decode.opc" | ||
| 2985 | +#line 603 "rl78-decode.opc" | ||
| 2986 | int rg AU = (op[0] >> 1) & 0x03; | ||
| 2987 | if (trace) | ||
| 2988 | { | ||
| 2989 | @@ -4627,7 +4629,7 @@ | ||
| 2990 | printf (" rg = 0x%x\n", rg); | ||
| 2991 | } | ||
| 2992 | SYNTAX("incw %0"); | ||
| 2993 | -#line 601 "rl78-decode.opc" | ||
| 2994 | +#line 603 "rl78-decode.opc" | ||
| 2995 | ID(add); W(); DRW(rg); SC(1); | ||
| 2996 | |||
| 2997 | } | ||
| 2998 | @@ -4642,7 +4644,7 @@ | ||
| 2999 | op[0]); | ||
| 3000 | } | ||
| 3001 | SYNTAX("incw %e!0"); | ||
| 3002 | -#line 595 "rl78-decode.opc" | ||
| 3003 | +#line 597 "rl78-decode.opc" | ||
| 3004 | ID(add); W(); DM(None, IMMU(2)); SC(1); | ||
| 3005 | |||
| 3006 | } | ||
| 3007 | @@ -4657,7 +4659,7 @@ | ||
| 3008 | op[0]); | ||
| 3009 | } | ||
| 3010 | SYNTAX("inc %0"); | ||
| 3011 | -#line 590 "rl78-decode.opc" | ||
| 3012 | +#line 592 "rl78-decode.opc" | ||
| 3013 | ID(add); DM(None, SADDR); SC(1); Fza; | ||
| 3014 | |||
| 3015 | /*----------------------------------------------------------------------*/ | ||
| 3016 | @@ -4674,7 +4676,7 @@ | ||
| 3017 | op[0]); | ||
| 3018 | } | ||
| 3019 | SYNTAX("incw %0"); | ||
| 3020 | -#line 604 "rl78-decode.opc" | ||
| 3021 | +#line 606 "rl78-decode.opc" | ||
| 3022 | ID(add); W(); DM(None, SADDR); SC(1); | ||
| 3023 | |||
| 3024 | /*----------------------------------------------------------------------*/ | ||
| 3025 | @@ -4691,7 +4693,7 @@ | ||
| 3026 | op[0]); | ||
| 3027 | } | ||
| 3028 | SYNTAX("movw %0, %a1"); | ||
| 3029 | -#line 850 "rl78-decode.opc" | ||
| 3030 | +#line 852 "rl78-decode.opc" | ||
| 3031 | ID(mov); W(); DR(AX); SM(SP, IMMU(1)); | ||
| 3032 | |||
| 3033 | } | ||
| 3034 | @@ -4706,7 +4708,7 @@ | ||
| 3035 | op[0]); | ||
| 3036 | } | ||
| 3037 | SYNTAX("movw %0, %e1"); | ||
| 3038 | -#line 838 "rl78-decode.opc" | ||
| 3039 | +#line 840 "rl78-decode.opc" | ||
| 3040 | ID(mov); W(); DR(AX); SM(DE, 0); | ||
| 3041 | |||
| 3042 | } | ||
| 3043 | @@ -4721,7 +4723,7 @@ | ||
| 3044 | op[0]); | ||
| 3045 | } | ||
| 3046 | SYNTAX("movw %0, %ea1"); | ||
| 3047 | -#line 841 "rl78-decode.opc" | ||
| 3048 | +#line 843 "rl78-decode.opc" | ||
| 3049 | ID(mov); W(); DR(AX); SM(DE, IMMU(1)); | ||
| 3050 | |||
| 3051 | } | ||
| 3052 | @@ -4736,7 +4738,7 @@ | ||
| 3053 | op[0]); | ||
| 3054 | } | ||
| 3055 | SYNTAX("movw %0, %e1"); | ||
| 3056 | -#line 844 "rl78-decode.opc" | ||
| 3057 | +#line 846 "rl78-decode.opc" | ||
| 3058 | ID(mov); W(); DR(AX); SM(HL, 0); | ||
| 3059 | |||
| 3060 | } | ||
| 3061 | @@ -4751,7 +4753,7 @@ | ||
| 3062 | op[0]); | ||
| 3063 | } | ||
| 3064 | SYNTAX("movw %0, %ea1"); | ||
| 3065 | -#line 847 "rl78-decode.opc" | ||
| 3066 | +#line 849 "rl78-decode.opc" | ||
| 3067 | ID(mov); W(); DR(AX); SM(HL, IMMU(1)); | ||
| 3068 | |||
| 3069 | } | ||
| 3070 | @@ -4766,7 +4768,7 @@ | ||
| 3071 | op[0]); | ||
| 3072 | } | ||
| 3073 | SYNTAX("movw %0, %1"); | ||
| 3074 | -#line 880 "rl78-decode.opc" | ||
| 3075 | +#line 882 "rl78-decode.opc" | ||
| 3076 | ID(mov); W(); DR(AX); SM(None, SADDR); | ||
| 3077 | |||
| 3078 | } | ||
| 3079 | @@ -4781,7 +4783,7 @@ | ||
| 3080 | op[0]); | ||
| 3081 | } | ||
| 3082 | SYNTAX("movw %0, %s1"); | ||
| 3083 | -#line 883 "rl78-decode.opc" | ||
| 3084 | +#line 885 "rl78-decode.opc" | ||
| 3085 | ID(mov); W(); DR(AX); SM(None, SFR); | ||
| 3086 | |||
| 3087 | } | ||
| 3088 | @@ -4796,7 +4798,7 @@ | ||
| 3089 | op[0]); | ||
| 3090 | } | ||
| 3091 | SYNTAX("movw %0, %e!1"); | ||
| 3092 | -#line 834 "rl78-decode.opc" | ||
| 3093 | +#line 836 "rl78-decode.opc" | ||
| 3094 | ID(mov); W(); DR(AX); SM(None, IMMU(2)); | ||
| 3095 | |||
| 3096 | |||
| 3097 | @@ -4812,7 +4814,7 @@ | ||
| 3098 | op[0]); | ||
| 3099 | } | ||
| 3100 | SYNTAX("dec %e!0"); | ||
| 3101 | -#line 548 "rl78-decode.opc" | ||
| 3102 | +#line 550 "rl78-decode.opc" | ||
| 3103 | ID(sub); DM(None, IMMU(2)); SC(1); Fza; | ||
| 3104 | |||
| 3105 | } | ||
| 3106 | @@ -4823,7 +4825,7 @@ | ||
| 3107 | case 0xb7: | ||
| 3108 | { | ||
| 3109 | /** 1011 0rg1 decw %0 */ | ||
| 3110 | -#line 568 "rl78-decode.opc" | ||
| 3111 | +#line 570 "rl78-decode.opc" | ||
| 3112 | int rg AU = (op[0] >> 1) & 0x03; | ||
| 3113 | if (trace) | ||
| 3114 | { | ||
| 3115 | @@ -4833,7 +4835,7 @@ | ||
| 3116 | printf (" rg = 0x%x\n", rg); | ||
| 3117 | } | ||
| 3118 | SYNTAX("decw %0"); | ||
| 3119 | -#line 568 "rl78-decode.opc" | ||
| 3120 | +#line 570 "rl78-decode.opc" | ||
| 3121 | ID(sub); W(); DRW(rg); SC(1); | ||
| 3122 | |||
| 3123 | } | ||
| 3124 | @@ -4848,7 +4850,7 @@ | ||
| 3125 | op[0]); | ||
| 3126 | } | ||
| 3127 | SYNTAX("decw %e!0"); | ||
| 3128 | -#line 562 "rl78-decode.opc" | ||
| 3129 | +#line 564 "rl78-decode.opc" | ||
| 3130 | ID(sub); W(); DM(None, IMMU(2)); SC(1); | ||
| 3131 | |||
| 3132 | } | ||
| 3133 | @@ -4863,7 +4865,7 @@ | ||
| 3134 | op[0]); | ||
| 3135 | } | ||
| 3136 | SYNTAX("dec %0"); | ||
| 3137 | -#line 557 "rl78-decode.opc" | ||
| 3138 | +#line 559 "rl78-decode.opc" | ||
| 3139 | ID(sub); DM(None, SADDR); SC(1); Fza; | ||
| 3140 | |||
| 3141 | /*----------------------------------------------------------------------*/ | ||
| 3142 | @@ -4880,7 +4882,7 @@ | ||
| 3143 | op[0]); | ||
| 3144 | } | ||
| 3145 | SYNTAX("decw %0"); | ||
| 3146 | -#line 571 "rl78-decode.opc" | ||
| 3147 | +#line 573 "rl78-decode.opc" | ||
| 3148 | ID(sub); W(); DM(None, SADDR); SC(1); | ||
| 3149 | |||
| 3150 | /*----------------------------------------------------------------------*/ | ||
| 3151 | @@ -4897,7 +4899,7 @@ | ||
| 3152 | op[0]); | ||
| 3153 | } | ||
| 3154 | SYNTAX("movw %a0, %1"); | ||
| 3155 | -#line 831 "rl78-decode.opc" | ||
| 3156 | +#line 833 "rl78-decode.opc" | ||
| 3157 | ID(mov); W(); DM(SP, IMMU(1)); SR(AX); | ||
| 3158 | |||
| 3159 | } | ||
| 3160 | @@ -4912,7 +4914,7 @@ | ||
| 3161 | op[0]); | ||
| 3162 | } | ||
| 3163 | SYNTAX("movw %e0, %1"); | ||
| 3164 | -#line 819 "rl78-decode.opc" | ||
| 3165 | +#line 821 "rl78-decode.opc" | ||
| 3166 | ID(mov); W(); DM(DE, 0); SR(AX); | ||
| 3167 | |||
| 3168 | } | ||
| 3169 | @@ -4927,7 +4929,7 @@ | ||
| 3170 | op[0]); | ||
| 3171 | } | ||
| 3172 | SYNTAX("movw %ea0, %1"); | ||
| 3173 | -#line 822 "rl78-decode.opc" | ||
| 3174 | +#line 824 "rl78-decode.opc" | ||
| 3175 | ID(mov); W(); DM(DE, IMMU(1)); SR(AX); | ||
| 3176 | |||
| 3177 | } | ||
| 3178 | @@ -4942,7 +4944,7 @@ | ||
| 3179 | op[0]); | ||
| 3180 | } | ||
| 3181 | SYNTAX("movw %e0, %1"); | ||
| 3182 | -#line 825 "rl78-decode.opc" | ||
| 3183 | +#line 827 "rl78-decode.opc" | ||
| 3184 | ID(mov); W(); DM(HL, 0); SR(AX); | ||
| 3185 | |||
| 3186 | } | ||
| 3187 | @@ -4957,7 +4959,7 @@ | ||
| 3188 | op[0]); | ||
| 3189 | } | ||
| 3190 | SYNTAX("movw %ea0, %1"); | ||
| 3191 | -#line 828 "rl78-decode.opc" | ||
| 3192 | +#line 830 "rl78-decode.opc" | ||
| 3193 | ID(mov); W(); DM(HL, IMMU(1)); SR(AX); | ||
| 3194 | |||
| 3195 | } | ||
| 3196 | @@ -4972,7 +4974,7 @@ | ||
| 3197 | op[0]); | ||
| 3198 | } | ||
| 3199 | SYNTAX("movw %0, %1"); | ||
| 3200 | -#line 895 "rl78-decode.opc" | ||
| 3201 | +#line 897 "rl78-decode.opc" | ||
| 3202 | ID(mov); W(); DM(None, SADDR); SR(AX); | ||
| 3203 | |||
| 3204 | } | ||
| 3205 | @@ -4987,7 +4989,7 @@ | ||
| 3206 | op[0]); | ||
| 3207 | } | ||
| 3208 | SYNTAX("movw %s0, %1"); | ||
| 3209 | -#line 901 "rl78-decode.opc" | ||
| 3210 | +#line 903 "rl78-decode.opc" | ||
| 3211 | ID(mov); W(); DM(None, SFR); SR(AX); | ||
| 3212 | |||
| 3213 | /*----------------------------------------------------------------------*/ | ||
| 3214 | @@ -5004,7 +5006,7 @@ | ||
| 3215 | op[0]); | ||
| 3216 | } | ||
| 3217 | SYNTAX("movw %e!0, %1"); | ||
| 3218 | -#line 816 "rl78-decode.opc" | ||
| 3219 | +#line 818 "rl78-decode.opc" | ||
| 3220 | ID(mov); W(); DM(None, IMMU(2)); SR(AX); | ||
| 3221 | |||
| 3222 | } | ||
| 3223 | @@ -5015,7 +5017,7 @@ | ||
| 3224 | case 0xc6: | ||
| 3225 | { | ||
| 3226 | /** 1100 0rg0 pop %0 */ | ||
| 3227 | -#line 986 "rl78-decode.opc" | ||
| 3228 | +#line 988 "rl78-decode.opc" | ||
| 3229 | int rg AU = (op[0] >> 1) & 0x03; | ||
| 3230 | if (trace) | ||
| 3231 | { | ||
| 3232 | @@ -5025,7 +5027,7 @@ | ||
| 3233 | printf (" rg = 0x%x\n", rg); | ||
| 3234 | } | ||
| 3235 | SYNTAX("pop %0"); | ||
| 3236 | -#line 986 "rl78-decode.opc" | ||
| 3237 | +#line 988 "rl78-decode.opc" | ||
| 3238 | ID(mov); W(); DRW(rg); SPOP(); | ||
| 3239 | |||
| 3240 | } | ||
| 3241 | @@ -5036,7 +5038,7 @@ | ||
| 3242 | case 0xc7: | ||
| 3243 | { | ||
| 3244 | /** 1100 0rg1 push %1 */ | ||
| 3245 | -#line 994 "rl78-decode.opc" | ||
| 3246 | +#line 996 "rl78-decode.opc" | ||
| 3247 | int rg AU = (op[0] >> 1) & 0x03; | ||
| 3248 | if (trace) | ||
| 3249 | { | ||
| 3250 | @@ -5046,7 +5048,7 @@ | ||
| 3251 | printf (" rg = 0x%x\n", rg); | ||
| 3252 | } | ||
| 3253 | SYNTAX("push %1"); | ||
| 3254 | -#line 994 "rl78-decode.opc" | ||
| 3255 | +#line 996 "rl78-decode.opc" | ||
| 3256 | ID(mov); W(); DPUSH(); SRW(rg); | ||
| 3257 | |||
| 3258 | } | ||
| 3259 | @@ -5061,7 +5063,7 @@ | ||
| 3260 | op[0]); | ||
| 3261 | } | ||
| 3262 | SYNTAX("mov %a0, #%1"); | ||
| 3263 | -#line 639 "rl78-decode.opc" | ||
| 3264 | +#line 641 "rl78-decode.opc" | ||
| 3265 | ID(mov); DM(SP, IMMU(1)); SC(IMMU(1)); | ||
| 3266 | |||
| 3267 | } | ||
| 3268 | @@ -5076,7 +5078,7 @@ | ||
| 3269 | op[0]); | ||
| 3270 | } | ||
| 3271 | SYNTAX("movw %0, #%1"); | ||
| 3272 | -#line 892 "rl78-decode.opc" | ||
| 3273 | +#line 894 "rl78-decode.opc" | ||
| 3274 | ID(mov); W(); DM(None, SADDR); SC(IMMU(2)); | ||
| 3275 | |||
| 3276 | } | ||
| 3277 | @@ -5091,7 +5093,7 @@ | ||
| 3278 | op[0]); | ||
| 3279 | } | ||
| 3280 | SYNTAX("mov %ea0, #%1"); | ||
| 3281 | -#line 618 "rl78-decode.opc" | ||
| 3282 | +#line 620 "rl78-decode.opc" | ||
| 3283 | ID(mov); DM(DE, IMMU(1)); SC(IMMU(1)); | ||
| 3284 | |||
| 3285 | } | ||
| 3286 | @@ -5106,7 +5108,7 @@ | ||
| 3287 | op[0]); | ||
| 3288 | } | ||
| 3289 | SYNTAX("movw %s0, #%1"); | ||
| 3290 | -#line 898 "rl78-decode.opc" | ||
| 3291 | +#line 900 "rl78-decode.opc" | ||
| 3292 | ID(mov); W(); DM(None, SFR); SC(IMMU(2)); | ||
| 3293 | |||
| 3294 | } | ||
| 3295 | @@ -5121,7 +5123,7 @@ | ||
| 3296 | op[0]); | ||
| 3297 | } | ||
| 3298 | SYNTAX("mov %ea0, #%1"); | ||
| 3299 | -#line 630 "rl78-decode.opc" | ||
| 3300 | +#line 632 "rl78-decode.opc" | ||
| 3301 | ID(mov); DM(HL, IMMU(1)); SC(IMMU(1)); | ||
| 3302 | |||
| 3303 | } | ||
| 3304 | @@ -5136,7 +5138,7 @@ | ||
| 3305 | op[0]); | ||
| 3306 | } | ||
| 3307 | SYNTAX("mov %0, #%1"); | ||
| 3308 | -#line 744 "rl78-decode.opc" | ||
| 3309 | +#line 746 "rl78-decode.opc" | ||
| 3310 | ID(mov); DM(None, SADDR); SC(IMMU(1)); | ||
| 3311 | |||
| 3312 | } | ||
| 3313 | @@ -5151,7 +5153,7 @@ | ||
| 3314 | op[0]); | ||
| 3315 | } | ||
| 3316 | SYNTAX("mov %s0, #%1"); | ||
| 3317 | -#line 750 "rl78-decode.opc" | ||
| 3318 | +#line 752 "rl78-decode.opc" | ||
| 3319 | op0 = SFR; | ||
| 3320 | op1 = IMMU(1); | ||
| 3321 | ID(mov); DM(None, op0); SC(op1); | ||
| 3322 | @@ -5193,7 +5195,7 @@ | ||
| 3323 | op[0]); | ||
| 3324 | } | ||
| 3325 | SYNTAX("mov %e!0, #%1"); | ||
| 3326 | -#line 609 "rl78-decode.opc" | ||
| 3327 | +#line 611 "rl78-decode.opc" | ||
| 3328 | ID(mov); DM(None, IMMU(2)); SC(IMMU(1)); | ||
| 3329 | |||
| 3330 | } | ||
| 3331 | @@ -5204,7 +5206,7 @@ | ||
| 3332 | case 0xd3: | ||
| 3333 | { | ||
| 3334 | /** 1101 00rg cmp0 %0 */ | ||
| 3335 | -#line 518 "rl78-decode.opc" | ||
| 3336 | +#line 520 "rl78-decode.opc" | ||
| 3337 | int rg AU = op[0] & 0x03; | ||
| 3338 | if (trace) | ||
| 3339 | { | ||
| 3340 | @@ -5214,7 +5216,7 @@ | ||
| 3341 | printf (" rg = 0x%x\n", rg); | ||
| 3342 | } | ||
| 3343 | SYNTAX("cmp0 %0"); | ||
| 3344 | -#line 518 "rl78-decode.opc" | ||
| 3345 | +#line 520 "rl78-decode.opc" | ||
| 3346 | ID(cmp); DRB(rg); SC(0); Fzac; | ||
| 3347 | |||
| 3348 | } | ||
| 3349 | @@ -5229,7 +5231,7 @@ | ||
| 3350 | op[0]); | ||
| 3351 | } | ||
| 3352 | SYNTAX("cmp0 %0"); | ||
| 3353 | -#line 521 "rl78-decode.opc" | ||
| 3354 | +#line 523 "rl78-decode.opc" | ||
| 3355 | ID(cmp); DM(None, SADDR); SC(0); Fzac; | ||
| 3356 | |||
| 3357 | /*----------------------------------------------------------------------*/ | ||
| 3358 | @@ -5246,7 +5248,7 @@ | ||
| 3359 | op[0]); | ||
| 3360 | } | ||
| 3361 | SYNTAX("cmp0 %e!0"); | ||
| 3362 | -#line 515 "rl78-decode.opc" | ||
| 3363 | +#line 517 "rl78-decode.opc" | ||
| 3364 | ID(cmp); DM(None, IMMU(2)); SC(0); Fzac; | ||
| 3365 | |||
| 3366 | } | ||
| 3367 | @@ -5261,7 +5263,7 @@ | ||
| 3368 | op[0]); | ||
| 3369 | } | ||
| 3370 | SYNTAX("mulu x"); | ||
| 3371 | -#line 906 "rl78-decode.opc" | ||
| 3372 | +#line 908 "rl78-decode.opc" | ||
| 3373 | ID(mulu); | ||
| 3374 | |||
| 3375 | /*----------------------------------------------------------------------*/ | ||
| 3376 | @@ -5278,7 +5280,7 @@ | ||
| 3377 | op[0]); | ||
| 3378 | } | ||
| 3379 | SYNTAX("ret"); | ||
| 3380 | -#line 1002 "rl78-decode.opc" | ||
| 3381 | +#line 1004 "rl78-decode.opc" | ||
| 3382 | ID(ret); | ||
| 3383 | |||
| 3384 | } | ||
| 3385 | @@ -5293,7 +5295,7 @@ | ||
| 3386 | op[0]); | ||
| 3387 | } | ||
| 3388 | SYNTAX("mov %0, %1"); | ||
| 3389 | -#line 711 "rl78-decode.opc" | ||
| 3390 | +#line 713 "rl78-decode.opc" | ||
| 3391 | ID(mov); DR(X); SM(None, SADDR); | ||
| 3392 | |||
| 3393 | } | ||
| 3394 | @@ -5308,7 +5310,7 @@ | ||
| 3395 | op[0]); | ||
| 3396 | } | ||
| 3397 | SYNTAX("mov %0, %e!1"); | ||
| 3398 | -#line 708 "rl78-decode.opc" | ||
| 3399 | +#line 710 "rl78-decode.opc" | ||
| 3400 | ID(mov); DR(X); SM(None, IMMU(2)); | ||
| 3401 | |||
| 3402 | } | ||
| 3403 | @@ -5318,7 +5320,7 @@ | ||
| 3404 | case 0xfa: | ||
| 3405 | { | ||
| 3406 | /** 11ra 1010 movw %0, %1 */ | ||
| 3407 | -#line 889 "rl78-decode.opc" | ||
| 3408 | +#line 891 "rl78-decode.opc" | ||
| 3409 | int ra AU = (op[0] >> 4) & 0x03; | ||
| 3410 | if (trace) | ||
| 3411 | { | ||
| 3412 | @@ -5328,7 +5330,7 @@ | ||
| 3413 | printf (" ra = 0x%x\n", ra); | ||
| 3414 | } | ||
| 3415 | SYNTAX("movw %0, %1"); | ||
| 3416 | -#line 889 "rl78-decode.opc" | ||
| 3417 | +#line 891 "rl78-decode.opc" | ||
| 3418 | ID(mov); W(); DRW(ra); SM(None, SADDR); | ||
| 3419 | |||
| 3420 | } | ||
| 3421 | @@ -5338,7 +5340,7 @@ | ||
| 3422 | case 0xfb: | ||
| 3423 | { | ||
| 3424 | /** 11ra 1011 movw %0, %es!1 */ | ||
| 3425 | -#line 886 "rl78-decode.opc" | ||
| 3426 | +#line 888 "rl78-decode.opc" | ||
| 3427 | int ra AU = (op[0] >> 4) & 0x03; | ||
| 3428 | if (trace) | ||
| 3429 | { | ||
| 3430 | @@ -5348,7 +5350,7 @@ | ||
| 3431 | printf (" ra = 0x%x\n", ra); | ||
| 3432 | } | ||
| 3433 | SYNTAX("movw %0, %es!1"); | ||
| 3434 | -#line 886 "rl78-decode.opc" | ||
| 3435 | +#line 888 "rl78-decode.opc" | ||
| 3436 | ID(mov); W(); DRW(ra); SM(None, IMMU(2)); | ||
| 3437 | |||
| 3438 | } | ||
| 3439 | @@ -5363,7 +5365,7 @@ | ||
| 3440 | op[0]); | ||
| 3441 | } | ||
| 3442 | SYNTAX("bc $%a0"); | ||
| 3443 | -#line 334 "rl78-decode.opc" | ||
| 3444 | +#line 336 "rl78-decode.opc" | ||
| 3445 | ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(C); | ||
| 3446 | |||
| 3447 | } | ||
| 3448 | @@ -5378,7 +5380,7 @@ | ||
| 3449 | op[0]); | ||
| 3450 | } | ||
| 3451 | SYNTAX("bz $%a0"); | ||
| 3452 | -#line 346 "rl78-decode.opc" | ||
| 3453 | +#line 348 "rl78-decode.opc" | ||
| 3454 | ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(Z); | ||
| 3455 | |||
| 3456 | } | ||
| 3457 | @@ -5393,7 +5395,7 @@ | ||
| 3458 | op[0]); | ||
| 3459 | } | ||
| 3460 | SYNTAX("bnc $%a0"); | ||
| 3461 | -#line 337 "rl78-decode.opc" | ||
| 3462 | +#line 339 "rl78-decode.opc" | ||
| 3463 | ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NC); | ||
| 3464 | |||
| 3465 | } | ||
| 3466 | @@ -5408,7 +5410,7 @@ | ||
| 3467 | op[0]); | ||
| 3468 | } | ||
| 3469 | SYNTAX("bnz $%a0"); | ||
| 3470 | -#line 349 "rl78-decode.opc" | ||
| 3471 | +#line 351 "rl78-decode.opc" | ||
| 3472 | ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NZ); | ||
| 3473 | |||
| 3474 | /*----------------------------------------------------------------------*/ | ||
| 3475 | @@ -5421,7 +5423,7 @@ | ||
| 3476 | case 0xe3: | ||
| 3477 | { | ||
| 3478 | /** 1110 00rg oneb %0 */ | ||
| 3479 | -#line 924 "rl78-decode.opc" | ||
| 3480 | +#line 926 "rl78-decode.opc" | ||
| 3481 | int rg AU = op[0] & 0x03; | ||
| 3482 | if (trace) | ||
| 3483 | { | ||
| 3484 | @@ -5431,7 +5433,7 @@ | ||
| 3485 | printf (" rg = 0x%x\n", rg); | ||
| 3486 | } | ||
| 3487 | SYNTAX("oneb %0"); | ||
| 3488 | -#line 924 "rl78-decode.opc" | ||
| 3489 | +#line 926 "rl78-decode.opc" | ||
| 3490 | ID(mov); DRB(rg); SC(1); | ||
| 3491 | |||
| 3492 | } | ||
| 3493 | @@ -5446,7 +5448,7 @@ | ||
| 3494 | op[0]); | ||
| 3495 | } | ||
| 3496 | SYNTAX("oneb %0"); | ||
| 3497 | -#line 927 "rl78-decode.opc" | ||
| 3498 | +#line 929 "rl78-decode.opc" | ||
| 3499 | ID(mov); DM(None, SADDR); SC(1); | ||
| 3500 | |||
| 3501 | /*----------------------------------------------------------------------*/ | ||
| 3502 | @@ -5463,7 +5465,7 @@ | ||
| 3503 | op[0]); | ||
| 3504 | } | ||
| 3505 | SYNTAX("oneb %e!0"); | ||
| 3506 | -#line 921 "rl78-decode.opc" | ||
| 3507 | +#line 923 "rl78-decode.opc" | ||
| 3508 | ID(mov); DM(None, IMMU(2)); SC(1); | ||
| 3509 | |||
| 3510 | } | ||
| 3511 | @@ -5478,7 +5480,7 @@ | ||
| 3512 | op[0]); | ||
| 3513 | } | ||
| 3514 | SYNTAX("onew %0"); | ||
| 3515 | -#line 932 "rl78-decode.opc" | ||
| 3516 | +#line 934 "rl78-decode.opc" | ||
| 3517 | ID(mov); DR(AX); SC(1); | ||
| 3518 | |||
| 3519 | } | ||
| 3520 | @@ -5493,7 +5495,7 @@ | ||
| 3521 | op[0]); | ||
| 3522 | } | ||
| 3523 | SYNTAX("onew %0"); | ||
| 3524 | -#line 935 "rl78-decode.opc" | ||
| 3525 | +#line 937 "rl78-decode.opc" | ||
| 3526 | ID(mov); DR(BC); SC(1); | ||
| 3527 | |||
| 3528 | /*----------------------------------------------------------------------*/ | ||
| 3529 | @@ -5510,7 +5512,7 @@ | ||
| 3530 | op[0]); | ||
| 3531 | } | ||
| 3532 | SYNTAX("mov %0, %1"); | ||
| 3533 | -#line 699 "rl78-decode.opc" | ||
| 3534 | +#line 701 "rl78-decode.opc" | ||
| 3535 | ID(mov); DR(B); SM(None, SADDR); | ||
| 3536 | |||
| 3537 | } | ||
| 3538 | @@ -5525,7 +5527,7 @@ | ||
| 3539 | op[0]); | ||
| 3540 | } | ||
| 3541 | SYNTAX("mov %0, %e!1"); | ||
| 3542 | -#line 693 "rl78-decode.opc" | ||
| 3543 | +#line 695 "rl78-decode.opc" | ||
| 3544 | ID(mov); DR(B); SM(None, IMMU(2)); | ||
| 3545 | |||
| 3546 | } | ||
| 3547 | @@ -5540,7 +5542,7 @@ | ||
| 3548 | op[0]); | ||
| 3549 | } | ||
| 3550 | SYNTAX("br !%!a0"); | ||
| 3551 | -#line 368 "rl78-decode.opc" | ||
| 3552 | +#line 370 "rl78-decode.opc" | ||
| 3553 | ID(branch); DC(IMMU(3)); | ||
| 3554 | |||
| 3555 | } | ||
| 3556 | @@ -5555,7 +5557,7 @@ | ||
| 3557 | op[0]); | ||
| 3558 | } | ||
| 3559 | SYNTAX("br %!a0"); | ||
| 3560 | -#line 371 "rl78-decode.opc" | ||
| 3561 | +#line 373 "rl78-decode.opc" | ||
| 3562 | ID(branch); DC(IMMU(2)); | ||
| 3563 | |||
| 3564 | } | ||
| 3565 | @@ -5570,7 +5572,7 @@ | ||
| 3566 | op[0]); | ||
| 3567 | } | ||
| 3568 | SYNTAX("br $%!a0"); | ||
| 3569 | -#line 374 "rl78-decode.opc" | ||
| 3570 | +#line 376 "rl78-decode.opc" | ||
| 3571 | ID(branch); DC(pc+IMMS(2)+3); | ||
| 3572 | |||
| 3573 | } | ||
| 3574 | @@ -5585,7 +5587,7 @@ | ||
| 3575 | op[0]); | ||
| 3576 | } | ||
| 3577 | SYNTAX("br $%a0"); | ||
| 3578 | -#line 377 "rl78-decode.opc" | ||
| 3579 | +#line 379 "rl78-decode.opc" | ||
| 3580 | ID(branch); DC(pc+IMMS(1)+2); | ||
| 3581 | |||
| 3582 | } | ||
| 3583 | @@ -5596,7 +5598,7 @@ | ||
| 3584 | case 0xf3: | ||
| 3585 | { | ||
| 3586 | /** 1111 00rg clrb %0 */ | ||
| 3587 | -#line 464 "rl78-decode.opc" | ||
| 3588 | +#line 466 "rl78-decode.opc" | ||
| 3589 | int rg AU = op[0] & 0x03; | ||
| 3590 | if (trace) | ||
| 3591 | { | ||
| 3592 | @@ -5606,7 +5608,7 @@ | ||
| 3593 | printf (" rg = 0x%x\n", rg); | ||
| 3594 | } | ||
| 3595 | SYNTAX("clrb %0"); | ||
| 3596 | -#line 464 "rl78-decode.opc" | ||
| 3597 | +#line 466 "rl78-decode.opc" | ||
| 3598 | ID(mov); DRB(rg); SC(0); | ||
| 3599 | |||
| 3600 | } | ||
| 3601 | @@ -5621,7 +5623,7 @@ | ||
| 3602 | op[0]); | ||
| 3603 | } | ||
| 3604 | SYNTAX("clrb %0"); | ||
| 3605 | -#line 467 "rl78-decode.opc" | ||
| 3606 | +#line 469 "rl78-decode.opc" | ||
| 3607 | ID(mov); DM(None, SADDR); SC(0); | ||
| 3608 | |||
| 3609 | /*----------------------------------------------------------------------*/ | ||
| 3610 | @@ -5638,7 +5640,7 @@ | ||
| 3611 | op[0]); | ||
| 3612 | } | ||
| 3613 | SYNTAX("clrb %e!0"); | ||
| 3614 | -#line 461 "rl78-decode.opc" | ||
| 3615 | +#line 463 "rl78-decode.opc" | ||
| 3616 | ID(mov); DM(None, IMMU(2)); SC(0); | ||
| 3617 | |||
| 3618 | } | ||
| 3619 | @@ -5653,7 +5655,7 @@ | ||
| 3620 | op[0]); | ||
| 3621 | } | ||
| 3622 | SYNTAX("clrw %0"); | ||
| 3623 | -#line 472 "rl78-decode.opc" | ||
| 3624 | +#line 474 "rl78-decode.opc" | ||
| 3625 | ID(mov); DR(AX); SC(0); | ||
| 3626 | |||
| 3627 | } | ||
| 3628 | @@ -5668,7 +5670,7 @@ | ||
| 3629 | op[0]); | ||
| 3630 | } | ||
| 3631 | SYNTAX("clrw %0"); | ||
| 3632 | -#line 475 "rl78-decode.opc" | ||
| 3633 | +#line 477 "rl78-decode.opc" | ||
| 3634 | ID(mov); DR(BC); SC(0); | ||
| 3635 | |||
| 3636 | /*----------------------------------------------------------------------*/ | ||
| 3637 | @@ -5685,7 +5687,7 @@ | ||
| 3638 | op[0]); | ||
| 3639 | } | ||
| 3640 | SYNTAX("mov %0, %1"); | ||
| 3641 | -#line 705 "rl78-decode.opc" | ||
| 3642 | +#line 707 "rl78-decode.opc" | ||
| 3643 | ID(mov); DR(C); SM(None, SADDR); | ||
| 3644 | |||
| 3645 | } | ||
| 3646 | @@ -5700,7 +5702,7 @@ | ||
| 3647 | op[0]); | ||
| 3648 | } | ||
| 3649 | SYNTAX("mov %0, %e!1"); | ||
| 3650 | -#line 702 "rl78-decode.opc" | ||
| 3651 | +#line 704 "rl78-decode.opc" | ||
| 3652 | ID(mov); DR(C); SM(None, IMMU(2)); | ||
| 3653 | |||
| 3654 | } | ||
| 3655 | @@ -5715,7 +5717,7 @@ | ||
| 3656 | op[0]); | ||
| 3657 | } | ||
| 3658 | SYNTAX("call !%!a0"); | ||
| 3659 | -#line 421 "rl78-decode.opc" | ||
| 3660 | +#line 423 "rl78-decode.opc" | ||
| 3661 | ID(call); DC(IMMU(3)); | ||
| 3662 | |||
| 3663 | } | ||
| 3664 | @@ -5730,7 +5732,7 @@ | ||
| 3665 | op[0]); | ||
| 3666 | } | ||
| 3667 | SYNTAX("call %!a0"); | ||
| 3668 | -#line 424 "rl78-decode.opc" | ||
| 3669 | +#line 426 "rl78-decode.opc" | ||
| 3670 | ID(call); DC(IMMU(2)); | ||
| 3671 | |||
| 3672 | } | ||
| 3673 | @@ -5745,7 +5747,7 @@ | ||
| 3674 | op[0]); | ||
| 3675 | } | ||
| 3676 | SYNTAX("call $%!a0"); | ||
| 3677 | -#line 427 "rl78-decode.opc" | ||
| 3678 | +#line 429 "rl78-decode.opc" | ||
| 3679 | ID(call); DC(pc+IMMS(2)+3); | ||
| 3680 | |||
| 3681 | } | ||
| 3682 | @@ -5760,13 +5762,13 @@ | ||
| 3683 | op[0]); | ||
| 3684 | } | ||
| 3685 | SYNTAX("brk1"); | ||
| 3686 | -#line 385 "rl78-decode.opc" | ||
| 3687 | +#line 387 "rl78-decode.opc" | ||
| 3688 | ID(break); | ||
| 3689 | |||
| 3690 | } | ||
| 3691 | break; | ||
| 3692 | } | ||
| 3693 | -#line 1290 "rl78-decode.opc" | ||
| 3694 | +#line 1292 "rl78-decode.opc" | ||
| 3695 | |||
| 3696 | return rl78->n_bytes; | ||
| 3697 | } | ||
| 3698 | Index: git/opcodes/rl78-decode.opc | ||
| 3699 | =================================================================== | ||
| 3700 | --- git.orig/opcodes/rl78-decode.opc 2017-09-21 13:14:42.256835775 +0530 | ||
| 3701 | +++ git/opcodes/rl78-decode.opc 2017-09-21 13:14:49.444888350 +0530 | ||
| 3702 | @@ -50,7 +50,9 @@ | ||
| 3703 | #define W() rl78->size = RL78_Word | ||
| 3704 | |||
| 3705 | #define AU ATTRIBUTE_UNUSED | ||
| 3706 | -#define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr)) | ||
| 3707 | + | ||
| 3708 | +#define OP_BUF_LEN 20 | ||
| 3709 | +#define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0) | ||
| 3710 | #define B ((unsigned long) GETBYTE()) | ||
| 3711 | |||
| 3712 | #define SYNTAX(x) rl78->syntax = x | ||
| 3713 | @@ -168,7 +170,7 @@ | ||
| 3714 | RL78_Dis_Isa isa) | ||
| 3715 | { | ||
| 3716 | LocalData lds, * ld = &lds; | ||
| 3717 | - unsigned char op_buf[20] = {0}; | ||
| 3718 | + unsigned char op_buf[OP_BUF_LEN] = {0}; | ||
| 3719 | unsigned char *op = op_buf; | ||
| 3720 | int op0, op1; | ||
| 3721 | |||
| 3722 | Index: git/opcodes/ChangeLog | ||
| 3723 | =================================================================== | ||
| 3724 | --- git.orig/opcodes/ChangeLog 2017-09-21 13:14:41.676831533 +0530 | ||
| 3725 | +++ git/opcodes/ChangeLog 2017-09-21 13:16:51.065779064 +0530 | ||
| 3726 | @@ -1,3 +1,12 @@ | ||
| 3727 | +2017-06-15 Nick Clifton <nickc@redhat.com> | ||
| 3728 | + | ||
| 3729 | + PR binutils/21588 | ||
| 3730 | + * rl78-decode.opc (OP_BUF_LEN): Define. | ||
| 3731 | + (GETBYTE): Check for the index exceeding OP_BUF_LEN. | ||
| 3732 | + (rl78_decode_opcode): Use OP_BUF_LEN as the length of the op_buf | ||
| 3733 | + array. | ||
| 3734 | + * rl78-decode.c: Regenerate. | ||
| 3735 | + | ||
| 3736 | 2016-08-03 Tristan Gingold <gingold@adacore.com> | ||
| 3737 | |||
| 3738 | * configure: Regenerate. | ||
