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