diff options
Diffstat (limited to 'src/buildvm_ppcspe.h')
-rw-r--r-- | src/buildvm_ppcspe.h | 438 |
1 files changed, 225 insertions, 213 deletions
diff --git a/src/buildvm_ppcspe.h b/src/buildvm_ppcspe.h index 0cedee2c..f3af36b0 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[4907] = { | 15 | static const unsigned int build_actionlist[4918] = { |
16 | 0x00010001, | 16 | 0x00010001, |
17 | 0x00060014, | 17 | 0x00060014, |
18 | 0x72000000, | 18 | 0x72000000, |
@@ -1056,9 +1056,14 @@ static const unsigned int build_actionlist[4907] = { | |||
1056 | 0x40800000, | 1056 | 0x40800000, |
1057 | 0x00050842, | 1057 | 0x00050842, |
1058 | 0x00000000, | 1058 | 0x00000000, |
1059 | 0x81230000, | ||
1060 | 0x00098200, | ||
1059 | 0x100a0301, | 1061 | 0x100a0301, |
1060 | 0x00090cab, | 1062 | 0x00090cab, |
1063 | 0x28090000, | ||
1061 | 0x3a8efff8, | 1064 | 0x3a8efff8, |
1065 | 0x40820000, | ||
1066 | 0x00050842, | ||
1062 | 0x106e0321, | 1067 | 0x106e0321, |
1063 | 0x134e0b21, | 1068 | 0x134e0b21, |
1064 | 0x39800000, | 1069 | 0x39800000, |
@@ -1115,13 +1120,13 @@ static const unsigned int build_actionlist[4907] = { | |||
1115 | 0x00098200, | 1120 | 0x00098200, |
1116 | 0x41820000, | 1121 | 0x41820000, |
1117 | 0x00050843, | 1122 | 0x00050843, |
1123 | 0x00000000, | ||
1118 | 0x7d244b78, | 1124 | 0x7d244b78, |
1119 | 0x48000001, | 1125 | 0x48000001, |
1120 | 0x0003000c, | 1126 | 0x0003000c, |
1121 | 0x28030000, | 1127 | 0x28030000, |
1122 | 0x39800000, | 1128 | 0x39800000, |
1123 | 0x00098200, | 1129 | 0x00098200, |
1124 | 0x00000000, | ||
1125 | 0x41820000, | 1130 | 0x41820000, |
1126 | 0x00050843, | 1131 | 0x00050843, |
1127 | 0x11030301, | 1132 | 0x11030301, |
@@ -1136,9 +1141,14 @@ static const unsigned int build_actionlist[4907] = { | |||
1136 | 0x820efff8, | 1141 | 0x820efff8, |
1137 | 0x40800000, | 1142 | 0x40800000, |
1138 | 0x00050842, | 1143 | 0x00050842, |
1144 | 0x81230000, | ||
1145 | 0x00098200, | ||
1139 | 0x100a0301, | 1146 | 0x100a0301, |
1140 | 0x00090cab, | 1147 | 0x00090cab, |
1148 | 0x28090000, | ||
1141 | 0x3a8efff8, | 1149 | 0x3a8efff8, |
1150 | 0x40820000, | ||
1151 | 0x00050842, | ||
1142 | 0x11000229, | 1152 | 0x11000229, |
1143 | 0x106e0321, | 1153 | 0x106e0321, |
1144 | 0x110e0b21, | 1154 | 0x110e0b21, |
@@ -1174,6 +1184,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1174 | 0x1004ca34, | 1184 | 0x1004ca34, |
1175 | 0x40800000, | 1185 | 0x40800000, |
1176 | 0x00050842, | 1186 | 0x00050842, |
1187 | 0x00000000, | ||
1177 | 0x39ce0010, | 1188 | 0x39ce0010, |
1178 | 0x54c607fe, | 1189 | 0x54c607fe, |
1179 | 0x000900ab, | 1190 | 0x000900ab, |
@@ -1185,7 +1196,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1185 | 0x48000000, | 1196 | 0x48000000, |
1186 | 0x00050024, | 1197 | 0x00050024, |
1187 | 0x00060052, | 1198 | 0x00060052, |
1188 | 0x00000000, | ||
1189 | 0x280b0008, | 1199 | 0x280b0008, |
1190 | 0x106e0301, | 1200 | 0x106e0301, |
1191 | 0x41800000, | 1201 | 0x41800000, |
@@ -1240,6 +1250,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1240 | 0x48000000, | 1250 | 0x48000000, |
1241 | 0x0005000c, | 1251 | 0x0005000c, |
1242 | 0x0006000d, | 1252 | 0x0006000d, |
1253 | 0x00000000, | ||
1243 | 0x38a00000, | 1254 | 0x38a00000, |
1244 | 0x7c751b78, | 1255 | 0x7c751b78, |
1245 | 0x38c00000, | 1256 | 0x38c00000, |
@@ -1250,7 +1261,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1250 | 0x00098200, | 1261 | 0x00098200, |
1251 | 0x28030000, | 1262 | 0x28030000, |
1252 | 0x00090200, | 1263 | 0x00090200, |
1253 | 0x00000000, | ||
1254 | 0x80d50000, | 1264 | 0x80d50000, |
1255 | 0x00098200, | 1265 | 0x00098200, |
1256 | 0x38000000, | 1266 | 0x38000000, |
@@ -1298,6 +1308,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1298 | 0x48000000, | 1308 | 0x48000000, |
1299 | 0x00050018, | 1309 | 0x00050018, |
1300 | 0x00060012, | 1310 | 0x00060012, |
1311 | 0x00000000, | ||
1301 | 0x72000000, | 1312 | 0x72000000, |
1302 | 0x00090200, | 1313 | 0x00090200, |
1303 | 0x38c6fff8, | 1314 | 0x38c6fff8, |
@@ -1308,7 +1319,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1308 | 0x00098200, | 1319 | 0x00098200, |
1309 | 0x39800000, | 1320 | 0x39800000, |
1310 | 0x00098200, | 1321 | 0x00098200, |
1311 | 0x00000000, | ||
1312 | 0x910efff8, | 1322 | 0x910efff8, |
1313 | 0x3a8efff8, | 1323 | 0x3a8efff8, |
1314 | 0x100e0321, | 1324 | 0x100e0321, |
@@ -1359,6 +1369,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1359 | 0x91d20000, | 1369 | 0x91d20000, |
1360 | 0x00098200, | 1370 | 0x00098200, |
1361 | 0x0006000c, | 1371 | 0x0006000c, |
1372 | 0x00000000, | ||
1362 | 0x7c085800, | 1373 | 0x7c085800, |
1363 | 0x100e4300, | 1374 | 0x100e4300, |
1364 | 0x41820000, | 1375 | 0x41820000, |
@@ -1368,7 +1379,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1368 | 0x48000000, | 1379 | 0x48000000, |
1369 | 0x0005000c, | 1380 | 0x0005000c, |
1370 | 0x0006000d, | 1381 | 0x0006000d, |
1371 | 0x00000000, | ||
1372 | 0x38a00000, | 1382 | 0x38a00000, |
1373 | 0x7c751b78, | 1383 | 0x7c751b78, |
1374 | 0x38c00000, | 1384 | 0x38c00000, |
@@ -1420,6 +1430,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1420 | 0x7d936378, | 1430 | 0x7d936378, |
1421 | 0x41820000, | 1431 | 0x41820000, |
1422 | 0x00050817, | 1432 | 0x00050817, |
1433 | 0x00000000, | ||
1423 | 0x48000000, | 1434 | 0x48000000, |
1424 | 0x00050018, | 1435 | 0x00050018, |
1425 | 0x00060012, | 1436 | 0x00060012, |
@@ -1428,7 +1439,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1428 | 0x48000001, | 1439 | 0x48000001, |
1429 | 0x0003000d, | 1440 | 0x0003000d, |
1430 | 0x00060013, | 1441 | 0x00060013, |
1431 | 0x00000000, | ||
1432 | 0x7e439378, | 1442 | 0x7e439378, |
1433 | 0x558400fe, | 1443 | 0x558400fe, |
1434 | 0x000900ab, | 1444 | 0x000900ab, |
@@ -1471,6 +1481,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1471 | 0x3a8efff8, | 1481 | 0x3a8efff8, |
1472 | 0x10740321, | 1482 | 0x10740321, |
1473 | 0x00060056, | 1483 | 0x00060056, |
1484 | 0x00000000, | ||
1474 | 0x39800000, | 1485 | 0x39800000, |
1475 | 0x00098200, | 1486 | 0x00098200, |
1476 | 0x00060043, | 1487 | 0x00060043, |
@@ -1479,7 +1490,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1479 | 0x7d936378, | 1490 | 0x7d936378, |
1480 | 0x40820000, | 1491 | 0x40820000, |
1481 | 0x00050818, | 1492 | 0x00050818, |
1482 | 0x00000000, | ||
1483 | 0x80f0fffc, | 1493 | 0x80f0fffc, |
1484 | 0x54ea5d78, | 1494 | 0x54ea5d78, |
1485 | 0x0006000f, | 1495 | 0x0006000f, |
@@ -1547,6 +1557,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1547 | 0x00050842, | 1557 | 0x00050842, |
1548 | 0x48000001, | 1558 | 0x48000001, |
1549 | 0x0003000e, | 1559 | 0x0003000e, |
1560 | 0x00000000, | ||
1550 | 0x1063222d, | 1561 | 0x1063222d, |
1551 | 0x48000000, | 1562 | 0x48000000, |
1552 | 0x00050045, | 1563 | 0x00050045, |
@@ -1559,7 +1570,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1559 | 0x1064222c, | 1570 | 0x1064222c, |
1560 | 0x40800000, | 1571 | 0x40800000, |
1561 | 0x00050842, | 1572 | 0x00050842, |
1562 | 0x00000000, | ||
1563 | 0x48000001, | 1573 | 0x48000001, |
1564 | 0x0003000f, | 1574 | 0x0003000f, |
1565 | 0x1063222d, | 1575 | 0x1063222d, |
@@ -1608,6 +1618,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1608 | 0x48000000, | 1618 | 0x48000000, |
1609 | 0x00050045, | 1619 | 0x00050045, |
1610 | 0x00060060, | 1620 | 0x00060060, |
1621 | 0x00000000, | ||
1611 | 0x280b0008, | 1622 | 0x280b0008, |
1612 | 0x108e0301, | 1623 | 0x108e0301, |
1613 | 0x41800000, | 1624 | 0x41800000, |
@@ -1622,7 +1633,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1622 | 0x48000000, | 1633 | 0x48000000, |
1623 | 0x00050045, | 1634 | 0x00050045, |
1624 | 0x00060061, | 1635 | 0x00060061, |
1625 | 0x00000000, | ||
1626 | 0x280b0008, | 1636 | 0x280b0008, |
1627 | 0x108e0301, | 1637 | 0x108e0301, |
1628 | 0x41800000, | 1638 | 0x41800000, |
@@ -1673,6 +1683,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1673 | 0x1064222c, | 1683 | 0x1064222c, |
1674 | 0x40800000, | 1684 | 0x40800000, |
1675 | 0x00050842, | 1685 | 0x00050842, |
1686 | 0x00000000, | ||
1676 | 0x48000001, | 1687 | 0x48000001, |
1677 | 0x00030017, | 1688 | 0x00030017, |
1678 | 0x1063222d, | 1689 | 0x1063222d, |
@@ -1687,7 +1698,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1687 | 0x1064222c, | 1698 | 0x1064222c, |
1688 | 0x40800000, | 1699 | 0x40800000, |
1689 | 0x00050842, | 1700 | 0x00050842, |
1690 | 0x00000000, | ||
1691 | 0x48000001, | 1701 | 0x48000001, |
1692 | 0x00030018, | 1702 | 0x00030018, |
1693 | 0x1063222d, | 1703 | 0x1063222d, |
@@ -1738,6 +1748,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1738 | 0x48000000, | 1748 | 0x48000000, |
1739 | 0x00050045, | 1749 | 0x00050045, |
1740 | 0x00060069, | 1750 | 0x00060069, |
1751 | 0x00000000, | ||
1741 | 0x280b0010, | 1752 | 0x280b0010, |
1742 | 0x108e0301, | 1753 | 0x108e0301, |
1743 | 0x10ce0b01, | 1754 | 0x10ce0b01, |
@@ -1754,7 +1765,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1754 | 0x48000000, | 1765 | 0x48000000, |
1755 | 0x00050045, | 1766 | 0x00050045, |
1756 | 0x0006006a, | 1767 | 0x0006006a, |
1757 | 0x00000000, | ||
1758 | 0x280b0010, | 1768 | 0x280b0010, |
1759 | 0x108e0301, | 1769 | 0x108e0301, |
1760 | 0x10ce0b01, | 1770 | 0x10ce0b01, |
@@ -1805,6 +1815,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1805 | 0x108e0301, | 1815 | 0x108e0301, |
1806 | 0x41800000, | 1816 | 0x41800000, |
1807 | 0x00050842, | 1817 | 0x00050842, |
1818 | 0x00000000, | ||
1808 | 0x1004b232, | 1819 | 0x1004b232, |
1809 | 0x1064222c, | 1820 | 0x1064222c, |
1810 | 0x40800000, | 1821 | 0x40800000, |
@@ -1822,7 +1833,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1822 | 0x10740321, | 1833 | 0x10740321, |
1823 | 0x39800000, | 1834 | 0x39800000, |
1824 | 0x00098200, | 1835 | 0x00098200, |
1825 | 0x00000000, | ||
1826 | 0x10940b21, | 1836 | 0x10940b21, |
1827 | 0x48000000, | 1837 | 0x48000000, |
1828 | 0x00050043, | 1838 | 0x00050043, |
@@ -1879,6 +1889,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1879 | 0x40800000, | 1889 | 0x40800000, |
1880 | 0x00050842, | 1890 | 0x00050842, |
1881 | 0x0006000b, | 1891 | 0x0006000b, |
1892 | 0x00000000, | ||
1882 | 0x108e4300, | 1893 | 0x108e4300, |
1883 | 0x7c885840, | 1894 | 0x7c885840, |
1884 | 0x1004b232, | 1895 | 0x1004b232, |
@@ -1893,7 +1904,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1893 | 0x48000000, | 1904 | 0x48000000, |
1894 | 0x0005000b, | 1905 | 0x0005000b, |
1895 | 0x00060072, | 1906 | 0x00060072, |
1896 | 0x00000000, | ||
1897 | 0x280b0008, | 1907 | 0x280b0008, |
1898 | 0x106e0301, | 1908 | 0x106e0301, |
1899 | 0x41800000, | 1909 | 0x41800000, |
@@ -1945,6 +1955,7 @@ static const unsigned int build_actionlist[4907] = { | |||
1945 | 0x1003b232, | 1955 | 0x1003b232, |
1946 | 0x38910000, | 1956 | 0x38910000, |
1947 | 0x00098200, | 1957 | 0x00098200, |
1958 | 0x00000000, | ||
1948 | 0x40800000, | 1959 | 0x40800000, |
1949 | 0x00050842, | 1960 | 0x00050842, |
1950 | 0x10001afa, | 1961 | 0x10001afa, |
@@ -1957,7 +1968,6 @@ static const unsigned int build_actionlist[4907] = { | |||
1957 | 0x7e439378, | 1968 | 0x7e439378, |
1958 | 0x91d20000, | 1969 | 0x91d20000, |
1959 | 0x00098200, | 1970 | 0x00098200, |
1960 | 0x00000000, | ||
1961 | 0x9201000c, | 1971 | 0x9201000c, |
1962 | 0x48000001, | 1972 | 0x48000001, |
1963 | 0x00030021, | 1973 | 0x00030021, |
@@ -2007,6 +2017,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2007 | 0x40810000, | 2017 | 0x40810000, |
2008 | 0x00050807, | 2018 | 0x00050807, |
2009 | 0x0006000d, | 2019 | 0x0006000d, |
2020 | 0x00000000, | ||
2010 | 0x7ca84851, | 2021 | 0x7ca84851, |
2011 | 0x38830000, | 2022 | 0x38830000, |
2012 | 0x00098200, | 2023 | 0x00098200, |
@@ -2022,7 +2033,6 @@ static const unsigned int build_actionlist[4907] = { | |||
2022 | 0x48000000, | 2033 | 0x48000000, |
2023 | 0x0005000c, | 2034 | 0x0005000c, |
2024 | 0x00060011, | 2035 | 0x00060011, |
2025 | 0x00000000, | ||
2026 | 0x2c860000, | 2036 | 0x2c860000, |
2027 | 0x7d00309e, | 2037 | 0x7d00309e, |
2028 | 0x7d00411e, | 2038 | 0x7d00411e, |
@@ -2070,6 +2080,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2070 | 0x41840000, | 2080 | 0x41840000, |
2071 | 0x00050842, | 2081 | 0x00050842, |
2072 | 0x0006000b, | 2082 | 0x0006000b, |
2083 | 0x00000000, | ||
2073 | 0x28090000, | 2084 | 0x28090000, |
2074 | 0x7c0449ae, | 2085 | 0x7c0449ae, |
2075 | 0x3929ffff, | 2086 | 0x3929ffff, |
@@ -2084,7 +2095,6 @@ static const unsigned int build_actionlist[4907] = { | |||
2084 | 0x48000000, | 2095 | 0x48000000, |
2085 | 0x00050045, | 2096 | 0x00050045, |
2086 | 0x00060078, | 2097 | 0x00060078, |
2087 | 0x00000000, | ||
2088 | 0x80110000, | 2098 | 0x80110000, |
2089 | 0x00098200, | 2099 | 0x00098200, |
2090 | 0x81110000, | 2100 | 0x81110000, |
@@ -2127,6 +2137,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2127 | 0x00098200, | 2137 | 0x00098200, |
2128 | 0x81110000, | 2138 | 0x81110000, |
2129 | 0x00098200, | 2139 | 0x00098200, |
2140 | 0x00000000, | ||
2130 | 0x7c004040, | 2141 | 0x7c004040, |
2131 | 0x40800001, | 2142 | 0x40800001, |
2132 | 0x0005084b, | 2143 | 0x0005084b, |
@@ -2143,7 +2154,6 @@ static const unsigned int build_actionlist[4907] = { | |||
2143 | 0x00098200, | 2154 | 0x00098200, |
2144 | 0x38630000, | 2155 | 0x38630000, |
2145 | 0x00098200, | 2156 | 0x00098200, |
2146 | 0x00000000, | ||
2147 | 0x80910000, | 2157 | 0x80910000, |
2148 | 0x00098200, | 2158 | 0x00098200, |
2149 | 0x7c082840, | 2159 | 0x7c082840, |
@@ -2191,6 +2201,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2191 | 0x41800000, | 2201 | 0x41800000, |
2192 | 0x00050842, | 2202 | 0x00050842, |
2193 | 0x0006000b, | 2203 | 0x0006000b, |
2204 | 0x00000000, | ||
2194 | 0x7c092840, | 2205 | 0x7c092840, |
2195 | 0x7d0348ae, | 2206 | 0x7d0348ae, |
2196 | 0x40800000, | 2207 | 0x40800000, |
@@ -2211,7 +2222,6 @@ static const unsigned int build_actionlist[4907] = { | |||
2211 | 0x1003c234, | 2222 | 0x1003c234, |
2212 | 0x40800000, | 2223 | 0x40800000, |
2213 | 0x00050842, | 2224 | 0x00050842, |
2214 | 0x00000000, | ||
2215 | 0x48000001, | 2225 | 0x48000001, |
2216 | 0x00030022, | 2226 | 0x00030022, |
2217 | 0x10601af1, | 2227 | 0x10601af1, |
@@ -2261,6 +2271,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2261 | 0x1003b232, | 2271 | 0x1003b232, |
2262 | 0x40800000, | 2272 | 0x40800000, |
2263 | 0x00050842, | 2273 | 0x00050842, |
2274 | 0x00000000, | ||
2264 | 0x1063dae0, | 2275 | 0x1063dae0, |
2265 | 0x39000008, | 2276 | 0x39000008, |
2266 | 0x0006000b, | 2277 | 0x0006000b, |
@@ -2277,7 +2288,6 @@ static const unsigned int build_actionlist[4907] = { | |||
2277 | 0x48000000, | 2288 | 0x48000000, |
2278 | 0x0005000b, | 2289 | 0x0005000b, |
2279 | 0x00060080, | 2290 | 0x00060080, |
2280 | 0x00000000, | ||
2281 | 0x280b0008, | 2291 | 0x280b0008, |
2282 | 0x106e0301, | 2292 | 0x106e0301, |
2283 | 0x41800000, | 2293 | 0x41800000, |
@@ -2338,6 +2348,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2338 | 0x1000b232, | 2348 | 0x1000b232, |
2339 | 0x40830000, | 2349 | 0x40830000, |
2340 | 0x00050842, | 2350 | 0x00050842, |
2351 | 0x00000000, | ||
2341 | 0x1084dae0, | 2352 | 0x1084dae0, |
2342 | 0x1063dae0, | 2353 | 0x1063dae0, |
2343 | 0x548406fe, | 2354 | 0x548406fe, |
@@ -2363,7 +2374,6 @@ static const unsigned int build_actionlist[4907] = { | |||
2363 | 0x48000000, | 2374 | 0x48000000, |
2364 | 0x00050045, | 2375 | 0x00050045, |
2365 | 0x00060085, | 2376 | 0x00060085, |
2366 | 0x00000000, | ||
2367 | 0x280b0010, | 2377 | 0x280b0010, |
2368 | 0x106e0301, | 2378 | 0x106e0301, |
2369 | 0x108e0b01, | 2379 | 0x108e0b01, |
@@ -2426,6 +2436,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2426 | 0x7c004840, | 2436 | 0x7c004840, |
2427 | 0x91d20000, | 2437 | 0x91d20000, |
2428 | 0x00098200, | 2438 | 0x00098200, |
2439 | 0x00000000, | ||
2429 | 0x91120000, | 2440 | 0x91120000, |
2430 | 0x00098200, | 2441 | 0x00098200, |
2431 | 0x7e439378, | 2442 | 0x7e439378, |
@@ -2442,7 +2453,6 @@ static const unsigned int build_actionlist[4907] = { | |||
2442 | 0x41810000, | 2453 | 0x41810000, |
2443 | 0x00050843, | 2454 | 0x00050843, |
2444 | 0x0006000b, | 2455 | 0x0006000b, |
2445 | 0x00000000, | ||
2446 | 0x80120000, | 2456 | 0x80120000, |
2447 | 0x00098200, | 2457 | 0x00098200, |
2448 | 0x814efffc, | 2458 | 0x814efffc, |
@@ -2490,6 +2500,7 @@ static const unsigned int build_actionlist[4907] = { | |||
2490 | 0x9201000c, | 2500 | 0x9201000c, |
2491 | 0x90120000, | 2501 | 0x90120000, |
2492 | 0x00098200, | 2502 | 0x00098200, |
2503 | 0x00000000, | ||
2493 | 0x7e439378, | 2504 | 0x7e439378, |
2494 | 0x48000001, | 2505 | 0x48000001, |
2495 | 0x00030023, | 2506 | 0x00030023, |
@@ -5297,74 +5308,75 @@ static void build_subroutines(BuildCtx *ctx) | |||
5297 | 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])); | 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])); |
5298 | 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)); | 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)); |
5299 | 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); | 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); |
5300 | dasm_put(Dst, 1043, Dt8(->upvalue[0]), (3+1)*8, Dt6(->asize), Dt6(->array), 31-3, (0+1)*8, (2+1)*8, Dt6(->hmask), (0+1)*8, (0+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); |
5301 | dasm_put(Dst, 1109, Dt8(->upvalue[0]), (3+1)*8, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 8+FRAME_PCALL, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 16+FRAME_PCALL); | 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)); |
5302 | dasm_put(Dst, 1173, LJ_TTHREAD, Dt1(->status), Dt1(->cframe), Dt1(->top), LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->base), LUA_YIELD); | 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)); |
5303 | dasm_put(Dst, 1238, Dt1(->top), ~LJ_VMST_INTERP, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top), (2+1)*8); | 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); |
5304 | dasm_put(Dst, 1296, 32-3, Dt8(->upvalue[0].gcr), Dt1(->status), Dt1(->cframe), Dt1(->top), LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top)); | 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)); |
5305 | dasm_put(Dst, 1356, Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE); | 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); |
5306 | dasm_put(Dst, 1416, 32-3, Dt1(->cframe), Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status), (1+1)*8, FRAME_TYPE); | 5317 | dasm_put(Dst, 1418, 32-3, Dt1(->cframe), Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status)); |
5307 | dasm_put(Dst, 1467); | 5318 | dasm_put(Dst, 1469, (1+1)*8, FRAME_TYPE); |
5308 | dasm_put(Dst, 1547); | 5319 | dasm_put(Dst, 1545); |
5309 | dasm_put(Dst, 1610); | 5320 | dasm_put(Dst, 1606); |
5310 | dasm_put(Dst, 1675); | 5321 | dasm_put(Dst, 1671); |
5311 | dasm_put(Dst, 1742, Dt8(->upvalue[0]), DISPATCH_GL(tmptv), DISPATCH_GL(tmptv), (2+1)*8); | 5322 | dasm_put(Dst, 1736, Dt8(->upvalue[0])); |
5312 | dasm_put(Dst, 1810, (2+1)*8); | 5323 | dasm_put(Dst, 1803, DISPATCH_GL(tmptv), DISPATCH_GL(tmptv), (2+1)*8, (2+1)*8); |
5313 | dasm_put(Dst, 1881, Dt5(->len), Dt5(->len), (0+1)*8, Dt5([1]), (1+1)*8, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmptv), Dt1(->base)); | 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)); |
5314 | dasm_put(Dst, 1945, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt5(->len), sizeof(GCstr)-1); | 5325 | dasm_put(Dst, 1943, Dt1(->base), Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt5(->len)); |
5315 | dasm_put(Dst, 2010, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(strempty)); | 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)); |
5316 | dasm_put(Dst, 2072, 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), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr)); | 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)); |
5317 | dasm_put(Dst, 2131, DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 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)); |
5318 | dasm_put(Dst, 2199); | 5329 | dasm_put(Dst, 2189); |
5319 | dasm_put(Dst, 2265); | 5330 | dasm_put(Dst, 2259); |
5320 | dasm_put(Dst, 2351, Dt8(->f), 8*LUA_MINSTACK-8, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), 31-3); | 5331 | dasm_put(Dst, 2336, Dt8(->f), 8*LUA_MINSTACK-8, Dt1(->maxstack), Dt1(->base)); |
5321 | dasm_put(Dst, 2430, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 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)); |
5333 | dasm_put(Dst, 2488, Dt1(->base), Dt1(->top)); | ||
5322 | #if LJ_HASJIT | 5334 | #if LJ_HASJIT |
5323 | dasm_put(Dst, 2490); | 5335 | dasm_put(Dst, 2501); |
5324 | #endif | 5336 | #endif |
5325 | dasm_put(Dst, 2492, 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)); | 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)); |
5326 | dasm_put(Dst, 2539, GG_DISP2STATIC); | 5338 | dasm_put(Dst, 2550, GG_DISP2STATIC); |
5327 | #if LJ_HASJIT | 5339 | #if LJ_HASJIT |
5328 | dasm_put(Dst, 2557); | 5340 | dasm_put(Dst, 2568); |
5329 | #endif | 5341 | #endif |
5330 | dasm_put(Dst, 2559); | 5342 | dasm_put(Dst, 2570); |
5331 | #if LJ_HASJIT | 5343 | #if LJ_HASJIT |
5332 | dasm_put(Dst, 2562); | 5344 | dasm_put(Dst, 2573); |
5333 | #endif | 5345 | #endif |
5334 | dasm_put(Dst, 2565); | 5346 | dasm_put(Dst, 2576); |
5335 | #if LJ_HASJIT | 5347 | #if LJ_HASJIT |
5336 | dasm_put(Dst, 2567); | 5348 | dasm_put(Dst, 2578); |
5337 | #endif | 5349 | #endif |
5338 | dasm_put(Dst, 2570, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 5350 | dasm_put(Dst, 2581, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); |
5339 | #if LJ_HASJIT | 5351 | #if LJ_HASJIT |
5340 | dasm_put(Dst, 2592); | 5352 | dasm_put(Dst, 2603); |
5341 | #endif | 5353 | #endif |
5342 | dasm_put(Dst, 2594); | 5354 | dasm_put(Dst, 2605); |
5343 | #if LJ_HASJIT | 5355 | #if LJ_HASJIT |
5344 | dasm_put(Dst, 2596); | 5356 | dasm_put(Dst, 2607); |
5345 | #endif | 5357 | #endif |
5346 | dasm_put(Dst, 2598); | 5358 | dasm_put(Dst, 2609); |
5347 | #if LJ_HASJIT | 5359 | #if LJ_HASJIT |
5348 | dasm_put(Dst, 2675); | 5360 | dasm_put(Dst, 2686); |
5349 | #else | 5361 | #else |
5350 | dasm_put(Dst, 2698); | 5362 | dasm_put(Dst, 2709); |
5351 | #endif | 5363 | #endif |
5352 | dasm_put(Dst, 2701); | 5364 | dasm_put(Dst, 2712); |
5353 | #if LJ_HASJIT | 5365 | #if LJ_HASJIT |
5354 | dasm_put(Dst, 2703); | 5366 | dasm_put(Dst, 2714); |
5355 | #endif | 5367 | #endif |
5356 | dasm_put(Dst, 2705); | 5368 | dasm_put(Dst, 2716); |
5357 | #if LJ_HASJIT | 5369 | #if LJ_HASJIT |
5358 | dasm_put(Dst, 2707); | 5370 | dasm_put(Dst, 2718); |
5359 | #endif | 5371 | #endif |
5360 | dasm_put(Dst, 2709); | 5372 | dasm_put(Dst, 2720); |
5361 | } | 5373 | } |
5362 | 5374 | ||
5363 | /* Generate the code for a single instruction. */ | 5375 | /* Generate the code for a single instruction. */ |
5364 | static void build_ins(BuildCtx *ctx, BCOp op, int defop) | 5376 | static void build_ins(BuildCtx *ctx, BCOp op, int defop) |
5365 | { | 5377 | { |
5366 | int vk = 0; | 5378 | int vk = 0; |
5367 | dasm_put(Dst, 2771, defop); | 5379 | dasm_put(Dst, 2782, defop); |
5368 | 5380 | ||
5369 | switch (op) { | 5381 | switch (op) { |
5370 | 5382 | ||
@@ -5373,112 +5385,112 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5373 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ | 5385 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ |
5374 | 5386 | ||
5375 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | 5387 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: |
5376 | dasm_put(Dst, 2773, -(BCBIAS_J*4 >> 16)); | 5388 | dasm_put(Dst, 2784, -(BCBIAS_J*4 >> 16)); |
5377 | if (op == BC_ISLE || op == BC_ISGT) { | 5389 | if (op == BC_ISLE || op == BC_ISGT) { |
5378 | dasm_put(Dst, 2787); | 5390 | dasm_put(Dst, 2798); |
5379 | } | 5391 | } |
5380 | if (op == BC_ISLT || op == BC_ISLE) { | 5392 | if (op == BC_ISLT || op == BC_ISLE) { |
5381 | dasm_put(Dst, 2790); | 5393 | dasm_put(Dst, 2801); |
5382 | } else { | 5394 | } else { |
5383 | dasm_put(Dst, 2792); | 5395 | dasm_put(Dst, 2803); |
5384 | } | 5396 | } |
5385 | dasm_put(Dst, 2794); | 5397 | dasm_put(Dst, 2805); |
5386 | break; | 5398 | break; |
5387 | 5399 | ||
5388 | case BC_ISEQV: case BC_ISNEV: | 5400 | case BC_ISEQV: case BC_ISNEV: |
5389 | vk = op == BC_ISEQV; | 5401 | vk = op == BC_ISEQV; |
5390 | dasm_put(Dst, 2805, -(BCBIAS_J*4 >> 16)); | 5402 | dasm_put(Dst, 2816, -(BCBIAS_J*4 >> 16)); |
5391 | if (vk) { | 5403 | if (vk) { |
5392 | dasm_put(Dst, 2819); | 5404 | dasm_put(Dst, 2830); |
5393 | } else { | 5405 | } else { |
5394 | dasm_put(Dst, 2821); | 5406 | dasm_put(Dst, 2832); |
5395 | } | 5407 | } |
5396 | dasm_put(Dst, 2823, ~LJ_TISPRI, ~LJ_TISTABUD); | 5408 | dasm_put(Dst, 2834, ~LJ_TISPRI, ~LJ_TISTABUD); |
5397 | if (vk) { | 5409 | if (vk) { |
5398 | dasm_put(Dst, 2845); | 5410 | dasm_put(Dst, 2856); |
5399 | } else { | 5411 | } else { |
5400 | dasm_put(Dst, 2847); | 5412 | dasm_put(Dst, 2858); |
5401 | } | 5413 | } |
5402 | dasm_put(Dst, 2849); | 5414 | dasm_put(Dst, 2860); |
5403 | if (vk) { | 5415 | if (vk) { |
5404 | dasm_put(Dst, 2851); | 5416 | dasm_put(Dst, 2862); |
5405 | } else { | 5417 | } else { |
5406 | dasm_put(Dst, 2853); | 5418 | dasm_put(Dst, 2864); |
5407 | } | 5419 | } |
5408 | dasm_put(Dst, 2855, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<<MM_eq); | 5420 | dasm_put(Dst, 2866, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<<MM_eq); |
5409 | break; | 5421 | break; |
5410 | 5422 | ||
5411 | case BC_ISEQS: case BC_ISNES: | 5423 | case BC_ISEQS: case BC_ISNES: |
5412 | vk = op == BC_ISEQS; | 5424 | vk = op == BC_ISEQS; |
5413 | dasm_put(Dst, 2876, 32-1, -(BCBIAS_J*4 >> 16)); | 5425 | dasm_put(Dst, 2887, 32-1, -(BCBIAS_J*4 >> 16)); |
5414 | if (vk) { | 5426 | if (vk) { |
5415 | dasm_put(Dst, 2890); | 5427 | dasm_put(Dst, 2901); |
5416 | } else { | 5428 | } else { |
5417 | dasm_put(Dst, 2892); | 5429 | dasm_put(Dst, 2903); |
5418 | } | 5430 | } |
5419 | dasm_put(Dst, 2894); | 5431 | dasm_put(Dst, 2905); |
5420 | break; | 5432 | break; |
5421 | 5433 | ||
5422 | case BC_ISEQN: case BC_ISNEN: | 5434 | case BC_ISEQN: case BC_ISNEN: |
5423 | vk = op == BC_ISEQN; | 5435 | vk = op == BC_ISEQN; |
5424 | dasm_put(Dst, 2905, -(BCBIAS_J*4 >> 16)); | 5436 | dasm_put(Dst, 2916, -(BCBIAS_J*4 >> 16)); |
5425 | if (vk) { | 5437 | if (vk) { |
5426 | dasm_put(Dst, 2919); | 5438 | dasm_put(Dst, 2930); |
5427 | } else { | 5439 | } else { |
5428 | dasm_put(Dst, 2922); | 5440 | dasm_put(Dst, 2933); |
5429 | } | 5441 | } |
5430 | dasm_put(Dst, 2924); | 5442 | dasm_put(Dst, 2935); |
5431 | if (!vk) { | 5443 | if (!vk) { |
5432 | dasm_put(Dst, 2936); | 5444 | dasm_put(Dst, 2947); |
5433 | } | 5445 | } |
5434 | break; | 5446 | break; |
5435 | 5447 | ||
5436 | case BC_ISEQP: case BC_ISNEP: | 5448 | case BC_ISEQP: case BC_ISNEP: |
5437 | vk = op == BC_ISEQP; | 5449 | vk = op == BC_ISEQP; |
5438 | dasm_put(Dst, 2942, 32-3, -(BCBIAS_J*4 >> 16)); | 5450 | dasm_put(Dst, 2953, 32-3, -(BCBIAS_J*4 >> 16)); |
5439 | if (vk) { | 5451 | if (vk) { |
5440 | dasm_put(Dst, 2954); | 5452 | dasm_put(Dst, 2965); |
5441 | } else { | 5453 | } else { |
5442 | dasm_put(Dst, 2956); | 5454 | dasm_put(Dst, 2967); |
5443 | } | 5455 | } |
5444 | dasm_put(Dst, 2958); | 5456 | dasm_put(Dst, 2969); |
5445 | break; | 5457 | break; |
5446 | 5458 | ||
5447 | /* -- Unary test and copy ops ------------------------------------------- */ | 5459 | /* -- Unary test and copy ops ------------------------------------------- */ |
5448 | 5460 | ||
5449 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | 5461 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: |
5450 | dasm_put(Dst, 2969); | 5462 | dasm_put(Dst, 2980); |
5451 | if (op == BC_IST || op == BC_ISF) { | 5463 | if (op == BC_IST || op == BC_ISF) { |
5452 | dasm_put(Dst, 2975, -(BCBIAS_J*4 >> 16)); | 5464 | dasm_put(Dst, 2986, -(BCBIAS_J*4 >> 16)); |
5453 | if (op == BC_IST) { | 5465 | if (op == BC_IST) { |
5454 | dasm_put(Dst, 2980); | 5466 | dasm_put(Dst, 2991); |
5455 | } else { | 5467 | } else { |
5456 | dasm_put(Dst, 2982); | 5468 | dasm_put(Dst, 2993); |
5457 | } | 5469 | } |
5458 | } else { | 5470 | } else { |
5459 | if (op == BC_ISTC) { | 5471 | if (op == BC_ISTC) { |
5460 | dasm_put(Dst, 2984); | 5472 | dasm_put(Dst, 2995); |
5461 | } else { | 5473 | } else { |
5462 | dasm_put(Dst, 2987); | 5474 | dasm_put(Dst, 2998); |
5463 | } | 5475 | } |
5464 | dasm_put(Dst, 2990, -(BCBIAS_J*4 >> 16)); | 5476 | dasm_put(Dst, 3001, -(BCBIAS_J*4 >> 16)); |
5465 | } | 5477 | } |
5466 | dasm_put(Dst, 2997); | 5478 | dasm_put(Dst, 3008); |
5467 | break; | 5479 | break; |
5468 | 5480 | ||
5469 | /* -- Unary ops --------------------------------------------------------- */ | 5481 | /* -- Unary ops --------------------------------------------------------- */ |
5470 | 5482 | ||
5471 | case BC_MOV: | 5483 | case BC_MOV: |
5472 | dasm_put(Dst, 3008); | 5484 | dasm_put(Dst, 3019); |
5473 | break; | 5485 | break; |
5474 | case BC_NOT: | 5486 | case BC_NOT: |
5475 | dasm_put(Dst, 3021, LJ_TTRUE); | 5487 | dasm_put(Dst, 3032, LJ_TTRUE); |
5476 | break; | 5488 | break; |
5477 | case BC_UNM: | 5489 | case BC_UNM: |
5478 | dasm_put(Dst, 3037); | 5490 | dasm_put(Dst, 3048); |
5479 | break; | 5491 | break; |
5480 | case BC_LEN: | 5492 | case BC_LEN: |
5481 | dasm_put(Dst, 3054, Dt5(->len)); | 5493 | dasm_put(Dst, 3065, Dt5(->len)); |
5482 | break; | 5494 | break; |
5483 | 5495 | ||
5484 | /* -- Binary ops -------------------------------------------------------- */ | 5496 | /* -- Binary ops -------------------------------------------------------- */ |
@@ -5488,257 +5500,257 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5488 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5500 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5489 | switch (vk) { | 5501 | switch (vk) { |
5490 | case 0: | 5502 | case 0: |
5491 | dasm_put(Dst, 3082); | 5503 | dasm_put(Dst, 3093); |
5492 | break; | 5504 | break; |
5493 | case 1: | 5505 | case 1: |
5494 | dasm_put(Dst, 3088); | 5506 | dasm_put(Dst, 3099); |
5495 | break; | 5507 | break; |
5496 | default: | 5508 | default: |
5497 | dasm_put(Dst, 3094); | 5509 | dasm_put(Dst, 3105); |
5498 | break; | 5510 | break; |
5499 | } | 5511 | } |
5500 | dasm_put(Dst, 3101); | 5512 | dasm_put(Dst, 3112); |
5501 | break; | 5513 | break; |
5502 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | 5514 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |
5503 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5515 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5504 | switch (vk) { | 5516 | switch (vk) { |
5505 | case 0: | 5517 | case 0: |
5506 | dasm_put(Dst, 3114); | 5518 | dasm_put(Dst, 3125); |
5507 | break; | 5519 | break; |
5508 | case 1: | 5520 | case 1: |
5509 | dasm_put(Dst, 3120); | 5521 | dasm_put(Dst, 3131); |
5510 | break; | 5522 | break; |
5511 | default: | 5523 | default: |
5512 | dasm_put(Dst, 3126); | 5524 | dasm_put(Dst, 3137); |
5513 | break; | 5525 | break; |
5514 | } | 5526 | } |
5515 | dasm_put(Dst, 3133); | 5527 | dasm_put(Dst, 3144); |
5516 | break; | 5528 | break; |
5517 | case BC_MULVN: case BC_MULNV: case BC_MULVV: | 5529 | case BC_MULVN: case BC_MULNV: case BC_MULVV: |
5518 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5530 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5519 | switch (vk) { | 5531 | switch (vk) { |
5520 | case 0: | 5532 | case 0: |
5521 | dasm_put(Dst, 3146); | 5533 | dasm_put(Dst, 3157); |
5522 | break; | 5534 | break; |
5523 | case 1: | 5535 | case 1: |
5524 | dasm_put(Dst, 3152); | 5536 | dasm_put(Dst, 3163); |
5525 | break; | 5537 | break; |
5526 | default: | 5538 | default: |
5527 | dasm_put(Dst, 3158); | 5539 | dasm_put(Dst, 3169); |
5528 | break; | 5540 | break; |
5529 | } | 5541 | } |
5530 | dasm_put(Dst, 3165); | 5542 | dasm_put(Dst, 3176); |
5531 | break; | 5543 | break; |
5532 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | 5544 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: |
5533 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5545 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5534 | switch (vk) { | 5546 | switch (vk) { |
5535 | case 0: | 5547 | case 0: |
5536 | dasm_put(Dst, 3178); | 5548 | dasm_put(Dst, 3189); |
5537 | break; | 5549 | break; |
5538 | case 1: | 5550 | case 1: |
5539 | dasm_put(Dst, 3184); | 5551 | dasm_put(Dst, 3195); |
5540 | break; | 5552 | break; |
5541 | default: | 5553 | default: |
5542 | dasm_put(Dst, 3190); | 5554 | dasm_put(Dst, 3201); |
5543 | break; | 5555 | break; |
5544 | } | 5556 | } |
5545 | dasm_put(Dst, 3197); | 5557 | dasm_put(Dst, 3208); |
5546 | break; | 5558 | break; |
5547 | case BC_MODVN: | 5559 | case BC_MODVN: |
5548 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5560 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5549 | switch (vk) { | 5561 | switch (vk) { |
5550 | case 0: | 5562 | case 0: |
5551 | dasm_put(Dst, 3210); | 5563 | dasm_put(Dst, 3221); |
5552 | break; | 5564 | break; |
5553 | case 1: | 5565 | case 1: |
5554 | dasm_put(Dst, 3216); | 5566 | dasm_put(Dst, 3227); |
5555 | break; | 5567 | break; |
5556 | default: | 5568 | default: |
5557 | dasm_put(Dst, 3222); | 5569 | dasm_put(Dst, 3233); |
5558 | break; | 5570 | break; |
5559 | } | 5571 | } |
5560 | dasm_put(Dst, 3229); | 5572 | dasm_put(Dst, 3240); |
5561 | break; | 5573 | break; |
5562 | case BC_MODNV: case BC_MODVV: | 5574 | case BC_MODNV: case BC_MODVV: |
5563 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 5575 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
5564 | switch (vk) { | 5576 | switch (vk) { |
5565 | case 0: | 5577 | case 0: |
5566 | dasm_put(Dst, 3247); | 5578 | dasm_put(Dst, 3258); |
5567 | break; | 5579 | break; |
5568 | case 1: | 5580 | case 1: |
5569 | dasm_put(Dst, 3253); | 5581 | dasm_put(Dst, 3264); |
5570 | break; | 5582 | break; |
5571 | default: | 5583 | default: |
5572 | dasm_put(Dst, 3259); | 5584 | dasm_put(Dst, 3270); |
5573 | break; | 5585 | break; |
5574 | } | 5586 | } |
5575 | dasm_put(Dst, 3266); | 5587 | dasm_put(Dst, 3277); |
5576 | break; | 5588 | break; |
5577 | case BC_POW: | 5589 | case BC_POW: |
5578 | dasm_put(Dst, 3269); | 5590 | dasm_put(Dst, 3280); |
5579 | break; | 5591 | break; |
5580 | 5592 | ||
5581 | case BC_CAT: | 5593 | case BC_CAT: |
5582 | dasm_put(Dst, 3291, Dt1(->base), 32-3, Dt1(->base)); | 5594 | dasm_put(Dst, 3302, Dt1(->base), 32-3, Dt1(->base)); |
5583 | break; | 5595 | break; |
5584 | 5596 | ||
5585 | /* -- Constant ops ------------------------------------------------------ */ | 5597 | /* -- Constant ops ------------------------------------------------------ */ |
5586 | 5598 | ||
5587 | case BC_KSTR: | 5599 | case BC_KSTR: |
5588 | dasm_put(Dst, 3321, 32-1); | 5600 | dasm_put(Dst, 3332, 32-1); |
5589 | break; | 5601 | break; |
5590 | case BC_KSHORT: | 5602 | case BC_KSHORT: |
5591 | dasm_put(Dst, 3338, 32-3); | 5603 | dasm_put(Dst, 3349, 32-3); |
5592 | break; | 5604 | break; |
5593 | case BC_KNUM: | 5605 | case BC_KNUM: |
5594 | dasm_put(Dst, 3354); | 5606 | dasm_put(Dst, 3365); |
5595 | break; | 5607 | break; |
5596 | case BC_KPRI: | 5608 | case BC_KPRI: |
5597 | dasm_put(Dst, 3367, 32-3); | 5609 | dasm_put(Dst, 3378, 32-3); |
5598 | break; | 5610 | break; |
5599 | case BC_KNIL: | 5611 | case BC_KNIL: |
5600 | dasm_put(Dst, 3382); | 5612 | dasm_put(Dst, 3393); |
5601 | break; | 5613 | break; |
5602 | 5614 | ||
5603 | /* -- Upvalue and function ops ------------------------------------------ */ | 5615 | /* -- Upvalue and function ops ------------------------------------------ */ |
5604 | 5616 | ||
5605 | case BC_UGET: | 5617 | case BC_UGET: |
5606 | dasm_put(Dst, 3401, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); | 5618 | dasm_put(Dst, 3412, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); |
5607 | break; | 5619 | break; |
5608 | case BC_USETV: | 5620 | case BC_USETV: |
5609 | dasm_put(Dst, 3422, 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); | 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); |
5610 | break; | 5622 | break; |
5611 | case BC_USETS: | 5623 | case BC_USETS: |
5612 | dasm_put(Dst, 3474, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_GC_WHITES, GG_DISP2G); | 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); |
5613 | break; | 5625 | break; |
5614 | case BC_USETN: | 5626 | case BC_USETN: |
5615 | dasm_put(Dst, 3523, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); | 5627 | dasm_put(Dst, 3534, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); |
5616 | break; | 5628 | break; |
5617 | case BC_USETP: | 5629 | case BC_USETP: |
5618 | dasm_put(Dst, 3544, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v)); | 5630 | dasm_put(Dst, 3555, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v)); |
5619 | break; | 5631 | break; |
5620 | 5632 | ||
5621 | case BC_UCLO: | 5633 | case BC_UCLO: |
5622 | dasm_put(Dst, 3567, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); | 5634 | dasm_put(Dst, 3578, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); |
5623 | break; | 5635 | break; |
5624 | 5636 | ||
5625 | case BC_FNEW: | 5637 | case BC_FNEW: |
5626 | dasm_put(Dst, 3597, 32-1, Dt1(->base), Dt1(->base)); | 5638 | dasm_put(Dst, 3608, 32-1, Dt1(->base), Dt1(->base)); |
5627 | break; | 5639 | break; |
5628 | 5640 | ||
5629 | /* -- Table ops --------------------------------------------------------- */ | 5641 | /* -- Table ops --------------------------------------------------------- */ |
5630 | 5642 | ||
5631 | case BC_TNEW: | 5643 | case BC_TNEW: |
5632 | case BC_TDUP: | 5644 | case BC_TDUP: |
5633 | dasm_put(Dst, 3623, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); | 5645 | dasm_put(Dst, 3634, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); |
5634 | if (op == BC_TNEW) { | 5646 | if (op == BC_TNEW) { |
5635 | dasm_put(Dst, 3636); | 5647 | dasm_put(Dst, 3647); |
5636 | } else { | 5648 | } else { |
5637 | dasm_put(Dst, 3644, 32-1); | 5649 | dasm_put(Dst, 3655, 32-1); |
5638 | } | 5650 | } |
5639 | dasm_put(Dst, 3651, Dt1(->base)); | 5651 | dasm_put(Dst, 3662, Dt1(->base)); |
5640 | break; | 5652 | break; |
5641 | 5653 | ||
5642 | case BC_GGET: | 5654 | case BC_GGET: |
5643 | case BC_GSET: | 5655 | case BC_GSET: |
5644 | dasm_put(Dst, 3674, 32-1, Dt7(->env)); | 5656 | dasm_put(Dst, 3685, 32-1, Dt7(->env)); |
5645 | if (op == BC_GGET) { | 5657 | if (op == BC_GGET) { |
5646 | dasm_put(Dst, 3682); | 5658 | dasm_put(Dst, 3693); |
5647 | } else { | 5659 | } else { |
5648 | dasm_put(Dst, 3685); | 5660 | dasm_put(Dst, 3696); |
5649 | } | 5661 | } |
5650 | break; | 5662 | break; |
5651 | 5663 | ||
5652 | case BC_TGETV: | 5664 | case BC_TGETV: |
5653 | dasm_put(Dst, 3688, Dt6(->asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 5665 | dasm_put(Dst, 3699, Dt6(->asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
5654 | break; | 5666 | break; |
5655 | case BC_TGETS: | 5667 | case BC_TGETS: |
5656 | dasm_put(Dst, 3746, 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); | 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); |
5657 | dasm_put(Dst, 3810); | 5669 | dasm_put(Dst, 3821); |
5658 | break; | 5670 | break; |
5659 | case BC_TGETB: | 5671 | case BC_TGETB: |
5660 | dasm_put(Dst, 3815, 32-3, Dt6(->asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 5672 | dasm_put(Dst, 3826, 32-3, Dt6(->asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
5661 | break; | 5673 | break; |
5662 | 5674 | ||
5663 | case BC_TSETV: | 5675 | case BC_TSETV: |
5664 | dasm_put(Dst, 3859, Dt6(->asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); | 5676 | dasm_put(Dst, 3870, Dt6(->asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); |
5665 | dasm_put(Dst, 3926, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); | 5677 | dasm_put(Dst, 3937, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); |
5666 | break; | 5678 | break; |
5667 | case BC_TSETS: | 5679 | case BC_TSETS: |
5668 | dasm_put(Dst, 3938, 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)); | 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)); |
5669 | dasm_put(Dst, 3999, 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)); | 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)); |
5670 | dasm_put(Dst, 4050, Dt6(->marked), Dt6(->gclist)); | 5682 | dasm_put(Dst, 4061, Dt6(->marked), Dt6(->gclist)); |
5671 | break; | 5683 | break; |
5672 | case BC_TSETB: | 5684 | case BC_TSETB: |
5673 | dasm_put(Dst, 4057, 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)); | 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)); |
5674 | dasm_put(Dst, 4117, Dt6(->gclist)); | 5686 | dasm_put(Dst, 4128, Dt6(->gclist)); |
5675 | break; | 5687 | break; |
5676 | 5688 | ||
5677 | case BC_TSETM: | 5689 | case BC_TSETM: |
5678 | dasm_put(Dst, 4122, 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)); | 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)); |
5679 | dasm_put(Dst, 4191); | 5691 | dasm_put(Dst, 4202); |
5680 | break; | 5692 | break; |
5681 | 5693 | ||
5682 | /* -- Calls and vararg handling ----------------------------------------- */ | 5694 | /* -- Calls and vararg handling ----------------------------------------- */ |
5683 | 5695 | ||
5684 | case BC_CALLM: | 5696 | case BC_CALLM: |
5685 | dasm_put(Dst, 4194); | 5697 | dasm_put(Dst, 4205); |
5686 | break; | 5698 | break; |
5687 | case BC_CALL: | 5699 | case BC_CALL: |
5688 | dasm_put(Dst, 4196, Dt7(->pc)); | 5700 | dasm_put(Dst, 4207, Dt7(->pc)); |
5689 | break; | 5701 | break; |
5690 | 5702 | ||
5691 | case BC_CALLMT: | 5703 | case BC_CALLMT: |
5692 | dasm_put(Dst, 4216); | 5704 | dasm_put(Dst, 4227); |
5693 | break; | 5705 | break; |
5694 | case BC_CALLT: | 5706 | case BC_CALLT: |
5695 | dasm_put(Dst, 4218, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); | 5707 | dasm_put(Dst, 4229, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); |
5696 | dasm_put(Dst, 4283, FRAME_TYPE); | 5708 | dasm_put(Dst, 4294, FRAME_TYPE); |
5697 | break; | 5709 | break; |
5698 | 5710 | ||
5699 | case BC_ITERC: | 5711 | case BC_ITERC: |
5700 | dasm_put(Dst, 4290, Dt7(->pc)); | 5712 | dasm_put(Dst, 4301, Dt7(->pc)); |
5701 | break; | 5713 | break; |
5702 | 5714 | ||
5703 | case BC_ITERN: | 5715 | case BC_ITERN: |
5704 | #if LJ_HASJIT | 5716 | #if LJ_HASJIT |
5705 | #endif | 5717 | #endif |
5706 | dasm_put(Dst, 4316, Dt6(->asize), Dt6(->array), 31-3, -(BCBIAS_J*4 >> 16), Dt6(->hmask), Dt6(->node), 31-5, 31-3, DtB(->key), -(BCBIAS_J*4 >> 16)); | 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)); |
5707 | dasm_put(Dst, 4395); | 5719 | dasm_put(Dst, 4406); |
5708 | break; | 5720 | break; |
5709 | 5721 | ||
5710 | case BC_ISNEXT: | 5722 | case BC_ISNEXT: |
5711 | dasm_put(Dst, 4399, 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)); | 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)); |
5712 | break; | 5724 | break; |
5713 | 5725 | ||
5714 | case BC_VARG: | 5726 | case BC_VARG: |
5715 | dasm_put(Dst, 4450, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); | 5727 | dasm_put(Dst, 4461, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); |
5716 | dasm_put(Dst, 4530); | 5728 | dasm_put(Dst, 4541); |
5717 | break; | 5729 | break; |
5718 | 5730 | ||
5719 | /* -- Returns ----------------------------------------------------------- */ | 5731 | /* -- Returns ----------------------------------------------------------- */ |
5720 | 5732 | ||
5721 | case BC_RETM: | 5733 | case BC_RETM: |
5722 | dasm_put(Dst, 4536); | 5734 | dasm_put(Dst, 4547); |
5723 | break; | 5735 | break; |
5724 | 5736 | ||
5725 | case BC_RET: | 5737 | case BC_RET: |
5726 | dasm_put(Dst, 4538, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); | 5738 | dasm_put(Dst, 4549, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); |
5727 | break; | 5739 | break; |
5728 | 5740 | ||
5729 | case BC_RET0: case BC_RET1: | 5741 | case BC_RET0: case BC_RET1: |
5730 | dasm_put(Dst, 4608, FRAME_TYPE, FRAME_VARG); | 5742 | dasm_put(Dst, 4619, FRAME_TYPE, FRAME_VARG); |
5731 | if (op == BC_RET1) { | 5743 | if (op == BC_RET1) { |
5732 | dasm_put(Dst, 4621); | 5744 | dasm_put(Dst, 4632); |
5733 | } | 5745 | } |
5734 | dasm_put(Dst, 4624, Dt7(->pc), PC2PROTO(k)); | 5746 | dasm_put(Dst, 4635, Dt7(->pc), PC2PROTO(k)); |
5735 | break; | 5747 | break; |
5736 | 5748 | ||
5737 | /* -- Loops and branches ------------------------------------------------ */ | 5749 | /* -- Loops and branches ------------------------------------------------ */ |
5738 | 5750 | ||
5739 | case BC_FORL: | 5751 | case BC_FORL: |
5740 | #if LJ_HASJIT | 5752 | #if LJ_HASJIT |
5741 | dasm_put(Dst, 4652); | 5753 | dasm_put(Dst, 4663); |
5742 | #endif | 5754 | #endif |
5743 | break; | 5755 | break; |
5744 | 5756 | ||
@@ -5750,35 +5762,35 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5750 | case BC_FORI: | 5762 | case BC_FORI: |
5751 | case BC_IFORL: | 5763 | case BC_IFORL: |
5752 | vk = (op == BC_IFORL || op == BC_JFORL); | 5764 | vk = (op == BC_IFORL || op == BC_JFORL); |
5753 | dasm_put(Dst, 4654, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); | 5765 | dasm_put(Dst, 4665, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); |
5754 | if (!vk) { | 5766 | if (!vk) { |
5755 | dasm_put(Dst, 4662); | 5767 | dasm_put(Dst, 4673); |
5756 | } | 5768 | } |
5757 | if (vk) { | 5769 | if (vk) { |
5758 | dasm_put(Dst, 4670, FORL_IDX*8); | 5770 | dasm_put(Dst, 4681, FORL_IDX*8); |
5759 | } | 5771 | } |
5760 | dasm_put(Dst, 4674, FORL_EXT*8); | 5772 | dasm_put(Dst, 4685, FORL_EXT*8); |
5761 | if (op != BC_JFORL) { | 5773 | if (op != BC_JFORL) { |
5762 | dasm_put(Dst, 4682, 32-1); | 5774 | dasm_put(Dst, 4693, 32-1); |
5763 | if (op == BC_JFORI) { | 5775 | if (op == BC_JFORI) { |
5764 | dasm_put(Dst, 4686, -(BCBIAS_J*4 >> 16)); | 5776 | dasm_put(Dst, 4697, -(BCBIAS_J*4 >> 16)); |
5765 | } else { | 5777 | } else { |
5766 | dasm_put(Dst, 4689, -(BCBIAS_J*4 >> 16)); | 5778 | dasm_put(Dst, 4700, -(BCBIAS_J*4 >> 16)); |
5767 | } | 5779 | } |
5768 | } | 5780 | } |
5769 | if (op == BC_FORI) { | 5781 | if (op == BC_FORI) { |
5770 | dasm_put(Dst, 4692); | 5782 | dasm_put(Dst, 4703); |
5771 | } else if (op == BC_IFORL) { | 5783 | } else if (op == BC_IFORL) { |
5772 | dasm_put(Dst, 4694); | 5784 | dasm_put(Dst, 4705); |
5773 | } else { | 5785 | } else { |
5774 | dasm_put(Dst, 4696, BC_JLOOP); | 5786 | dasm_put(Dst, 4707, BC_JLOOP); |
5775 | } | 5787 | } |
5776 | dasm_put(Dst, 4699); | 5788 | dasm_put(Dst, 4710); |
5777 | break; | 5789 | break; |
5778 | 5790 | ||
5779 | case BC_ITERL: | 5791 | case BC_ITERL: |
5780 | #if LJ_HASJIT | 5792 | #if LJ_HASJIT |
5781 | dasm_put(Dst, 4714); | 5793 | dasm_put(Dst, 4725); |
5782 | #endif | 5794 | #endif |
5783 | break; | 5795 | break; |
5784 | 5796 | ||
@@ -5787,40 +5799,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5787 | break; | 5799 | break; |
5788 | #endif | 5800 | #endif |
5789 | case BC_IITERL: | 5801 | case BC_IITERL: |
5790 | dasm_put(Dst, 4716); | 5802 | dasm_put(Dst, 4727); |
5791 | if (op == BC_JITERL) { | 5803 | if (op == BC_JITERL) { |
5792 | dasm_put(Dst, 4722); | 5804 | dasm_put(Dst, 4733); |
5793 | } else { | 5805 | } else { |
5794 | dasm_put(Dst, 4724, 32-1, -(BCBIAS_J*4 >> 16)); | 5806 | dasm_put(Dst, 4735, 32-1, -(BCBIAS_J*4 >> 16)); |
5795 | } | 5807 | } |
5796 | dasm_put(Dst, 4731); | 5808 | dasm_put(Dst, 4742); |
5797 | break; | 5809 | break; |
5798 | 5810 | ||
5799 | case BC_LOOP: | 5811 | case BC_LOOP: |
5800 | #if LJ_HASJIT | 5812 | #if LJ_HASJIT |
5801 | dasm_put(Dst, 4743); | 5813 | dasm_put(Dst, 4754); |
5802 | #endif | 5814 | #endif |
5803 | break; | 5815 | break; |
5804 | 5816 | ||
5805 | case BC_ILOOP: | 5817 | case BC_ILOOP: |
5806 | dasm_put(Dst, 4745); | 5818 | dasm_put(Dst, 4756); |
5807 | break; | 5819 | break; |
5808 | 5820 | ||
5809 | case BC_JLOOP: | 5821 | case BC_JLOOP: |
5810 | #if LJ_HASJIT | 5822 | #if LJ_HASJIT |
5811 | dasm_put(Dst, 4756); | 5823 | dasm_put(Dst, 4767); |
5812 | #endif | 5824 | #endif |
5813 | break; | 5825 | break; |
5814 | 5826 | ||
5815 | case BC_JMP: | 5827 | case BC_JMP: |
5816 | dasm_put(Dst, 4758, 32-1, -(BCBIAS_J*4 >> 16)); | 5828 | dasm_put(Dst, 4769, 32-1, -(BCBIAS_J*4 >> 16)); |
5817 | break; | 5829 | break; |
5818 | 5830 | ||
5819 | /* -- Function headers -------------------------------------------------- */ | 5831 | /* -- Function headers -------------------------------------------------- */ |
5820 | 5832 | ||
5821 | case BC_FUNCF: | 5833 | case BC_FUNCF: |
5822 | #if LJ_HASJIT | 5834 | #if LJ_HASJIT |
5823 | dasm_put(Dst, 4774); | 5835 | dasm_put(Dst, 4785); |
5824 | #endif | 5836 | #endif |
5825 | case BC_FUNCV: /* NYI: compiled vararg functions. */ | 5837 | case BC_FUNCV: /* NYI: compiled vararg functions. */ |
5826 | break; | 5838 | break; |
@@ -5830,38 +5842,38 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
5830 | break; | 5842 | break; |
5831 | #endif | 5843 | #endif |
5832 | case BC_IFUNCF: | 5844 | case BC_IFUNCF: |
5833 | dasm_put(Dst, 4776, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); | 5845 | dasm_put(Dst, 4787, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); |
5834 | if (op == BC_JFUNCF) { | 5846 | if (op == BC_JFUNCF) { |
5835 | dasm_put(Dst, 4794); | 5847 | dasm_put(Dst, 4805); |
5836 | } else { | 5848 | } else { |
5837 | dasm_put(Dst, 4796); | 5849 | dasm_put(Dst, 4807); |
5838 | } | 5850 | } |
5839 | dasm_put(Dst, 4805); | 5851 | dasm_put(Dst, 4816); |
5840 | break; | 5852 | break; |
5841 | 5853 | ||
5842 | case BC_JFUNCV: | 5854 | case BC_JFUNCV: |
5843 | #if !LJ_HASJIT | 5855 | #if !LJ_HASJIT |
5844 | break; | 5856 | break; |
5845 | #endif | 5857 | #endif |
5846 | dasm_put(Dst, 4811); | 5858 | dasm_put(Dst, 4822); |
5847 | break; /* NYI: compiled vararg functions. */ | 5859 | break; /* NYI: compiled vararg functions. */ |
5848 | 5860 | ||
5849 | case BC_IFUNCV: | 5861 | case BC_IFUNCV: |
5850 | dasm_put(Dst, 4813, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams)); | 5862 | dasm_put(Dst, 4824, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams)); |
5851 | break; | 5863 | break; |
5852 | 5864 | ||
5853 | case BC_FUNCC: | 5865 | case BC_FUNCC: |
5854 | case BC_FUNCCW: | 5866 | case BC_FUNCCW: |
5855 | if (op == BC_FUNCC) { | 5867 | if (op == BC_FUNCC) { |
5856 | dasm_put(Dst, 4863, Dt8(->f)); | 5868 | dasm_put(Dst, 4874, Dt8(->f)); |
5857 | } else { | 5869 | } else { |
5858 | dasm_put(Dst, 4866, DISPATCH_GL(wrapf)); | 5870 | dasm_put(Dst, 4877, DISPATCH_GL(wrapf)); |
5859 | } | 5871 | } |
5860 | dasm_put(Dst, 4869, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); | 5872 | dasm_put(Dst, 4880, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); |
5861 | if (op == BC_FUNCCW) { | 5873 | if (op == BC_FUNCCW) { |
5862 | dasm_put(Dst, 4882, Dt8(->f)); | 5874 | dasm_put(Dst, 4893, Dt8(->f)); |
5863 | } | 5875 | } |
5864 | dasm_put(Dst, 4885, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); | 5876 | dasm_put(Dst, 4896, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); |
5865 | break; | 5877 | break; |
5866 | 5878 | ||
5867 | /* ---------------------------------------------------------------------- */ | 5879 | /* ---------------------------------------------------------------------- */ |
@@ -5881,7 +5893,7 @@ static int build_backend(BuildCtx *ctx) | |||
5881 | 5893 | ||
5882 | build_subroutines(ctx); | 5894 | build_subroutines(ctx); |
5883 | 5895 | ||
5884 | dasm_put(Dst, 4906); | 5896 | dasm_put(Dst, 4917); |
5885 | for (op = 0; op < BC__MAX; op++) | 5897 | for (op = 0; op < BC__MAX; op++) |
5886 | build_ins(ctx, (BCOp)op, op); | 5898 | build_ins(ctx, (BCOp)op, op); |
5887 | 5899 | ||