diff options
Diffstat (limited to 'src/buildvm_ppcspe.h')
-rw-r--r-- | src/buildvm_ppcspe.h | 450 |
1 files changed, 235 insertions, 215 deletions
diff --git a/src/buildvm_ppcspe.h b/src/buildvm_ppcspe.h index f3af36b0..0855fda8 100644 --- a/src/buildvm_ppcspe.h +++ b/src/buildvm_ppcspe.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #define DASM_SECTION_CODE_OP 0 | 12 | #define DASM_SECTION_CODE_OP 0 |
13 | #define DASM_SECTION_CODE_SUB 1 | 13 | #define DASM_SECTION_CODE_SUB 1 |
14 | #define DASM_MAXSECTION 2 | 14 | #define DASM_MAXSECTION 2 |
15 | static const unsigned int build_actionlist[4918] = { | 15 | static const unsigned int build_actionlist[4928] = { |
16 | 0x00010001, | 16 | 0x00010001, |
17 | 0x00060014, | 17 | 0x00060014, |
18 | 0x72000000, | 18 | 0x72000000, |
@@ -1064,6 +1064,11 @@ static const unsigned int build_actionlist[4918] = { | |||
1064 | 0x3a8efff8, | 1064 | 0x3a8efff8, |
1065 | 0x40820000, | 1065 | 0x40820000, |
1066 | 0x00050842, | 1066 | 0x00050842, |
1067 | 0x00000000, | ||
1068 | 0x100a0301, | ||
1069 | 0x00090cab, | ||
1070 | 0x3a8efff8, | ||
1071 | 0x00000000, | ||
1067 | 0x106e0321, | 1072 | 0x106e0321, |
1068 | 0x134e0b21, | 1073 | 0x134e0b21, |
1069 | 0x39800000, | 1074 | 0x39800000, |
@@ -1120,7 +1125,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1120 | 0x00098200, | 1125 | 0x00098200, |
1121 | 0x41820000, | 1126 | 0x41820000, |
1122 | 0x00050843, | 1127 | 0x00050843, |
1123 | 0x00000000, | ||
1124 | 0x7d244b78, | 1128 | 0x7d244b78, |
1125 | 0x48000001, | 1129 | 0x48000001, |
1126 | 0x0003000c, | 1130 | 0x0003000c, |
@@ -1129,6 +1133,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1129 | 0x00098200, | 1133 | 0x00098200, |
1130 | 0x41820000, | 1134 | 0x41820000, |
1131 | 0x00050843, | 1135 | 0x00050843, |
1136 | 0x00000000, | ||
1132 | 0x11030301, | 1137 | 0x11030301, |
1133 | 0x48000000, | 1138 | 0x48000000, |
1134 | 0x0005000b, | 1139 | 0x0005000b, |
@@ -1141,6 +1146,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1141 | 0x820efff8, | 1146 | 0x820efff8, |
1142 | 0x40800000, | 1147 | 0x40800000, |
1143 | 0x00050842, | 1148 | 0x00050842, |
1149 | 0x00000000, | ||
1144 | 0x81230000, | 1150 | 0x81230000, |
1145 | 0x00098200, | 1151 | 0x00098200, |
1146 | 0x100a0301, | 1152 | 0x100a0301, |
@@ -1149,6 +1155,11 @@ static const unsigned int build_actionlist[4918] = { | |||
1149 | 0x3a8efff8, | 1155 | 0x3a8efff8, |
1150 | 0x40820000, | 1156 | 0x40820000, |
1151 | 0x00050842, | 1157 | 0x00050842, |
1158 | 0x00000000, | ||
1159 | 0x100a0301, | ||
1160 | 0x00090cab, | ||
1161 | 0x3a8efff8, | ||
1162 | 0x00000000, | ||
1152 | 0x11000229, | 1163 | 0x11000229, |
1153 | 0x106e0321, | 1164 | 0x106e0321, |
1154 | 0x110e0b21, | 1165 | 0x110e0b21, |
@@ -1184,7 +1195,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1184 | 0x1004ca34, | 1195 | 0x1004ca34, |
1185 | 0x40800000, | 1196 | 0x40800000, |
1186 | 0x00050842, | 1197 | 0x00050842, |
1187 | 0x00000000, | ||
1188 | 0x39ce0010, | 1198 | 0x39ce0010, |
1189 | 0x54c607fe, | 1199 | 0x54c607fe, |
1190 | 0x000900ab, | 1200 | 0x000900ab, |
@@ -1211,6 +1221,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1211 | 0x00098200, | 1221 | 0x00098200, |
1212 | 0x80830000, | 1222 | 0x80830000, |
1213 | 0x00098200, | 1223 | 0x00098200, |
1224 | 0x00000000, | ||
1214 | 0x28000000, | 1225 | 0x28000000, |
1215 | 0x00090200, | 1226 | 0x00090200, |
1216 | 0x81230000, | 1227 | 0x81230000, |
@@ -1250,7 +1261,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1250 | 0x48000000, | 1261 | 0x48000000, |
1251 | 0x0005000c, | 1262 | 0x0005000c, |
1252 | 0x0006000d, | 1263 | 0x0006000d, |
1253 | 0x00000000, | ||
1254 | 0x38a00000, | 1264 | 0x38a00000, |
1255 | 0x7c751b78, | 1265 | 0x7c751b78, |
1256 | 0x38c00000, | 1266 | 0x38c00000, |
@@ -1274,6 +1284,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1274 | 0x7d893050, | 1284 | 0x7d893050, |
1275 | 0x80120000, | 1285 | 0x80120000, |
1276 | 0x00098200, | 1286 | 0x00098200, |
1287 | 0x00000000, | ||
1277 | 0x280c0000, | 1288 | 0x280c0000, |
1278 | 0x7d0e6214, | 1289 | 0x7d0e6214, |
1279 | 0x41820000, | 1290 | 0x41820000, |
@@ -1308,7 +1319,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1308 | 0x48000000, | 1319 | 0x48000000, |
1309 | 0x00050018, | 1320 | 0x00050018, |
1310 | 0x00060012, | 1321 | 0x00060012, |
1311 | 0x00000000, | ||
1312 | 0x72000000, | 1322 | 0x72000000, |
1313 | 0x00090200, | 1323 | 0x00090200, |
1314 | 0x38c6fff8, | 1324 | 0x38c6fff8, |
@@ -1334,6 +1344,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1334 | 0x48000000, | 1344 | 0x48000000, |
1335 | 0x0005000e, | 1345 | 0x0005000e, |
1336 | 0x00060053, | 1346 | 0x00060053, |
1347 | 0x00000000, | ||
1337 | 0x806a0000, | 1348 | 0x806a0000, |
1338 | 0x00098200, | 1349 | 0x00098200, |
1339 | 0x88030000, | 1350 | 0x88030000, |
@@ -1369,7 +1380,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1369 | 0x91d20000, | 1380 | 0x91d20000, |
1370 | 0x00098200, | 1381 | 0x00098200, |
1371 | 0x0006000c, | 1382 | 0x0006000c, |
1372 | 0x00000000, | ||
1373 | 0x7c085800, | 1383 | 0x7c085800, |
1374 | 0x100e4300, | 1384 | 0x100e4300, |
1375 | 0x41820000, | 1385 | 0x41820000, |
@@ -1393,6 +1403,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1393 | 0x00098200, | 1403 | 0x00098200, |
1394 | 0x38000000, | 1404 | 0x38000000, |
1395 | 0x00098200, | 1405 | 0x00098200, |
1406 | 0x00000000, | ||
1396 | 0x81d20000, | 1407 | 0x81d20000, |
1397 | 0x00098200, | 1408 | 0x00098200, |
1398 | 0x90110000, | 1409 | 0x90110000, |
@@ -1430,7 +1441,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1430 | 0x7d936378, | 1441 | 0x7d936378, |
1431 | 0x41820000, | 1442 | 0x41820000, |
1432 | 0x00050817, | 1443 | 0x00050817, |
1433 | 0x00000000, | ||
1434 | 0x48000000, | 1444 | 0x48000000, |
1435 | 0x00050018, | 1445 | 0x00050018, |
1436 | 0x00060012, | 1446 | 0x00060012, |
@@ -1450,6 +1460,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1450 | 0x00060054, | 1460 | 0x00060054, |
1451 | 0x80120000, | 1461 | 0x80120000, |
1452 | 0x00098200, | 1462 | 0x00098200, |
1463 | 0x00000000, | ||
1453 | 0x7d0e5a14, | 1464 | 0x7d0e5a14, |
1454 | 0x91d20000, | 1465 | 0x91d20000, |
1455 | 0x00098200, | 1466 | 0x00098200, |
@@ -1481,7 +1492,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1481 | 0x3a8efff8, | 1492 | 0x3a8efff8, |
1482 | 0x10740321, | 1493 | 0x10740321, |
1483 | 0x00060056, | 1494 | 0x00060056, |
1484 | 0x00000000, | ||
1485 | 0x39800000, | 1495 | 0x39800000, |
1486 | 0x00098200, | 1496 | 0x00098200, |
1487 | 0x00060043, | 1497 | 0x00060043, |
@@ -1515,6 +1525,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1515 | 0x48000000, | 1525 | 0x48000000, |
1516 | 0x0005000f, | 1526 | 0x0005000f, |
1517 | 0x00060057, | 1527 | 0x00060057, |
1528 | 0x00000000, | ||
1518 | 0x280b0008, | 1529 | 0x280b0008, |
1519 | 0x108e0301, | 1530 | 0x108e0301, |
1520 | 0x41800000, | 1531 | 0x41800000, |
@@ -1557,7 +1568,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1557 | 0x00050842, | 1568 | 0x00050842, |
1558 | 0x48000001, | 1569 | 0x48000001, |
1559 | 0x0003000e, | 1570 | 0x0003000e, |
1560 | 0x00000000, | ||
1561 | 0x1063222d, | 1571 | 0x1063222d, |
1562 | 0x48000000, | 1572 | 0x48000000, |
1563 | 0x00050045, | 1573 | 0x00050045, |
@@ -1584,6 +1594,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1584 | 0x1064222c, | 1594 | 0x1064222c, |
1585 | 0x40800000, | 1595 | 0x40800000, |
1586 | 0x00050842, | 1596 | 0x00050842, |
1597 | 0x00000000, | ||
1587 | 0x48000001, | 1598 | 0x48000001, |
1588 | 0x00030010, | 1599 | 0x00030010, |
1589 | 0x1063222d, | 1600 | 0x1063222d, |
@@ -1618,7 +1629,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1618 | 0x48000000, | 1629 | 0x48000000, |
1619 | 0x00050045, | 1630 | 0x00050045, |
1620 | 0x00060060, | 1631 | 0x00060060, |
1621 | 0x00000000, | ||
1622 | 0x280b0008, | 1632 | 0x280b0008, |
1623 | 0x108e0301, | 1633 | 0x108e0301, |
1624 | 0x41800000, | 1634 | 0x41800000, |
@@ -1647,6 +1657,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1647 | 0x48000000, | 1657 | 0x48000000, |
1648 | 0x00050045, | 1658 | 0x00050045, |
1649 | 0x00060062, | 1659 | 0x00060062, |
1660 | 0x00000000, | ||
1650 | 0x280b0008, | 1661 | 0x280b0008, |
1651 | 0x108e0301, | 1662 | 0x108e0301, |
1652 | 0x41800000, | 1663 | 0x41800000, |
@@ -1683,7 +1694,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1683 | 0x1064222c, | 1694 | 0x1064222c, |
1684 | 0x40800000, | 1695 | 0x40800000, |
1685 | 0x00050842, | 1696 | 0x00050842, |
1686 | 0x00000000, | ||
1687 | 0x48000001, | 1697 | 0x48000001, |
1688 | 0x00030017, | 1698 | 0x00030017, |
1689 | 0x1063222d, | 1699 | 0x1063222d, |
@@ -1712,6 +1722,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1712 | 0x1064222c, | 1722 | 0x1064222c, |
1713 | 0x40800000, | 1723 | 0x40800000, |
1714 | 0x00050842, | 1724 | 0x00050842, |
1725 | 0x00000000, | ||
1715 | 0x48000001, | 1726 | 0x48000001, |
1716 | 0x00030019, | 1727 | 0x00030019, |
1717 | 0x1063222d, | 1728 | 0x1063222d, |
@@ -1748,7 +1759,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1748 | 0x48000000, | 1759 | 0x48000000, |
1749 | 0x00050045, | 1760 | 0x00050045, |
1750 | 0x00060069, | 1761 | 0x00060069, |
1751 | 0x00000000, | ||
1752 | 0x280b0010, | 1762 | 0x280b0010, |
1753 | 0x108e0301, | 1763 | 0x108e0301, |
1754 | 0x10ce0b01, | 1764 | 0x10ce0b01, |
@@ -1782,6 +1792,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1782 | 0x00050045, | 1792 | 0x00050045, |
1783 | 0x0006006b, | 1793 | 0x0006006b, |
1784 | 0x0006006c, | 1794 | 0x0006006c, |
1795 | 0x00000000, | ||
1785 | 0x280b0008, | 1796 | 0x280b0008, |
1786 | 0x106e0301, | 1797 | 0x106e0301, |
1787 | 0x41800000, | 1798 | 0x41800000, |
@@ -1815,7 +1826,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1815 | 0x108e0301, | 1826 | 0x108e0301, |
1816 | 0x41800000, | 1827 | 0x41800000, |
1817 | 0x00050842, | 1828 | 0x00050842, |
1818 | 0x00000000, | ||
1819 | 0x1004b232, | 1829 | 0x1004b232, |
1820 | 0x1064222c, | 1830 | 0x1064222c, |
1821 | 0x40800000, | 1831 | 0x40800000, |
@@ -1854,6 +1864,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1854 | 0x106e0321, | 1864 | 0x106e0321, |
1855 | 0x39800000, | 1865 | 0x39800000, |
1856 | 0x00098200, | 1866 | 0x00098200, |
1867 | 0x00000000, | ||
1857 | 0x48000000, | 1868 | 0x48000000, |
1858 | 0x00050043, | 1869 | 0x00050043, |
1859 | 0x00060070, | 1870 | 0x00060070, |
@@ -1889,7 +1900,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1889 | 0x40800000, | 1900 | 0x40800000, |
1890 | 0x00050842, | 1901 | 0x00050842, |
1891 | 0x0006000b, | 1902 | 0x0006000b, |
1892 | 0x00000000, | ||
1893 | 0x108e4300, | 1903 | 0x108e4300, |
1894 | 0x7c885840, | 1904 | 0x7c885840, |
1895 | 0x1004b232, | 1905 | 0x1004b232, |
@@ -1921,6 +1931,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1921 | 0x106e0301, | 1931 | 0x106e0301, |
1922 | 0x40820000, | 1932 | 0x40820000, |
1923 | 0x00050842, | 1933 | 0x00050842, |
1934 | 0x00000000, | ||
1924 | 0x1003ba34, | 1935 | 0x1003ba34, |
1925 | 0x3a8efff8, | 1936 | 0x3a8efff8, |
1926 | 0x40800000, | 1937 | 0x40800000, |
@@ -1955,7 +1966,6 @@ static const unsigned int build_actionlist[4918] = { | |||
1955 | 0x1003b232, | 1966 | 0x1003b232, |
1956 | 0x38910000, | 1967 | 0x38910000, |
1957 | 0x00098200, | 1968 | 0x00098200, |
1958 | 0x00000000, | ||
1959 | 0x40800000, | 1969 | 0x40800000, |
1960 | 0x00050842, | 1970 | 0x00050842, |
1961 | 0x10001afa, | 1971 | 0x10001afa, |
@@ -1981,6 +1991,7 @@ static const unsigned int build_actionlist[4918] = { | |||
1981 | 0x00098200, | 1991 | 0x00098200, |
1982 | 0x81110000, | 1992 | 0x81110000, |
1983 | 0x00098200, | 1993 | 0x00098200, |
1994 | 0x00000000, | ||
1984 | 0x7c004040, | 1995 | 0x7c004040, |
1985 | 0x40800001, | 1996 | 0x40800001, |
1986 | 0x0005084b, | 1997 | 0x0005084b, |
@@ -2017,7 +2028,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2017 | 0x40810000, | 2028 | 0x40810000, |
2018 | 0x00050807, | 2029 | 0x00050807, |
2019 | 0x0006000d, | 2030 | 0x0006000d, |
2020 | 0x00000000, | ||
2021 | 0x7ca84851, | 2031 | 0x7ca84851, |
2022 | 0x38830000, | 2032 | 0x38830000, |
2023 | 0x00098200, | 2033 | 0x00098200, |
@@ -2047,6 +2057,7 @@ static const unsigned int build_actionlist[4918] = { | |||
2047 | 0x7c004040, | 2057 | 0x7c004040, |
2048 | 0x40800001, | 2058 | 0x40800001, |
2049 | 0x0005084b, | 2059 | 0x0005084b, |
2060 | 0x00000000, | ||
2050 | 0x280b0010, | 2061 | 0x280b0010, |
2051 | 0x106e0301, | 2062 | 0x106e0301, |
2052 | 0x108e0b01, | 2063 | 0x108e0b01, |
@@ -2080,7 +2091,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2080 | 0x41840000, | 2091 | 0x41840000, |
2081 | 0x00050842, | 2092 | 0x00050842, |
2082 | 0x0006000b, | 2093 | 0x0006000b, |
2083 | 0x00000000, | ||
2084 | 0x28090000, | 2094 | 0x28090000, |
2085 | 0x7c0449ae, | 2095 | 0x7c0449ae, |
2086 | 0x3929ffff, | 2096 | 0x3929ffff, |
@@ -2106,6 +2116,7 @@ static const unsigned int build_actionlist[4918] = { | |||
2106 | 0x106e0301, | 2116 | 0x106e0301, |
2107 | 0x41800000, | 2117 | 0x41800000, |
2108 | 0x00050842, | 2118 | 0x00050842, |
2119 | 0x00000000, | ||
2109 | 0x1003ba34, | 2120 | 0x1003ba34, |
2110 | 0x81110000, | 2121 | 0x81110000, |
2111 | 0x00098200, | 2122 | 0x00098200, |
@@ -2137,7 +2148,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2137 | 0x00098200, | 2148 | 0x00098200, |
2138 | 0x81110000, | 2149 | 0x81110000, |
2139 | 0x00098200, | 2150 | 0x00098200, |
2140 | 0x00000000, | ||
2141 | 0x7c004040, | 2151 | 0x7c004040, |
2142 | 0x40800001, | 2152 | 0x40800001, |
2143 | 0x0005084b, | 2153 | 0x0005084b, |
@@ -2165,6 +2175,7 @@ static const unsigned int build_actionlist[4918] = { | |||
2165 | 0x7d0348ae, | 2175 | 0x7d0348ae, |
2166 | 0x40800000, | 2176 | 0x40800000, |
2167 | 0x00050875, | 2177 | 0x00050875, |
2178 | 0x00000000, | ||
2168 | 0x3808ffbf, | 2179 | 0x3808ffbf, |
2169 | 0x69060020, | 2180 | 0x69060020, |
2170 | 0x2800001a, | 2181 | 0x2800001a, |
@@ -2201,7 +2212,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2201 | 0x41800000, | 2212 | 0x41800000, |
2202 | 0x00050842, | 2213 | 0x00050842, |
2203 | 0x0006000b, | 2214 | 0x0006000b, |
2204 | 0x00000000, | ||
2205 | 0x7c092840, | 2215 | 0x7c092840, |
2206 | 0x7d0348ae, | 2216 | 0x7d0348ae, |
2207 | 0x40800000, | 2217 | 0x40800000, |
@@ -2232,6 +2242,7 @@ static const unsigned int build_actionlist[4918] = { | |||
2232 | 0x106e0301, | 2242 | 0x106e0301, |
2233 | 0x41800000, | 2243 | 0x41800000, |
2234 | 0x00050842, | 2244 | 0x00050842, |
2245 | 0x00000000, | ||
2235 | 0x1003b232, | 2246 | 0x1003b232, |
2236 | 0x40800000, | 2247 | 0x40800000, |
2237 | 0x00050842, | 2248 | 0x00050842, |
@@ -2271,7 +2282,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2271 | 0x1003b232, | 2282 | 0x1003b232, |
2272 | 0x40800000, | 2283 | 0x40800000, |
2273 | 0x00050842, | 2284 | 0x00050842, |
2274 | 0x00000000, | ||
2275 | 0x1063dae0, | 2285 | 0x1063dae0, |
2276 | 0x39000008, | 2286 | 0x39000008, |
2277 | 0x0006000b, | 2287 | 0x0006000b, |
@@ -2303,6 +2313,7 @@ static const unsigned int build_actionlist[4918] = { | |||
2303 | 0x1004b232, | 2313 | 0x1004b232, |
2304 | 0x40840000, | 2314 | 0x40840000, |
2305 | 0x0005087d, | 2315 | 0x0005087d, |
2316 | 0x00000000, | ||
2306 | 0x40800000, | 2317 | 0x40800000, |
2307 | 0x00050842, | 2318 | 0x00050842, |
2308 | 0x1084dae0, | 2319 | 0x1084dae0, |
@@ -2348,7 +2359,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2348 | 0x1000b232, | 2359 | 0x1000b232, |
2349 | 0x40830000, | 2360 | 0x40830000, |
2350 | 0x00050842, | 2361 | 0x00050842, |
2351 | 0x00000000, | ||
2352 | 0x1084dae0, | 2362 | 0x1084dae0, |
2353 | 0x1063dae0, | 2363 | 0x1063dae0, |
2354 | 0x548406fe, | 2364 | 0x548406fe, |
@@ -2391,6 +2401,7 @@ static const unsigned int build_actionlist[4918] = { | |||
2391 | 0x48000000, | 2401 | 0x48000000, |
2392 | 0x00050045, | 2402 | 0x00050045, |
2393 | 0x00060086, | 2403 | 0x00060086, |
2404 | 0x00000000, | ||
2394 | 0x280b0010, | 2405 | 0x280b0010, |
2395 | 0x106e0301, | 2406 | 0x106e0301, |
2396 | 0x108e0b01, | 2407 | 0x108e0b01, |
@@ -2436,7 +2447,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2436 | 0x7c004840, | 2447 | 0x7c004840, |
2437 | 0x91d20000, | 2448 | 0x91d20000, |
2438 | 0x00098200, | 2449 | 0x00098200, |
2439 | 0x00000000, | ||
2440 | 0x91120000, | 2450 | 0x91120000, |
2441 | 0x00098200, | 2451 | 0x00098200, |
2442 | 0x7e439378, | 2452 | 0x7e439378, |
@@ -2470,6 +2480,7 @@ static const unsigned int build_actionlist[4918] = { | |||
2470 | 0x7c0903a6, | 2480 | 0x7c0903a6, |
2471 | 0x4e800420, | 2481 | 0x4e800420, |
2472 | 0x0006000c, | 2482 | 0x0006000c, |
2483 | 0x00000000, | ||
2473 | 0x72000000, | 2484 | 0x72000000, |
2474 | 0x00090200, | 2485 | 0x00090200, |
2475 | 0x56080038, | 2486 | 0x56080038, |
@@ -2500,7 +2511,6 @@ static const unsigned int build_actionlist[4918] = { | |||
2500 | 0x9201000c, | 2511 | 0x9201000c, |
2501 | 0x90120000, | 2512 | 0x90120000, |
2502 | 0x00098200, | 2513 | 0x00098200, |
2503 | 0x00000000, | ||
2504 | 0x7e439378, | 2514 | 0x7e439378, |
2505 | 0x48000001, | 2515 | 0x48000001, |
2506 | 0x00030023, | 2516 | 0x00030023, |
@@ -5308,75 +5318,85 @@ static void build_subroutines(BuildCtx *ctx) | |||
5308 | dasm_put(Dst, 854, Dt6(->hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), LJ_TUDATA, 31-2, 4*~LJ_TNUMX, DISPATCH_GL(gcroot[GCROOT_BASEMT])); | 5318 | dasm_put(Dst, 854, Dt6(->hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), LJ_TUDATA, 31-2, 4*~LJ_TNUMX, DISPATCH_GL(gcroot[GCROOT_BASEMT])); |
5309 | dasm_put(Dst, 910, Dt6(->metatable), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); | 5319 | dasm_put(Dst, 910, Dt6(->metatable), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); |
5310 | dasm_put(Dst, 970, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->top), (2+1)*8); | 5320 | dasm_put(Dst, 970, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->top), (2+1)*8); |
5311 | dasm_put(Dst, 1043, Dt6(->metatable), Dt8(->upvalue[0]), (3+1)*8, Dt6(->asize), Dt6(->array), 31-3, (0+1)*8, (2+1)*8, Dt6(->hmask), (0+1)*8); | 5321 | #ifdef LUAJIT_ENABLE_LUA52COMPAT |
5312 | dasm_put(Dst, 1108, (0+1)*8, Dt6(->metatable), Dt8(->upvalue[0]), (3+1)*8, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 8+FRAME_PCALL, DISPATCH_GL(hookmask)); | 5322 | dasm_put(Dst, 1043, Dt6(->metatable), Dt8(->upvalue[0])); |
5313 | dasm_put(Dst, 1172, 32-HOOK_ACTIVE_SHIFT, 16+FRAME_PCALL, LJ_TTHREAD, Dt1(->status), Dt1(->cframe), Dt1(->top), LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top)); | 5323 | #else |
5314 | dasm_put(Dst, 1238, Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, LJ_TTRUE); | 5324 | dasm_put(Dst, 1052, Dt8(->upvalue[0])); |
5315 | dasm_put(Dst, 1296, FRAME_TYPE, LJ_TFALSE, Dt1(->top), (2+1)*8, 32-3, Dt8(->upvalue[0].gcr), Dt1(->status), Dt1(->cframe), Dt1(->top), LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top)); | 5325 | #endif |
5316 | dasm_put(Dst, 1357, Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE); | 5326 | dasm_put(Dst, 1056, (3+1)*8, Dt6(->asize), Dt6(->array), 31-3, (0+1)*8, (2+1)*8, Dt6(->hmask), (0+1)*8, (0+1)*8); |
5317 | dasm_put(Dst, 1418, 32-3, Dt1(->cframe), Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status)); | 5327 | dasm_put(Dst, 1121); |
5318 | dasm_put(Dst, 1469, (1+1)*8, FRAME_TYPE); | 5328 | #ifdef LUAJIT_ENABLE_LUA52COMPAT |
5319 | dasm_put(Dst, 1545); | 5329 | dasm_put(Dst, 1134, Dt6(->metatable), Dt8(->upvalue[0])); |
5320 | dasm_put(Dst, 1606); | 5330 | #else |
5321 | dasm_put(Dst, 1671); | 5331 | dasm_put(Dst, 1143, Dt8(->upvalue[0])); |
5322 | dasm_put(Dst, 1736, Dt8(->upvalue[0])); | 5332 | #endif |
5323 | dasm_put(Dst, 1803, DISPATCH_GL(tmptv), DISPATCH_GL(tmptv), (2+1)*8, (2+1)*8); | 5333 | dasm_put(Dst, 1147, (3+1)*8, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 8+FRAME_PCALL, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 16+FRAME_PCALL, LJ_TTHREAD, Dt1(->status), Dt1(->cframe), Dt1(->top)); |
5324 | dasm_put(Dst, 1877, Dt5(->len), Dt5(->len), (0+1)*8, Dt5([1]), (1+1)*8, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmptv)); | 5334 | dasm_put(Dst, 1209, LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack)); |
5325 | dasm_put(Dst, 1943, Dt1(->base), Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt5(->len)); | 5335 | dasm_put(Dst, 1272, Dt1(->top), FRAME_TYPE, LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top), (2+1)*8, 32-3); |
5326 | dasm_put(Dst, 2005, sizeof(GCstr)-1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf)); | 5336 | dasm_put(Dst, 1332, Dt8(->upvalue[0].gcr), Dt1(->status), Dt1(->cframe), Dt1(->top), LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP); |
5327 | dasm_put(Dst, 2068, DISPATCH_GL(strempty), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 5337 | dasm_put(Dst, 1391, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, 32-3, Dt1(->cframe)); |
5328 | dasm_put(Dst, 2125, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 5338 | dasm_put(Dst, 1448, Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status), (1+1)*8, FRAME_TYPE); |
5329 | dasm_put(Dst, 2189); | 5339 | dasm_put(Dst, 1513); |
5330 | dasm_put(Dst, 2259); | 5340 | dasm_put(Dst, 1582); |
5331 | dasm_put(Dst, 2336, Dt8(->f), 8*LUA_MINSTACK-8, Dt1(->maxstack), Dt1(->base)); | 5341 | dasm_put(Dst, 1645); |
5332 | dasm_put(Dst, 2424, Dt1(->top), Dt1(->base), 31-3, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top)); | 5342 | dasm_put(Dst, 1710); |
5333 | dasm_put(Dst, 2488, Dt1(->base), Dt1(->top)); | 5343 | dasm_put(Dst, 1780, Dt8(->upvalue[0]), DISPATCH_GL(tmptv), DISPATCH_GL(tmptv), (2+1)*8, (2+1)*8); |
5344 | dasm_put(Dst, 1852, Dt5(->len)); | ||
5345 | dasm_put(Dst, 1919, Dt5(->len), (0+1)*8, Dt5([1]), (1+1)*8, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmptv), Dt1(->base), Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | ||
5346 | dasm_put(Dst, 1979, Dt5(->len), sizeof(GCstr)-1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | ||
5347 | dasm_put(Dst, 2045, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(strempty), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | ||
5348 | dasm_put(Dst, 2104, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | ||
5349 | dasm_put(Dst, 2163, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | ||
5350 | dasm_put(Dst, 2230); | ||
5351 | dasm_put(Dst, 2301); | ||
5352 | dasm_put(Dst, 2389, Dt8(->f), 8*LUA_MINSTACK-8, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), 31-3, Dt1(->top), Dt7(->pc)); | ||
5353 | dasm_put(Dst, 2468, FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | ||
5334 | #if LJ_HASJIT | 5354 | #if LJ_HASJIT |
5335 | dasm_put(Dst, 2501); | 5355 | dasm_put(Dst, 2511); |
5336 | #endif | 5356 | #endif |
5337 | dasm_put(Dst, 2503, DISPATCH_GL(hookmask), HOOK_ACTIVE, GG_DISP2STATIC, DISPATCH_GL(hookmask), DISPATCH_GL(hookcount), HOOK_ACTIVE, 31-LUA_HOOKLINE, DISPATCH_GL(hookcount), Dt1(->base), Dt1(->base)); | 5357 | dasm_put(Dst, 2513, DISPATCH_GL(hookmask), HOOK_ACTIVE, GG_DISP2STATIC, DISPATCH_GL(hookmask), DISPATCH_GL(hookcount), HOOK_ACTIVE, 31-LUA_HOOKLINE, DISPATCH_GL(hookcount), Dt1(->base), Dt1(->base)); |
5338 | dasm_put(Dst, 2550, GG_DISP2STATIC); | 5358 | dasm_put(Dst, 2560, GG_DISP2STATIC); |
5339 | #if LJ_HASJIT | 5359 | #if LJ_HASJIT |
5340 | dasm_put(Dst, 2568); | 5360 | dasm_put(Dst, 2578); |
5341 | #endif | 5361 | #endif |
5342 | dasm_put(Dst, 2570); | 5362 | dasm_put(Dst, 2580); |
5343 | #if LJ_HASJIT | 5363 | #if LJ_HASJIT |
5344 | dasm_put(Dst, 2573); | 5364 | dasm_put(Dst, 2583); |
5345 | #endif | 5365 | #endif |
5346 | dasm_put(Dst, 2576); | 5366 | dasm_put(Dst, 2586); |
5347 | #if LJ_HASJIT | 5367 | #if LJ_HASJIT |
5348 | dasm_put(Dst, 2578); | 5368 | dasm_put(Dst, 2588); |
5349 | #endif | 5369 | #endif |
5350 | dasm_put(Dst, 2581, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 5370 | dasm_put(Dst, 2591, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); |
5351 | #if LJ_HASJIT | 5371 | #if LJ_HASJIT |
5352 | dasm_put(Dst, 2603); | 5372 | dasm_put(Dst, 2613); |
5353 | #endif | 5373 | #endif |
5354 | dasm_put(Dst, 2605); | 5374 | dasm_put(Dst, 2615); |
5355 | #if LJ_HASJIT | 5375 | #if LJ_HASJIT |
5356 | dasm_put(Dst, 2607); | 5376 | dasm_put(Dst, 2617); |
5357 | #endif | 5377 | #endif |
5358 | dasm_put(Dst, 2609); | 5378 | dasm_put(Dst, 2619); |
5359 | #if LJ_HASJIT | 5379 | #if LJ_HASJIT |
5360 | dasm_put(Dst, 2686); | 5380 | dasm_put(Dst, 2696); |
5361 | #else | 5381 | #else |
5362 | dasm_put(Dst, 2709); | 5382 | dasm_put(Dst, 2719); |
5363 | #endif | 5383 | #endif |
5364 | dasm_put(Dst, 2712); | 5384 | dasm_put(Dst, 2722); |
5365 | #if LJ_HASJIT | 5385 | #if LJ_HASJIT |
5366 | dasm_put(Dst, 2714); | 5386 | dasm_put(Dst, 2724); |
5367 | #endif | 5387 | #endif |
5368 | dasm_put(Dst, 2716); | 5388 | dasm_put(Dst, 2726); |
5369 | #if LJ_HASJIT | 5389 | #if LJ_HASJIT |
5370 | dasm_put(Dst, 2718); | 5390 | dasm_put(Dst, 2728); |
5371 | #endif | 5391 | #endif |
5372 | dasm_put(Dst, 2720); | 5392 | dasm_put(Dst, 2730); |
5373 | } | 5393 | } |
5374 | 5394 | ||
5375 | /* Generate the code for a single instruction. */ | 5395 | /* Generate the code for a single instruction. */ |
5376 | static void build_ins(BuildCtx *ctx, BCOp op, int defop) | 5396 | static void build_ins(BuildCtx *ctx, BCOp op, int defop) |
5377 | { | 5397 | { |
5378 | int vk = 0; | 5398 | int vk = 0; |
5379 | dasm_put(Dst, 2782, defop); | 5399 | dasm_put(Dst, 2792, defop); |
5380 | 5400 | ||
5381 | switch (op) { | 5401 | switch (op) { |
5382 | 5402 | ||
@@ -5385,112 +5405,112 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5385 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ | 5405 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ |
5386 | 5406 | ||
5387 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | 5407 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: |
5388 | dasm_put(Dst, 2784, -(BCBIAS_J*4 >> 16)); | 5408 | dasm_put(Dst, 2794, -(BCBIAS_J*4 >> 16)); |
5389 | if (op == BC_ISLE || op == BC_ISGT) { | 5409 | if (op == BC_ISLE || op == BC_ISGT) { |
5390 | dasm_put(Dst, 2798); | 5410 | dasm_put(Dst, 2808); |
5391 | } | 5411 | } |
5392 | if (op == BC_ISLT || op == BC_ISLE) { | 5412 | if (op == BC_ISLT || op == BC_ISLE) { |
5393 | dasm_put(Dst, 2801); | 5413 | dasm_put(Dst, 2811); |
5394 | } else { | 5414 | } else { |
5395 | dasm_put(Dst, 2803); | 5415 | dasm_put(Dst, 2813); |
5396 | } | 5416 | } |
5397 | dasm_put(Dst, 2805); | 5417 | dasm_put(Dst, 2815); |
5398 | break; | 5418 | break; |
5399 | 5419 | ||
5400 | case BC_ISEQV: case BC_ISNEV: | 5420 | case BC_ISEQV: case BC_ISNEV: |
5401 | vk = op == BC_ISEQV; | 5421 | vk = op == BC_ISEQV; |
5402 | dasm_put(Dst, 2816, -(BCBIAS_J*4 >> 16)); | 5422 | dasm_put(Dst, 2826, -(BCBIAS_J*4 >> 16)); |
5403 | if (vk) { | 5423 | if (vk) { |
5404 | dasm_put(Dst, 2830); | 5424 | dasm_put(Dst, 2840); |
5405 | } else { | 5425 | } else { |
5406 | dasm_put(Dst, 2832); | 5426 | dasm_put(Dst, 2842); |
5407 | } | 5427 | } |
5408 | dasm_put(Dst, 2834, ~LJ_TISPRI, ~LJ_TISTABUD); | 5428 | dasm_put(Dst, 2844, ~LJ_TISPRI, ~LJ_TISTABUD); |
5409 | if (vk) { | 5429 | if (vk) { |
5410 | dasm_put(Dst, 2856); | 5430 | dasm_put(Dst, 2866); |
5411 | } else { | 5431 | } else { |
5412 | dasm_put(Dst, 2858); | 5432 | dasm_put(Dst, 2868); |
5413 | } | 5433 | } |
5414 | dasm_put(Dst, 2860); | 5434 | dasm_put(Dst, 2870); |
5415 | if (vk) { | 5435 | if (vk) { |
5416 | dasm_put(Dst, 2862); | 5436 | dasm_put(Dst, 2872); |
5417 | } else { | 5437 | } else { |
5418 | dasm_put(Dst, 2864); | 5438 | dasm_put(Dst, 2874); |
5419 | } | 5439 | } |
5420 | dasm_put(Dst, 2866, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<<MM_eq); | 5440 | dasm_put(Dst, 2876, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<<MM_eq); |
5421 | break; | 5441 | break; |
5422 | 5442 | ||
5423 | case BC_ISEQS: case BC_ISNES: | 5443 | case BC_ISEQS: case BC_ISNES: |
5424 | vk = op == BC_ISEQS; | 5444 | vk = op == BC_ISEQS; |
5425 | dasm_put(Dst, 2887, 32-1, -(BCBIAS_J*4 >> 16)); | 5445 | dasm_put(Dst, 2897, 32-1, -(BCBIAS_J*4 >> 16)); |
5426 | if (vk) { | 5446 | if (vk) { |
5427 | dasm_put(Dst, 2901); | 5447 | dasm_put(Dst, 2911); |
5428 | } else { | 5448 | } else { |
5429 | dasm_put(Dst, 2903); | 5449 | dasm_put(Dst, 2913); |
5430 | } | 5450 | } |
5431 | dasm_put(Dst, 2905); | 5451 | dasm_put(Dst, 2915); |
5432 | break; | 5452 | break; |
5433 | 5453 | ||
5434 | case BC_ISEQN: case BC_ISNEN: | 5454 | case BC_ISEQN: case BC_ISNEN: |
5435 | vk = op == BC_ISEQN; | 5455 | vk = op == BC_ISEQN; |
5436 | dasm_put(Dst, 2916, -(BCBIAS_J*4 >> 16)); | 5456 | dasm_put(Dst, 2926, -(BCBIAS_J*4 >> 16)); |
5437 | if (vk) { | 5457 | if (vk) { |
5438 | dasm_put(Dst, 2930); | 5458 | dasm_put(Dst, 2940); |
5439 | } else { | 5459 | } else { |
5440 | dasm_put(Dst, 2933); | 5460 | dasm_put(Dst, 2943); |
5441 | } | 5461 | } |
5442 | dasm_put(Dst, 2935); | 5462 | dasm_put(Dst, 2945); |
5443 | if (!vk) { | 5463 | if (!vk) { |
5444 | dasm_put(Dst, 2947); | 5464 | dasm_put(Dst, 2957); |
5445 | } | 5465 | } |
5446 | break; | 5466 | break; |
5447 | 5467 | ||
5448 | case BC_ISEQP: case BC_ISNEP: | 5468 | case BC_ISEQP: case BC_ISNEP: |
5449 | vk = op == BC_ISEQP; | 5469 | vk = op == BC_ISEQP; |
5450 | dasm_put(Dst, 2953, 32-3, -(BCBIAS_J*4 >> 16)); | 5470 | dasm_put(Dst, 2963, 32-3, -(BCBIAS_J*4 >> 16)); |
5451 | if (vk) { | 5471 | if (vk) { |
5452 | dasm_put(Dst, 2965); | 5472 | dasm_put(Dst, 2975); |
5453 | } else { | 5473 | } else { |
5454 | dasm_put(Dst, 2967); | 5474 | dasm_put(Dst, 2977); |
5455 | } | 5475 | } |
5456 | dasm_put(Dst, 2969); | 5476 | dasm_put(Dst, 2979); |
5457 | break; | 5477 | break; |
5458 | 5478 | ||
5459 | /* -- Unary test and copy ops ------------------------------------------- */ | 5479 | /* -- Unary test and copy ops ------------------------------------------- */ |
5460 | 5480 | ||
5461 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | 5481 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: |
5462 | dasm_put(Dst, 2980); | 5482 | dasm_put(Dst, 2990); |
5463 | if (op == BC_IST || op == BC_ISF) { | 5483 | if (op == BC_IST || op == BC_ISF) { |
5464 | dasm_put(Dst, 2986, -(BCBIAS_J*4 >> 16)); | 5484 | dasm_put(Dst, 2996, -(BCBIAS_J*4 >> 16)); |
5465 | if (op == BC_IST) { | 5485 | if (op == BC_IST) { |
5466 | dasm_put(Dst, 2991); | 5486 | dasm_put(Dst, 3001); |
5467 | } else { | 5487 | } else { |
5468 | dasm_put(Dst, 2993); | 5488 | dasm_put(Dst, 3003); |
5469 | } | 5489 | } |
5470 | } else { | 5490 | } else { |
5471 | if (op == BC_ISTC) { | 5491 | if (op == BC_ISTC) { |
5472 | dasm_put(Dst, 2995); | 5492 | dasm_put(Dst, 3005); |
5473 | } else { | 5493 | } else { |
5474 | dasm_put(Dst, 2998); | 5494 | dasm_put(Dst, 3008); |
5475 | } | 5495 | } |
5476 | dasm_put(Dst, 3001, -(BCBIAS_J*4 >> 16)); | 5496 | dasm_put(Dst, 3011, -(BCBIAS_J*4 >> 16)); |
5477 | } | 5497 | } |
5478 | dasm_put(Dst, 3008); | 5498 | dasm_put(Dst, 3018); |
5479 | break; | 5499 | break; |
5480 | 5500 | ||
5481 | /* -- Unary ops --------------------------------------------------------- */ | 5501 | /* -- Unary ops --------------------------------------------------------- */ |
5482 | 5502 | ||
5483 | case BC_MOV: | 5503 | case BC_MOV: |
5484 | dasm_put(Dst, 3019); | 5504 | dasm_put(Dst, 3029); |
5485 | break; | 5505 | break; |
5486 | case BC_NOT: | 5506 | case BC_NOT: |
5487 | dasm_put(Dst, 3032, LJ_TTRUE); | 5507 | dasm_put(Dst, 3042, LJ_TTRUE); |
5488 | break; | 5508 | break; |
5489 | case BC_UNM: | 5509 | case BC_UNM: |
5490 | dasm_put(Dst, 3048); | 5510 | dasm_put(Dst, 3058); |
5491 | break; | 5511 | break; |
5492 | case BC_LEN: | 5512 | case BC_LEN: |
5493 | dasm_put(Dst, 3065, Dt5(->len)); | 5513 | dasm_put(Dst, 3075, Dt5(->len)); |
5494 | break; | 5514 | break; |
5495 | 5515 | ||
5496 | /* -- Binary ops -------------------------------------------------------- */ | 5516 | /* -- Binary ops -------------------------------------------------------- */ |
@@ -5500,257 +5520,257 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5500 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5520 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5501 | switch (vk) { | 5521 | switch (vk) { |
5502 | case 0: | 5522 | case 0: |
5503 | dasm_put(Dst, 3093); | 5523 | dasm_put(Dst, 3103); |
5504 | break; | 5524 | break; |
5505 | case 1: | 5525 | case 1: |
5506 | dasm_put(Dst, 3099); | 5526 | dasm_put(Dst, 3109); |
5507 | break; | 5527 | break; |
5508 | default: | 5528 | default: |
5509 | dasm_put(Dst, 3105); | 5529 | dasm_put(Dst, 3115); |
5510 | break; | 5530 | break; |
5511 | } | 5531 | } |
5512 | dasm_put(Dst, 3112); | 5532 | dasm_put(Dst, 3122); |
5513 | break; | 5533 | break; |
5514 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | 5534 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |
5515 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5535 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5516 | switch (vk) { | 5536 | switch (vk) { |
5517 | case 0: | 5537 | case 0: |
5518 | dasm_put(Dst, 3125); | 5538 | dasm_put(Dst, 3135); |
5519 | break; | 5539 | break; |
5520 | case 1: | 5540 | case 1: |
5521 | dasm_put(Dst, 3131); | 5541 | dasm_put(Dst, 3141); |
5522 | break; | 5542 | break; |
5523 | default: | 5543 | default: |
5524 | dasm_put(Dst, 3137); | 5544 | dasm_put(Dst, 3147); |
5525 | break; | 5545 | break; |
5526 | } | 5546 | } |
5527 | dasm_put(Dst, 3144); | 5547 | dasm_put(Dst, 3154); |
5528 | break; | 5548 | break; |
5529 | case BC_MULVN: case BC_MULNV: case BC_MULVV: | 5549 | case BC_MULVN: case BC_MULNV: case BC_MULVV: |
5530 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5550 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5531 | switch (vk) { | 5551 | switch (vk) { |
5532 | case 0: | 5552 | case 0: |
5533 | dasm_put(Dst, 3157); | 5553 | dasm_put(Dst, 3167); |
5534 | break; | 5554 | break; |
5535 | case 1: | 5555 | case 1: |
5536 | dasm_put(Dst, 3163); | 5556 | dasm_put(Dst, 3173); |
5537 | break; | 5557 | break; |
5538 | default: | 5558 | default: |
5539 | dasm_put(Dst, 3169); | 5559 | dasm_put(Dst, 3179); |
5540 | break; | 5560 | break; |
5541 | } | 5561 | } |
5542 | dasm_put(Dst, 3176); | 5562 | dasm_put(Dst, 3186); |
5543 | break; | 5563 | break; |
5544 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | 5564 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: |
5545 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5565 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5546 | switch (vk) { | 5566 | switch (vk) { |
5547 | case 0: | 5567 | case 0: |
5548 | dasm_put(Dst, 3189); | 5568 | dasm_put(Dst, 3199); |
5549 | break; | 5569 | break; |
5550 | case 1: | 5570 | case 1: |
5551 | dasm_put(Dst, 3195); | 5571 | dasm_put(Dst, 3205); |
5552 | break; | 5572 | break; |
5553 | default: | 5573 | default: |
5554 | dasm_put(Dst, 3201); | 5574 | dasm_put(Dst, 3211); |
5555 | break; | 5575 | break; |
5556 | } | 5576 | } |
5557 | dasm_put(Dst, 3208); | 5577 | dasm_put(Dst, 3218); |
5558 | break; | 5578 | break; |
5559 | case BC_MODVN: | 5579 | case BC_MODVN: |
5560 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5580 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5561 | switch (vk) { | 5581 | switch (vk) { |
5562 | case 0: | 5582 | case 0: |
5563 | dasm_put(Dst, 3221); | 5583 | dasm_put(Dst, 3231); |
5564 | break; | 5584 | break; |
5565 | case 1: | 5585 | case 1: |
5566 | dasm_put(Dst, 3227); | 5586 | dasm_put(Dst, 3237); |
5567 | break; | 5587 | break; |
5568 | default: | 5588 | default: |
5569 | dasm_put(Dst, 3233); | 5589 | dasm_put(Dst, 3243); |
5570 | break; | 5590 | break; |
5571 | } | 5591 | } |
5572 | dasm_put(Dst, 3240); | 5592 | dasm_put(Dst, 3250); |
5573 | break; | 5593 | break; |
5574 | case BC_MODNV: case BC_MODVV: | 5594 | case BC_MODNV: case BC_MODVV: |
5575 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5595 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5576 | switch (vk) { | 5596 | switch (vk) { |
5577 | case 0: | 5597 | case 0: |
5578 | dasm_put(Dst, 3258); | 5598 | dasm_put(Dst, 3268); |
5579 | break; | 5599 | break; |
5580 | case 1: | 5600 | case 1: |
5581 | dasm_put(Dst, 3264); | 5601 | dasm_put(Dst, 3274); |
5582 | break; | 5602 | break; |
5583 | default: | 5603 | default: |
5584 | dasm_put(Dst, 3270); | 5604 | dasm_put(Dst, 3280); |
5585 | break; | 5605 | break; |
5586 | } | 5606 | } |
5587 | dasm_put(Dst, 3277); | 5607 | dasm_put(Dst, 3287); |
5588 | break; | 5608 | break; |
5589 | case BC_POW: | 5609 | case BC_POW: |
5590 | dasm_put(Dst, 3280); | 5610 | dasm_put(Dst, 3290); |
5591 | break; | 5611 | break; |
5592 | 5612 | ||
5593 | case BC_CAT: | 5613 | case BC_CAT: |
5594 | dasm_put(Dst, 3302, Dt1(->base), 32-3, Dt1(->base)); | 5614 | dasm_put(Dst, 3312, Dt1(->base), 32-3, Dt1(->base)); |
5595 | break; | 5615 | break; |
5596 | 5616 | ||
5597 | /* -- Constant ops ------------------------------------------------------ */ | 5617 | /* -- Constant ops ------------------------------------------------------ */ |
5598 | 5618 | ||
5599 | case BC_KSTR: | 5619 | case BC_KSTR: |
5600 | dasm_put(Dst, 3332, 32-1); | 5620 | dasm_put(Dst, 3342, 32-1); |
5601 | break; | 5621 | break; |
5602 | case BC_KSHORT: | 5622 | case BC_KSHORT: |
5603 | dasm_put(Dst, 3349, 32-3); | 5623 | dasm_put(Dst, 3359, 32-3); |
5604 | break; | 5624 | break; |
5605 | case BC_KNUM: | 5625 | case BC_KNUM: |
5606 | dasm_put(Dst, 3365); | 5626 | dasm_put(Dst, 3375); |
5607 | break; | 5627 | break; |
5608 | case BC_KPRI: | 5628 | case BC_KPRI: |
5609 | dasm_put(Dst, 3378, 32-3); | 5629 | dasm_put(Dst, 3388, 32-3); |
5610 | break; | 5630 | break; |
5611 | case BC_KNIL: | 5631 | case BC_KNIL: |
5612 | dasm_put(Dst, 3393); | 5632 | dasm_put(Dst, 3403); |
5613 | break; | 5633 | break; |
5614 | 5634 | ||
5615 | /* -- Upvalue and function ops ------------------------------------------ */ | 5635 | /* -- Upvalue and function ops ------------------------------------------ */ |
5616 | 5636 | ||
5617 | case BC_UGET: | 5637 | case BC_UGET: |
5618 | dasm_put(Dst, 3412, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); | 5638 | dasm_put(Dst, 3422, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); |
5619 | break; | 5639 | break; |
5620 | case BC_USETV: | 5640 | case BC_USETV: |
5621 | dasm_put(Dst, 3433, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -LJ_TISNUM, LJ_TISGCV - LJ_TISNUM, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); | 5641 | dasm_put(Dst, 3443, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -LJ_TISNUM, LJ_TISGCV - LJ_TISNUM, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); |
5622 | break; | 5642 | break; |
5623 | case BC_USETS: | 5643 | case BC_USETS: |
5624 | dasm_put(Dst, 3485, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_GC_WHITES, GG_DISP2G); | 5644 | dasm_put(Dst, 3495, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_GC_WHITES, GG_DISP2G); |
5625 | break; | 5645 | break; |
5626 | case BC_USETN: | 5646 | case BC_USETN: |
5627 | dasm_put(Dst, 3534, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); | 5647 | dasm_put(Dst, 3544, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); |
5628 | break; | 5648 | break; |
5629 | case BC_USETP: | 5649 | case BC_USETP: |
5630 | dasm_put(Dst, 3555, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v)); | 5650 | dasm_put(Dst, 3565, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v)); |
5631 | break; | 5651 | break; |
5632 | 5652 | ||
5633 | case BC_UCLO: | 5653 | case BC_UCLO: |
5634 | dasm_put(Dst, 3578, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); | 5654 | dasm_put(Dst, 3588, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); |
5635 | break; | 5655 | break; |
5636 | 5656 | ||
5637 | case BC_FNEW: | 5657 | case BC_FNEW: |
5638 | dasm_put(Dst, 3608, 32-1, Dt1(->base), Dt1(->base)); | 5658 | dasm_put(Dst, 3618, 32-1, Dt1(->base), Dt1(->base)); |
5639 | break; | 5659 | break; |
5640 | 5660 | ||
5641 | /* -- Table ops --------------------------------------------------------- */ | 5661 | /* -- Table ops --------------------------------------------------------- */ |
5642 | 5662 | ||
5643 | case BC_TNEW: | 5663 | case BC_TNEW: |
5644 | case BC_TDUP: | 5664 | case BC_TDUP: |
5645 | dasm_put(Dst, 3634, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); | 5665 | dasm_put(Dst, 3644, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); |
5646 | if (op == BC_TNEW) { | 5666 | if (op == BC_TNEW) { |
5647 | dasm_put(Dst, 3647); | 5667 | dasm_put(Dst, 3657); |
5648 | } else { | 5668 | } else { |
5649 | dasm_put(Dst, 3655, 32-1); | 5669 | dasm_put(Dst, 3665, 32-1); |
5650 | } | 5670 | } |
5651 | dasm_put(Dst, 3662, Dt1(->base)); | 5671 | dasm_put(Dst, 3672, Dt1(->base)); |
5652 | break; | 5672 | break; |
5653 | 5673 | ||
5654 | case BC_GGET: | 5674 | case BC_GGET: |
5655 | case BC_GSET: | 5675 | case BC_GSET: |
5656 | dasm_put(Dst, 3685, 32-1, Dt7(->env)); | 5676 | dasm_put(Dst, 3695, 32-1, Dt7(->env)); |
5657 | if (op == BC_GGET) { | 5677 | if (op == BC_GGET) { |
5658 | dasm_put(Dst, 3693); | 5678 | dasm_put(Dst, 3703); |
5659 | } else { | 5679 | } else { |
5660 | dasm_put(Dst, 3696); | 5680 | dasm_put(Dst, 3706); |
5661 | } | 5681 | } |
5662 | break; | 5682 | break; |
5663 | 5683 | ||
5664 | case BC_TGETV: | 5684 | case BC_TGETV: |
5665 | dasm_put(Dst, 3699, Dt6(->asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 5685 | dasm_put(Dst, 3709, Dt6(->asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
5666 | break; | 5686 | break; |
5667 | case BC_TGETS: | 5687 | case BC_TGETS: |
5668 | dasm_put(Dst, 3757, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 5688 | dasm_put(Dst, 3767, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
5669 | dasm_put(Dst, 3821); | 5689 | dasm_put(Dst, 3831); |
5670 | break; | 5690 | break; |
5671 | case BC_TGETB: | 5691 | case BC_TGETB: |
5672 | dasm_put(Dst, 3826, 32-3, Dt6(->asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 5692 | dasm_put(Dst, 3836, 32-3, Dt6(->asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
5673 | break; | 5693 | break; |
5674 | 5694 | ||
5675 | case BC_TSETV: | 5695 | case BC_TSETV: |
5676 | dasm_put(Dst, 3870, Dt6(->asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); | 5696 | dasm_put(Dst, 3880, Dt6(->asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); |
5677 | dasm_put(Dst, 3937, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); | 5697 | dasm_put(Dst, 3947, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); |
5678 | break; | 5698 | break; |
5679 | case BC_TSETS: | 5699 | case BC_TSETS: |
5680 | dasm_put(Dst, 3949, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), DtB(->val), LJ_GC_BLACK, DtB(->val), Dt6(->metatable)); | 5700 | dasm_put(Dst, 3959, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), DtB(->val), LJ_GC_BLACK, DtB(->val), Dt6(->metatable)); |
5681 | dasm_put(Dst, 4010, Dt6(->nomm), 1<<MM_newindex, DtB(->next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); | 5701 | dasm_put(Dst, 4020, Dt6(->nomm), 1<<MM_newindex, DtB(->next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); |
5682 | dasm_put(Dst, 4061, Dt6(->marked), Dt6(->gclist)); | 5702 | dasm_put(Dst, 4071, Dt6(->marked), Dt6(->gclist)); |
5683 | break; | 5703 | break; |
5684 | case BC_TSETB: | 5704 | case BC_TSETB: |
5685 | dasm_put(Dst, 4068, 32-3, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked)); | 5705 | dasm_put(Dst, 4078, 32-3, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked)); |
5686 | dasm_put(Dst, 4128, Dt6(->gclist)); | 5706 | dasm_put(Dst, 4138, Dt6(->gclist)); |
5687 | break; | 5707 | break; |
5688 | 5708 | ||
5689 | case BC_TSETM: | 5709 | case BC_TSETM: |
5690 | dasm_put(Dst, 4133, 32-3, Dt6(->asize), 31-3, Dt6(->marked), Dt6(->array), LJ_GC_BLACK, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); | 5710 | dasm_put(Dst, 4143, 32-3, Dt6(->asize), 31-3, Dt6(->marked), Dt6(->array), LJ_GC_BLACK, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); |
5691 | dasm_put(Dst, 4202); | 5711 | dasm_put(Dst, 4212); |
5692 | break; | 5712 | break; |
5693 | 5713 | ||
5694 | /* -- Calls and vararg handling ----------------------------------------- */ | 5714 | /* -- Calls and vararg handling ----------------------------------------- */ |
5695 | 5715 | ||
5696 | case BC_CALLM: | 5716 | case BC_CALLM: |
5697 | dasm_put(Dst, 4205); | 5717 | dasm_put(Dst, 4215); |
5698 | break; | 5718 | break; |
5699 | case BC_CALL: | 5719 | case BC_CALL: |
5700 | dasm_put(Dst, 4207, Dt7(->pc)); | 5720 | dasm_put(Dst, 4217, Dt7(->pc)); |
5701 | break; | 5721 | break; |
5702 | 5722 | ||
5703 | case BC_CALLMT: | 5723 | case BC_CALLMT: |
5704 | dasm_put(Dst, 4227); | 5724 | dasm_put(Dst, 4237); |
5705 | break; | 5725 | break; |
5706 | case BC_CALLT: | 5726 | case BC_CALLT: |
5707 | dasm_put(Dst, 4229, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); | 5727 | dasm_put(Dst, 4239, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); |
5708 | dasm_put(Dst, 4294, FRAME_TYPE); | 5728 | dasm_put(Dst, 4304, FRAME_TYPE); |
5709 | break; | 5729 | break; |
5710 | 5730 | ||
5711 | case BC_ITERC: | 5731 | case BC_ITERC: |
5712 | dasm_put(Dst, 4301, Dt7(->pc)); | 5732 | dasm_put(Dst, 4311, Dt7(->pc)); |
5713 | break; | 5733 | break; |
5714 | 5734 | ||
5715 | case BC_ITERN: | 5735 | case BC_ITERN: |
5716 | #if LJ_HASJIT | 5736 | #if LJ_HASJIT |
5717 | #endif | 5737 | #endif |
5718 | dasm_put(Dst, 4327, Dt6(->asize), Dt6(->array), 31-3, -(BCBIAS_J*4 >> 16), Dt6(->hmask), Dt6(->node), 31-5, 31-3, DtB(->key), -(BCBIAS_J*4 >> 16)); | 5738 | dasm_put(Dst, 4337, Dt6(->asize), Dt6(->array), 31-3, -(BCBIAS_J*4 >> 16), Dt6(->hmask), Dt6(->node), 31-5, 31-3, DtB(->key), -(BCBIAS_J*4 >> 16)); |
5719 | dasm_put(Dst, 4406); | 5739 | dasm_put(Dst, 4416); |
5720 | break; | 5740 | break; |
5721 | 5741 | ||
5722 | case BC_ISNEXT: | 5742 | case BC_ISNEXT: |
5723 | dasm_put(Dst, 4410, LJ_TTAB, LJ_TFUNC, LJ_TNIL, Dt8(->ffid), FF_next_N, 32-1, -(BCBIAS_J*4 >> 16), BC_JMP, BC_ITERC, -(BCBIAS_J*4 >> 16)); | 5743 | dasm_put(Dst, 4420, LJ_TTAB, LJ_TFUNC, LJ_TNIL, Dt8(->ffid), FF_next_N, 32-1, -(BCBIAS_J*4 >> 16), BC_JMP, BC_ITERC, -(BCBIAS_J*4 >> 16)); |
5724 | break; | 5744 | break; |
5725 | 5745 | ||
5726 | case BC_VARG: | 5746 | case BC_VARG: |
5727 | dasm_put(Dst, 4461, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); | 5747 | dasm_put(Dst, 4471, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); |
5728 | dasm_put(Dst, 4541); | 5748 | dasm_put(Dst, 4551); |
5729 | break; | 5749 | break; |
5730 | 5750 | ||
5731 | /* -- Returns ----------------------------------------------------------- */ | 5751 | /* -- Returns ----------------------------------------------------------- */ |
5732 | 5752 | ||
5733 | case BC_RETM: | 5753 | case BC_RETM: |
5734 | dasm_put(Dst, 4547); | 5754 | dasm_put(Dst, 4557); |
5735 | break; | 5755 | break; |
5736 | 5756 | ||
5737 | case BC_RET: | 5757 | case BC_RET: |
5738 | dasm_put(Dst, 4549, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); | 5758 | dasm_put(Dst, 4559, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); |
5739 | break; | 5759 | break; |
5740 | 5760 | ||
5741 | case BC_RET0: case BC_RET1: | 5761 | case BC_RET0: case BC_RET1: |
5742 | dasm_put(Dst, 4619, FRAME_TYPE, FRAME_VARG); | 5762 | dasm_put(Dst, 4629, FRAME_TYPE, FRAME_VARG); |
5743 | if (op == BC_RET1) { | 5763 | if (op == BC_RET1) { |
5744 | dasm_put(Dst, 4632); | 5764 | dasm_put(Dst, 4642); |
5745 | } | 5765 | } |
5746 | dasm_put(Dst, 4635, Dt7(->pc), PC2PROTO(k)); | 5766 | dasm_put(Dst, 4645, Dt7(->pc), PC2PROTO(k)); |
5747 | break; | 5767 | break; |
5748 | 5768 | ||
5749 | /* -- Loops and branches ------------------------------------------------ */ | 5769 | /* -- Loops and branches ------------------------------------------------ */ |
5750 | 5770 | ||
5751 | case BC_FORL: | 5771 | case BC_FORL: |
5752 | #if LJ_HASJIT | 5772 | #if LJ_HASJIT |
5753 | dasm_put(Dst, 4663); | 5773 | dasm_put(Dst, 4673); |
5754 | #endif | 5774 | #endif |
5755 | break; | 5775 | break; |
5756 | 5776 | ||
@@ -5762,35 +5782,35 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5762 | case BC_FORI: | 5782 | case BC_FORI: |
5763 | case BC_IFORL: | 5783 | case BC_IFORL: |
5764 | vk = (op == BC_IFORL || op == BC_JFORL); | 5784 | vk = (op == BC_IFORL || op == BC_JFORL); |
5765 | dasm_put(Dst, 4665, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); | 5785 | dasm_put(Dst, 4675, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); |
5766 | if (!vk) { | 5786 | if (!vk) { |
5767 | dasm_put(Dst, 4673); | 5787 | dasm_put(Dst, 4683); |
5768 | } | 5788 | } |
5769 | if (vk) { | 5789 | if (vk) { |
5770 | dasm_put(Dst, 4681, FORL_IDX*8); | 5790 | dasm_put(Dst, 4691, FORL_IDX*8); |
5771 | } | 5791 | } |
5772 | dasm_put(Dst, 4685, FORL_EXT*8); | 5792 | dasm_put(Dst, 4695, FORL_EXT*8); |
5773 | if (op != BC_JFORL) { | 5793 | if (op != BC_JFORL) { |
5774 | dasm_put(Dst, 4693, 32-1); | 5794 | dasm_put(Dst, 4703, 32-1); |
5775 | if (op == BC_JFORI) { | 5795 | if (op == BC_JFORI) { |
5776 | dasm_put(Dst, 4697, -(BCBIAS_J*4 >> 16)); | 5796 | dasm_put(Dst, 4707, -(BCBIAS_J*4 >> 16)); |
5777 | } else { | 5797 | } else { |
5778 | dasm_put(Dst, 4700, -(BCBIAS_J*4 >> 16)); | 5798 | dasm_put(Dst, 4710, -(BCBIAS_J*4 >> 16)); |
5779 | } | 5799 | } |
5780 | } | 5800 | } |
5781 | if (op == BC_FORI) { | 5801 | if (op == BC_FORI) { |
5782 | dasm_put(Dst, 4703); | 5802 | dasm_put(Dst, 4713); |
5783 | } else if (op == BC_IFORL) { | 5803 | } else if (op == BC_IFORL) { |
5784 | dasm_put(Dst, 4705); | 5804 | dasm_put(Dst, 4715); |
5785 | } else { | 5805 | } else { |
5786 | dasm_put(Dst, 4707, BC_JLOOP); | 5806 | dasm_put(Dst, 4717, BC_JLOOP); |
5787 | } | 5807 | } |
5788 | dasm_put(Dst, 4710); | 5808 | dasm_put(Dst, 4720); |
5789 | break; | 5809 | break; |
5790 | 5810 | ||
5791 | case BC_ITERL: | 5811 | case BC_ITERL: |
5792 | #if LJ_HASJIT | 5812 | #if LJ_HASJIT |
5793 | dasm_put(Dst, 4725); | 5813 | dasm_put(Dst, 4735); |
5794 | #endif | 5814 | #endif |
5795 | break; | 5815 | break; |
5796 | 5816 | ||
@@ -5799,40 +5819,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5799 | break; | 5819 | break; |
5800 | #endif | 5820 | #endif |
5801 | case BC_IITERL: | 5821 | case BC_IITERL: |
5802 | dasm_put(Dst, 4727); | 5822 | dasm_put(Dst, 4737); |
5803 | if (op == BC_JITERL) { | 5823 | if (op == BC_JITERL) { |
5804 | dasm_put(Dst, 4733); | 5824 | dasm_put(Dst, 4743); |
5805 | } else { | 5825 | } else { |
5806 | dasm_put(Dst, 4735, 32-1, -(BCBIAS_J*4 >> 16)); | 5826 | dasm_put(Dst, 4745, 32-1, -(BCBIAS_J*4 >> 16)); |
5807 | } | 5827 | } |
5808 | dasm_put(Dst, 4742); | 5828 | dasm_put(Dst, 4752); |
5809 | break; | 5829 | break; |
5810 | 5830 | ||
5811 | case BC_LOOP: | 5831 | case BC_LOOP: |
5812 | #if LJ_HASJIT | 5832 | #if LJ_HASJIT |
5813 | dasm_put(Dst, 4754); | 5833 | dasm_put(Dst, 4764); |
5814 | #endif | 5834 | #endif |
5815 | break; | 5835 | break; |
5816 | 5836 | ||
5817 | case BC_ILOOP: | 5837 | case BC_ILOOP: |
5818 | dasm_put(Dst, 4756); | 5838 | dasm_put(Dst, 4766); |
5819 | break; | 5839 | break; |
5820 | 5840 | ||
5821 | case BC_JLOOP: | 5841 | case BC_JLOOP: |
5822 | #if LJ_HASJIT | 5842 | #if LJ_HASJIT |
5823 | dasm_put(Dst, 4767); | 5843 | dasm_put(Dst, 4777); |
5824 | #endif | 5844 | #endif |
5825 | break; | 5845 | break; |
5826 | 5846 | ||
5827 | case BC_JMP: | 5847 | case BC_JMP: |
5828 | dasm_put(Dst, 4769, 32-1, -(BCBIAS_J*4 >> 16)); | 5848 | dasm_put(Dst, 4779, 32-1, -(BCBIAS_J*4 >> 16)); |
5829 | break; | 5849 | break; |
5830 | 5850 | ||
5831 | /* -- Function headers -------------------------------------------------- */ | 5851 | /* -- Function headers -------------------------------------------------- */ |
5832 | 5852 | ||
5833 | case BC_FUNCF: | 5853 | case BC_FUNCF: |
5834 | #if LJ_HASJIT | 5854 | #if LJ_HASJIT |
5835 | dasm_put(Dst, 4785); | 5855 | dasm_put(Dst, 4795); |
5836 | #endif | 5856 | #endif |
5837 | case BC_FUNCV: /* NYI: compiled vararg functions. */ | 5857 | case BC_FUNCV: /* NYI: compiled vararg functions. */ |
5838 | break; | 5858 | break; |
@@ -5842,38 +5862,38 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5842 | break; | 5862 | break; |
5843 | #endif | 5863 | #endif |
5844 | case BC_IFUNCF: | 5864 | case BC_IFUNCF: |
5845 | dasm_put(Dst, 4787, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); | 5865 | dasm_put(Dst, 4797, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); |
5846 | if (op == BC_JFUNCF) { | 5866 | if (op == BC_JFUNCF) { |
5847 | dasm_put(Dst, 4805); | 5867 | dasm_put(Dst, 4815); |
5848 | } else { | 5868 | } else { |
5849 | dasm_put(Dst, 4807); | 5869 | dasm_put(Dst, 4817); |
5850 | } | 5870 | } |
5851 | dasm_put(Dst, 4816); | 5871 | dasm_put(Dst, 4826); |
5852 | break; | 5872 | break; |
5853 | 5873 | ||
5854 | case BC_JFUNCV: | 5874 | case BC_JFUNCV: |
5855 | #if !LJ_HASJIT | 5875 | #if !LJ_HASJIT |
5856 | break; | 5876 | break; |
5857 | #endif | 5877 | #endif |
5858 | dasm_put(Dst, 4822); | 5878 | dasm_put(Dst, 4832); |
5859 | break; /* NYI: compiled vararg functions. */ | 5879 | break; /* NYI: compiled vararg functions. */ |
5860 | 5880 | ||
5861 | case BC_IFUNCV: | 5881 | case BC_IFUNCV: |
5862 | dasm_put(Dst, 4824, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams)); | 5882 | dasm_put(Dst, 4834, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams)); |
5863 | break; | 5883 | break; |
5864 | 5884 | ||
5865 | case BC_FUNCC: | 5885 | case BC_FUNCC: |
5866 | case BC_FUNCCW: | 5886 | case BC_FUNCCW: |
5867 | if (op == BC_FUNCC) { | 5887 | if (op == BC_FUNCC) { |
5868 | dasm_put(Dst, 4874, Dt8(->f)); | 5888 | dasm_put(Dst, 4884, Dt8(->f)); |
5869 | } else { | 5889 | } else { |
5870 | dasm_put(Dst, 4877, DISPATCH_GL(wrapf)); | 5890 | dasm_put(Dst, 4887, DISPATCH_GL(wrapf)); |
5871 | } | 5891 | } |
5872 | dasm_put(Dst, 4880, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); | 5892 | dasm_put(Dst, 4890, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); |
5873 | if (op == BC_FUNCCW) { | 5893 | if (op == BC_FUNCCW) { |
5874 | dasm_put(Dst, 4893, Dt8(->f)); | 5894 | dasm_put(Dst, 4903, Dt8(->f)); |
5875 | } | 5895 | } |
5876 | dasm_put(Dst, 4896, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); | 5896 | dasm_put(Dst, 4906, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); |
5877 | break; | 5897 | break; |
5878 | 5898 | ||
5879 | /* ---------------------------------------------------------------------- */ | 5899 | /* ---------------------------------------------------------------------- */ |
@@ -5893,7 +5913,7 @@ static int build_backend(BuildCtx *ctx) | |||
5893 | 5913 | ||
5894 | build_subroutines(ctx); | 5914 | build_subroutines(ctx); |
5895 | 5915 | ||
5896 | dasm_put(Dst, 4917); | 5916 | dasm_put(Dst, 4927); |
5897 | for (op = 0; op < BC__MAX; op++) | 5917 | for (op = 0; op < BC__MAX; op++) |
5898 | build_ins(ctx, (BCOp)op, op); | 5918 | build_ins(ctx, (BCOp)op, op); |
5899 | 5919 | ||