Previous 199869 Revisions Next

r33757 Tuesday 9th December, 2014 at 10:06:16 UTC by David Haywood
more arcompact (nw)
[src/emu/cpu/arcompact]arcompactdasm.c

trunk/src/emu/cpu/arcompact/arcompactdasm.c
r242268r242269
295295int arcompact_handle05_3f_dasm(DASM_OPS_32);
296296
297297
298int arcompact_handle0c_00_dasm(DASM_OPS_16);
299int arcompact_handle0c_01_dasm(DASM_OPS_16);
300int arcompact_handle0c_02_dasm(DASM_OPS_16);
301int arcompact_handle0c_03_dasm(DASM_OPS_16);
298302
303int arcompact_handle0d_00_dasm(DASM_OPS_16);
304int arcompact_handle0d_01_dasm(DASM_OPS_16);
305int arcompact_handle0d_02_dasm(DASM_OPS_16);
306int arcompact_handle0d_03_dasm(DASM_OPS_16);
299307
300308int arcompact_handle0e_00_dasm(DASM_OPS_16);
301309int arcompact_handle0e_01_dasm(DASM_OPS_16);
302310int arcompact_handle0e_02_dasm(DASM_OPS_16);
303311int arcompact_handle0e_03_dasm(DASM_OPS_16);
304312
313int arcompact_handle17_00_dasm(DASM_OPS_16);
314int arcompact_handle17_01_dasm(DASM_OPS_16);
315int arcompact_handle17_02_dasm(DASM_OPS_16);
316int arcompact_handle17_03_dasm(DASM_OPS_16);
317int arcompact_handle17_04_dasm(DASM_OPS_16);
318int arcompact_handle17_05_dasm(DASM_OPS_16);
319int arcompact_handle17_06_dasm(DASM_OPS_16);
320int arcompact_handle17_07_dasm(DASM_OPS_16);
321
305322int arcompact_handle18_00_dasm(DASM_OPS_16);
306323int arcompact_handle18_01_dasm(DASM_OPS_16);
307324int arcompact_handle18_02_dasm(DASM_OPS_16);
r242268r242269
13321349
13331350int arcompact_handle0c_dasm(DASM_OPS_16)
13341351{
1335   print("Load/Add reg-reg (%04x)", op);
1336   return 2;
1352   int size = 2;
1353   UINT8 subinstr = (op & 0x0018) >> 3;
1354   op &= ~0x0018;
1355
1356   switch (subinstr)
1357   {
1358      case 0x00: size = arcompact_handle0c_00_dasm(DASM_PARAMS); break; // LD_S
1359      case 0x01: size = arcompact_handle0c_01_dasm(DASM_PARAMS); break; // LDB_S
1360      case 0x02: size = arcompact_handle0c_02_dasm(DASM_PARAMS); break; // LDW_S
1361      case 0x03: size = arcompact_handle0c_03_dasm(DASM_PARAMS); break; // ADD_S
1362   }
1363   return size;
13371364}
13381365
1366
1367int arcompact_handle0c_00_dasm(DASM_OPS_16)
1368{
1369   int size = 2;
1370   print("LD_S a <- m[b + c].long (%04x)", op);
1371   return size;
1372}
1373
1374int arcompact_handle0c_01_dasm(DASM_OPS_16)
1375{
1376   int size = 2;
1377   print("LDB_S a <- m[b + c].byte (%04x)", op);
1378   return size;
1379}
1380
1381int arcompact_handle0c_02_dasm(DASM_OPS_16)
1382{
1383   int size = 2;
1384   print("LDW_S a <- m[b + c].word (%04x)", op);
1385   return size;
1386}
1387
1388int arcompact_handle0c_03_dasm(DASM_OPS_16)
1389{
1390   int size = 2;
1391   print("ADD_S a <- b + c (%04x)", op);
1392   return size;
1393}
1394
1395
13391396int arcompact_handle0d_dasm(DASM_OPS_16)
13401397{
1341   print("Add/Sub/Shft imm (%04x)", op);
1342   return 2;
1398   int size = 2;
1399   UINT8 subinstr = (op & 0x0018) >> 3;
1400   op &= ~0x0018;
1401
1402   switch (subinstr)
1403   {
1404      case 0x00: size = arcompact_handle0d_00_dasm(DASM_PARAMS); break; // ADD_S
1405      case 0x01: size = arcompact_handle0d_01_dasm(DASM_PARAMS); break; // SUB_S
1406      case 0x02: size = arcompact_handle0d_02_dasm(DASM_PARAMS); break; // ASL_S
1407      case 0x03: size = arcompact_handle0d_03_dasm(DASM_PARAMS); break; // ASR_S
1408   }
1409   return size;
13431410}
13441411
1412int arcompact_handle0d_00_dasm(DASM_OPS_16)
1413{
1414   int size = 2;
1415   print("ADD_S c <- b + u3 (%04x)", op);
1416   return size;
1417}
1418
1419int arcompact_handle0d_01_dasm(DASM_OPS_16)
1420{
1421   int size = 2;
1422   print("SUB_S c <- b - u3 (%04x)", op);
1423   return size;
1424}
1425
1426int arcompact_handle0d_02_dasm(DASM_OPS_16)
1427{
1428   int size = 2;
1429   print("ASL_S c <- b asl u3 (%04x)", op);
1430   return size;
1431}
1432
1433int arcompact_handle0d_03_dasm(DASM_OPS_16)
1434{
1435   int size = 2;
1436   print("ASL_S c <- b asr u3 (%04x)", op);
1437   return size;
1438}
1439
1440
13451441int arcompact_handle0e_dasm(DASM_OPS_16)
13461442{
13471443   int size = 2;
r242268r242269
13591455}
13601456
13611457
1458
1459
13621460#define GROUP_0e_GET_h \
13631461   h =  ((op & 0x0007) << 3); \
13641462    h |= ((op & 0x00e0) >> 5); \
r242268r242269
15431641
15441642int arcompact_handle17_dasm(DASM_OPS_16)
15451643{
1546   print("Shift/Sub/Bit (%04x)",  op);
1547   return 2;
1644   int size = 2;
1645   UINT8 subinstr = (op & 0x00e0) >> 5;
1646   op &= ~0x00e0;
1647
1648   switch (subinstr)
1649   {
1650      case 0x00: size = arcompact_handle17_00_dasm(DASM_PARAMS); break; // ASL_S
1651      case 0x01: size = arcompact_handle17_01_dasm(DASM_PARAMS); break; // LSR_S
1652      case 0x02: size = arcompact_handle17_02_dasm(DASM_PARAMS); break; // ASR_S
1653      case 0x03: size = arcompact_handle17_03_dasm(DASM_PARAMS); break; // SUB_S
1654      case 0x04: size = arcompact_handle17_04_dasm(DASM_PARAMS); break; // BSET_S
1655      case 0x05: size = arcompact_handle17_05_dasm(DASM_PARAMS); break; // BCLR_S
1656      case 0x06: size = arcompact_handle17_06_dasm(DASM_PARAMS); break; // BMSK_S
1657      case 0x07: size = arcompact_handle17_07_dasm(DASM_PARAMS); break; // BTST_S
1658   }
1659
1660   return size;
15481661}
15491662
1663int arcompact_handle17_00_dasm(DASM_OPS_16)
1664{
1665   int size = 2;
1666   print("ASL_S b <- b asl u5 (%04x)",  op);
1667   return size;
1668}
1669
1670int arcompact_handle17_01_dasm(DASM_OPS_16)
1671{
1672   int size = 2;
1673   print("LSR_S b <- b lsr u5 (%04x)",  op);
1674   return size;
1675}
1676
1677int arcompact_handle17_02_dasm(DASM_OPS_16)
1678{
1679   int size = 2;
1680   print("ASR_S b <- b asr u5 (%04x)",  op);
1681   return size;
1682}
1683
1684int arcompact_handle17_03_dasm(DASM_OPS_16)
1685{
1686   int size = 2;
1687   print("SUB_S b <- b - u5 (%04x)",  op);
1688   return size;
1689}
1690
1691int arcompact_handle17_04_dasm(DASM_OPS_16)
1692{
1693   int size = 2;
1694   print("BSET_S b <- b | (1 << u5) (%04x)",  op);
1695   return size;
1696}
1697
1698int arcompact_handle17_05_dasm(DASM_OPS_16)
1699{
1700   int size = 2;
1701   print("BCLR_S b <- b & !(1 << u5) (%04x)",  op);
1702   return size;
1703}
1704
1705int arcompact_handle17_06_dasm(DASM_OPS_16)
1706{
1707   int size = 2;
1708   print("BMSK_S (%04x)",  op);
1709   return size;
1710}
1711
1712int arcompact_handle17_07_dasm(DASM_OPS_16)
1713{
1714   int size = 2;
1715   print("BTST_S (%04x)",  op);
1716   return size;
1717}
1718
15501719int arcompact_handle18_dasm(DASM_OPS_16)
15511720{
15521721   int size = 2;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team