diff options
author | Mike Pall <mike> | 2010-11-18 00:23:24 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-11-18 00:23:24 +0100 |
commit | ba602c9578e01b1d692beddf7e974fa70b6eecf2 (patch) | |
tree | 3ec1beecf5205801d9c1048aca92c97b5bafe859 /src | |
parent | 3754a8fe7a820bcfc5e2633d15c648a194dd4144 (diff) | |
download | luajit-ba602c9578e01b1d692beddf7e974fa70b6eecf2.tar.gz luajit-ba602c9578e01b1d692beddf7e974fa70b6eecf2.tar.bz2 luajit-ba602c9578e01b1d692beddf7e974fa70b6eecf2.zip |
Add support for __pairs and __ipairs metamethods (from Lua 5.2).
Diffstat (limited to 'src')
-rw-r--r-- | src/buildvm_ppc.dasc | 6 | ||||
-rw-r--r-- | src/buildvm_ppcspe.h | 438 | ||||
-rw-r--r-- | src/buildvm_x64.h | 926 | ||||
-rw-r--r-- | src/buildvm_x64win.h | 890 | ||||
-rw-r--r-- | src/buildvm_x86.dasc | 8 | ||||
-rw-r--r-- | src/buildvm_x86.h | 1028 | ||||
-rw-r--r-- | src/lib_base.c | 34 | ||||
-rw-r--r-- | src/lj_obj.h | 2 | ||||
-rw-r--r-- | src/lj_record.c | 63 |
9 files changed, 1729 insertions, 1666 deletions
diff --git a/src/buildvm_ppc.dasc b/src/buildvm_ppc.dasc index d9239d6b..06fc5078 100644 --- a/src/buildvm_ppc.dasc +++ b/src/buildvm_ppc.dasc | |||
@@ -1098,8 +1098,11 @@ static void build_subroutines(BuildCtx *ctx) | |||
1098 | | checktab TAB:CARG1 | 1098 | | checktab TAB:CARG1 |
1099 | | lwz PC, FRAME_PC(BASE) | 1099 | | lwz PC, FRAME_PC(BASE) |
1100 | | checkfail ->fff_fallback | 1100 | | checkfail ->fff_fallback |
1101 | | lwz TAB:TMP2, TAB:CARG1->metatable | ||
1101 | | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] | 1102 | | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] |
1103 | | cmplwi TAB:TMP2, 0 | ||
1102 | | la RA, -8(BASE) | 1104 | | la RA, -8(BASE) |
1105 | | bne ->fff_fallback | ||
1103 | | evstdd TAB:CARG1, 0(BASE) | 1106 | | evstdd TAB:CARG1, 0(BASE) |
1104 | | evstdd TISNIL, 8(BASE) | 1107 | | evstdd TISNIL, 8(BASE) |
1105 | | li RD, (3+1)*8 | 1108 | | li RD, (3+1)*8 |
@@ -1150,8 +1153,11 @@ static void build_subroutines(BuildCtx *ctx) | |||
1150 | | checktab TAB:CARG1 | 1153 | | checktab TAB:CARG1 |
1151 | | lwz PC, FRAME_PC(BASE) | 1154 | | lwz PC, FRAME_PC(BASE) |
1152 | | checkfail ->fff_fallback | 1155 | | checkfail ->fff_fallback |
1156 | | lwz TAB:TMP2, TAB:CARG1->metatable | ||
1153 | | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] | 1157 | | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] |
1158 | | cmplwi TAB:TMP2, 0 | ||
1154 | | la RA, -8(BASE) | 1159 | | la RA, -8(BASE) |
1160 | | bne ->fff_fallback | ||
1155 | | evsplati TMP1, 0 | 1161 | | evsplati TMP1, 0 |
1156 | | evstdd TAB:CARG1, 0(BASE) | 1162 | | evstdd TAB:CARG1, 0(BASE) |
1157 | | evstdd TMP1, 8(BASE) | 1163 | | evstdd TMP1, 8(BASE) |
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 | ||
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h index 8bcfd63f..af5c0b73 100644 --- a/src/buildvm_x64.h +++ b/src/buildvm_x64.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 char build_actionlist[14263] = { | 15 | static const unsigned char build_actionlist[14284] = { |
16 | 254,1,248,10,252,247,195,237,15,132,244,11,131,227,252,248,41,218,72,141, | 16 | 254,1,248,10,252,247,195,237,15,132,244,11,131,227,252,248,41,218,72,141, |
17 | 76,25,252,248,139,90,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,4, | 17 | 76,25,252,248,139,90,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,4, |
18 | 252,247,195,237,15,132,244,13,248,14,129,252,243,239,252,247,195,237,15,133, | 18 | 252,247,195,237,15,132,244,13,248,14,129,252,243,239,252,247,195,237,15,133, |
@@ -129,35 +129,36 @@ static const unsigned char build_actionlist[14263] = { | |||
129 | 141,82,8,137,252,239,137,92,36,28,232,251,1,11,139,149,233,133,192,15,132, | 129 | 141,82,8,137,252,239,137,92,36,28,232,251,1,11,139,149,233,133,192,15,132, |
130 | 244,249,72,139,106,8,72,139,66,16,72,137,106,252,248,72,137,2,248,68,184, | 130 | 244,249,72,139,106,8,72,139,66,16,72,137,106,252,248,72,137,2,248,68,184, |
131 | 237,252,233,244,69,248,2,199,66,12,237,252,233,244,1,248,3,199,66,252,252, | 131 | 237,252,233,244,69,248,2,199,66,12,237,252,233,244,1,248,3,199,66,252,252, |
132 | 237,252,233,244,58,248,70,129,252,248,239,15,130,244,55,255,139,106,252,248, | 132 | 237,252,233,244,58,248,70,129,252,248,239,15,130,244,55,255,139,42,129,122, |
133 | 129,122,253,4,239,15,133,244,55,139,133,233,139,90,252,252,199,66,252,252, | 133 | 253,4,239,15,133,244,55,131,189,233,0,15,133,244,55,139,106,252,248,139,133, |
134 | 237,137,66,252,248,199,66,12,237,184,237,252,233,244,69,248,71,129,252,248, | 134 | 233,139,90,252,252,199,66,252,252,237,137,66,252,248,199,66,12,237,184,237, |
135 | 239,15,130,244,55,129,122,253,4,239,15,133,244,55,129,122,253,12,239,15,135, | 135 | 252,233,244,69,248,71,129,252,248,239,15,130,244,55,129,122,253,4,239,15, |
136 | 244,55,139,90,252,252,255,252,242,15,16,66,8,72,189,237,237,102,72,15,110, | 136 | 133,244,55,129,122,253,12,239,255,15,135,244,55,139,90,252,252,255,252,242, |
137 | 205,252,242,15,88,193,252,242,15,45,192,252,242,15,17,66,252,248,255,139, | 137 | 15,16,66,8,72,189,237,237,102,72,15,110,205,252,242,15,88,193,252,242,15, |
138 | 42,59,133,233,15,131,244,248,193,224,3,3,133,233,248,1,129,120,253,4,239, | 138 | 45,192,252,242,15,17,66,252,248,255,139,42,59,133,233,15,131,244,248,193, |
139 | 15,132,244,72,72,139,40,72,137,42,252,233,244,68,248,2,131,189,233,0,15,132, | 139 | 224,3,3,133,233,248,1,129,120,253,4,239,15,132,244,72,72,139,40,72,137,42, |
140 | 244,72,137,252,239,137,213,137,198,232,251,1,12,137,252,234,133,192,15,133, | 140 | 252,233,244,68,248,2,131,189,233,0,15,132,244,72,137,252,239,137,213,137, |
141 | 244,1,248,72,184,237,252,233,244,69,248,73,255,129,252,248,239,15,130,244, | 141 | 198,232,251,1,12,137,252,234,133,192,15,133,244,1,248,72,184,237,252,233, |
142 | 55,139,106,252,248,129,122,253,4,239,15,133,244,55,139,133,233,139,90,252, | 142 | 244,69,248,73,255,129,252,248,239,15,130,244,55,139,42,129,122,253,4,239, |
143 | 252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242,15,17,66,8,255, | 143 | 15,133,244,55,131,189,233,0,15,133,244,55,139,106,252,248,139,133,233,139, |
144 | 217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129,252,248,239,15, | 144 | 90,252,252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242,15,17, |
145 | 130,244,55,141,74,8,131,232,1,187,237,248,1,65,15,182,174,233,193,252,237, | 145 | 66,8,255,217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129,252,248, |
146 | 235,131,229,1,1,252,235,252,233,244,27,248,75,129,252,248,239,15,130,244, | 146 | 239,15,130,244,55,141,74,8,131,232,1,187,237,248,1,65,15,182,174,233,193, |
147 | 55,129,122,253,12,239,15,133,244,55,255,139,106,4,137,106,12,199,66,4,237, | 147 | 252,237,235,131,229,1,1,252,235,252,233,244,27,248,75,129,252,248,239,15, |
148 | 139,42,139,90,8,137,106,8,137,26,141,74,16,131,232,2,187,237,252,233,244, | 148 | 130,244,55,129,122,253,12,239,15,133,244,55,255,139,106,4,137,106,12,199, |
149 | 1,248,76,129,252,248,239,15,130,244,55,139,42,139,90,252,252,137,92,36,28, | 149 | 66,4,237,139,42,139,90,8,137,106,8,137,26,141,74,16,131,232,2,187,237,252, |
150 | 137,44,36,129,122,253,4,239,15,133,244,55,72,131,189,233,0,15,133,244,55, | 150 | 233,244,1,248,76,129,252,248,239,15,130,244,55,139,42,139,90,252,252,137, |
151 | 128,189,233,235,15,135,244,55,139,141,233,15,132,244,247,255,59,141,233,15, | 151 | 92,36,28,137,44,36,129,122,253,4,239,15,133,244,55,72,131,189,233,0,15,133, |
152 | 132,244,55,248,1,141,92,193,252,240,59,157,233,15,135,244,55,137,157,233, | 152 | 244,55,128,189,233,235,15,135,244,55,139,141,233,15,132,244,247,255,59,141, |
153 | 139,108,36,24,137,149,233,131,194,8,137,149,233,141,108,194,232,72,41,221, | 153 | 233,15,132,244,55,248,1,141,92,193,252,240,59,157,233,15,135,244,55,137,157, |
154 | 57,203,15,132,244,249,248,2,72,139,4,43,72,137,67,252,248,131,252,235,8,57, | 154 | 233,139,108,36,24,137,149,233,131,194,8,137,149,233,141,108,194,232,72,41, |
155 | 203,15,133,244,2,248,3,137,206,139,60,36,232,244,24,65,199,134,233,237,255, | 155 | 221,57,203,15,132,244,249,248,2,72,139,4,43,72,137,67,252,248,131,252,235, |
156 | 139,108,36,24,139,28,36,139,149,233,129,252,248,239,15,135,244,254,248,4, | 156 | 8,57,203,15,133,244,2,248,3,137,206,139,60,36,232,244,24,65,199,134,233,237, |
157 | 139,139,233,68,139,187,233,137,139,233,68,137,252,251,41,203,15,132,244,252, | 157 | 255,139,108,36,24,139,28,36,139,149,233,129,252,248,239,15,135,244,254,248, |
158 | 141,4,26,193,252,235,3,59,133,233,15,135,244,255,137,213,72,41,205,248,5, | 158 | 4,139,139,233,68,139,187,233,137,139,233,68,137,252,251,41,203,15,132,244, |
159 | 72,139,1,72,137,4,41,131,193,8,68,57,252,249,15,133,244,5,248,6,141,67,2, | 159 | 252,141,4,26,193,252,235,3,59,133,233,15,135,244,255,137,213,72,41,205,248, |
160 | 199,66,252,252,237,248,7,139,92,36,28,137,68,36,4,72,199,193,252,248,252, | 160 | 5,72,139,1,72,137,4,41,131,193,8,68,57,252,249,15,133,244,5,248,6,141,67, |
161 | 2,199,66,252,252,237,248,7,139,92,36,28,137,68,36,4,72,199,193,252,248,252, | ||
161 | 255,252,255,252,255,252,247,195,237,255,15,132,244,13,252,233,244,14,248, | 162 | 255,252,255,252,255,252,247,195,237,255,15,132,244,13,252,233,244,14,248, |
162 | 8,199,66,252,252,237,139,139,233,131,252,233,8,137,139,233,72,139,1,72,137, | 163 | 8,199,66,252,252,237,139,139,233,131,252,233,8,137,139,233,72,139,1,72,137, |
163 | 2,184,237,252,233,244,7,248,9,139,12,36,68,137,185,233,137,222,137,252,239, | 164 | 2,184,237,252,233,244,7,248,9,139,12,36,68,137,185,233,137,222,137,252,239, |
@@ -1111,330 +1112,331 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
1111 | dasm_put(Dst, 2176, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1112 | dasm_put(Dst, 2176, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1112 | dasm_put(Dst, 2245, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); | 1113 | dasm_put(Dst, 2245, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); |
1113 | dasm_put(Dst, 2314, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); | 1114 | dasm_put(Dst, 2314, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); |
1114 | dasm_put(Dst, 2402, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); | 1115 | dasm_put(Dst, 2402, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); |
1116 | dasm_put(Dst, 2476); | ||
1115 | if (sse) { | 1117 | if (sse) { |
1116 | dasm_put(Dst, 2474, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1118 | dasm_put(Dst, 2485, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1117 | } else { | 1119 | } else { |
1118 | } | 1120 | } |
1119 | dasm_put(Dst, 2507, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); | 1121 | dasm_put(Dst, 2518, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); |
1120 | dasm_put(Dst, 2584, 1+1, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC); | 1122 | dasm_put(Dst, 2595, 1+1, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC); |
1121 | if (sse) { | 1123 | if (sse) { |
1122 | dasm_put(Dst, 2622); | 1124 | dasm_put(Dst, 2643); |
1123 | } else { | 1125 | } else { |
1124 | dasm_put(Dst, 2632); | 1126 | dasm_put(Dst, 2653); |
1125 | } | 1127 | } |
1126 | dasm_put(Dst, 2639, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); | 1128 | dasm_put(Dst, 2660, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); |
1127 | dasm_put(Dst, 2704, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); | 1129 | dasm_put(Dst, 2725, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); |
1128 | dasm_put(Dst, 2793, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); | 1130 | dasm_put(Dst, 2814, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); |
1129 | dasm_put(Dst, 2880, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); | 1131 | dasm_put(Dst, 2901, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); |
1130 | dasm_put(Dst, 2995, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); | 1132 | dasm_put(Dst, 3016, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); |
1131 | dasm_put(Dst, 3090, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); | 1133 | dasm_put(Dst, 3111, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); |
1132 | dasm_put(Dst, 3156, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); | 1134 | dasm_put(Dst, 3177, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); |
1133 | dasm_put(Dst, 3245, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); | 1135 | dasm_put(Dst, 3266, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); |
1134 | dasm_put(Dst, 3355, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); | 1136 | dasm_put(Dst, 3376, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); |
1135 | if (sse) { | 1137 | if (sse) { |
1136 | dasm_put(Dst, 3382, 1+1, LJ_TISNUM, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); | 1138 | dasm_put(Dst, 3403, 1+1, LJ_TISNUM, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); |
1137 | } else { | 1139 | } else { |
1138 | dasm_put(Dst, 3446, 1+1, LJ_TISNUM); | 1140 | dasm_put(Dst, 3467, 1+1, LJ_TISNUM); |
1139 | } | 1141 | } |
1140 | dasm_put(Dst, 3482, 1+1, FRAME_TYPE, LJ_TNIL); | 1142 | dasm_put(Dst, 3503, 1+1, FRAME_TYPE, LJ_TNIL); |
1141 | if (sse) { | 1143 | if (sse) { |
1142 | dasm_put(Dst, 3577, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1144 | dasm_put(Dst, 3598, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1143 | dasm_put(Dst, 3639, 1+1, LJ_TISNUM); | 1145 | dasm_put(Dst, 3660, 1+1, LJ_TISNUM); |
1144 | } else { | 1146 | } else { |
1145 | dasm_put(Dst, 3669, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1147 | dasm_put(Dst, 3690, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1146 | dasm_put(Dst, 3728, 1+1, LJ_TISNUM); | 1148 | dasm_put(Dst, 3749, 1+1, LJ_TISNUM); |
1147 | } | 1149 | } |
1148 | dasm_put(Dst, 3755, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1150 | dasm_put(Dst, 3776, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1149 | dasm_put(Dst, 3824, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1151 | dasm_put(Dst, 3845, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1150 | dasm_put(Dst, 3881, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1152 | dasm_put(Dst, 3902, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1151 | dasm_put(Dst, 3944, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1153 | dasm_put(Dst, 3965, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1152 | dasm_put(Dst, 4034); | 1154 | dasm_put(Dst, 4055); |
1153 | if (sse) { | 1155 | if (sse) { |
1154 | dasm_put(Dst, 4046, 1+1, LJ_TISNUM); | 1156 | dasm_put(Dst, 4067, 1+1, LJ_TISNUM); |
1155 | } else { | 1157 | } else { |
1156 | } | 1158 | } |
1157 | dasm_put(Dst, 4071); | 1159 | dasm_put(Dst, 4092); |
1158 | if (sse) { | 1160 | if (sse) { |
1159 | dasm_put(Dst, 4085, 1+1, LJ_TISNUM); | 1161 | dasm_put(Dst, 4106, 1+1, LJ_TISNUM); |
1160 | } else { | 1162 | } else { |
1161 | } | 1163 | } |
1162 | dasm_put(Dst, 4110); | 1164 | dasm_put(Dst, 4131); |
1163 | if (sse) { | 1165 | if (sse) { |
1164 | dasm_put(Dst, 4124, 1+1, LJ_TISNUM); | 1166 | dasm_put(Dst, 4145, 1+1, LJ_TISNUM); |
1165 | } else { | 1167 | } else { |
1166 | } | 1168 | } |
1167 | dasm_put(Dst, 4149); | 1169 | dasm_put(Dst, 4170); |
1168 | if (sse) { | 1170 | if (sse) { |
1169 | dasm_put(Dst, 4165, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1171 | dasm_put(Dst, 4186, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1170 | } else { | 1172 | } else { |
1171 | dasm_put(Dst, 4204, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1173 | dasm_put(Dst, 4225, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1172 | } | 1174 | } |
1173 | dasm_put(Dst, 4237, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); | 1175 | dasm_put(Dst, 4258, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); |
1174 | dasm_put(Dst, 4302, 1+1, LJ_TISNUM); | 1176 | dasm_put(Dst, 4323, 1+1, LJ_TISNUM); |
1175 | if (sse) { | 1177 | if (sse) { |
1176 | dasm_put(Dst, 4401); | 1178 | dasm_put(Dst, 4422); |
1177 | } else { | 1179 | } else { |
1178 | dasm_put(Dst, 4407); | 1180 | dasm_put(Dst, 4428); |
1179 | } | 1181 | } |
1180 | dasm_put(Dst, 4414); | 1182 | dasm_put(Dst, 4435); |
1181 | if (sse) { | 1183 | if (sse) { |
1182 | dasm_put(Dst, 4439); | 1184 | dasm_put(Dst, 4460); |
1183 | } else { | 1185 | } else { |
1184 | dasm_put(Dst, 4445); | 1186 | dasm_put(Dst, 4466); |
1185 | } | 1187 | } |
1186 | dasm_put(Dst, 4448, 1+2); | 1188 | dasm_put(Dst, 4469, 1+2); |
1187 | if (sse) { | 1189 | if (sse) { |
1188 | dasm_put(Dst, 4457); | 1190 | dasm_put(Dst, 4478); |
1189 | } else { | 1191 | } else { |
1190 | dasm_put(Dst, 4465); | 1192 | dasm_put(Dst, 4486); |
1191 | } | 1193 | } |
1192 | dasm_put(Dst, 4473); | 1194 | dasm_put(Dst, 4494); |
1193 | if (sse) { | 1195 | if (sse) { |
1194 | dasm_put(Dst, 4476, (unsigned int)(U64x(43500000,00000000)), (unsigned int)((U64x(43500000,00000000))>>32)); | 1196 | dasm_put(Dst, 4497, (unsigned int)(U64x(43500000,00000000)), (unsigned int)((U64x(43500000,00000000))>>32)); |
1195 | } else { | 1197 | } else { |
1196 | dasm_put(Dst, 4503); | 1198 | dasm_put(Dst, 4524); |
1197 | } | 1199 | } |
1198 | dasm_put(Dst, 4520); | 1200 | dasm_put(Dst, 4541); |
1199 | if (sse) { | 1201 | if (sse) { |
1200 | dasm_put(Dst, 4536, 1+1, LJ_TISNUM); | 1202 | dasm_put(Dst, 4557, 1+1, LJ_TISNUM); |
1201 | } else { | 1203 | } else { |
1202 | dasm_put(Dst, 4561, 1+1, LJ_TISNUM); | 1204 | dasm_put(Dst, 4582, 1+1, LJ_TISNUM); |
1203 | } | 1205 | } |
1204 | dasm_put(Dst, 4583); | 1206 | dasm_put(Dst, 4604); |
1205 | if (sse) { | 1207 | if (sse) { |
1206 | dasm_put(Dst, 4605); | 1208 | dasm_put(Dst, 4626); |
1207 | } else { | 1209 | } else { |
1208 | dasm_put(Dst, 4631); | 1210 | dasm_put(Dst, 4652); |
1209 | } | 1211 | } |
1210 | dasm_put(Dst, 4648, 1+2); | 1212 | dasm_put(Dst, 4669, 1+2); |
1211 | if (sse) { | 1213 | if (sse) { |
1212 | dasm_put(Dst, 4688); | 1214 | dasm_put(Dst, 4709); |
1213 | } else { | 1215 | } else { |
1214 | dasm_put(Dst, 4696); | 1216 | dasm_put(Dst, 4717); |
1215 | } | 1217 | } |
1216 | dasm_put(Dst, 4706, 2+1, LJ_TISNUM, LJ_TISNUM); | 1218 | dasm_put(Dst, 4727, 2+1, LJ_TISNUM, LJ_TISNUM); |
1217 | if (sse) { | 1219 | if (sse) { |
1218 | dasm_put(Dst, 4758, 2+1, LJ_TISNUM, LJ_TISNUM); | 1220 | dasm_put(Dst, 4779, 2+1, LJ_TISNUM, LJ_TISNUM); |
1219 | } else { | 1221 | } else { |
1220 | dasm_put(Dst, 4805, 2+1, LJ_TISNUM, LJ_TISNUM); | 1222 | dasm_put(Dst, 4826, 2+1, LJ_TISNUM, LJ_TISNUM); |
1221 | } | 1223 | } |
1222 | if (sse) { | 1224 | if (sse) { |
1223 | dasm_put(Dst, 4846, 1+1, LJ_TISNUM, LJ_TISNUM); | 1225 | dasm_put(Dst, 4867, 1+1, LJ_TISNUM, LJ_TISNUM); |
1224 | } else { | 1226 | } else { |
1225 | } | 1227 | } |
1226 | if (sse) { | 1228 | if (sse) { |
1227 | dasm_put(Dst, 4917, 1+1, LJ_TISNUM, LJ_TISNUM); | 1229 | dasm_put(Dst, 4938, 1+1, LJ_TISNUM, LJ_TISNUM); |
1228 | } else { | 1230 | } else { |
1229 | } | 1231 | } |
1230 | if (!sse) { | 1232 | if (!sse) { |
1231 | dasm_put(Dst, 4988); | 1233 | dasm_put(Dst, 5009); |
1232 | } | 1234 | } |
1233 | dasm_put(Dst, 4997, 1+1, LJ_TSTR); | 1235 | dasm_put(Dst, 5018, 1+1, LJ_TSTR); |
1234 | if (sse) { | 1236 | if (sse) { |
1235 | dasm_put(Dst, 5019, Dt5(->len)); | 1237 | dasm_put(Dst, 5040, Dt5(->len)); |
1236 | } else { | 1238 | } else { |
1237 | dasm_put(Dst, 5030, Dt5(->len)); | 1239 | dasm_put(Dst, 5051, Dt5(->len)); |
1238 | } | 1240 | } |
1239 | dasm_put(Dst, 5038, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); | 1241 | dasm_put(Dst, 5059, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); |
1240 | if (sse) { | 1242 | if (sse) { |
1241 | dasm_put(Dst, 5076); | 1243 | dasm_put(Dst, 5097); |
1242 | } else { | 1244 | } else { |
1243 | dasm_put(Dst, 5086); | 1245 | dasm_put(Dst, 5107); |
1244 | } | 1246 | } |
1245 | dasm_put(Dst, 5097, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); | 1247 | dasm_put(Dst, 5118, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); |
1246 | if (sse) { | 1248 | if (sse) { |
1247 | dasm_put(Dst, 5134); | 1249 | dasm_put(Dst, 5155); |
1248 | } else { | 1250 | } else { |
1249 | dasm_put(Dst, 5156); | 1251 | dasm_put(Dst, 5177); |
1250 | } | 1252 | } |
1251 | dasm_put(Dst, 5176, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); | 1253 | dasm_put(Dst, 5197, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); |
1252 | dasm_put(Dst, 2154); | 1254 | dasm_put(Dst, 2154); |
1253 | if (sse) { | 1255 | if (sse) { |
1254 | dasm_put(Dst, 5285); | 1256 | dasm_put(Dst, 5306); |
1255 | } else { | 1257 | } else { |
1256 | dasm_put(Dst, 5296); | 1258 | dasm_put(Dst, 5317); |
1257 | } | 1259 | } |
1258 | dasm_put(Dst, 5304, LJ_TSTR, LJ_TISNUM, Dt5(->len)); | 1260 | dasm_put(Dst, 5325, LJ_TSTR, LJ_TISNUM, Dt5(->len)); |
1259 | if (sse) { | 1261 | if (sse) { |
1260 | dasm_put(Dst, 5334); | 1262 | dasm_put(Dst, 5355); |
1261 | } else { | 1263 | } else { |
1262 | } | 1264 | } |
1263 | dasm_put(Dst, 5341, sizeof(GCstr)-1); | 1265 | dasm_put(Dst, 5362, sizeof(GCstr)-1); |
1264 | dasm_put(Dst, 5416, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1266 | dasm_put(Dst, 5437, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1265 | dasm_put(Dst, 5477, LJ_TSTR, LJ_TISNUM); | 1267 | dasm_put(Dst, 5498, LJ_TSTR, LJ_TISNUM); |
1266 | if (sse) { | 1268 | if (sse) { |
1267 | dasm_put(Dst, 5498); | 1269 | dasm_put(Dst, 5519); |
1268 | } else { | 1270 | } else { |
1269 | dasm_put(Dst, 5505); | 1271 | dasm_put(Dst, 5526); |
1270 | } | 1272 | } |
1271 | dasm_put(Dst, 5517, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); | 1273 | dasm_put(Dst, 5538, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); |
1272 | dasm_put(Dst, 5585, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1274 | dasm_put(Dst, 5606, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1273 | dasm_put(Dst, 5652, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); | 1275 | dasm_put(Dst, 5673, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); |
1274 | dasm_put(Dst, 5725, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); | 1276 | dasm_put(Dst, 5746, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); |
1275 | dasm_put(Dst, 5810, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1277 | dasm_put(Dst, 5831, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1276 | dasm_put(Dst, 5884, 1+1, LJ_TTAB); | 1278 | dasm_put(Dst, 5905, 1+1, LJ_TTAB); |
1277 | if (sse) { | 1279 | if (sse) { |
1278 | dasm_put(Dst, 5951); | 1280 | dasm_put(Dst, 5972); |
1279 | } else { | 1281 | } else { |
1280 | } | 1282 | } |
1281 | if (sse) { | 1283 | if (sse) { |
1282 | dasm_put(Dst, 5961, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1284 | dasm_put(Dst, 5982, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1283 | } else { | 1285 | } else { |
1284 | } | 1286 | } |
1285 | if (sse) { | 1287 | if (sse) { |
1286 | dasm_put(Dst, 6013, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1288 | dasm_put(Dst, 6034, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1287 | } else { | 1289 | } else { |
1288 | } | 1290 | } |
1289 | dasm_put(Dst, 6056, LJ_TISNUM); | 1291 | dasm_put(Dst, 6077, LJ_TISNUM); |
1290 | if (sse) { | 1292 | if (sse) { |
1291 | dasm_put(Dst, 6083); | 1293 | dasm_put(Dst, 6104); |
1292 | } else { | 1294 | } else { |
1293 | } | 1295 | } |
1294 | dasm_put(Dst, 6100); | 1296 | dasm_put(Dst, 6121); |
1295 | if (sse) { | 1297 | if (sse) { |
1296 | dasm_put(Dst, 6108, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1298 | dasm_put(Dst, 6129, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1297 | } else { | 1299 | } else { |
1298 | } | 1300 | } |
1299 | dasm_put(Dst, 6056, LJ_TISNUM); | 1301 | dasm_put(Dst, 6077, LJ_TISNUM); |
1300 | if (sse) { | 1302 | if (sse) { |
1301 | dasm_put(Dst, 6151); | 1303 | dasm_put(Dst, 6172); |
1302 | } else { | 1304 | } else { |
1303 | } | 1305 | } |
1304 | dasm_put(Dst, 6100); | 1306 | dasm_put(Dst, 6121); |
1305 | if (sse) { | 1307 | if (sse) { |
1306 | dasm_put(Dst, 6168, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1308 | dasm_put(Dst, 6189, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1307 | } else { | 1309 | } else { |
1308 | } | 1310 | } |
1309 | dasm_put(Dst, 6056, LJ_TISNUM); | 1311 | dasm_put(Dst, 6077, LJ_TISNUM); |
1310 | if (sse) { | 1312 | if (sse) { |
1311 | dasm_put(Dst, 6211); | 1313 | dasm_put(Dst, 6232); |
1312 | } else { | 1314 | } else { |
1313 | } | 1315 | } |
1314 | dasm_put(Dst, 6100); | 1316 | dasm_put(Dst, 6121); |
1315 | if (sse) { | 1317 | if (sse) { |
1316 | dasm_put(Dst, 6228, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1318 | dasm_put(Dst, 6249, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1317 | } else { | 1319 | } else { |
1318 | } | 1320 | } |
1319 | dasm_put(Dst, 6271); | 1321 | dasm_put(Dst, 6292); |
1320 | if (sse) { | 1322 | if (sse) { |
1321 | dasm_put(Dst, 6278, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1323 | dasm_put(Dst, 6299, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1322 | } else { | 1324 | } else { |
1323 | } | 1325 | } |
1324 | dasm_put(Dst, 6321); | 1326 | dasm_put(Dst, 6342); |
1325 | if (sse) { | 1327 | if (sse) { |
1326 | dasm_put(Dst, 6325); | 1328 | dasm_put(Dst, 6346); |
1327 | } else { | 1329 | } else { |
1328 | } | 1330 | } |
1329 | dasm_put(Dst, 6337); | 1331 | dasm_put(Dst, 6358); |
1330 | if (sse) { | 1332 | if (sse) { |
1331 | dasm_put(Dst, 6348, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1333 | dasm_put(Dst, 6369, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1332 | } else { | 1334 | } else { |
1333 | } | 1335 | } |
1334 | dasm_put(Dst, 6417); | 1336 | dasm_put(Dst, 6438); |
1335 | if (sse) { | 1337 | if (sse) { |
1336 | dasm_put(Dst, 6426, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1338 | dasm_put(Dst, 6447, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1337 | } else { | 1339 | } else { |
1338 | } | 1340 | } |
1339 | dasm_put(Dst, 6495); | 1341 | dasm_put(Dst, 6516); |
1340 | if (sse) { | 1342 | if (sse) { |
1341 | dasm_put(Dst, 6505, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1343 | dasm_put(Dst, 6526, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1342 | } else { | 1344 | } else { |
1343 | } | 1345 | } |
1344 | dasm_put(Dst, 6574); | 1346 | dasm_put(Dst, 6595); |
1345 | if (sse) { | 1347 | if (sse) { |
1346 | dasm_put(Dst, 6584, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1348 | dasm_put(Dst, 6605, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1347 | } else { | 1349 | } else { |
1348 | } | 1350 | } |
1349 | dasm_put(Dst, 6653); | 1351 | dasm_put(Dst, 6674); |
1350 | if (sse) { | 1352 | if (sse) { |
1351 | dasm_put(Dst, 6662, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1353 | dasm_put(Dst, 6683, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1352 | } else { | 1354 | } else { |
1353 | } | 1355 | } |
1354 | dasm_put(Dst, 6731, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); | 1356 | dasm_put(Dst, 6752, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); |
1355 | dasm_put(Dst, 6809, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); | 1357 | dasm_put(Dst, 6830, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); |
1356 | dasm_put(Dst, 6936, Dt1(->top), Dt1(->base), Dt1(->top)); | 1358 | dasm_put(Dst, 6957, Dt1(->top), Dt1(->base), Dt1(->top)); |
1357 | #if LJ_HASJIT | 1359 | #if LJ_HASJIT |
1358 | dasm_put(Dst, 6975, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); | 1360 | dasm_put(Dst, 6996, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); |
1359 | #endif | 1361 | #endif |
1360 | dasm_put(Dst, 7008, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); | 1362 | dasm_put(Dst, 7029, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); |
1361 | dasm_put(Dst, 7062, Dt1(->base), Dt1(->base), GG_DISP2STATIC); | 1363 | dasm_put(Dst, 7083, Dt1(->base), Dt1(->base), GG_DISP2STATIC); |
1362 | #if LJ_HASJIT | 1364 | #if LJ_HASJIT |
1363 | dasm_put(Dst, 7129, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); | 1365 | dasm_put(Dst, 7150, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); |
1364 | #endif | 1366 | #endif |
1365 | dasm_put(Dst, 7176); | 1367 | dasm_put(Dst, 7197); |
1366 | #if LJ_HASJIT | 1368 | #if LJ_HASJIT |
1367 | dasm_put(Dst, 7003); | 1369 | dasm_put(Dst, 7024); |
1368 | #endif | 1370 | #endif |
1369 | dasm_put(Dst, 7183); | 1371 | dasm_put(Dst, 7204); |
1370 | #if LJ_HASJIT | 1372 | #if LJ_HASJIT |
1371 | dasm_put(Dst, 7186); | 1373 | dasm_put(Dst, 7207); |
1372 | #endif | 1374 | #endif |
1373 | dasm_put(Dst, 7196, Dt1(->base), Dt1(->top)); | 1375 | dasm_put(Dst, 7217, Dt1(->base), Dt1(->top)); |
1374 | #if LJ_HASJIT | 1376 | #if LJ_HASJIT |
1375 | dasm_put(Dst, 7229); | 1377 | dasm_put(Dst, 7250); |
1376 | #endif | 1378 | #endif |
1377 | dasm_put(Dst, 7234, Dt1(->base), Dt1(->top)); | 1379 | dasm_put(Dst, 7255, Dt1(->base), Dt1(->top)); |
1378 | #if LJ_HASJIT | 1380 | #if LJ_HASJIT |
1379 | dasm_put(Dst, 7265, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 16*8, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); | 1381 | dasm_put(Dst, 7286, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 16*8, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); |
1380 | #endif | 1382 | #endif |
1381 | dasm_put(Dst, 7504); | 1383 | dasm_put(Dst, 7525); |
1382 | #if LJ_HASJIT | 1384 | #if LJ_HASJIT |
1383 | dasm_put(Dst, 7507, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); | 1385 | dasm_put(Dst, 7528, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); |
1384 | #endif | 1386 | #endif |
1385 | dasm_put(Dst, 7607); | 1387 | dasm_put(Dst, 7628); |
1386 | if (!sse) { | 1388 | if (!sse) { |
1387 | dasm_put(Dst, 7610); | 1389 | dasm_put(Dst, 7631); |
1388 | } | 1390 | } |
1389 | dasm_put(Dst, 7655, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1391 | dasm_put(Dst, 7676, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1390 | if (!sse) { | 1392 | if (!sse) { |
1391 | dasm_put(Dst, 7741); | 1393 | dasm_put(Dst, 7762); |
1392 | } | 1394 | } |
1393 | dasm_put(Dst, 7786, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); | 1395 | dasm_put(Dst, 7807, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); |
1394 | if (!sse) { | 1396 | if (!sse) { |
1395 | dasm_put(Dst, 7872); | 1397 | dasm_put(Dst, 7893); |
1396 | } | 1398 | } |
1397 | dasm_put(Dst, 7911, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1399 | dasm_put(Dst, 7932, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1398 | if (sse) { | 1400 | if (sse) { |
1399 | dasm_put(Dst, 8000, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1401 | dasm_put(Dst, 8021, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1400 | } else { | 1402 | } else { |
1401 | dasm_put(Dst, 8114); | 1403 | dasm_put(Dst, 8135); |
1402 | } | 1404 | } |
1403 | dasm_put(Dst, 8161); | 1405 | dasm_put(Dst, 8182); |
1404 | if (!sse) { | 1406 | if (!sse) { |
1405 | } else { | 1407 | } else { |
1406 | dasm_put(Dst, 8238); | 1408 | dasm_put(Dst, 8259); |
1407 | } | 1409 | } |
1408 | dasm_put(Dst, 8241); | 1410 | dasm_put(Dst, 8262); |
1409 | dasm_put(Dst, 8326, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1411 | dasm_put(Dst, 8347, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1410 | dasm_put(Dst, 8427, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); | 1412 | dasm_put(Dst, 8448, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); |
1411 | dasm_put(Dst, 8601); | 1413 | dasm_put(Dst, 8622); |
1412 | #if LJ_HASJIT | 1414 | #if LJ_HASJIT |
1413 | if (sse) { | 1415 | if (sse) { |
1414 | dasm_put(Dst, 8642); | 1416 | dasm_put(Dst, 8663); |
1415 | dasm_put(Dst, 8712); | 1417 | dasm_put(Dst, 8733); |
1416 | dasm_put(Dst, 8784); | 1418 | dasm_put(Dst, 8805); |
1417 | } else { | 1419 | } else { |
1418 | dasm_put(Dst, 8836); | 1420 | dasm_put(Dst, 8857); |
1419 | dasm_put(Dst, 8928); | 1421 | dasm_put(Dst, 8949); |
1420 | } | 1422 | } |
1421 | dasm_put(Dst, 8974); | 1423 | dasm_put(Dst, 8995); |
1422 | #endif | 1424 | #endif |
1423 | dasm_put(Dst, 8978); | 1425 | dasm_put(Dst, 8999); |
1424 | if (sse) { | 1426 | if (sse) { |
1425 | dasm_put(Dst, 8981, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); | 1427 | dasm_put(Dst, 9002, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); |
1426 | dasm_put(Dst, 9066, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); | 1428 | dasm_put(Dst, 9087, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); |
1427 | } else { | 1429 | } else { |
1428 | dasm_put(Dst, 9194); | 1430 | dasm_put(Dst, 9215); |
1429 | dasm_put(Dst, 9277); | 1431 | dasm_put(Dst, 9298); |
1430 | if (cmov) { | 1432 | if (cmov) { |
1431 | dasm_put(Dst, 9332); | 1433 | dasm_put(Dst, 9353); |
1432 | } else { | 1434 | } else { |
1433 | dasm_put(Dst, 9351); | 1435 | dasm_put(Dst, 9372); |
1434 | } | 1436 | } |
1435 | dasm_put(Dst, 8974); | 1437 | dasm_put(Dst, 8995); |
1436 | } | 1438 | } |
1437 | dasm_put(Dst, 9392); | 1439 | dasm_put(Dst, 9413); |
1438 | } | 1440 | } |
1439 | 1441 | ||
1440 | /* Generate the code for a single instruction. */ | 1442 | /* Generate the code for a single instruction. */ |
@@ -1450,618 +1452,618 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
1450 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ | 1452 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ |
1451 | 1453 | ||
1452 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | 1454 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: |
1453 | dasm_put(Dst, 9414, LJ_TISNUM, LJ_TISNUM); | 1455 | dasm_put(Dst, 9435, LJ_TISNUM, LJ_TISNUM); |
1454 | if (sse) { | 1456 | if (sse) { |
1455 | dasm_put(Dst, 9435); | 1457 | dasm_put(Dst, 9456); |
1456 | } else { | 1458 | } else { |
1457 | dasm_put(Dst, 9450); | 1459 | dasm_put(Dst, 9471); |
1458 | if (cmov) { | 1460 | if (cmov) { |
1459 | dasm_put(Dst, 9460); | 1461 | dasm_put(Dst, 9481); |
1460 | } else { | 1462 | } else { |
1461 | dasm_put(Dst, 9466); | 1463 | dasm_put(Dst, 9487); |
1462 | } | 1464 | } |
1463 | } | 1465 | } |
1464 | switch (op) { | 1466 | switch (op) { |
1465 | case BC_ISLT: | 1467 | case BC_ISLT: |
1466 | dasm_put(Dst, 9473); | 1468 | dasm_put(Dst, 9494); |
1467 | break; | 1469 | break; |
1468 | case BC_ISGE: | 1470 | case BC_ISGE: |
1469 | dasm_put(Dst, 9272); | 1471 | dasm_put(Dst, 9293); |
1470 | break; | 1472 | break; |
1471 | case BC_ISLE: | 1473 | case BC_ISLE: |
1472 | dasm_put(Dst, 5879); | 1474 | dasm_put(Dst, 5900); |
1473 | break; | 1475 | break; |
1474 | case BC_ISGT: | 1476 | case BC_ISGT: |
1475 | dasm_put(Dst, 9478); | 1477 | dasm_put(Dst, 9499); |
1476 | break; | 1478 | break; |
1477 | default: break; /* Shut up GCC. */ | 1479 | default: break; /* Shut up GCC. */ |
1478 | } | 1480 | } |
1479 | dasm_put(Dst, 9483, -BCBIAS_J*4); | 1481 | dasm_put(Dst, 9504, -BCBIAS_J*4); |
1480 | break; | 1482 | break; |
1481 | 1483 | ||
1482 | case BC_ISEQV: case BC_ISNEV: | 1484 | case BC_ISEQV: case BC_ISNEV: |
1483 | vk = op == BC_ISEQV; | 1485 | vk = op == BC_ISEQV; |
1484 | dasm_put(Dst, 9518, LJ_TISNUM, LJ_TISNUM); | 1486 | dasm_put(Dst, 9539, LJ_TISNUM, LJ_TISNUM); |
1485 | if (sse) { | 1487 | if (sse) { |
1486 | dasm_put(Dst, 9544); | 1488 | dasm_put(Dst, 9565); |
1487 | } else { | 1489 | } else { |
1488 | dasm_put(Dst, 9556); | 1490 | dasm_put(Dst, 9577); |
1489 | if (cmov) { | 1491 | if (cmov) { |
1490 | dasm_put(Dst, 9460); | 1492 | dasm_put(Dst, 9481); |
1491 | } else { | 1493 | } else { |
1492 | dasm_put(Dst, 9466); | 1494 | dasm_put(Dst, 9487); |
1493 | } | 1495 | } |
1494 | } | 1496 | } |
1495 | iseqne_fp: | 1497 | iseqne_fp: |
1496 | if (vk) { | 1498 | if (vk) { |
1497 | dasm_put(Dst, 9563); | 1499 | dasm_put(Dst, 9584); |
1498 | } else { | 1500 | } else { |
1499 | dasm_put(Dst, 9572); | 1501 | dasm_put(Dst, 9593); |
1500 | } | 1502 | } |
1501 | iseqne_end: | 1503 | iseqne_end: |
1502 | if (vk) { | 1504 | if (vk) { |
1503 | dasm_put(Dst, 9581, -BCBIAS_J*4); | 1505 | dasm_put(Dst, 9602, -BCBIAS_J*4); |
1504 | } else { | 1506 | } else { |
1505 | dasm_put(Dst, 9596, -BCBIAS_J*4); | 1507 | dasm_put(Dst, 9617, -BCBIAS_J*4); |
1506 | } | 1508 | } |
1507 | dasm_put(Dst, 9497); | 1509 | dasm_put(Dst, 9518); |
1508 | if (op == BC_ISEQV || op == BC_ISNEV) { | 1510 | if (op == BC_ISEQV || op == BC_ISNEV) { |
1509 | dasm_put(Dst, 9611, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); | 1511 | dasm_put(Dst, 9632, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); |
1510 | if (vk) { | 1512 | if (vk) { |
1511 | dasm_put(Dst, 9669); | 1513 | dasm_put(Dst, 9690); |
1512 | } else { | 1514 | } else { |
1513 | dasm_put(Dst, 9673); | 1515 | dasm_put(Dst, 9694); |
1514 | } | 1516 | } |
1515 | dasm_put(Dst, 9679); | 1517 | dasm_put(Dst, 9700); |
1516 | } | 1518 | } |
1517 | break; | 1519 | break; |
1518 | case BC_ISEQS: case BC_ISNES: | 1520 | case BC_ISEQS: case BC_ISNES: |
1519 | vk = op == BC_ISEQS; | 1521 | vk = op == BC_ISEQS; |
1520 | dasm_put(Dst, 9684, LJ_TSTR); | 1522 | dasm_put(Dst, 9705, LJ_TSTR); |
1521 | iseqne_test: | 1523 | iseqne_test: |
1522 | if (vk) { | 1524 | if (vk) { |
1523 | dasm_put(Dst, 9567); | 1525 | dasm_put(Dst, 9588); |
1524 | } else { | 1526 | } else { |
1525 | dasm_put(Dst, 2788); | 1527 | dasm_put(Dst, 2809); |
1526 | } | 1528 | } |
1527 | goto iseqne_end; | 1529 | goto iseqne_end; |
1528 | case BC_ISEQN: case BC_ISNEN: | 1530 | case BC_ISEQN: case BC_ISNEN: |
1529 | vk = op == BC_ISEQN; | 1531 | vk = op == BC_ISEQN; |
1530 | dasm_put(Dst, 9709, LJ_TISNUM); | 1532 | dasm_put(Dst, 9730, LJ_TISNUM); |
1531 | if (sse) { | 1533 | if (sse) { |
1532 | dasm_put(Dst, 9723); | 1534 | dasm_put(Dst, 9744); |
1533 | } else { | 1535 | } else { |
1534 | dasm_put(Dst, 9736); | 1536 | dasm_put(Dst, 9757); |
1535 | if (cmov) { | 1537 | if (cmov) { |
1536 | dasm_put(Dst, 9460); | 1538 | dasm_put(Dst, 9481); |
1537 | } else { | 1539 | } else { |
1538 | dasm_put(Dst, 9466); | 1540 | dasm_put(Dst, 9487); |
1539 | } | 1541 | } |
1540 | } | 1542 | } |
1541 | goto iseqne_fp; | 1543 | goto iseqne_fp; |
1542 | case BC_ISEQP: case BC_ISNEP: | 1544 | case BC_ISEQP: case BC_ISNEP: |
1543 | vk = op == BC_ISEQP; | 1545 | vk = op == BC_ISEQP; |
1544 | dasm_put(Dst, 9744); | 1546 | dasm_put(Dst, 9765); |
1545 | goto iseqne_test; | 1547 | goto iseqne_test; |
1546 | 1548 | ||
1547 | /* -- Unary test and copy ops ------------------------------------------- */ | 1549 | /* -- Unary test and copy ops ------------------------------------------- */ |
1548 | 1550 | ||
1549 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | 1551 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: |
1550 | dasm_put(Dst, 9756, LJ_TISTRUECOND); | 1552 | dasm_put(Dst, 9777, LJ_TISTRUECOND); |
1551 | if (op == BC_IST || op == BC_ISTC) { | 1553 | if (op == BC_IST || op == BC_ISTC) { |
1552 | dasm_put(Dst, 9768); | 1554 | dasm_put(Dst, 9789); |
1553 | } else { | 1555 | } else { |
1554 | dasm_put(Dst, 9773); | 1556 | dasm_put(Dst, 9794); |
1555 | } | 1557 | } |
1556 | if (op == BC_ISTC || op == BC_ISFC) { | 1558 | if (op == BC_ISTC || op == BC_ISFC) { |
1557 | dasm_put(Dst, 9778); | 1559 | dasm_put(Dst, 9799); |
1558 | } | 1560 | } |
1559 | dasm_put(Dst, 9789, -BCBIAS_J*4); | 1561 | dasm_put(Dst, 9810, -BCBIAS_J*4); |
1560 | break; | 1562 | break; |
1561 | 1563 | ||
1562 | /* -- Unary ops --------------------------------------------------------- */ | 1564 | /* -- Unary ops --------------------------------------------------------- */ |
1563 | 1565 | ||
1564 | case BC_MOV: | 1566 | case BC_MOV: |
1565 | dasm_put(Dst, 9822); | 1567 | dasm_put(Dst, 9843); |
1566 | break; | 1568 | break; |
1567 | case BC_NOT: | 1569 | case BC_NOT: |
1568 | dasm_put(Dst, 9851, LJ_TISTRUECOND, LJ_TTRUE); | 1570 | dasm_put(Dst, 9872, LJ_TISTRUECOND, LJ_TTRUE); |
1569 | break; | 1571 | break; |
1570 | case BC_UNM: | 1572 | case BC_UNM: |
1571 | dasm_put(Dst, 9888, LJ_TISNUM); | 1573 | dasm_put(Dst, 9909, LJ_TISNUM); |
1572 | if (sse) { | 1574 | if (sse) { |
1573 | dasm_put(Dst, 9899, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); | 1575 | dasm_put(Dst, 9920, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); |
1574 | } else { | 1576 | } else { |
1575 | dasm_put(Dst, 9924); | 1577 | dasm_put(Dst, 9945); |
1576 | } | 1578 | } |
1577 | dasm_put(Dst, 9497); | 1579 | dasm_put(Dst, 9518); |
1578 | break; | 1580 | break; |
1579 | case BC_LEN: | 1581 | case BC_LEN: |
1580 | dasm_put(Dst, 9933, LJ_TSTR); | 1582 | dasm_put(Dst, 9954, LJ_TSTR); |
1581 | if (sse) { | 1583 | if (sse) { |
1582 | dasm_put(Dst, 9947, Dt5(->len)); | 1584 | dasm_put(Dst, 9968, Dt5(->len)); |
1583 | } else { | 1585 | } else { |
1584 | dasm_put(Dst, 9965, Dt5(->len)); | 1586 | dasm_put(Dst, 9986, Dt5(->len)); |
1585 | } | 1587 | } |
1586 | dasm_put(Dst, 9974, LJ_TTAB); | 1588 | dasm_put(Dst, 9995, LJ_TTAB); |
1587 | if (sse) { | 1589 | if (sse) { |
1588 | dasm_put(Dst, 10016); | 1590 | dasm_put(Dst, 10037); |
1589 | } else { | 1591 | } else { |
1590 | } | 1592 | } |
1591 | dasm_put(Dst, 10025); | 1593 | dasm_put(Dst, 10046); |
1592 | break; | 1594 | break; |
1593 | 1595 | ||
1594 | /* -- Binary ops -------------------------------------------------------- */ | 1596 | /* -- Binary ops -------------------------------------------------------- */ |
1595 | 1597 | ||
1596 | 1598 | ||
1597 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | 1599 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: |
1598 | dasm_put(Dst, 10035); | 1600 | dasm_put(Dst, 10056); |
1599 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1601 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1600 | switch (vk) { | 1602 | switch (vk) { |
1601 | case 0: | 1603 | case 0: |
1602 | dasm_put(Dst, 10043, LJ_TISNUM); | 1604 | dasm_put(Dst, 10064, LJ_TISNUM); |
1603 | if (sse) { | 1605 | if (sse) { |
1604 | dasm_put(Dst, 10055); | 1606 | dasm_put(Dst, 10076); |
1605 | } else { | 1607 | } else { |
1606 | dasm_put(Dst, 10070); | 1608 | dasm_put(Dst, 10091); |
1607 | } | 1609 | } |
1608 | break; | 1610 | break; |
1609 | case 1: | 1611 | case 1: |
1610 | dasm_put(Dst, 10079, LJ_TISNUM); | 1612 | dasm_put(Dst, 10100, LJ_TISNUM); |
1611 | if (sse) { | 1613 | if (sse) { |
1612 | dasm_put(Dst, 10091); | 1614 | dasm_put(Dst, 10112); |
1613 | } else { | 1615 | } else { |
1614 | dasm_put(Dst, 10106); | 1616 | dasm_put(Dst, 10127); |
1615 | } | 1617 | } |
1616 | break; | 1618 | break; |
1617 | default: | 1619 | default: |
1618 | dasm_put(Dst, 10115, LJ_TISNUM, LJ_TISNUM); | 1620 | dasm_put(Dst, 10136, LJ_TISNUM, LJ_TISNUM); |
1619 | if (sse) { | 1621 | if (sse) { |
1620 | dasm_put(Dst, 10137); | 1622 | dasm_put(Dst, 10158); |
1621 | } else { | 1623 | } else { |
1622 | dasm_put(Dst, 10151); | 1624 | dasm_put(Dst, 10172); |
1623 | } | 1625 | } |
1624 | break; | 1626 | break; |
1625 | } | 1627 | } |
1626 | if (sse) { | 1628 | if (sse) { |
1627 | dasm_put(Dst, 9917); | 1629 | dasm_put(Dst, 9938); |
1628 | } else { | 1630 | } else { |
1629 | dasm_put(Dst, 9929); | 1631 | dasm_put(Dst, 9950); |
1630 | } | 1632 | } |
1631 | dasm_put(Dst, 9497); | 1633 | dasm_put(Dst, 9518); |
1632 | break; | 1634 | break; |
1633 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | 1635 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |
1634 | dasm_put(Dst, 10035); | 1636 | dasm_put(Dst, 10056); |
1635 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1637 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1636 | switch (vk) { | 1638 | switch (vk) { |
1637 | case 0: | 1639 | case 0: |
1638 | dasm_put(Dst, 10043, LJ_TISNUM); | 1640 | dasm_put(Dst, 10064, LJ_TISNUM); |
1639 | if (sse) { | 1641 | if (sse) { |
1640 | dasm_put(Dst, 10159); | 1642 | dasm_put(Dst, 10180); |
1641 | } else { | 1643 | } else { |
1642 | dasm_put(Dst, 10174); | 1644 | dasm_put(Dst, 10195); |
1643 | } | 1645 | } |
1644 | break; | 1646 | break; |
1645 | case 1: | 1647 | case 1: |
1646 | dasm_put(Dst, 10079, LJ_TISNUM); | 1648 | dasm_put(Dst, 10100, LJ_TISNUM); |
1647 | if (sse) { | 1649 | if (sse) { |
1648 | dasm_put(Dst, 10183); | 1650 | dasm_put(Dst, 10204); |
1649 | } else { | 1651 | } else { |
1650 | dasm_put(Dst, 10198); | 1652 | dasm_put(Dst, 10219); |
1651 | } | 1653 | } |
1652 | break; | 1654 | break; |
1653 | default: | 1655 | default: |
1654 | dasm_put(Dst, 10115, LJ_TISNUM, LJ_TISNUM); | 1656 | dasm_put(Dst, 10136, LJ_TISNUM, LJ_TISNUM); |
1655 | if (sse) { | 1657 | if (sse) { |
1656 | dasm_put(Dst, 10207); | 1658 | dasm_put(Dst, 10228); |
1657 | } else { | 1659 | } else { |
1658 | dasm_put(Dst, 10221); | 1660 | dasm_put(Dst, 10242); |
1659 | } | 1661 | } |
1660 | break; | 1662 | break; |
1661 | } | 1663 | } |
1662 | if (sse) { | 1664 | if (sse) { |
1663 | dasm_put(Dst, 9917); | 1665 | dasm_put(Dst, 9938); |
1664 | } else { | 1666 | } else { |
1665 | dasm_put(Dst, 9929); | 1667 | dasm_put(Dst, 9950); |
1666 | } | 1668 | } |
1667 | dasm_put(Dst, 9497); | 1669 | dasm_put(Dst, 9518); |
1668 | break; | 1670 | break; |
1669 | case BC_MULVN: case BC_MULNV: case BC_MULVV: | 1671 | case BC_MULVN: case BC_MULNV: case BC_MULVV: |
1670 | dasm_put(Dst, 10035); | 1672 | dasm_put(Dst, 10056); |
1671 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1673 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1672 | switch (vk) { | 1674 | switch (vk) { |
1673 | case 0: | 1675 | case 0: |
1674 | dasm_put(Dst, 10043, LJ_TISNUM); | 1676 | dasm_put(Dst, 10064, LJ_TISNUM); |
1675 | if (sse) { | 1677 | if (sse) { |
1676 | dasm_put(Dst, 10229); | 1678 | dasm_put(Dst, 10250); |
1677 | } else { | 1679 | } else { |
1678 | dasm_put(Dst, 10244); | 1680 | dasm_put(Dst, 10265); |
1679 | } | 1681 | } |
1680 | break; | 1682 | break; |
1681 | case 1: | 1683 | case 1: |
1682 | dasm_put(Dst, 10079, LJ_TISNUM); | 1684 | dasm_put(Dst, 10100, LJ_TISNUM); |
1683 | if (sse) { | 1685 | if (sse) { |
1684 | dasm_put(Dst, 10253); | 1686 | dasm_put(Dst, 10274); |
1685 | } else { | 1687 | } else { |
1686 | dasm_put(Dst, 10268); | 1688 | dasm_put(Dst, 10289); |
1687 | } | 1689 | } |
1688 | break; | 1690 | break; |
1689 | default: | 1691 | default: |
1690 | dasm_put(Dst, 10115, LJ_TISNUM, LJ_TISNUM); | 1692 | dasm_put(Dst, 10136, LJ_TISNUM, LJ_TISNUM); |
1691 | if (sse) { | 1693 | if (sse) { |
1692 | dasm_put(Dst, 10277); | 1694 | dasm_put(Dst, 10298); |
1693 | } else { | 1695 | } else { |
1694 | dasm_put(Dst, 10291); | 1696 | dasm_put(Dst, 10312); |
1695 | } | 1697 | } |
1696 | break; | 1698 | break; |
1697 | } | 1699 | } |
1698 | if (sse) { | 1700 | if (sse) { |
1699 | dasm_put(Dst, 9917); | 1701 | dasm_put(Dst, 9938); |
1700 | } else { | 1702 | } else { |
1701 | dasm_put(Dst, 9929); | 1703 | dasm_put(Dst, 9950); |
1702 | } | 1704 | } |
1703 | dasm_put(Dst, 9497); | 1705 | dasm_put(Dst, 9518); |
1704 | break; | 1706 | break; |
1705 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | 1707 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: |
1706 | dasm_put(Dst, 10035); | 1708 | dasm_put(Dst, 10056); |
1707 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1709 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1708 | switch (vk) { | 1710 | switch (vk) { |
1709 | case 0: | 1711 | case 0: |
1710 | dasm_put(Dst, 10043, LJ_TISNUM); | 1712 | dasm_put(Dst, 10064, LJ_TISNUM); |
1711 | if (sse) { | 1713 | if (sse) { |
1712 | dasm_put(Dst, 10299); | 1714 | dasm_put(Dst, 10320); |
1713 | } else { | 1715 | } else { |
1714 | dasm_put(Dst, 10314); | 1716 | dasm_put(Dst, 10335); |
1715 | } | 1717 | } |
1716 | break; | 1718 | break; |
1717 | case 1: | 1719 | case 1: |
1718 | dasm_put(Dst, 10079, LJ_TISNUM); | 1720 | dasm_put(Dst, 10100, LJ_TISNUM); |
1719 | if (sse) { | 1721 | if (sse) { |
1720 | dasm_put(Dst, 10323); | 1722 | dasm_put(Dst, 10344); |
1721 | } else { | 1723 | } else { |
1722 | dasm_put(Dst, 10338); | 1724 | dasm_put(Dst, 10359); |
1723 | } | 1725 | } |
1724 | break; | 1726 | break; |
1725 | default: | 1727 | default: |
1726 | dasm_put(Dst, 10115, LJ_TISNUM, LJ_TISNUM); | 1728 | dasm_put(Dst, 10136, LJ_TISNUM, LJ_TISNUM); |
1727 | if (sse) { | 1729 | if (sse) { |
1728 | dasm_put(Dst, 10347); | 1730 | dasm_put(Dst, 10368); |
1729 | } else { | 1731 | } else { |
1730 | dasm_put(Dst, 10361); | 1732 | dasm_put(Dst, 10382); |
1731 | } | 1733 | } |
1732 | break; | 1734 | break; |
1733 | } | 1735 | } |
1734 | if (sse) { | 1736 | if (sse) { |
1735 | dasm_put(Dst, 9917); | 1737 | dasm_put(Dst, 9938); |
1736 | } else { | 1738 | } else { |
1737 | dasm_put(Dst, 9929); | 1739 | dasm_put(Dst, 9950); |
1738 | } | 1740 | } |
1739 | dasm_put(Dst, 9497); | 1741 | dasm_put(Dst, 9518); |
1740 | break; | 1742 | break; |
1741 | case BC_MODVN: | 1743 | case BC_MODVN: |
1742 | dasm_put(Dst, 10035); | 1744 | dasm_put(Dst, 10056); |
1743 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1745 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1744 | switch (vk) { | 1746 | switch (vk) { |
1745 | case 0: | 1747 | case 0: |
1746 | dasm_put(Dst, 10043, LJ_TISNUM); | 1748 | dasm_put(Dst, 10064, LJ_TISNUM); |
1747 | if (sse) { | 1749 | if (sse) { |
1748 | dasm_put(Dst, 10369); | 1750 | dasm_put(Dst, 10390); |
1749 | } else { | 1751 | } else { |
1750 | dasm_put(Dst, 10384); | 1752 | dasm_put(Dst, 10405); |
1751 | } | 1753 | } |
1752 | break; | 1754 | break; |
1753 | case 1: | 1755 | case 1: |
1754 | dasm_put(Dst, 10079, LJ_TISNUM); | 1756 | dasm_put(Dst, 10100, LJ_TISNUM); |
1755 | if (sse) { | 1757 | if (sse) { |
1756 | dasm_put(Dst, 10393); | 1758 | dasm_put(Dst, 10414); |
1757 | } else { | 1759 | } else { |
1758 | dasm_put(Dst, 10408); | 1760 | dasm_put(Dst, 10429); |
1759 | } | 1761 | } |
1760 | break; | 1762 | break; |
1761 | default: | 1763 | default: |
1762 | dasm_put(Dst, 10115, LJ_TISNUM, LJ_TISNUM); | 1764 | dasm_put(Dst, 10136, LJ_TISNUM, LJ_TISNUM); |
1763 | if (sse) { | 1765 | if (sse) { |
1764 | dasm_put(Dst, 10417); | 1766 | dasm_put(Dst, 10438); |
1765 | } else { | 1767 | } else { |
1766 | dasm_put(Dst, 10431); | 1768 | dasm_put(Dst, 10452); |
1767 | } | 1769 | } |
1768 | break; | 1770 | break; |
1769 | } | 1771 | } |
1770 | dasm_put(Dst, 10439); | 1772 | dasm_put(Dst, 10460); |
1771 | if (sse) { | 1773 | if (sse) { |
1772 | dasm_put(Dst, 9917); | 1774 | dasm_put(Dst, 9938); |
1773 | } else { | 1775 | } else { |
1774 | dasm_put(Dst, 9929); | 1776 | dasm_put(Dst, 9950); |
1775 | } | 1777 | } |
1776 | dasm_put(Dst, 9497); | 1778 | dasm_put(Dst, 9518); |
1777 | break; | 1779 | break; |
1778 | case BC_MODNV: case BC_MODVV: | 1780 | case BC_MODNV: case BC_MODVV: |
1779 | dasm_put(Dst, 10035); | 1781 | dasm_put(Dst, 10056); |
1780 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1782 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1781 | switch (vk) { | 1783 | switch (vk) { |
1782 | case 0: | 1784 | case 0: |
1783 | dasm_put(Dst, 10043, LJ_TISNUM); | 1785 | dasm_put(Dst, 10064, LJ_TISNUM); |
1784 | if (sse) { | 1786 | if (sse) { |
1785 | dasm_put(Dst, 10369); | 1787 | dasm_put(Dst, 10390); |
1786 | } else { | 1788 | } else { |
1787 | dasm_put(Dst, 10384); | 1789 | dasm_put(Dst, 10405); |
1788 | } | 1790 | } |
1789 | break; | 1791 | break; |
1790 | case 1: | 1792 | case 1: |
1791 | dasm_put(Dst, 10079, LJ_TISNUM); | 1793 | dasm_put(Dst, 10100, LJ_TISNUM); |
1792 | if (sse) { | 1794 | if (sse) { |
1793 | dasm_put(Dst, 10393); | 1795 | dasm_put(Dst, 10414); |
1794 | } else { | 1796 | } else { |
1795 | dasm_put(Dst, 10408); | 1797 | dasm_put(Dst, 10429); |
1796 | } | 1798 | } |
1797 | break; | 1799 | break; |
1798 | default: | 1800 | default: |
1799 | dasm_put(Dst, 10115, LJ_TISNUM, LJ_TISNUM); | 1801 | dasm_put(Dst, 10136, LJ_TISNUM, LJ_TISNUM); |
1800 | if (sse) { | 1802 | if (sse) { |
1801 | dasm_put(Dst, 10417); | 1803 | dasm_put(Dst, 10438); |
1802 | } else { | 1804 | } else { |
1803 | dasm_put(Dst, 10431); | 1805 | dasm_put(Dst, 10452); |
1804 | } | 1806 | } |
1805 | break; | 1807 | break; |
1806 | } | 1808 | } |
1807 | dasm_put(Dst, 10445); | 1809 | dasm_put(Dst, 10466); |
1808 | break; | 1810 | break; |
1809 | case BC_POW: | 1811 | case BC_POW: |
1810 | dasm_put(Dst, 10035); | 1812 | dasm_put(Dst, 10056); |
1811 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1813 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1812 | switch (vk) { | 1814 | switch (vk) { |
1813 | case 0: | 1815 | case 0: |
1814 | dasm_put(Dst, 10043, LJ_TISNUM); | 1816 | dasm_put(Dst, 10064, LJ_TISNUM); |
1815 | if (sse) { | 1817 | if (sse) { |
1816 | dasm_put(Dst, 10369); | 1818 | dasm_put(Dst, 10390); |
1817 | } else { | 1819 | } else { |
1818 | dasm_put(Dst, 10384); | 1820 | dasm_put(Dst, 10405); |
1819 | } | 1821 | } |
1820 | break; | 1822 | break; |
1821 | case 1: | 1823 | case 1: |
1822 | dasm_put(Dst, 10079, LJ_TISNUM); | 1824 | dasm_put(Dst, 10100, LJ_TISNUM); |
1823 | if (sse) { | 1825 | if (sse) { |
1824 | dasm_put(Dst, 10393); | 1826 | dasm_put(Dst, 10414); |
1825 | } else { | 1827 | } else { |
1826 | dasm_put(Dst, 10408); | 1828 | dasm_put(Dst, 10429); |
1827 | } | 1829 | } |
1828 | break; | 1830 | break; |
1829 | default: | 1831 | default: |
1830 | dasm_put(Dst, 10115, LJ_TISNUM, LJ_TISNUM); | 1832 | dasm_put(Dst, 10136, LJ_TISNUM, LJ_TISNUM); |
1831 | if (sse) { | 1833 | if (sse) { |
1832 | dasm_put(Dst, 10417); | 1834 | dasm_put(Dst, 10438); |
1833 | } else { | 1835 | } else { |
1834 | dasm_put(Dst, 10431); | 1836 | dasm_put(Dst, 10452); |
1835 | } | 1837 | } |
1836 | break; | 1838 | break; |
1837 | } | 1839 | } |
1838 | dasm_put(Dst, 10450); | 1840 | dasm_put(Dst, 10471); |
1839 | if (sse) { | 1841 | if (sse) { |
1840 | dasm_put(Dst, 9917); | 1842 | dasm_put(Dst, 9938); |
1841 | } else { | 1843 | } else { |
1842 | dasm_put(Dst, 9929); | 1844 | dasm_put(Dst, 9950); |
1843 | } | 1845 | } |
1844 | dasm_put(Dst, 9497); | 1846 | dasm_put(Dst, 9518); |
1845 | break; | 1847 | break; |
1846 | 1848 | ||
1847 | case BC_CAT: | 1849 | case BC_CAT: |
1848 | dasm_put(Dst, 10454, Dt1(->base), Dt1(->base)); | 1850 | dasm_put(Dst, 10475, Dt1(->base), Dt1(->base)); |
1849 | break; | 1851 | break; |
1850 | 1852 | ||
1851 | /* -- Constant ops ------------------------------------------------------ */ | 1853 | /* -- Constant ops ------------------------------------------------------ */ |
1852 | 1854 | ||
1853 | case BC_KSTR: | 1855 | case BC_KSTR: |
1854 | dasm_put(Dst, 10538, LJ_TSTR); | 1856 | dasm_put(Dst, 10559, LJ_TSTR); |
1855 | break; | 1857 | break; |
1856 | case BC_KSHORT: | 1858 | case BC_KSHORT: |
1857 | if (sse) { | 1859 | if (sse) { |
1858 | dasm_put(Dst, 10575); | 1860 | dasm_put(Dst, 10596); |
1859 | } else { | 1861 | } else { |
1860 | dasm_put(Dst, 10590); | 1862 | dasm_put(Dst, 10611); |
1861 | } | 1863 | } |
1862 | dasm_put(Dst, 9497); | 1864 | dasm_put(Dst, 9518); |
1863 | break; | 1865 | break; |
1864 | case BC_KNUM: | 1866 | case BC_KNUM: |
1865 | if (sse) { | 1867 | if (sse) { |
1866 | dasm_put(Dst, 10598); | 1868 | dasm_put(Dst, 10619); |
1867 | } else { | 1869 | } else { |
1868 | dasm_put(Dst, 10612); | 1870 | dasm_put(Dst, 10633); |
1869 | } | 1871 | } |
1870 | dasm_put(Dst, 9497); | 1872 | dasm_put(Dst, 9518); |
1871 | break; | 1873 | break; |
1872 | case BC_KPRI: | 1874 | case BC_KPRI: |
1873 | dasm_put(Dst, 10620); | 1875 | dasm_put(Dst, 10641); |
1874 | break; | 1876 | break; |
1875 | case BC_KNIL: | 1877 | case BC_KNIL: |
1876 | dasm_put(Dst, 10649, LJ_TNIL); | 1878 | dasm_put(Dst, 10670, LJ_TNIL); |
1877 | break; | 1879 | break; |
1878 | 1880 | ||
1879 | /* -- Upvalue and function ops ------------------------------------------ */ | 1881 | /* -- Upvalue and function ops ------------------------------------------ */ |
1880 | 1882 | ||
1881 | case BC_UGET: | 1883 | case BC_UGET: |
1882 | dasm_put(Dst, 10697, offsetof(GCfuncL, uvptr), DtA(->v)); | 1884 | dasm_put(Dst, 10718, offsetof(GCfuncL, uvptr), DtA(->v)); |
1883 | break; | 1885 | break; |
1884 | case BC_USETV: | 1886 | case BC_USETV: |
1885 | #define TV2MARKOFS \ | 1887 | #define TV2MARKOFS \ |
1886 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) | 1888 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) |
1887 | dasm_put(Dst, 10738, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); | 1889 | dasm_put(Dst, 10759, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); |
1888 | dasm_put(Dst, 10834); | 1890 | dasm_put(Dst, 10855); |
1889 | break; | 1891 | break; |
1890 | #undef TV2MARKOFS | 1892 | #undef TV2MARKOFS |
1891 | case BC_USETS: | 1893 | case BC_USETS: |
1892 | dasm_put(Dst, 10846, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); | 1894 | dasm_put(Dst, 10867, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); |
1893 | break; | 1895 | break; |
1894 | case BC_USETN: | 1896 | case BC_USETN: |
1895 | dasm_put(Dst, 10942); | 1897 | dasm_put(Dst, 10963); |
1896 | if (sse) { | 1898 | if (sse) { |
1897 | dasm_put(Dst, 10947); | 1899 | dasm_put(Dst, 10968); |
1898 | } else { | 1900 | } else { |
1899 | dasm_put(Dst, 9739); | 1901 | dasm_put(Dst, 9760); |
1900 | } | 1902 | } |
1901 | dasm_put(Dst, 10955, offsetof(GCfuncL, uvptr), DtA(->v)); | 1903 | dasm_put(Dst, 10976, offsetof(GCfuncL, uvptr), DtA(->v)); |
1902 | if (sse) { | 1904 | if (sse) { |
1903 | dasm_put(Dst, 10964); | 1905 | dasm_put(Dst, 10985); |
1904 | } else { | 1906 | } else { |
1905 | dasm_put(Dst, 10970); | 1907 | dasm_put(Dst, 10991); |
1906 | } | 1908 | } |
1907 | dasm_put(Dst, 9497); | 1909 | dasm_put(Dst, 9518); |
1908 | break; | 1910 | break; |
1909 | case BC_USETP: | 1911 | case BC_USETP: |
1910 | dasm_put(Dst, 10973, offsetof(GCfuncL, uvptr), DtA(->v)); | 1912 | dasm_put(Dst, 10994, offsetof(GCfuncL, uvptr), DtA(->v)); |
1911 | break; | 1913 | break; |
1912 | case BC_UCLO: | 1914 | case BC_UCLO: |
1913 | dasm_put(Dst, 11013, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); | 1915 | dasm_put(Dst, 11034, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); |
1914 | break; | 1916 | break; |
1915 | 1917 | ||
1916 | case BC_FNEW: | 1918 | case BC_FNEW: |
1917 | dasm_put(Dst, 11069, Dt1(->base), Dt1(->base), LJ_TFUNC); | 1919 | dasm_put(Dst, 11090, Dt1(->base), Dt1(->base), LJ_TFUNC); |
1918 | break; | 1920 | break; |
1919 | 1921 | ||
1920 | /* -- Table ops --------------------------------------------------------- */ | 1922 | /* -- Table ops --------------------------------------------------------- */ |
1921 | 1923 | ||
1922 | case BC_TNEW: | 1924 | case BC_TNEW: |
1923 | dasm_put(Dst, 11136, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); | 1925 | dasm_put(Dst, 11157, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); |
1924 | break; | 1926 | break; |
1925 | case BC_TDUP: | 1927 | case BC_TDUP: |
1926 | dasm_put(Dst, 11260, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); | 1928 | dasm_put(Dst, 11281, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); |
1927 | break; | 1929 | break; |
1928 | 1930 | ||
1929 | case BC_GGET: | 1931 | case BC_GGET: |
1930 | dasm_put(Dst, 11359, Dt7(->env)); | 1932 | dasm_put(Dst, 11380, Dt7(->env)); |
1931 | break; | 1933 | break; |
1932 | case BC_GSET: | 1934 | case BC_GSET: |
1933 | dasm_put(Dst, 11379, Dt7(->env)); | 1935 | dasm_put(Dst, 11400, Dt7(->env)); |
1934 | break; | 1936 | break; |
1935 | 1937 | ||
1936 | case BC_TGETV: | 1938 | case BC_TGETV: |
1937 | dasm_put(Dst, 11399, LJ_TTAB, LJ_TISNUM); | 1939 | dasm_put(Dst, 11420, LJ_TTAB, LJ_TISNUM); |
1938 | if (sse) { | 1940 | if (sse) { |
1939 | dasm_put(Dst, 11432); | 1941 | dasm_put(Dst, 11453); |
1940 | } else { | 1942 | } else { |
1941 | } | 1943 | } |
1942 | dasm_put(Dst, 11453, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 1944 | dasm_put(Dst, 11474, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
1943 | dasm_put(Dst, 11538, LJ_TNIL, LJ_TSTR); | 1945 | dasm_put(Dst, 11559, LJ_TNIL, LJ_TSTR); |
1944 | break; | 1946 | break; |
1945 | case BC_TGETS: | 1947 | case BC_TGETS: |
1946 | dasm_put(Dst, 11567, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 1948 | dasm_put(Dst, 11588, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
1947 | dasm_put(Dst, 11652, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 1949 | dasm_put(Dst, 11673, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
1948 | break; | 1950 | break; |
1949 | case BC_TGETB: | 1951 | case BC_TGETB: |
1950 | dasm_put(Dst, 11724, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 1952 | dasm_put(Dst, 11745, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
1951 | dasm_put(Dst, 11820, LJ_TNIL); | 1953 | dasm_put(Dst, 11841, LJ_TNIL); |
1952 | break; | 1954 | break; |
1953 | 1955 | ||
1954 | case BC_TSETV: | 1956 | case BC_TSETV: |
1955 | dasm_put(Dst, 11837, LJ_TTAB, LJ_TISNUM); | 1957 | dasm_put(Dst, 11858, LJ_TTAB, LJ_TISNUM); |
1956 | if (sse) { | 1958 | if (sse) { |
1957 | dasm_put(Dst, 11432); | 1959 | dasm_put(Dst, 11453); |
1958 | } else { | 1960 | } else { |
1959 | } | 1961 | } |
1960 | dasm_put(Dst, 11870, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); | 1962 | dasm_put(Dst, 11891, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); |
1961 | dasm_put(Dst, 11950, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1963 | dasm_put(Dst, 11971, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1962 | break; | 1964 | break; |
1963 | case BC_TSETS: | 1965 | case BC_TSETS: |
1964 | dasm_put(Dst, 12014, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 1966 | dasm_put(Dst, 12035, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
1965 | dasm_put(Dst, 12091, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); | 1967 | dasm_put(Dst, 12112, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); |
1966 | dasm_put(Dst, 12178, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1968 | dasm_put(Dst, 12199, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1967 | break; | 1969 | break; |
1968 | case BC_TSETB: | 1970 | case BC_TSETB: |
1969 | dasm_put(Dst, 12270, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); | 1971 | dasm_put(Dst, 12291, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); |
1970 | dasm_put(Dst, 12365, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1972 | dasm_put(Dst, 12386, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1971 | break; | 1973 | break; |
1972 | 1974 | ||
1973 | case BC_TSETM: | 1975 | case BC_TSETM: |
1974 | dasm_put(Dst, 12413, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); | 1976 | dasm_put(Dst, 12434, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); |
1975 | dasm_put(Dst, 12563, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1977 | dasm_put(Dst, 12584, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1976 | break; | 1978 | break; |
1977 | 1979 | ||
1978 | /* -- Calls and vararg handling ----------------------------------------- */ | 1980 | /* -- Calls and vararg handling ----------------------------------------- */ |
1979 | 1981 | ||
1980 | case BC_CALL: case BC_CALLM: | 1982 | case BC_CALL: case BC_CALLM: |
1981 | dasm_put(Dst, 10039); | 1983 | dasm_put(Dst, 10060); |
1982 | if (op == BC_CALLM) { | 1984 | if (op == BC_CALLM) { |
1983 | dasm_put(Dst, 12583); | 1985 | dasm_put(Dst, 12604); |
1984 | } | 1986 | } |
1985 | dasm_put(Dst, 12588, LJ_TFUNC, Dt7(->pc)); | 1987 | dasm_put(Dst, 12609, LJ_TFUNC, Dt7(->pc)); |
1986 | break; | 1988 | break; |
1987 | 1989 | ||
1988 | case BC_CALLMT: | 1990 | case BC_CALLMT: |
1989 | dasm_put(Dst, 12583); | 1991 | dasm_put(Dst, 12604); |
1990 | break; | 1992 | break; |
1991 | case BC_CALLT: | 1993 | case BC_CALLT: |
1992 | dasm_put(Dst, 12631, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); | 1994 | dasm_put(Dst, 12652, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); |
1993 | dasm_put(Dst, 12749, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); | 1995 | dasm_put(Dst, 12770, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); |
1994 | break; | 1996 | break; |
1995 | 1997 | ||
1996 | case BC_ITERC: | 1998 | case BC_ITERC: |
1997 | dasm_put(Dst, 12823, LJ_TFUNC, 2+1, Dt7(->pc)); | 1999 | dasm_put(Dst, 12844, LJ_TFUNC, 2+1, Dt7(->pc)); |
1998 | break; | 2000 | break; |
1999 | 2001 | ||
2000 | case BC_ITERN: | 2002 | case BC_ITERN: |
2001 | #if LJ_HASJIT | 2003 | #if LJ_HASJIT |
2002 | #endif | 2004 | #endif |
2003 | dasm_put(Dst, 12895, Dt6(->asize), Dt6(->array), LJ_TNIL); | 2005 | dasm_put(Dst, 12916, Dt6(->asize), Dt6(->array), LJ_TNIL); |
2004 | if (sse) { | 2006 | if (sse) { |
2005 | dasm_put(Dst, 12947); | 2007 | dasm_put(Dst, 12968); |
2006 | } else { | 2008 | } else { |
2007 | dasm_put(Dst, 12953); | 2009 | dasm_put(Dst, 12974); |
2008 | } | 2010 | } |
2009 | dasm_put(Dst, 12959); | 2011 | dasm_put(Dst, 12980); |
2010 | if (sse) { | 2012 | if (sse) { |
2011 | dasm_put(Dst, 9917); | 2013 | dasm_put(Dst, 9938); |
2012 | } else { | 2014 | } else { |
2013 | dasm_put(Dst, 9929); | 2015 | dasm_put(Dst, 9950); |
2014 | } | 2016 | } |
2015 | dasm_put(Dst, 12972, -BCBIAS_J*4); | 2017 | dasm_put(Dst, 12993, -BCBIAS_J*4); |
2016 | if (!sse) { | 2018 | if (!sse) { |
2017 | dasm_put(Dst, 13026); | 2019 | dasm_put(Dst, 13047); |
2018 | } | 2020 | } |
2019 | dasm_put(Dst, 13032, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); | 2021 | dasm_put(Dst, 13053, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); |
2020 | break; | 2022 | break; |
2021 | 2023 | ||
2022 | case BC_ISNEXT: | 2024 | case BC_ISNEXT: |
2023 | dasm_put(Dst, 13111, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); | 2025 | dasm_put(Dst, 13132, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); |
2024 | break; | 2026 | break; |
2025 | 2027 | ||
2026 | case BC_VARG: | 2028 | case BC_VARG: |
2027 | dasm_put(Dst, 13212, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); | 2029 | dasm_put(Dst, 13233, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); |
2028 | dasm_put(Dst, 13379, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 2030 | dasm_put(Dst, 13400, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); |
2029 | break; | 2031 | break; |
2030 | 2032 | ||
2031 | /* -- Returns ----------------------------------------------------------- */ | 2033 | /* -- Returns ----------------------------------------------------------- */ |
2032 | 2034 | ||
2033 | case BC_RETM: | 2035 | case BC_RETM: |
2034 | dasm_put(Dst, 12583); | 2036 | dasm_put(Dst, 12604); |
2035 | break; | 2037 | break; |
2036 | 2038 | ||
2037 | case BC_RET: case BC_RET0: case BC_RET1: | 2039 | case BC_RET: case BC_RET0: case BC_RET1: |
2038 | if (op != BC_RET0) { | 2040 | if (op != BC_RET0) { |
2039 | dasm_put(Dst, 13449); | 2041 | dasm_put(Dst, 13470); |
2040 | } | 2042 | } |
2041 | dasm_put(Dst, 13453, FRAME_TYPE); | 2043 | dasm_put(Dst, 13474, FRAME_TYPE); |
2042 | switch (op) { | 2044 | switch (op) { |
2043 | case BC_RET: | 2045 | case BC_RET: |
2044 | dasm_put(Dst, 13472); | 2046 | dasm_put(Dst, 13493); |
2045 | break; | 2047 | break; |
2046 | case BC_RET1: | 2048 | case BC_RET1: |
2047 | dasm_put(Dst, 13526); | 2049 | dasm_put(Dst, 13547); |
2048 | /* fallthrough */ | 2050 | /* fallthrough */ |
2049 | case BC_RET0: | 2051 | case BC_RET0: |
2050 | dasm_put(Dst, 13536); | 2052 | dasm_put(Dst, 13557); |
2051 | default: | 2053 | default: |
2052 | break; | 2054 | break; |
2053 | } | 2055 | } |
2054 | dasm_put(Dst, 13547, Dt7(->pc), PC2PROTO(k)); | 2056 | dasm_put(Dst, 13568, Dt7(->pc), PC2PROTO(k)); |
2055 | if (op == BC_RET) { | 2057 | if (op == BC_RET) { |
2056 | dasm_put(Dst, 13595, LJ_TNIL); | 2058 | dasm_put(Dst, 13616, LJ_TNIL); |
2057 | } else { | 2059 | } else { |
2058 | dasm_put(Dst, 13606, LJ_TNIL); | 2060 | dasm_put(Dst, 13627, LJ_TNIL); |
2059 | } | 2061 | } |
2060 | dasm_put(Dst, 13613, -FRAME_VARG, FRAME_TYPEP); | 2062 | dasm_put(Dst, 13634, -FRAME_VARG, FRAME_TYPEP); |
2061 | if (op != BC_RET0) { | 2063 | if (op != BC_RET0) { |
2062 | dasm_put(Dst, 13637); | 2064 | dasm_put(Dst, 13658); |
2063 | } | 2065 | } |
2064 | dasm_put(Dst, 4531); | 2066 | dasm_put(Dst, 4552); |
2065 | break; | 2067 | break; |
2066 | 2068 | ||
2067 | /* -- Loops and branches ------------------------------------------------ */ | 2069 | /* -- Loops and branches ------------------------------------------------ */ |
@@ -2069,7 +2071,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2069 | 2071 | ||
2070 | case BC_FORL: | 2072 | case BC_FORL: |
2071 | #if LJ_HASJIT | 2073 | #if LJ_HASJIT |
2072 | dasm_put(Dst, 13641, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2074 | dasm_put(Dst, 13662, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2073 | #endif | 2075 | #endif |
2074 | break; | 2076 | break; |
2075 | 2077 | ||
@@ -2081,57 +2083,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2081 | case BC_FORI: | 2083 | case BC_FORI: |
2082 | case BC_IFORL: | 2084 | case BC_IFORL: |
2083 | vk = (op == BC_IFORL || op == BC_JFORL); | 2085 | vk = (op == BC_IFORL || op == BC_JFORL); |
2084 | dasm_put(Dst, 13662); | 2086 | dasm_put(Dst, 13683); |
2085 | if (!vk) { | 2087 | if (!vk) { |
2086 | dasm_put(Dst, 13666, LJ_TISNUM, LJ_TISNUM); | 2088 | dasm_put(Dst, 13687, LJ_TISNUM, LJ_TISNUM); |
2087 | } | 2089 | } |
2088 | dasm_put(Dst, 13685); | 2090 | dasm_put(Dst, 13706); |
2089 | if (!vk) { | 2091 | if (!vk) { |
2090 | dasm_put(Dst, 13689, LJ_TISNUM); | 2092 | dasm_put(Dst, 13710, LJ_TISNUM); |
2091 | } | 2093 | } |
2092 | if (sse) { | 2094 | if (sse) { |
2093 | dasm_put(Dst, 13698); | 2095 | dasm_put(Dst, 13719); |
2094 | if (vk) { | 2096 | if (vk) { |
2095 | dasm_put(Dst, 13710); | 2097 | dasm_put(Dst, 13731); |
2096 | } else { | 2098 | } else { |
2097 | dasm_put(Dst, 13729); | 2099 | dasm_put(Dst, 13750); |
2098 | } | 2100 | } |
2099 | dasm_put(Dst, 13734); | 2101 | dasm_put(Dst, 13755); |
2100 | } else { | 2102 | } else { |
2101 | dasm_put(Dst, 13747); | 2103 | dasm_put(Dst, 13768); |
2102 | if (vk) { | 2104 | if (vk) { |
2103 | dasm_put(Dst, 13753); | 2105 | dasm_put(Dst, 13774); |
2104 | } else { | 2106 | } else { |
2105 | dasm_put(Dst, 13769); | 2107 | dasm_put(Dst, 13790); |
2106 | } | 2108 | } |
2107 | dasm_put(Dst, 13777); | 2109 | dasm_put(Dst, 13798); |
2108 | if (cmov) { | 2110 | if (cmov) { |
2109 | dasm_put(Dst, 9460); | 2111 | dasm_put(Dst, 9481); |
2110 | } else { | 2112 | } else { |
2111 | dasm_put(Dst, 9466); | 2113 | dasm_put(Dst, 9487); |
2112 | } | 2114 | } |
2113 | if (!cmov) { | 2115 | if (!cmov) { |
2114 | dasm_put(Dst, 13782); | 2116 | dasm_put(Dst, 13803); |
2115 | } | 2117 | } |
2116 | } | 2118 | } |
2117 | if (op == BC_FORI) { | 2119 | if (op == BC_FORI) { |
2118 | dasm_put(Dst, 13788, -BCBIAS_J*4); | 2120 | dasm_put(Dst, 13809, -BCBIAS_J*4); |
2119 | } else if (op == BC_JFORI) { | 2121 | } else if (op == BC_JFORI) { |
2120 | dasm_put(Dst, 13798, -BCBIAS_J*4, BC_JLOOP); | 2122 | dasm_put(Dst, 13819, -BCBIAS_J*4, BC_JLOOP); |
2121 | } else if (op == BC_IFORL) { | 2123 | } else if (op == BC_IFORL) { |
2122 | dasm_put(Dst, 13812, -BCBIAS_J*4); | 2124 | dasm_put(Dst, 13833, -BCBIAS_J*4); |
2123 | } else { | 2125 | } else { |
2124 | dasm_put(Dst, 13808, BC_JLOOP); | 2126 | dasm_put(Dst, 13829, BC_JLOOP); |
2125 | } | 2127 | } |
2126 | dasm_put(Dst, 9495); | 2128 | dasm_put(Dst, 9516); |
2127 | if (sse) { | 2129 | if (sse) { |
2128 | dasm_put(Dst, 13822); | 2130 | dasm_put(Dst, 13843); |
2129 | } | 2131 | } |
2130 | break; | 2132 | break; |
2131 | 2133 | ||
2132 | case BC_ITERL: | 2134 | case BC_ITERL: |
2133 | #if LJ_HASJIT | 2135 | #if LJ_HASJIT |
2134 | dasm_put(Dst, 13641, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2136 | dasm_put(Dst, 13662, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2135 | #endif | 2137 | #endif |
2136 | break; | 2138 | break; |
2137 | 2139 | ||
@@ -2140,33 +2142,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2140 | break; | 2142 | break; |
2141 | #endif | 2143 | #endif |
2142 | case BC_IITERL: | 2144 | case BC_IITERL: |
2143 | dasm_put(Dst, 13833, LJ_TNIL); | 2145 | dasm_put(Dst, 13854, LJ_TNIL); |
2144 | if (op == BC_JITERL) { | 2146 | if (op == BC_JITERL) { |
2145 | dasm_put(Dst, 13848, BC_JLOOP); | 2147 | dasm_put(Dst, 13869, BC_JLOOP); |
2146 | } else { | 2148 | } else { |
2147 | dasm_put(Dst, 13862, -BCBIAS_J*4); | 2149 | dasm_put(Dst, 13883, -BCBIAS_J*4); |
2148 | } | 2150 | } |
2149 | dasm_put(Dst, 9799); | 2151 | dasm_put(Dst, 9820); |
2150 | break; | 2152 | break; |
2151 | 2153 | ||
2152 | case BC_LOOP: | 2154 | case BC_LOOP: |
2153 | #if LJ_HASJIT | 2155 | #if LJ_HASJIT |
2154 | dasm_put(Dst, 13641, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2156 | dasm_put(Dst, 13662, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2155 | #endif | 2157 | #endif |
2156 | break; | 2158 | break; |
2157 | 2159 | ||
2158 | case BC_ILOOP: | 2160 | case BC_ILOOP: |
2159 | dasm_put(Dst, 9497); | 2161 | dasm_put(Dst, 9518); |
2160 | break; | 2162 | break; |
2161 | 2163 | ||
2162 | case BC_JLOOP: | 2164 | case BC_JLOOP: |
2163 | #if LJ_HASJIT | 2165 | #if LJ_HASJIT |
2164 | dasm_put(Dst, 13878, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); | 2166 | dasm_put(Dst, 13899, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); |
2165 | #endif | 2167 | #endif |
2166 | break; | 2168 | break; |
2167 | 2169 | ||
2168 | case BC_JMP: | 2170 | case BC_JMP: |
2169 | dasm_put(Dst, 13919, -BCBIAS_J*4); | 2171 | dasm_put(Dst, 13940, -BCBIAS_J*4); |
2170 | break; | 2172 | break; |
2171 | 2173 | ||
2172 | /* -- Function headers -------------------------------------------------- */ | 2174 | /* -- Function headers -------------------------------------------------- */ |
@@ -2180,7 +2182,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2180 | 2182 | ||
2181 | case BC_FUNCF: | 2183 | case BC_FUNCF: |
2182 | #if LJ_HASJIT | 2184 | #if LJ_HASJIT |
2183 | dasm_put(Dst, 13945, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2185 | dasm_put(Dst, 13966, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2184 | #endif | 2186 | #endif |
2185 | case BC_FUNCV: /* NYI: compiled vararg functions. */ | 2187 | case BC_FUNCV: /* NYI: compiled vararg functions. */ |
2186 | break; | 2188 | break; |
@@ -2190,47 +2192,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2190 | break; | 2192 | break; |
2191 | #endif | 2193 | #endif |
2192 | case BC_IFUNCF: | 2194 | case BC_IFUNCF: |
2193 | dasm_put(Dst, 13966, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); | 2195 | dasm_put(Dst, 13987, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); |
2194 | if (op == BC_JFUNCF) { | 2196 | if (op == BC_JFUNCF) { |
2195 | dasm_put(Dst, 13997, BC_JLOOP); | 2197 | dasm_put(Dst, 14018, BC_JLOOP); |
2196 | } else { | 2198 | } else { |
2197 | dasm_put(Dst, 9497); | 2199 | dasm_put(Dst, 9518); |
2198 | } | 2200 | } |
2199 | dasm_put(Dst, 14006, LJ_TNIL); | 2201 | dasm_put(Dst, 14027, LJ_TNIL); |
2200 | break; | 2202 | break; |
2201 | 2203 | ||
2202 | case BC_JFUNCV: | 2204 | case BC_JFUNCV: |
2203 | #if !LJ_HASJIT | 2205 | #if !LJ_HASJIT |
2204 | break; | 2206 | break; |
2205 | #endif | 2207 | #endif |
2206 | dasm_put(Dst, 8976); | 2208 | dasm_put(Dst, 8997); |
2207 | break; /* NYI: compiled vararg functions. */ | 2209 | break; /* NYI: compiled vararg functions. */ |
2208 | 2210 | ||
2209 | case BC_IFUNCV: | 2211 | case BC_IFUNCV: |
2210 | dasm_put(Dst, 14028, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); | 2212 | dasm_put(Dst, 14049, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); |
2211 | if (op == BC_JFUNCV) { | 2213 | if (op == BC_JFUNCV) { |
2212 | dasm_put(Dst, 13997, BC_JLOOP); | 2214 | dasm_put(Dst, 14018, BC_JLOOP); |
2213 | } else { | 2215 | } else { |
2214 | dasm_put(Dst, 14125, -4+PC2PROTO(k)); | 2216 | dasm_put(Dst, 14146, -4+PC2PROTO(k)); |
2215 | } | 2217 | } |
2216 | dasm_put(Dst, 14150, LJ_TNIL); | 2218 | dasm_put(Dst, 14171, LJ_TNIL); |
2217 | break; | 2219 | break; |
2218 | 2220 | ||
2219 | case BC_FUNCC: | 2221 | case BC_FUNCC: |
2220 | case BC_FUNCCW: | 2222 | case BC_FUNCCW: |
2221 | dasm_put(Dst, 14172, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); | 2223 | dasm_put(Dst, 14193, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); |
2222 | if (op == BC_FUNCC) { | 2224 | if (op == BC_FUNCC) { |
2223 | dasm_put(Dst, 14202); | 2225 | dasm_put(Dst, 14223); |
2224 | } else { | 2226 | } else { |
2225 | dasm_put(Dst, 14206); | 2227 | dasm_put(Dst, 14227); |
2226 | } | 2228 | } |
2227 | dasm_put(Dst, 14214, DISPATCH_GL(vmstate), ~LJ_VMST_C); | 2229 | dasm_put(Dst, 14235, DISPATCH_GL(vmstate), ~LJ_VMST_C); |
2228 | if (op == BC_FUNCC) { | 2230 | if (op == BC_FUNCC) { |
2229 | dasm_put(Dst, 14224); | 2231 | dasm_put(Dst, 14245); |
2230 | } else { | 2232 | } else { |
2231 | dasm_put(Dst, 14229, DISPATCH_GL(wrapf)); | 2233 | dasm_put(Dst, 14250, DISPATCH_GL(wrapf)); |
2232 | } | 2234 | } |
2233 | dasm_put(Dst, 14235, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); | 2235 | dasm_put(Dst, 14256, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); |
2234 | break; | 2236 | break; |
2235 | 2237 | ||
2236 | /* ---------------------------------------------------------------------- */ | 2238 | /* ---------------------------------------------------------------------- */ |
@@ -2258,7 +2260,7 @@ static int build_backend(BuildCtx *ctx) | |||
2258 | 2260 | ||
2259 | build_subroutines(ctx, cmov, sse); | 2261 | build_subroutines(ctx, cmov, sse); |
2260 | 2262 | ||
2261 | dasm_put(Dst, 14261); | 2263 | dasm_put(Dst, 14282); |
2262 | for (op = 0; op < BC__MAX; op++) | 2264 | for (op = 0; op < BC__MAX; op++) |
2263 | build_ins(ctx, (BCOp)op, op, cmov, sse); | 2265 | build_ins(ctx, (BCOp)op, op, cmov, sse); |
2264 | 2266 | ||
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h index bc4da564..2ca7c7b2 100644 --- a/src/buildvm_x64win.h +++ b/src/buildvm_x64win.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 char build_actionlist[14208] = { | 15 | static const unsigned char build_actionlist[14229] = { |
16 | 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,72, | 16 | 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,72, |
17 | 141,76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68, | 17 | 141,76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68, |
18 | 36,84,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237, | 18 | 36,84,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237, |
@@ -129,16 +129,17 @@ static const unsigned char build_actionlist[14208] = { | |||
129 | 133,192,15,132,244,249,72,139,106,8,72,139,66,16,72,137,106,252,248,72,137, | 129 | 133,192,15,132,244,249,72,139,106,8,72,139,66,16,72,137,106,252,248,72,137, |
130 | 2,248,68,184,237,252,233,244,69,248,2,199,66,12,237,252,233,244,1,248,3,199, | 130 | 2,248,68,184,237,252,233,244,69,248,2,199,66,12,237,252,233,244,1,248,3,199, |
131 | 66,252,252,237,252,233,244,58,248,70,129,252,248,239,15,130,244,55,255,139, | 131 | 66,252,252,237,252,233,244,58,248,70,129,252,248,239,15,130,244,55,255,139, |
132 | 106,252,248,129,122,253,4,239,15,133,244,55,139,133,233,139,114,252,252,199, | 132 | 42,129,122,253,4,239,15,133,244,55,131,189,233,0,15,133,244,55,139,106,252, |
133 | 66,252,252,237,137,66,252,248,199,66,12,237,184,237,252,233,244,69,248,71, | 133 | 248,139,133,233,139,114,252,252,199,66,252,252,237,137,66,252,248,199,66, |
134 | 129,252,248,239,15,130,244,55,129,122,253,4,239,15,133,244,55,129,122,253, | 134 | 12,237,184,237,252,233,244,69,248,71,129,252,248,239,15,130,244,55,129,122, |
135 | 12,239,15,135,244,55,139,114,252,252,255,252,242,15,16,66,8,72,189,237,237, | 135 | 253,4,239,15,133,244,55,129,122,253,12,239,255,15,135,244,55,139,114,252, |
136 | 102,72,15,110,205,252,242,15,88,193,252,242,15,45,192,252,242,15,17,66,252, | 136 | 252,255,252,242,15,16,66,8,72,189,237,237,102,72,15,110,205,252,242,15,88, |
137 | 248,255,139,42,59,133,233,15,131,244,248,193,224,3,3,133,233,248,1,129,120, | 137 | 193,252,242,15,45,192,252,242,15,17,66,252,248,255,139,42,59,133,233,15,131, |
138 | 253,4,239,15,132,244,72,72,139,40,72,137,42,252,233,244,68,248,2,131,189, | 138 | 244,248,193,224,3,3,133,233,248,1,129,120,253,4,239,15,132,244,72,72,139, |
139 | 233,0,15,132,244,72,137,252,233,137,213,137,194,232,251,1,12,137,252,234, | 139 | 40,72,137,42,252,233,244,68,248,2,131,189,233,0,15,132,244,72,137,252,233, |
140 | 133,192,15,133,244,1,248,72,184,237,252,233,244,69,248,73,255,129,252,248, | 140 | 137,213,137,194,232,251,1,12,137,252,234,133,192,15,133,244,1,248,72,184, |
141 | 239,15,130,244,55,139,106,252,248,129,122,253,4,239,15,133,244,55,139,133, | 141 | 237,252,233,244,69,248,73,255,129,252,248,239,15,130,244,55,139,42,129,122, |
142 | 253,4,239,15,133,244,55,131,189,233,0,15,133,244,55,139,106,252,248,139,133, | ||
142 | 233,139,114,252,252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242, | 143 | 233,139,114,252,252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242, |
143 | 15,17,66,8,255,217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129, | 144 | 15,17,66,8,255,217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129, |
144 | 252,248,239,15,130,244,55,141,74,8,131,232,1,190,237,248,1,15,182,171,233, | 145 | 252,248,239,15,130,244,55,141,74,8,131,232,1,190,237,248,1,15,182,171,233, |
@@ -1112,331 +1113,332 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
1112 | dasm_put(Dst, 2149, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1113 | dasm_put(Dst, 2149, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1113 | dasm_put(Dst, 2215, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); | 1114 | dasm_put(Dst, 2215, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); |
1114 | dasm_put(Dst, 2282, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); | 1115 | dasm_put(Dst, 2282, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); |
1115 | dasm_put(Dst, 2371, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); | 1116 | dasm_put(Dst, 2371, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); |
1117 | dasm_put(Dst, 2445); | ||
1116 | if (sse) { | 1118 | if (sse) { |
1117 | dasm_put(Dst, 2443, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1119 | dasm_put(Dst, 2454, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1118 | } else { | 1120 | } else { |
1119 | } | 1121 | } |
1120 | dasm_put(Dst, 2476, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); | 1122 | dasm_put(Dst, 2487, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); |
1121 | dasm_put(Dst, 2553, 1+1, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC); | 1123 | dasm_put(Dst, 2564, 1+1, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC); |
1122 | if (sse) { | 1124 | if (sse) { |
1123 | dasm_put(Dst, 2591); | 1125 | dasm_put(Dst, 2612); |
1124 | } else { | 1126 | } else { |
1125 | dasm_put(Dst, 2601); | 1127 | dasm_put(Dst, 2622); |
1126 | } | 1128 | } |
1127 | dasm_put(Dst, 2608, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); | 1129 | dasm_put(Dst, 2629, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); |
1128 | dasm_put(Dst, 2672, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); | 1130 | dasm_put(Dst, 2693, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); |
1129 | dasm_put(Dst, 2762, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); | 1131 | dasm_put(Dst, 2783, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); |
1130 | dasm_put(Dst, 2850, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); | 1132 | dasm_put(Dst, 2871, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); |
1131 | dasm_put(Dst, 2963, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); | 1133 | dasm_put(Dst, 2984, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); |
1132 | dasm_put(Dst, 3061, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); | 1134 | dasm_put(Dst, 3082, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); |
1133 | dasm_put(Dst, 3128, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); | 1135 | dasm_put(Dst, 3149, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); |
1134 | dasm_put(Dst, 3216, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); | 1136 | dasm_put(Dst, 3237, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); |
1135 | dasm_put(Dst, 3328, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); | 1137 | dasm_put(Dst, 3349, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); |
1136 | if (sse) { | 1138 | if (sse) { |
1137 | dasm_put(Dst, 3355, 1+1, LJ_TISNUM, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); | 1139 | dasm_put(Dst, 3376, 1+1, LJ_TISNUM, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); |
1138 | } else { | 1140 | } else { |
1139 | dasm_put(Dst, 3419, 1+1, LJ_TISNUM); | 1141 | dasm_put(Dst, 3440, 1+1, LJ_TISNUM); |
1140 | } | 1142 | } |
1141 | dasm_put(Dst, 3455, 1+1, FRAME_TYPE, LJ_TNIL); | 1143 | dasm_put(Dst, 3476, 1+1, FRAME_TYPE, LJ_TNIL); |
1142 | if (sse) { | 1144 | if (sse) { |
1143 | dasm_put(Dst, 3549, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1145 | dasm_put(Dst, 3570, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1144 | dasm_put(Dst, 3611, 1+1, LJ_TISNUM); | 1146 | dasm_put(Dst, 3632, 1+1, LJ_TISNUM); |
1145 | } else { | 1147 | } else { |
1146 | dasm_put(Dst, 3641, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1148 | dasm_put(Dst, 3662, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1147 | dasm_put(Dst, 3700, 1+1, LJ_TISNUM); | 1149 | dasm_put(Dst, 3721, 1+1, LJ_TISNUM); |
1148 | } | 1150 | } |
1149 | dasm_put(Dst, 3727, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1151 | dasm_put(Dst, 3748, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1150 | dasm_put(Dst, 3796, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1152 | dasm_put(Dst, 3817, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1151 | dasm_put(Dst, 3853, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1153 | dasm_put(Dst, 3874, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1152 | dasm_put(Dst, 3916, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1154 | dasm_put(Dst, 3937, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1153 | dasm_put(Dst, 4006); | 1155 | dasm_put(Dst, 4027); |
1154 | if (sse) { | 1156 | if (sse) { |
1155 | dasm_put(Dst, 4018, 1+1, LJ_TISNUM); | 1157 | dasm_put(Dst, 4039, 1+1, LJ_TISNUM); |
1156 | } else { | 1158 | } else { |
1157 | } | 1159 | } |
1158 | dasm_put(Dst, 4043); | 1160 | dasm_put(Dst, 4064); |
1159 | if (sse) { | 1161 | if (sse) { |
1160 | dasm_put(Dst, 4057, 1+1, LJ_TISNUM); | 1162 | dasm_put(Dst, 4078, 1+1, LJ_TISNUM); |
1161 | } else { | 1163 | } else { |
1162 | } | 1164 | } |
1163 | dasm_put(Dst, 4082); | 1165 | dasm_put(Dst, 4103); |
1164 | if (sse) { | 1166 | if (sse) { |
1165 | dasm_put(Dst, 4096, 1+1, LJ_TISNUM); | 1167 | dasm_put(Dst, 4117, 1+1, LJ_TISNUM); |
1166 | } else { | 1168 | } else { |
1167 | } | 1169 | } |
1168 | dasm_put(Dst, 4121); | 1170 | dasm_put(Dst, 4142); |
1169 | if (sse) { | 1171 | if (sse) { |
1170 | dasm_put(Dst, 4137, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1172 | dasm_put(Dst, 4158, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1171 | } else { | 1173 | } else { |
1172 | dasm_put(Dst, 4176, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1174 | dasm_put(Dst, 4197, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1173 | } | 1175 | } |
1174 | dasm_put(Dst, 4209, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); | 1176 | dasm_put(Dst, 4230, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); |
1175 | dasm_put(Dst, 4274, 1+1, LJ_TISNUM); | 1177 | dasm_put(Dst, 4295, 1+1, LJ_TISNUM); |
1176 | if (sse) { | 1178 | if (sse) { |
1177 | dasm_put(Dst, 4373); | 1179 | dasm_put(Dst, 4394); |
1178 | } else { | 1180 | } else { |
1179 | dasm_put(Dst, 4379); | 1181 | dasm_put(Dst, 4400); |
1180 | } | 1182 | } |
1181 | dasm_put(Dst, 4388); | 1183 | dasm_put(Dst, 4409); |
1182 | if (sse) { | 1184 | if (sse) { |
1183 | dasm_put(Dst, 4413); | 1185 | dasm_put(Dst, 4434); |
1184 | } else { | 1186 | } else { |
1185 | dasm_put(Dst, 4419); | 1187 | dasm_put(Dst, 4440); |
1186 | } | 1188 | } |
1187 | dasm_put(Dst, 4422, 1+2); | 1189 | dasm_put(Dst, 4443, 1+2); |
1188 | if (sse) { | 1190 | if (sse) { |
1189 | dasm_put(Dst, 4431); | 1191 | dasm_put(Dst, 4452); |
1190 | } else { | 1192 | } else { |
1191 | dasm_put(Dst, 4439); | 1193 | dasm_put(Dst, 4460); |
1192 | } | 1194 | } |
1193 | dasm_put(Dst, 4447); | 1195 | dasm_put(Dst, 4468); |
1194 | if (sse) { | 1196 | if (sse) { |
1195 | dasm_put(Dst, 4450, (unsigned int)(U64x(43500000,00000000)), (unsigned int)((U64x(43500000,00000000))>>32)); | 1197 | dasm_put(Dst, 4471, (unsigned int)(U64x(43500000,00000000)), (unsigned int)((U64x(43500000,00000000))>>32)); |
1196 | } else { | 1198 | } else { |
1197 | dasm_put(Dst, 4477); | 1199 | dasm_put(Dst, 4498); |
1198 | } | 1200 | } |
1199 | dasm_put(Dst, 4496); | 1201 | dasm_put(Dst, 4517); |
1200 | if (sse) { | 1202 | if (sse) { |
1201 | dasm_put(Dst, 4512, 1+1, LJ_TISNUM); | 1203 | dasm_put(Dst, 4533, 1+1, LJ_TISNUM); |
1202 | } else { | 1204 | } else { |
1203 | dasm_put(Dst, 4537, 1+1, LJ_TISNUM); | 1205 | dasm_put(Dst, 4558, 1+1, LJ_TISNUM); |
1204 | } | 1206 | } |
1205 | dasm_put(Dst, 4559); | 1207 | dasm_put(Dst, 4580); |
1206 | if (sse) { | 1208 | if (sse) { |
1207 | dasm_put(Dst, 4581); | 1209 | dasm_put(Dst, 4602); |
1208 | } else { | 1210 | } else { |
1209 | dasm_put(Dst, 4607); | 1211 | dasm_put(Dst, 4628); |
1210 | } | 1212 | } |
1211 | dasm_put(Dst, 4624, 1+2); | 1213 | dasm_put(Dst, 4645, 1+2); |
1212 | if (sse) { | 1214 | if (sse) { |
1213 | dasm_put(Dst, 4664); | 1215 | dasm_put(Dst, 4685); |
1214 | } else { | 1216 | } else { |
1215 | dasm_put(Dst, 4672); | 1217 | dasm_put(Dst, 4693); |
1216 | } | 1218 | } |
1217 | dasm_put(Dst, 4682, 2+1, LJ_TISNUM, LJ_TISNUM); | 1219 | dasm_put(Dst, 4703, 2+1, LJ_TISNUM, LJ_TISNUM); |
1218 | if (sse) { | 1220 | if (sse) { |
1219 | dasm_put(Dst, 4734, 2+1, LJ_TISNUM, LJ_TISNUM); | 1221 | dasm_put(Dst, 4755, 2+1, LJ_TISNUM, LJ_TISNUM); |
1220 | } else { | 1222 | } else { |
1221 | dasm_put(Dst, 4781, 2+1, LJ_TISNUM, LJ_TISNUM); | 1223 | dasm_put(Dst, 4802, 2+1, LJ_TISNUM, LJ_TISNUM); |
1222 | } | 1224 | } |
1223 | if (sse) { | 1225 | if (sse) { |
1224 | dasm_put(Dst, 4822, 1+1, LJ_TISNUM, LJ_TISNUM); | 1226 | dasm_put(Dst, 4843, 1+1, LJ_TISNUM, LJ_TISNUM); |
1225 | } else { | 1227 | } else { |
1226 | } | 1228 | } |
1227 | if (sse) { | 1229 | if (sse) { |
1228 | dasm_put(Dst, 4893, 1+1, LJ_TISNUM, LJ_TISNUM); | 1230 | dasm_put(Dst, 4914, 1+1, LJ_TISNUM, LJ_TISNUM); |
1229 | } else { | 1231 | } else { |
1230 | } | 1232 | } |
1231 | if (!sse) { | 1233 | if (!sse) { |
1232 | dasm_put(Dst, 4964); | 1234 | dasm_put(Dst, 4985); |
1233 | } | 1235 | } |
1234 | dasm_put(Dst, 4973, 1+1, LJ_TSTR); | 1236 | dasm_put(Dst, 4994, 1+1, LJ_TSTR); |
1235 | if (sse) { | 1237 | if (sse) { |
1236 | dasm_put(Dst, 4995, Dt5(->len)); | 1238 | dasm_put(Dst, 5016, Dt5(->len)); |
1237 | } else { | 1239 | } else { |
1238 | dasm_put(Dst, 5006, Dt5(->len)); | 1240 | dasm_put(Dst, 5027, Dt5(->len)); |
1239 | } | 1241 | } |
1240 | dasm_put(Dst, 5014, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); | 1242 | dasm_put(Dst, 5035, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); |
1241 | if (sse) { | 1243 | if (sse) { |
1242 | dasm_put(Dst, 5052); | 1244 | dasm_put(Dst, 5073); |
1243 | } else { | 1245 | } else { |
1244 | dasm_put(Dst, 5062); | 1246 | dasm_put(Dst, 5083); |
1245 | } | 1247 | } |
1246 | dasm_put(Dst, 5075, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); | 1248 | dasm_put(Dst, 5096, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); |
1247 | if (sse) { | 1249 | if (sse) { |
1248 | dasm_put(Dst, 5110); | 1250 | dasm_put(Dst, 5131); |
1249 | } else { | 1251 | } else { |
1250 | dasm_put(Dst, 5132); | 1252 | dasm_put(Dst, 5153); |
1251 | } | 1253 | } |
1252 | dasm_put(Dst, 5152, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); | 1254 | dasm_put(Dst, 5173, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); |
1253 | dasm_put(Dst, 2127); | 1255 | dasm_put(Dst, 2127); |
1254 | if (sse) { | 1256 | if (sse) { |
1255 | dasm_put(Dst, 5260); | 1257 | dasm_put(Dst, 5281); |
1256 | } else { | 1258 | } else { |
1257 | dasm_put(Dst, 5271); | 1259 | dasm_put(Dst, 5292); |
1258 | } | 1260 | } |
1259 | dasm_put(Dst, 5279, LJ_TSTR, LJ_TISNUM, Dt5(->len)); | 1261 | dasm_put(Dst, 5300, LJ_TSTR, LJ_TISNUM, Dt5(->len)); |
1260 | if (sse) { | 1262 | if (sse) { |
1261 | dasm_put(Dst, 5309); | 1263 | dasm_put(Dst, 5330); |
1262 | } else { | 1264 | } else { |
1263 | } | 1265 | } |
1264 | dasm_put(Dst, 5316, sizeof(GCstr)-1); | 1266 | dasm_put(Dst, 5337, sizeof(GCstr)-1); |
1265 | dasm_put(Dst, 5391, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1267 | dasm_put(Dst, 5412, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1266 | dasm_put(Dst, 5450, LJ_TSTR, LJ_TISNUM); | 1268 | dasm_put(Dst, 5471, LJ_TSTR, LJ_TISNUM); |
1267 | if (sse) { | 1269 | if (sse) { |
1268 | dasm_put(Dst, 5471); | 1270 | dasm_put(Dst, 5492); |
1269 | } else { | 1271 | } else { |
1270 | dasm_put(Dst, 5478); | 1272 | dasm_put(Dst, 5499); |
1271 | } | 1273 | } |
1272 | dasm_put(Dst, 5490, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); | 1274 | dasm_put(Dst, 5511, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); |
1273 | dasm_put(Dst, 5555, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1275 | dasm_put(Dst, 5576, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1274 | dasm_put(Dst, 5618, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); | 1276 | dasm_put(Dst, 5639, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); |
1275 | dasm_put(Dst, 5689, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); | 1277 | dasm_put(Dst, 5710, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); |
1276 | dasm_put(Dst, 5774, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1278 | dasm_put(Dst, 5795, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1277 | dasm_put(Dst, 5844, 1+1, LJ_TTAB); | 1279 | dasm_put(Dst, 5865, 1+1, LJ_TTAB); |
1278 | if (sse) { | 1280 | if (sse) { |
1279 | dasm_put(Dst, 5912); | 1281 | dasm_put(Dst, 5933); |
1280 | } else { | 1282 | } else { |
1281 | } | 1283 | } |
1282 | if (sse) { | 1284 | if (sse) { |
1283 | dasm_put(Dst, 5922, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1285 | dasm_put(Dst, 5943, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1284 | } else { | 1286 | } else { |
1285 | } | 1287 | } |
1286 | if (sse) { | 1288 | if (sse) { |
1287 | dasm_put(Dst, 5974, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1289 | dasm_put(Dst, 5995, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1288 | } else { | 1290 | } else { |
1289 | } | 1291 | } |
1290 | dasm_put(Dst, 6017, LJ_TISNUM); | 1292 | dasm_put(Dst, 6038, LJ_TISNUM); |
1291 | if (sse) { | 1293 | if (sse) { |
1292 | dasm_put(Dst, 6044); | 1294 | dasm_put(Dst, 6065); |
1293 | } else { | 1295 | } else { |
1294 | } | 1296 | } |
1295 | dasm_put(Dst, 6061); | 1297 | dasm_put(Dst, 6082); |
1296 | if (sse) { | 1298 | if (sse) { |
1297 | dasm_put(Dst, 6069, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1299 | dasm_put(Dst, 6090, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1298 | } else { | 1300 | } else { |
1299 | } | 1301 | } |
1300 | dasm_put(Dst, 6017, LJ_TISNUM); | 1302 | dasm_put(Dst, 6038, LJ_TISNUM); |
1301 | if (sse) { | 1303 | if (sse) { |
1302 | dasm_put(Dst, 6112); | 1304 | dasm_put(Dst, 6133); |
1303 | } else { | 1305 | } else { |
1304 | } | 1306 | } |
1305 | dasm_put(Dst, 6061); | 1307 | dasm_put(Dst, 6082); |
1306 | if (sse) { | 1308 | if (sse) { |
1307 | dasm_put(Dst, 6129, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1309 | dasm_put(Dst, 6150, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1308 | } else { | 1310 | } else { |
1309 | } | 1311 | } |
1310 | dasm_put(Dst, 6017, LJ_TISNUM); | 1312 | dasm_put(Dst, 6038, LJ_TISNUM); |
1311 | if (sse) { | 1313 | if (sse) { |
1312 | dasm_put(Dst, 6172); | 1314 | dasm_put(Dst, 6193); |
1313 | } else { | 1315 | } else { |
1314 | } | 1316 | } |
1315 | dasm_put(Dst, 6061); | 1317 | dasm_put(Dst, 6082); |
1316 | if (sse) { | 1318 | if (sse) { |
1317 | dasm_put(Dst, 6189, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1319 | dasm_put(Dst, 6210, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1318 | } else { | 1320 | } else { |
1319 | } | 1321 | } |
1320 | dasm_put(Dst, 6232); | 1322 | dasm_put(Dst, 6253); |
1321 | if (sse) { | 1323 | if (sse) { |
1322 | dasm_put(Dst, 6239, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1324 | dasm_put(Dst, 6260, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1323 | } else { | 1325 | } else { |
1324 | } | 1326 | } |
1325 | dasm_put(Dst, 6282); | 1327 | dasm_put(Dst, 6303); |
1326 | if (sse) { | 1328 | if (sse) { |
1327 | dasm_put(Dst, 6286); | 1329 | dasm_put(Dst, 6307); |
1328 | } else { | 1330 | } else { |
1329 | } | 1331 | } |
1330 | dasm_put(Dst, 6298); | 1332 | dasm_put(Dst, 6319); |
1331 | if (sse) { | 1333 | if (sse) { |
1332 | dasm_put(Dst, 6309, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1334 | dasm_put(Dst, 6330, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1333 | } else { | 1335 | } else { |
1334 | } | 1336 | } |
1335 | dasm_put(Dst, 6378); | 1337 | dasm_put(Dst, 6399); |
1336 | if (sse) { | 1338 | if (sse) { |
1337 | dasm_put(Dst, 6387, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1339 | dasm_put(Dst, 6408, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1338 | } else { | 1340 | } else { |
1339 | } | 1341 | } |
1340 | dasm_put(Dst, 6456); | 1342 | dasm_put(Dst, 6477); |
1341 | if (sse) { | 1343 | if (sse) { |
1342 | dasm_put(Dst, 6466, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1344 | dasm_put(Dst, 6487, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1343 | } else { | 1345 | } else { |
1344 | } | 1346 | } |
1345 | dasm_put(Dst, 6535); | 1347 | dasm_put(Dst, 6556); |
1346 | if (sse) { | 1348 | if (sse) { |
1347 | dasm_put(Dst, 6545, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1349 | dasm_put(Dst, 6566, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1348 | } else { | 1350 | } else { |
1349 | } | 1351 | } |
1350 | dasm_put(Dst, 6614); | 1352 | dasm_put(Dst, 6635); |
1351 | if (sse) { | 1353 | if (sse) { |
1352 | dasm_put(Dst, 6623, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); | 1354 | dasm_put(Dst, 6644, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); |
1353 | } else { | 1355 | } else { |
1354 | } | 1356 | } |
1355 | dasm_put(Dst, 6692, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); | 1357 | dasm_put(Dst, 6713, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); |
1356 | dasm_put(Dst, 6770, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); | 1358 | dasm_put(Dst, 6791, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); |
1357 | dasm_put(Dst, 6897, Dt1(->top), Dt1(->base), Dt1(->top)); | 1359 | dasm_put(Dst, 6918, Dt1(->top), Dt1(->base), Dt1(->top)); |
1358 | #if LJ_HASJIT | 1360 | #if LJ_HASJIT |
1359 | dasm_put(Dst, 6936, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); | 1361 | dasm_put(Dst, 6957, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); |
1360 | #endif | 1362 | #endif |
1361 | dasm_put(Dst, 6967, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); | 1363 | dasm_put(Dst, 6988, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); |
1362 | dasm_put(Dst, 7018, Dt1(->base), Dt1(->base), GG_DISP2STATIC); | 1364 | dasm_put(Dst, 7039, Dt1(->base), Dt1(->base), GG_DISP2STATIC); |
1363 | #if LJ_HASJIT | 1365 | #if LJ_HASJIT |
1364 | dasm_put(Dst, 7085, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); | 1366 | dasm_put(Dst, 7106, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); |
1365 | #endif | 1367 | #endif |
1366 | dasm_put(Dst, 7132); | 1368 | dasm_put(Dst, 7153); |
1367 | #if LJ_HASJIT | 1369 | #if LJ_HASJIT |
1368 | dasm_put(Dst, 6962); | 1370 | dasm_put(Dst, 6983); |
1369 | #endif | 1371 | #endif |
1370 | dasm_put(Dst, 7139); | 1372 | dasm_put(Dst, 7160); |
1371 | #if LJ_HASJIT | 1373 | #if LJ_HASJIT |
1372 | dasm_put(Dst, 7142); | 1374 | dasm_put(Dst, 7163); |
1373 | #endif | 1375 | #endif |
1374 | dasm_put(Dst, 7152, Dt1(->base), Dt1(->top)); | 1376 | dasm_put(Dst, 7173, Dt1(->base), Dt1(->top)); |
1375 | #if LJ_HASJIT | 1377 | #if LJ_HASJIT |
1376 | dasm_put(Dst, 7186); | 1378 | dasm_put(Dst, 7207); |
1377 | #endif | 1379 | #endif |
1378 | dasm_put(Dst, 7191, Dt1(->base), Dt1(->top)); | 1380 | dasm_put(Dst, 7212, Dt1(->base), Dt1(->top)); |
1379 | #if LJ_HASJIT | 1381 | #if LJ_HASJIT |
1380 | dasm_put(Dst, 7222, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 16*8+4*8, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), 4*8, GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); | 1382 | dasm_put(Dst, 7243, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 16*8+4*8, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), 4*8, GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); |
1381 | #endif | 1383 | #endif |
1382 | dasm_put(Dst, 7452); | 1384 | dasm_put(Dst, 7473); |
1383 | #if LJ_HASJIT | 1385 | #if LJ_HASJIT |
1384 | dasm_put(Dst, 7455, 9*16+4*8, -9*16, -8*16, -7*16, -6*16, -5*16, -4*16, -3*16, -2*16, -1*16, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); | 1386 | dasm_put(Dst, 7476, 9*16+4*8, -9*16, -8*16, -7*16, -6*16, -5*16, -4*16, -3*16, -2*16, -1*16, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); |
1385 | dasm_put(Dst, 7597); | 1387 | dasm_put(Dst, 7618); |
1386 | #endif | 1388 | #endif |
1387 | dasm_put(Dst, 7623); | 1389 | dasm_put(Dst, 7644); |
1388 | if (!sse) { | 1390 | if (!sse) { |
1389 | dasm_put(Dst, 7626); | 1391 | dasm_put(Dst, 7647); |
1390 | } | 1392 | } |
1391 | dasm_put(Dst, 7671, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1393 | dasm_put(Dst, 7692, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1392 | if (!sse) { | 1394 | if (!sse) { |
1393 | dasm_put(Dst, 7757); | 1395 | dasm_put(Dst, 7778); |
1394 | } | 1396 | } |
1395 | dasm_put(Dst, 7802, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); | 1397 | dasm_put(Dst, 7823, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); |
1396 | if (!sse) { | 1398 | if (!sse) { |
1397 | dasm_put(Dst, 7888); | 1399 | dasm_put(Dst, 7909); |
1398 | } | 1400 | } |
1399 | dasm_put(Dst, 7927, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1401 | dasm_put(Dst, 7948, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1400 | if (sse) { | 1402 | if (sse) { |
1401 | dasm_put(Dst, 8016, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1403 | dasm_put(Dst, 8037, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1402 | } else { | 1404 | } else { |
1403 | dasm_put(Dst, 8130); | 1405 | dasm_put(Dst, 8151); |
1404 | } | 1406 | } |
1405 | dasm_put(Dst, 8177); | 1407 | dasm_put(Dst, 8198); |
1406 | if (!sse) { | 1408 | if (!sse) { |
1407 | } else { | 1409 | } else { |
1408 | dasm_put(Dst, 8251); | 1410 | dasm_put(Dst, 8272); |
1409 | } | 1411 | } |
1410 | dasm_put(Dst, 8254); | 1412 | dasm_put(Dst, 8275); |
1411 | dasm_put(Dst, 8339, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); | 1413 | dasm_put(Dst, 8360, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); |
1412 | dasm_put(Dst, 8440, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); | 1414 | dasm_put(Dst, 8461, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); |
1413 | dasm_put(Dst, 8608); | 1415 | dasm_put(Dst, 8629); |
1414 | #if LJ_HASJIT | 1416 | #if LJ_HASJIT |
1415 | if (sse) { | 1417 | if (sse) { |
1416 | dasm_put(Dst, 8649); | 1418 | dasm_put(Dst, 8670); |
1417 | dasm_put(Dst, 8719); | 1419 | dasm_put(Dst, 8740); |
1418 | dasm_put(Dst, 8792); | 1420 | dasm_put(Dst, 8813); |
1419 | } else { | 1421 | } else { |
1420 | dasm_put(Dst, 8842); | 1422 | dasm_put(Dst, 8863); |
1421 | dasm_put(Dst, 8934); | 1423 | dasm_put(Dst, 8955); |
1422 | } | 1424 | } |
1423 | dasm_put(Dst, 8980); | 1425 | dasm_put(Dst, 9001); |
1424 | #endif | 1426 | #endif |
1425 | dasm_put(Dst, 8984); | 1427 | dasm_put(Dst, 9005); |
1426 | if (sse) { | 1428 | if (sse) { |
1427 | dasm_put(Dst, 8987, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); | 1429 | dasm_put(Dst, 9008, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); |
1428 | dasm_put(Dst, 9076, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); | 1430 | dasm_put(Dst, 9097, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); |
1429 | } else { | 1431 | } else { |
1430 | dasm_put(Dst, 9200); | 1432 | dasm_put(Dst, 9221); |
1431 | dasm_put(Dst, 9283); | 1433 | dasm_put(Dst, 9304); |
1432 | if (cmov) { | 1434 | if (cmov) { |
1433 | dasm_put(Dst, 9338); | 1435 | dasm_put(Dst, 9359); |
1434 | } else { | 1436 | } else { |
1435 | dasm_put(Dst, 9357); | 1437 | dasm_put(Dst, 9378); |
1436 | } | 1438 | } |
1437 | dasm_put(Dst, 8980); | 1439 | dasm_put(Dst, 9001); |
1438 | } | 1440 | } |
1439 | dasm_put(Dst, 9398); | 1441 | dasm_put(Dst, 9419); |
1440 | } | 1442 | } |
1441 | 1443 | ||
1442 | /* Generate the code for a single instruction. */ | 1444 | /* Generate the code for a single instruction. */ |
@@ -1452,618 +1454,618 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
1452 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ | 1454 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ |
1453 | 1455 | ||
1454 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | 1456 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: |
1455 | dasm_put(Dst, 9424, LJ_TISNUM, LJ_TISNUM); | 1457 | dasm_put(Dst, 9445, LJ_TISNUM, LJ_TISNUM); |
1456 | if (sse) { | 1458 | if (sse) { |
1457 | dasm_put(Dst, 9445); | 1459 | dasm_put(Dst, 9466); |
1458 | } else { | 1460 | } else { |
1459 | dasm_put(Dst, 9460); | 1461 | dasm_put(Dst, 9481); |
1460 | if (cmov) { | 1462 | if (cmov) { |
1461 | dasm_put(Dst, 9470); | 1463 | dasm_put(Dst, 9491); |
1462 | } else { | 1464 | } else { |
1463 | dasm_put(Dst, 9476); | 1465 | dasm_put(Dst, 9497); |
1464 | } | 1466 | } |
1465 | } | 1467 | } |
1466 | switch (op) { | 1468 | switch (op) { |
1467 | case BC_ISLT: | 1469 | case BC_ISLT: |
1468 | dasm_put(Dst, 9483); | 1470 | dasm_put(Dst, 9504); |
1469 | break; | 1471 | break; |
1470 | case BC_ISGE: | 1472 | case BC_ISGE: |
1471 | dasm_put(Dst, 9278); | 1473 | dasm_put(Dst, 9299); |
1472 | break; | 1474 | break; |
1473 | case BC_ISLE: | 1475 | case BC_ISLE: |
1474 | dasm_put(Dst, 5839); | 1476 | dasm_put(Dst, 5860); |
1475 | break; | 1477 | break; |
1476 | case BC_ISGT: | 1478 | case BC_ISGT: |
1477 | dasm_put(Dst, 9488); | 1479 | dasm_put(Dst, 9509); |
1478 | break; | 1480 | break; |
1479 | default: break; /* Shut up GCC. */ | 1481 | default: break; /* Shut up GCC. */ |
1480 | } | 1482 | } |
1481 | dasm_put(Dst, 9493, -BCBIAS_J*4); | 1483 | dasm_put(Dst, 9514, -BCBIAS_J*4); |
1482 | break; | 1484 | break; |
1483 | 1485 | ||
1484 | case BC_ISEQV: case BC_ISNEV: | 1486 | case BC_ISEQV: case BC_ISNEV: |
1485 | vk = op == BC_ISEQV; | 1487 | vk = op == BC_ISEQV; |
1486 | dasm_put(Dst, 9527, LJ_TISNUM, LJ_TISNUM); | 1488 | dasm_put(Dst, 9548, LJ_TISNUM, LJ_TISNUM); |
1487 | if (sse) { | 1489 | if (sse) { |
1488 | dasm_put(Dst, 9553); | 1490 | dasm_put(Dst, 9574); |
1489 | } else { | 1491 | } else { |
1490 | dasm_put(Dst, 9565); | 1492 | dasm_put(Dst, 9586); |
1491 | if (cmov) { | 1493 | if (cmov) { |
1492 | dasm_put(Dst, 9470); | 1494 | dasm_put(Dst, 9491); |
1493 | } else { | 1495 | } else { |
1494 | dasm_put(Dst, 9476); | 1496 | dasm_put(Dst, 9497); |
1495 | } | 1497 | } |
1496 | } | 1498 | } |
1497 | iseqne_fp: | 1499 | iseqne_fp: |
1498 | if (vk) { | 1500 | if (vk) { |
1499 | dasm_put(Dst, 9572); | 1501 | dasm_put(Dst, 9593); |
1500 | } else { | 1502 | } else { |
1501 | dasm_put(Dst, 9581); | 1503 | dasm_put(Dst, 9602); |
1502 | } | 1504 | } |
1503 | iseqne_end: | 1505 | iseqne_end: |
1504 | if (vk) { | 1506 | if (vk) { |
1505 | dasm_put(Dst, 9590, -BCBIAS_J*4); | 1507 | dasm_put(Dst, 9611, -BCBIAS_J*4); |
1506 | } else { | 1508 | } else { |
1507 | dasm_put(Dst, 9605, -BCBIAS_J*4); | 1509 | dasm_put(Dst, 9626, -BCBIAS_J*4); |
1508 | } | 1510 | } |
1509 | dasm_put(Dst, 9507); | 1511 | dasm_put(Dst, 9528); |
1510 | if (op == BC_ISEQV || op == BC_ISNEV) { | 1512 | if (op == BC_ISEQV || op == BC_ISNEV) { |
1511 | dasm_put(Dst, 9620, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); | 1513 | dasm_put(Dst, 9641, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); |
1512 | if (vk) { | 1514 | if (vk) { |
1513 | dasm_put(Dst, 9678); | 1515 | dasm_put(Dst, 9699); |
1514 | } else { | 1516 | } else { |
1515 | dasm_put(Dst, 9682); | 1517 | dasm_put(Dst, 9703); |
1516 | } | 1518 | } |
1517 | dasm_put(Dst, 9688); | 1519 | dasm_put(Dst, 9709); |
1518 | } | 1520 | } |
1519 | break; | 1521 | break; |
1520 | case BC_ISEQS: case BC_ISNES: | 1522 | case BC_ISEQS: case BC_ISNES: |
1521 | vk = op == BC_ISEQS; | 1523 | vk = op == BC_ISEQS; |
1522 | dasm_put(Dst, 9693, LJ_TSTR); | 1524 | dasm_put(Dst, 9714, LJ_TSTR); |
1523 | iseqne_test: | 1525 | iseqne_test: |
1524 | if (vk) { | 1526 | if (vk) { |
1525 | dasm_put(Dst, 9576); | 1527 | dasm_put(Dst, 9597); |
1526 | } else { | 1528 | } else { |
1527 | dasm_put(Dst, 2757); | 1529 | dasm_put(Dst, 2778); |
1528 | } | 1530 | } |
1529 | goto iseqne_end; | 1531 | goto iseqne_end; |
1530 | case BC_ISEQN: case BC_ISNEN: | 1532 | case BC_ISEQN: case BC_ISNEN: |
1531 | vk = op == BC_ISEQN; | 1533 | vk = op == BC_ISEQN; |
1532 | dasm_put(Dst, 9717, LJ_TISNUM); | 1534 | dasm_put(Dst, 9738, LJ_TISNUM); |
1533 | if (sse) { | 1535 | if (sse) { |
1534 | dasm_put(Dst, 9731); | 1536 | dasm_put(Dst, 9752); |
1535 | } else { | 1537 | } else { |
1536 | dasm_put(Dst, 9743); | 1538 | dasm_put(Dst, 9764); |
1537 | if (cmov) { | 1539 | if (cmov) { |
1538 | dasm_put(Dst, 9470); | 1540 | dasm_put(Dst, 9491); |
1539 | } else { | 1541 | } else { |
1540 | dasm_put(Dst, 9476); | 1542 | dasm_put(Dst, 9497); |
1541 | } | 1543 | } |
1542 | } | 1544 | } |
1543 | goto iseqne_fp; | 1545 | goto iseqne_fp; |
1544 | case BC_ISEQP: case BC_ISNEP: | 1546 | case BC_ISEQP: case BC_ISNEP: |
1545 | vk = op == BC_ISEQP; | 1547 | vk = op == BC_ISEQP; |
1546 | dasm_put(Dst, 9750); | 1548 | dasm_put(Dst, 9771); |
1547 | goto iseqne_test; | 1549 | goto iseqne_test; |
1548 | 1550 | ||
1549 | /* -- Unary test and copy ops ------------------------------------------- */ | 1551 | /* -- Unary test and copy ops ------------------------------------------- */ |
1550 | 1552 | ||
1551 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | 1553 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: |
1552 | dasm_put(Dst, 9762, LJ_TISTRUECOND); | 1554 | dasm_put(Dst, 9783, LJ_TISTRUECOND); |
1553 | if (op == BC_IST || op == BC_ISTC) { | 1555 | if (op == BC_IST || op == BC_ISTC) { |
1554 | dasm_put(Dst, 9774); | 1556 | dasm_put(Dst, 9795); |
1555 | } else { | 1557 | } else { |
1556 | dasm_put(Dst, 9779); | 1558 | dasm_put(Dst, 9800); |
1557 | } | 1559 | } |
1558 | if (op == BC_ISTC || op == BC_ISFC) { | 1560 | if (op == BC_ISTC || op == BC_ISFC) { |
1559 | dasm_put(Dst, 9784); | 1561 | dasm_put(Dst, 9805); |
1560 | } | 1562 | } |
1561 | dasm_put(Dst, 9795, -BCBIAS_J*4); | 1563 | dasm_put(Dst, 9816, -BCBIAS_J*4); |
1562 | break; | 1564 | break; |
1563 | 1565 | ||
1564 | /* -- Unary ops --------------------------------------------------------- */ | 1566 | /* -- Unary ops --------------------------------------------------------- */ |
1565 | 1567 | ||
1566 | case BC_MOV: | 1568 | case BC_MOV: |
1567 | dasm_put(Dst, 9827); | 1569 | dasm_put(Dst, 9848); |
1568 | break; | 1570 | break; |
1569 | case BC_NOT: | 1571 | case BC_NOT: |
1570 | dasm_put(Dst, 9855, LJ_TISTRUECOND, LJ_TTRUE); | 1572 | dasm_put(Dst, 9876, LJ_TISTRUECOND, LJ_TTRUE); |
1571 | break; | 1573 | break; |
1572 | case BC_UNM: | 1574 | case BC_UNM: |
1573 | dasm_put(Dst, 9891, LJ_TISNUM); | 1575 | dasm_put(Dst, 9912, LJ_TISNUM); |
1574 | if (sse) { | 1576 | if (sse) { |
1575 | dasm_put(Dst, 9902, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); | 1577 | dasm_put(Dst, 9923, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); |
1576 | } else { | 1578 | } else { |
1577 | dasm_put(Dst, 9927); | 1579 | dasm_put(Dst, 9948); |
1578 | } | 1580 | } |
1579 | dasm_put(Dst, 9507); | 1581 | dasm_put(Dst, 9528); |
1580 | break; | 1582 | break; |
1581 | case BC_LEN: | 1583 | case BC_LEN: |
1582 | dasm_put(Dst, 9936, LJ_TSTR); | 1584 | dasm_put(Dst, 9957, LJ_TSTR); |
1583 | if (sse) { | 1585 | if (sse) { |
1584 | dasm_put(Dst, 9950, Dt5(->len)); | 1586 | dasm_put(Dst, 9971, Dt5(->len)); |
1585 | } else { | 1587 | } else { |
1586 | dasm_put(Dst, 9968, Dt5(->len)); | 1588 | dasm_put(Dst, 9989, Dt5(->len)); |
1587 | } | 1589 | } |
1588 | dasm_put(Dst, 9977, LJ_TTAB); | 1590 | dasm_put(Dst, 9998, LJ_TTAB); |
1589 | if (sse) { | 1591 | if (sse) { |
1590 | dasm_put(Dst, 10018); | 1592 | dasm_put(Dst, 10039); |
1591 | } else { | 1593 | } else { |
1592 | } | 1594 | } |
1593 | dasm_put(Dst, 10027); | 1595 | dasm_put(Dst, 10048); |
1594 | break; | 1596 | break; |
1595 | 1597 | ||
1596 | /* -- Binary ops -------------------------------------------------------- */ | 1598 | /* -- Binary ops -------------------------------------------------------- */ |
1597 | 1599 | ||
1598 | 1600 | ||
1599 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | 1601 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: |
1600 | dasm_put(Dst, 10037); | 1602 | dasm_put(Dst, 10058); |
1601 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1603 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1602 | switch (vk) { | 1604 | switch (vk) { |
1603 | case 0: | 1605 | case 0: |
1604 | dasm_put(Dst, 10045, LJ_TISNUM); | 1606 | dasm_put(Dst, 10066, LJ_TISNUM); |
1605 | if (sse) { | 1607 | if (sse) { |
1606 | dasm_put(Dst, 10057); | 1608 | dasm_put(Dst, 10078); |
1607 | } else { | 1609 | } else { |
1608 | dasm_put(Dst, 10071); | 1610 | dasm_put(Dst, 10092); |
1609 | } | 1611 | } |
1610 | break; | 1612 | break; |
1611 | case 1: | 1613 | case 1: |
1612 | dasm_put(Dst, 10079, LJ_TISNUM); | 1614 | dasm_put(Dst, 10100, LJ_TISNUM); |
1613 | if (sse) { | 1615 | if (sse) { |
1614 | dasm_put(Dst, 10091); | 1616 | dasm_put(Dst, 10112); |
1615 | } else { | 1617 | } else { |
1616 | dasm_put(Dst, 10105); | 1618 | dasm_put(Dst, 10126); |
1617 | } | 1619 | } |
1618 | break; | 1620 | break; |
1619 | default: | 1621 | default: |
1620 | dasm_put(Dst, 10113, LJ_TISNUM, LJ_TISNUM); | 1622 | dasm_put(Dst, 10134, LJ_TISNUM, LJ_TISNUM); |
1621 | if (sse) { | 1623 | if (sse) { |
1622 | dasm_put(Dst, 10135); | 1624 | dasm_put(Dst, 10156); |
1623 | } else { | 1625 | } else { |
1624 | dasm_put(Dst, 10149); | 1626 | dasm_put(Dst, 10170); |
1625 | } | 1627 | } |
1626 | break; | 1628 | break; |
1627 | } | 1629 | } |
1628 | if (sse) { | 1630 | if (sse) { |
1629 | dasm_put(Dst, 9920); | 1631 | dasm_put(Dst, 9941); |
1630 | } else { | 1632 | } else { |
1631 | dasm_put(Dst, 9932); | 1633 | dasm_put(Dst, 9953); |
1632 | } | 1634 | } |
1633 | dasm_put(Dst, 9507); | 1635 | dasm_put(Dst, 9528); |
1634 | break; | 1636 | break; |
1635 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | 1637 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |
1636 | dasm_put(Dst, 10037); | 1638 | dasm_put(Dst, 10058); |
1637 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1639 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1638 | switch (vk) { | 1640 | switch (vk) { |
1639 | case 0: | 1641 | case 0: |
1640 | dasm_put(Dst, 10045, LJ_TISNUM); | 1642 | dasm_put(Dst, 10066, LJ_TISNUM); |
1641 | if (sse) { | 1643 | if (sse) { |
1642 | dasm_put(Dst, 10157); | 1644 | dasm_put(Dst, 10178); |
1643 | } else { | 1645 | } else { |
1644 | dasm_put(Dst, 10171); | 1646 | dasm_put(Dst, 10192); |
1645 | } | 1647 | } |
1646 | break; | 1648 | break; |
1647 | case 1: | 1649 | case 1: |
1648 | dasm_put(Dst, 10079, LJ_TISNUM); | 1650 | dasm_put(Dst, 10100, LJ_TISNUM); |
1649 | if (sse) { | 1651 | if (sse) { |
1650 | dasm_put(Dst, 10179); | 1652 | dasm_put(Dst, 10200); |
1651 | } else { | 1653 | } else { |
1652 | dasm_put(Dst, 10193); | 1654 | dasm_put(Dst, 10214); |
1653 | } | 1655 | } |
1654 | break; | 1656 | break; |
1655 | default: | 1657 | default: |
1656 | dasm_put(Dst, 10113, LJ_TISNUM, LJ_TISNUM); | 1658 | dasm_put(Dst, 10134, LJ_TISNUM, LJ_TISNUM); |
1657 | if (sse) { | 1659 | if (sse) { |
1658 | dasm_put(Dst, 10201); | 1660 | dasm_put(Dst, 10222); |
1659 | } else { | 1661 | } else { |
1660 | dasm_put(Dst, 10215); | 1662 | dasm_put(Dst, 10236); |
1661 | } | 1663 | } |
1662 | break; | 1664 | break; |
1663 | } | 1665 | } |
1664 | if (sse) { | 1666 | if (sse) { |
1665 | dasm_put(Dst, 9920); | 1667 | dasm_put(Dst, 9941); |
1666 | } else { | 1668 | } else { |
1667 | dasm_put(Dst, 9932); | 1669 | dasm_put(Dst, 9953); |
1668 | } | 1670 | } |
1669 | dasm_put(Dst, 9507); | 1671 | dasm_put(Dst, 9528); |
1670 | break; | 1672 | break; |
1671 | case BC_MULVN: case BC_MULNV: case BC_MULVV: | 1673 | case BC_MULVN: case BC_MULNV: case BC_MULVV: |
1672 | dasm_put(Dst, 10037); | 1674 | dasm_put(Dst, 10058); |
1673 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1675 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1674 | switch (vk) { | 1676 | switch (vk) { |
1675 | case 0: | 1677 | case 0: |
1676 | dasm_put(Dst, 10045, LJ_TISNUM); | 1678 | dasm_put(Dst, 10066, LJ_TISNUM); |
1677 | if (sse) { | 1679 | if (sse) { |
1678 | dasm_put(Dst, 10223); | 1680 | dasm_put(Dst, 10244); |
1679 | } else { | 1681 | } else { |
1680 | dasm_put(Dst, 10237); | 1682 | dasm_put(Dst, 10258); |
1681 | } | 1683 | } |
1682 | break; | 1684 | break; |
1683 | case 1: | 1685 | case 1: |
1684 | dasm_put(Dst, 10079, LJ_TISNUM); | 1686 | dasm_put(Dst, 10100, LJ_TISNUM); |
1685 | if (sse) { | 1687 | if (sse) { |
1686 | dasm_put(Dst, 10245); | 1688 | dasm_put(Dst, 10266); |
1687 | } else { | 1689 | } else { |
1688 | dasm_put(Dst, 10259); | 1690 | dasm_put(Dst, 10280); |
1689 | } | 1691 | } |
1690 | break; | 1692 | break; |
1691 | default: | 1693 | default: |
1692 | dasm_put(Dst, 10113, LJ_TISNUM, LJ_TISNUM); | 1694 | dasm_put(Dst, 10134, LJ_TISNUM, LJ_TISNUM); |
1693 | if (sse) { | 1695 | if (sse) { |
1694 | dasm_put(Dst, 10267); | 1696 | dasm_put(Dst, 10288); |
1695 | } else { | 1697 | } else { |
1696 | dasm_put(Dst, 10281); | 1698 | dasm_put(Dst, 10302); |
1697 | } | 1699 | } |
1698 | break; | 1700 | break; |
1699 | } | 1701 | } |
1700 | if (sse) { | 1702 | if (sse) { |
1701 | dasm_put(Dst, 9920); | 1703 | dasm_put(Dst, 9941); |
1702 | } else { | 1704 | } else { |
1703 | dasm_put(Dst, 9932); | 1705 | dasm_put(Dst, 9953); |
1704 | } | 1706 | } |
1705 | dasm_put(Dst, 9507); | 1707 | dasm_put(Dst, 9528); |
1706 | break; | 1708 | break; |
1707 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | 1709 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: |
1708 | dasm_put(Dst, 10037); | 1710 | dasm_put(Dst, 10058); |
1709 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1711 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1710 | switch (vk) { | 1712 | switch (vk) { |
1711 | case 0: | 1713 | case 0: |
1712 | dasm_put(Dst, 10045, LJ_TISNUM); | 1714 | dasm_put(Dst, 10066, LJ_TISNUM); |
1713 | if (sse) { | 1715 | if (sse) { |
1714 | dasm_put(Dst, 10289); | 1716 | dasm_put(Dst, 10310); |
1715 | } else { | 1717 | } else { |
1716 | dasm_put(Dst, 10303); | 1718 | dasm_put(Dst, 10324); |
1717 | } | 1719 | } |
1718 | break; | 1720 | break; |
1719 | case 1: | 1721 | case 1: |
1720 | dasm_put(Dst, 10079, LJ_TISNUM); | 1722 | dasm_put(Dst, 10100, LJ_TISNUM); |
1721 | if (sse) { | 1723 | if (sse) { |
1722 | dasm_put(Dst, 10311); | 1724 | dasm_put(Dst, 10332); |
1723 | } else { | 1725 | } else { |
1724 | dasm_put(Dst, 10325); | 1726 | dasm_put(Dst, 10346); |
1725 | } | 1727 | } |
1726 | break; | 1728 | break; |
1727 | default: | 1729 | default: |
1728 | dasm_put(Dst, 10113, LJ_TISNUM, LJ_TISNUM); | 1730 | dasm_put(Dst, 10134, LJ_TISNUM, LJ_TISNUM); |
1729 | if (sse) { | 1731 | if (sse) { |
1730 | dasm_put(Dst, 10333); | 1732 | dasm_put(Dst, 10354); |
1731 | } else { | 1733 | } else { |
1732 | dasm_put(Dst, 10347); | 1734 | dasm_put(Dst, 10368); |
1733 | } | 1735 | } |
1734 | break; | 1736 | break; |
1735 | } | 1737 | } |
1736 | if (sse) { | 1738 | if (sse) { |
1737 | dasm_put(Dst, 9920); | 1739 | dasm_put(Dst, 9941); |
1738 | } else { | 1740 | } else { |
1739 | dasm_put(Dst, 9932); | 1741 | dasm_put(Dst, 9953); |
1740 | } | 1742 | } |
1741 | dasm_put(Dst, 9507); | 1743 | dasm_put(Dst, 9528); |
1742 | break; | 1744 | break; |
1743 | case BC_MODVN: | 1745 | case BC_MODVN: |
1744 | dasm_put(Dst, 10037); | 1746 | dasm_put(Dst, 10058); |
1745 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1747 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1746 | switch (vk) { | 1748 | switch (vk) { |
1747 | case 0: | 1749 | case 0: |
1748 | dasm_put(Dst, 10045, LJ_TISNUM); | 1750 | dasm_put(Dst, 10066, LJ_TISNUM); |
1749 | if (sse) { | 1751 | if (sse) { |
1750 | dasm_put(Dst, 10355); | 1752 | dasm_put(Dst, 10376); |
1751 | } else { | 1753 | } else { |
1752 | dasm_put(Dst, 10369); | 1754 | dasm_put(Dst, 10390); |
1753 | } | 1755 | } |
1754 | break; | 1756 | break; |
1755 | case 1: | 1757 | case 1: |
1756 | dasm_put(Dst, 10079, LJ_TISNUM); | 1758 | dasm_put(Dst, 10100, LJ_TISNUM); |
1757 | if (sse) { | 1759 | if (sse) { |
1758 | dasm_put(Dst, 10377); | 1760 | dasm_put(Dst, 10398); |
1759 | } else { | 1761 | } else { |
1760 | dasm_put(Dst, 10391); | 1762 | dasm_put(Dst, 10412); |
1761 | } | 1763 | } |
1762 | break; | 1764 | break; |
1763 | default: | 1765 | default: |
1764 | dasm_put(Dst, 10113, LJ_TISNUM, LJ_TISNUM); | 1766 | dasm_put(Dst, 10134, LJ_TISNUM, LJ_TISNUM); |
1765 | if (sse) { | 1767 | if (sse) { |
1766 | dasm_put(Dst, 10399); | 1768 | dasm_put(Dst, 10420); |
1767 | } else { | 1769 | } else { |
1768 | dasm_put(Dst, 10413); | 1770 | dasm_put(Dst, 10434); |
1769 | } | 1771 | } |
1770 | break; | 1772 | break; |
1771 | } | 1773 | } |
1772 | dasm_put(Dst, 10421); | 1774 | dasm_put(Dst, 10442); |
1773 | if (sse) { | 1775 | if (sse) { |
1774 | dasm_put(Dst, 9920); | 1776 | dasm_put(Dst, 9941); |
1775 | } else { | 1777 | } else { |
1776 | dasm_put(Dst, 9932); | 1778 | dasm_put(Dst, 9953); |
1777 | } | 1779 | } |
1778 | dasm_put(Dst, 9507); | 1780 | dasm_put(Dst, 9528); |
1779 | break; | 1781 | break; |
1780 | case BC_MODNV: case BC_MODVV: | 1782 | case BC_MODNV: case BC_MODVV: |
1781 | dasm_put(Dst, 10037); | 1783 | dasm_put(Dst, 10058); |
1782 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1784 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1783 | switch (vk) { | 1785 | switch (vk) { |
1784 | case 0: | 1786 | case 0: |
1785 | dasm_put(Dst, 10045, LJ_TISNUM); | 1787 | dasm_put(Dst, 10066, LJ_TISNUM); |
1786 | if (sse) { | 1788 | if (sse) { |
1787 | dasm_put(Dst, 10355); | 1789 | dasm_put(Dst, 10376); |
1788 | } else { | 1790 | } else { |
1789 | dasm_put(Dst, 10369); | 1791 | dasm_put(Dst, 10390); |
1790 | } | 1792 | } |
1791 | break; | 1793 | break; |
1792 | case 1: | 1794 | case 1: |
1793 | dasm_put(Dst, 10079, LJ_TISNUM); | 1795 | dasm_put(Dst, 10100, LJ_TISNUM); |
1794 | if (sse) { | 1796 | if (sse) { |
1795 | dasm_put(Dst, 10377); | 1797 | dasm_put(Dst, 10398); |
1796 | } else { | 1798 | } else { |
1797 | dasm_put(Dst, 10391); | 1799 | dasm_put(Dst, 10412); |
1798 | } | 1800 | } |
1799 | break; | 1801 | break; |
1800 | default: | 1802 | default: |
1801 | dasm_put(Dst, 10113, LJ_TISNUM, LJ_TISNUM); | 1803 | dasm_put(Dst, 10134, LJ_TISNUM, LJ_TISNUM); |
1802 | if (sse) { | 1804 | if (sse) { |
1803 | dasm_put(Dst, 10399); | 1805 | dasm_put(Dst, 10420); |
1804 | } else { | 1806 | } else { |
1805 | dasm_put(Dst, 10413); | 1807 | dasm_put(Dst, 10434); |
1806 | } | 1808 | } |
1807 | break; | 1809 | break; |
1808 | } | 1810 | } |
1809 | dasm_put(Dst, 10427); | 1811 | dasm_put(Dst, 10448); |
1810 | break; | 1812 | break; |
1811 | case BC_POW: | 1813 | case BC_POW: |
1812 | dasm_put(Dst, 10037); | 1814 | dasm_put(Dst, 10058); |
1813 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1815 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1814 | switch (vk) { | 1816 | switch (vk) { |
1815 | case 0: | 1817 | case 0: |
1816 | dasm_put(Dst, 10045, LJ_TISNUM); | 1818 | dasm_put(Dst, 10066, LJ_TISNUM); |
1817 | if (sse) { | 1819 | if (sse) { |
1818 | dasm_put(Dst, 10355); | 1820 | dasm_put(Dst, 10376); |
1819 | } else { | 1821 | } else { |
1820 | dasm_put(Dst, 10369); | 1822 | dasm_put(Dst, 10390); |
1821 | } | 1823 | } |
1822 | break; | 1824 | break; |
1823 | case 1: | 1825 | case 1: |
1824 | dasm_put(Dst, 10079, LJ_TISNUM); | 1826 | dasm_put(Dst, 10100, LJ_TISNUM); |
1825 | if (sse) { | 1827 | if (sse) { |
1826 | dasm_put(Dst, 10377); | 1828 | dasm_put(Dst, 10398); |
1827 | } else { | 1829 | } else { |
1828 | dasm_put(Dst, 10391); | 1830 | dasm_put(Dst, 10412); |
1829 | } | 1831 | } |
1830 | break; | 1832 | break; |
1831 | default: | 1833 | default: |
1832 | dasm_put(Dst, 10113, LJ_TISNUM, LJ_TISNUM); | 1834 | dasm_put(Dst, 10134, LJ_TISNUM, LJ_TISNUM); |
1833 | if (sse) { | 1835 | if (sse) { |
1834 | dasm_put(Dst, 10399); | 1836 | dasm_put(Dst, 10420); |
1835 | } else { | 1837 | } else { |
1836 | dasm_put(Dst, 10413); | 1838 | dasm_put(Dst, 10434); |
1837 | } | 1839 | } |
1838 | break; | 1840 | break; |
1839 | } | 1841 | } |
1840 | dasm_put(Dst, 10432); | 1842 | dasm_put(Dst, 10453); |
1841 | if (sse) { | 1843 | if (sse) { |
1842 | dasm_put(Dst, 9920); | 1844 | dasm_put(Dst, 9941); |
1843 | } else { | 1845 | } else { |
1844 | dasm_put(Dst, 9932); | 1846 | dasm_put(Dst, 9953); |
1845 | } | 1847 | } |
1846 | dasm_put(Dst, 9507); | 1848 | dasm_put(Dst, 9528); |
1847 | break; | 1849 | break; |
1848 | 1850 | ||
1849 | case BC_CAT: | 1851 | case BC_CAT: |
1850 | dasm_put(Dst, 10436, Dt1(->base), Dt1(->base)); | 1852 | dasm_put(Dst, 10457, Dt1(->base), Dt1(->base)); |
1851 | break; | 1853 | break; |
1852 | 1854 | ||
1853 | /* -- Constant ops ------------------------------------------------------ */ | 1855 | /* -- Constant ops ------------------------------------------------------ */ |
1854 | 1856 | ||
1855 | case BC_KSTR: | 1857 | case BC_KSTR: |
1856 | dasm_put(Dst, 10519, LJ_TSTR); | 1858 | dasm_put(Dst, 10540, LJ_TSTR); |
1857 | break; | 1859 | break; |
1858 | case BC_KSHORT: | 1860 | case BC_KSHORT: |
1859 | if (sse) { | 1861 | if (sse) { |
1860 | dasm_put(Dst, 10554); | 1862 | dasm_put(Dst, 10575); |
1861 | } else { | 1863 | } else { |
1862 | dasm_put(Dst, 10569); | 1864 | dasm_put(Dst, 10590); |
1863 | } | 1865 | } |
1864 | dasm_put(Dst, 9507); | 1866 | dasm_put(Dst, 9528); |
1865 | break; | 1867 | break; |
1866 | case BC_KNUM: | 1868 | case BC_KNUM: |
1867 | if (sse) { | 1869 | if (sse) { |
1868 | dasm_put(Dst, 10577); | 1870 | dasm_put(Dst, 10598); |
1869 | } else { | 1871 | } else { |
1870 | dasm_put(Dst, 10590); | 1872 | dasm_put(Dst, 10611); |
1871 | } | 1873 | } |
1872 | dasm_put(Dst, 9507); | 1874 | dasm_put(Dst, 9528); |
1873 | break; | 1875 | break; |
1874 | case BC_KPRI: | 1876 | case BC_KPRI: |
1875 | dasm_put(Dst, 10597); | 1877 | dasm_put(Dst, 10618); |
1876 | break; | 1878 | break; |
1877 | case BC_KNIL: | 1879 | case BC_KNIL: |
1878 | dasm_put(Dst, 10625, LJ_TNIL); | 1880 | dasm_put(Dst, 10646, LJ_TNIL); |
1879 | break; | 1881 | break; |
1880 | 1882 | ||
1881 | /* -- Upvalue and function ops ------------------------------------------ */ | 1883 | /* -- Upvalue and function ops ------------------------------------------ */ |
1882 | 1884 | ||
1883 | case BC_UGET: | 1885 | case BC_UGET: |
1884 | dasm_put(Dst, 10672, offsetof(GCfuncL, uvptr), DtA(->v)); | 1886 | dasm_put(Dst, 10693, offsetof(GCfuncL, uvptr), DtA(->v)); |
1885 | break; | 1887 | break; |
1886 | case BC_USETV: | 1888 | case BC_USETV: |
1887 | #define TV2MARKOFS \ | 1889 | #define TV2MARKOFS \ |
1888 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) | 1890 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) |
1889 | dasm_put(Dst, 10712, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); | 1891 | dasm_put(Dst, 10733, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); |
1890 | dasm_put(Dst, 10803); | 1892 | dasm_put(Dst, 10824); |
1891 | break; | 1893 | break; |
1892 | #undef TV2MARKOFS | 1894 | #undef TV2MARKOFS |
1893 | case BC_USETS: | 1895 | case BC_USETS: |
1894 | dasm_put(Dst, 10815, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); | 1896 | dasm_put(Dst, 10836, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); |
1895 | break; | 1897 | break; |
1896 | case BC_USETN: | 1898 | case BC_USETN: |
1897 | dasm_put(Dst, 10908); | 1899 | dasm_put(Dst, 10929); |
1898 | if (sse) { | 1900 | if (sse) { |
1899 | dasm_put(Dst, 10913); | 1901 | dasm_put(Dst, 10934); |
1900 | } else { | 1902 | } else { |
1901 | dasm_put(Dst, 9746); | 1903 | dasm_put(Dst, 9767); |
1902 | } | 1904 | } |
1903 | dasm_put(Dst, 10920, offsetof(GCfuncL, uvptr), DtA(->v)); | 1905 | dasm_put(Dst, 10941, offsetof(GCfuncL, uvptr), DtA(->v)); |
1904 | if (sse) { | 1906 | if (sse) { |
1905 | dasm_put(Dst, 10929); | 1907 | dasm_put(Dst, 10950); |
1906 | } else { | 1908 | } else { |
1907 | dasm_put(Dst, 10935); | 1909 | dasm_put(Dst, 10956); |
1908 | } | 1910 | } |
1909 | dasm_put(Dst, 9507); | 1911 | dasm_put(Dst, 9528); |
1910 | break; | 1912 | break; |
1911 | case BC_USETP: | 1913 | case BC_USETP: |
1912 | dasm_put(Dst, 10938, offsetof(GCfuncL, uvptr), DtA(->v)); | 1914 | dasm_put(Dst, 10959, offsetof(GCfuncL, uvptr), DtA(->v)); |
1913 | break; | 1915 | break; |
1914 | case BC_UCLO: | 1916 | case BC_UCLO: |
1915 | dasm_put(Dst, 10977, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); | 1917 | dasm_put(Dst, 10998, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); |
1916 | break; | 1918 | break; |
1917 | 1919 | ||
1918 | case BC_FNEW: | 1920 | case BC_FNEW: |
1919 | dasm_put(Dst, 11032, Dt1(->base), Dt1(->base), LJ_TFUNC); | 1921 | dasm_put(Dst, 11053, Dt1(->base), Dt1(->base), LJ_TFUNC); |
1920 | break; | 1922 | break; |
1921 | 1923 | ||
1922 | /* -- Table ops --------------------------------------------------------- */ | 1924 | /* -- Table ops --------------------------------------------------------- */ |
1923 | 1925 | ||
1924 | case BC_TNEW: | 1926 | case BC_TNEW: |
1925 | dasm_put(Dst, 11098, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); | 1927 | dasm_put(Dst, 11119, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); |
1926 | break; | 1928 | break; |
1927 | case BC_TDUP: | 1929 | case BC_TDUP: |
1928 | dasm_put(Dst, 11220, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); | 1930 | dasm_put(Dst, 11241, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); |
1929 | break; | 1931 | break; |
1930 | 1932 | ||
1931 | case BC_GGET: | 1933 | case BC_GGET: |
1932 | dasm_put(Dst, 11315, Dt7(->env)); | 1934 | dasm_put(Dst, 11336, Dt7(->env)); |
1933 | break; | 1935 | break; |
1934 | case BC_GSET: | 1936 | case BC_GSET: |
1935 | dasm_put(Dst, 11334, Dt7(->env)); | 1937 | dasm_put(Dst, 11355, Dt7(->env)); |
1936 | break; | 1938 | break; |
1937 | 1939 | ||
1938 | case BC_TGETV: | 1940 | case BC_TGETV: |
1939 | dasm_put(Dst, 11353, LJ_TTAB, LJ_TISNUM); | 1941 | dasm_put(Dst, 11374, LJ_TTAB, LJ_TISNUM); |
1940 | if (sse) { | 1942 | if (sse) { |
1941 | dasm_put(Dst, 11386); | 1943 | dasm_put(Dst, 11407); |
1942 | } else { | 1944 | } else { |
1943 | } | 1945 | } |
1944 | dasm_put(Dst, 11407, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 1946 | dasm_put(Dst, 11428, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
1945 | dasm_put(Dst, 11491, LJ_TNIL, LJ_TSTR); | 1947 | dasm_put(Dst, 11512, LJ_TNIL, LJ_TSTR); |
1946 | break; | 1948 | break; |
1947 | case BC_TGETS: | 1949 | case BC_TGETS: |
1948 | dasm_put(Dst, 11520, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 1950 | dasm_put(Dst, 11541, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
1949 | dasm_put(Dst, 11604, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 1951 | dasm_put(Dst, 11625, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
1950 | break; | 1952 | break; |
1951 | case BC_TGETB: | 1953 | case BC_TGETB: |
1952 | dasm_put(Dst, 11675, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 1954 | dasm_put(Dst, 11696, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
1953 | dasm_put(Dst, 11770, LJ_TNIL); | 1955 | dasm_put(Dst, 11791, LJ_TNIL); |
1954 | break; | 1956 | break; |
1955 | 1957 | ||
1956 | case BC_TSETV: | 1958 | case BC_TSETV: |
1957 | dasm_put(Dst, 11787, LJ_TTAB, LJ_TISNUM); | 1959 | dasm_put(Dst, 11808, LJ_TTAB, LJ_TISNUM); |
1958 | if (sse) { | 1960 | if (sse) { |
1959 | dasm_put(Dst, 11386); | 1961 | dasm_put(Dst, 11407); |
1960 | } else { | 1962 | } else { |
1961 | } | 1963 | } |
1962 | dasm_put(Dst, 11820, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); | 1964 | dasm_put(Dst, 11841, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); |
1963 | dasm_put(Dst, 11899, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1965 | dasm_put(Dst, 11920, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1964 | break; | 1966 | break; |
1965 | case BC_TSETS: | 1967 | case BC_TSETS: |
1966 | dasm_put(Dst, 11961, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 1968 | dasm_put(Dst, 11982, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
1967 | dasm_put(Dst, 12037, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); | 1969 | dasm_put(Dst, 12058, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); |
1968 | dasm_put(Dst, 12125, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1970 | dasm_put(Dst, 12146, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1969 | break; | 1971 | break; |
1970 | case BC_TSETB: | 1972 | case BC_TSETB: |
1971 | dasm_put(Dst, 12216, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); | 1973 | dasm_put(Dst, 12237, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); |
1972 | dasm_put(Dst, 12310, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1974 | dasm_put(Dst, 12331, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1973 | break; | 1975 | break; |
1974 | 1976 | ||
1975 | case BC_TSETM: | 1977 | case BC_TSETM: |
1976 | dasm_put(Dst, 12356, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); | 1978 | dasm_put(Dst, 12377, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); |
1977 | dasm_put(Dst, 12499, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 1979 | dasm_put(Dst, 12520, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
1978 | break; | 1980 | break; |
1979 | 1981 | ||
1980 | /* -- Calls and vararg handling ----------------------------------------- */ | 1982 | /* -- Calls and vararg handling ----------------------------------------- */ |
1981 | 1983 | ||
1982 | case BC_CALL: case BC_CALLM: | 1984 | case BC_CALL: case BC_CALLM: |
1983 | dasm_put(Dst, 10041); | 1985 | dasm_put(Dst, 10062); |
1984 | if (op == BC_CALLM) { | 1986 | if (op == BC_CALLM) { |
1985 | dasm_put(Dst, 12517); | 1987 | dasm_put(Dst, 12538); |
1986 | } | 1988 | } |
1987 | dasm_put(Dst, 12522, LJ_TFUNC, Dt7(->pc)); | 1989 | dasm_put(Dst, 12543, LJ_TFUNC, Dt7(->pc)); |
1988 | break; | 1990 | break; |
1989 | 1991 | ||
1990 | case BC_CALLMT: | 1992 | case BC_CALLMT: |
1991 | dasm_put(Dst, 12517); | 1993 | dasm_put(Dst, 12538); |
1992 | break; | 1994 | break; |
1993 | case BC_CALLT: | 1995 | case BC_CALLT: |
1994 | dasm_put(Dst, 12564, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); | 1996 | dasm_put(Dst, 12585, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); |
1995 | dasm_put(Dst, 12679, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); | 1997 | dasm_put(Dst, 12700, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); |
1996 | break; | 1998 | break; |
1997 | 1999 | ||
1998 | case BC_ITERC: | 2000 | case BC_ITERC: |
1999 | dasm_put(Dst, 12750, LJ_TFUNC, 2+1, Dt7(->pc)); | 2001 | dasm_put(Dst, 12771, LJ_TFUNC, 2+1, Dt7(->pc)); |
2000 | break; | 2002 | break; |
2001 | 2003 | ||
2002 | case BC_ITERN: | 2004 | case BC_ITERN: |
2003 | #if LJ_HASJIT | 2005 | #if LJ_HASJIT |
2004 | #endif | 2006 | #endif |
2005 | dasm_put(Dst, 12821, Dt6(->asize), Dt6(->array), LJ_TNIL); | 2007 | dasm_put(Dst, 12842, Dt6(->asize), Dt6(->array), LJ_TNIL); |
2006 | if (sse) { | 2008 | if (sse) { |
2007 | dasm_put(Dst, 12867); | 2009 | dasm_put(Dst, 12888); |
2008 | } else { | 2010 | } else { |
2009 | dasm_put(Dst, 12873); | 2011 | dasm_put(Dst, 12894); |
2010 | } | 2012 | } |
2011 | dasm_put(Dst, 12879); | 2013 | dasm_put(Dst, 12900); |
2012 | if (sse) { | 2014 | if (sse) { |
2013 | dasm_put(Dst, 9920); | 2015 | dasm_put(Dst, 9941); |
2014 | } else { | 2016 | } else { |
2015 | dasm_put(Dst, 9932); | 2017 | dasm_put(Dst, 9953); |
2016 | } | 2018 | } |
2017 | dasm_put(Dst, 12892, -BCBIAS_J*4); | 2019 | dasm_put(Dst, 12913, -BCBIAS_J*4); |
2018 | if (!sse) { | 2020 | if (!sse) { |
2019 | dasm_put(Dst, 12944); | 2021 | dasm_put(Dst, 12965); |
2020 | } | 2022 | } |
2021 | dasm_put(Dst, 12950, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); | 2023 | dasm_put(Dst, 12971, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); |
2022 | break; | 2024 | break; |
2023 | 2025 | ||
2024 | case BC_ISNEXT: | 2026 | case BC_ISNEXT: |
2025 | dasm_put(Dst, 13022, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); | 2027 | dasm_put(Dst, 13043, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); |
2026 | break; | 2028 | break; |
2027 | 2029 | ||
2028 | case BC_VARG: | 2030 | case BC_VARG: |
2029 | dasm_put(Dst, 13122, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); | 2031 | dasm_put(Dst, 13143, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); |
2030 | dasm_put(Dst, 13282, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 2032 | dasm_put(Dst, 13303, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); |
2031 | break; | 2033 | break; |
2032 | 2034 | ||
2033 | /* -- Returns ----------------------------------------------------------- */ | 2035 | /* -- Returns ----------------------------------------------------------- */ |
2034 | 2036 | ||
2035 | case BC_RETM: | 2037 | case BC_RETM: |
2036 | dasm_put(Dst, 12517); | 2038 | dasm_put(Dst, 12538); |
2037 | break; | 2039 | break; |
2038 | 2040 | ||
2039 | case BC_RET: case BC_RET0: case BC_RET1: | 2041 | case BC_RET: case BC_RET0: case BC_RET1: |
2040 | if (op != BC_RET0) { | 2042 | if (op != BC_RET0) { |
2041 | dasm_put(Dst, 13348); | 2043 | dasm_put(Dst, 13369); |
2042 | } | 2044 | } |
2043 | dasm_put(Dst, 13352, FRAME_TYPE); | 2045 | dasm_put(Dst, 13373, FRAME_TYPE); |
2044 | switch (op) { | 2046 | switch (op) { |
2045 | case BC_RET: | 2047 | case BC_RET: |
2046 | dasm_put(Dst, 13371); | 2048 | dasm_put(Dst, 13392); |
2047 | break; | 2049 | break; |
2048 | case BC_RET1: | 2050 | case BC_RET1: |
2049 | dasm_put(Dst, 13423); | 2051 | dasm_put(Dst, 13444); |
2050 | /* fallthrough */ | 2052 | /* fallthrough */ |
2051 | case BC_RET0: | 2053 | case BC_RET0: |
2052 | dasm_put(Dst, 13433); | 2054 | dasm_put(Dst, 13454); |
2053 | default: | 2055 | default: |
2054 | break; | 2056 | break; |
2055 | } | 2057 | } |
2056 | dasm_put(Dst, 13444, Dt7(->pc), PC2PROTO(k)); | 2058 | dasm_put(Dst, 13465, Dt7(->pc), PC2PROTO(k)); |
2057 | if (op == BC_RET) { | 2059 | if (op == BC_RET) { |
2058 | dasm_put(Dst, 13488, LJ_TNIL); | 2060 | dasm_put(Dst, 13509, LJ_TNIL); |
2059 | } else { | 2061 | } else { |
2060 | dasm_put(Dst, 13497, LJ_TNIL); | 2062 | dasm_put(Dst, 13518, LJ_TNIL); |
2061 | } | 2063 | } |
2062 | dasm_put(Dst, 13504, -FRAME_VARG, FRAME_TYPEP); | 2064 | dasm_put(Dst, 13525, -FRAME_VARG, FRAME_TYPEP); |
2063 | if (op != BC_RET0) { | 2065 | if (op != BC_RET0) { |
2064 | dasm_put(Dst, 13528); | 2066 | dasm_put(Dst, 13549); |
2065 | } | 2067 | } |
2066 | dasm_put(Dst, 4507); | 2068 | dasm_put(Dst, 4528); |
2067 | break; | 2069 | break; |
2068 | 2070 | ||
2069 | /* -- Loops and branches ------------------------------------------------ */ | 2071 | /* -- Loops and branches ------------------------------------------------ */ |
@@ -2071,7 +2073,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2071 | 2073 | ||
2072 | case BC_FORL: | 2074 | case BC_FORL: |
2073 | #if LJ_HASJIT | 2075 | #if LJ_HASJIT |
2074 | dasm_put(Dst, 13532, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2076 | dasm_put(Dst, 13553, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2075 | #endif | 2077 | #endif |
2076 | break; | 2078 | break; |
2077 | 2079 | ||
@@ -2083,57 +2085,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2083 | case BC_FORI: | 2085 | case BC_FORI: |
2084 | case BC_IFORL: | 2086 | case BC_IFORL: |
2085 | vk = (op == BC_IFORL || op == BC_JFORL); | 2087 | vk = (op == BC_IFORL || op == BC_JFORL); |
2086 | dasm_put(Dst, 13553); | 2088 | dasm_put(Dst, 13574); |
2087 | if (!vk) { | 2089 | if (!vk) { |
2088 | dasm_put(Dst, 13557, LJ_TISNUM, LJ_TISNUM); | 2090 | dasm_put(Dst, 13578, LJ_TISNUM, LJ_TISNUM); |
2089 | } | 2091 | } |
2090 | dasm_put(Dst, 13576); | 2092 | dasm_put(Dst, 13597); |
2091 | if (!vk) { | 2093 | if (!vk) { |
2092 | dasm_put(Dst, 13580, LJ_TISNUM); | 2094 | dasm_put(Dst, 13601, LJ_TISNUM); |
2093 | } | 2095 | } |
2094 | if (sse) { | 2096 | if (sse) { |
2095 | dasm_put(Dst, 13589); | 2097 | dasm_put(Dst, 13610); |
2096 | if (vk) { | 2098 | if (vk) { |
2097 | dasm_put(Dst, 13601); | 2099 | dasm_put(Dst, 13622); |
2098 | } else { | 2100 | } else { |
2099 | dasm_put(Dst, 13620); | 2101 | dasm_put(Dst, 13641); |
2100 | } | 2102 | } |
2101 | dasm_put(Dst, 13625); | 2103 | dasm_put(Dst, 13646); |
2102 | } else { | 2104 | } else { |
2103 | dasm_put(Dst, 13638); | 2105 | dasm_put(Dst, 13659); |
2104 | if (vk) { | 2106 | if (vk) { |
2105 | dasm_put(Dst, 13644); | 2107 | dasm_put(Dst, 13665); |
2106 | } else { | 2108 | } else { |
2107 | dasm_put(Dst, 13660); | 2109 | dasm_put(Dst, 13681); |
2108 | } | 2110 | } |
2109 | dasm_put(Dst, 13668); | 2111 | dasm_put(Dst, 13689); |
2110 | if (cmov) { | 2112 | if (cmov) { |
2111 | dasm_put(Dst, 9470); | 2113 | dasm_put(Dst, 9491); |
2112 | } else { | 2114 | } else { |
2113 | dasm_put(Dst, 9476); | 2115 | dasm_put(Dst, 9497); |
2114 | } | 2116 | } |
2115 | if (!cmov) { | 2117 | if (!cmov) { |
2116 | dasm_put(Dst, 13673); | 2118 | dasm_put(Dst, 13694); |
2117 | } | 2119 | } |
2118 | } | 2120 | } |
2119 | if (op == BC_FORI) { | 2121 | if (op == BC_FORI) { |
2120 | dasm_put(Dst, 13679, -BCBIAS_J*4); | 2122 | dasm_put(Dst, 13700, -BCBIAS_J*4); |
2121 | } else if (op == BC_JFORI) { | 2123 | } else if (op == BC_JFORI) { |
2122 | dasm_put(Dst, 13689, -BCBIAS_J*4, BC_JLOOP); | 2124 | dasm_put(Dst, 13710, -BCBIAS_J*4, BC_JLOOP); |
2123 | } else if (op == BC_IFORL) { | 2125 | } else if (op == BC_IFORL) { |
2124 | dasm_put(Dst, 13703, -BCBIAS_J*4); | 2126 | dasm_put(Dst, 13724, -BCBIAS_J*4); |
2125 | } else { | 2127 | } else { |
2126 | dasm_put(Dst, 13699, BC_JLOOP); | 2128 | dasm_put(Dst, 13720, BC_JLOOP); |
2127 | } | 2129 | } |
2128 | dasm_put(Dst, 9505); | 2130 | dasm_put(Dst, 9526); |
2129 | if (sse) { | 2131 | if (sse) { |
2130 | dasm_put(Dst, 13713); | 2132 | dasm_put(Dst, 13734); |
2131 | } | 2133 | } |
2132 | break; | 2134 | break; |
2133 | 2135 | ||
2134 | case BC_ITERL: | 2136 | case BC_ITERL: |
2135 | #if LJ_HASJIT | 2137 | #if LJ_HASJIT |
2136 | dasm_put(Dst, 13532, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2138 | dasm_put(Dst, 13553, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2137 | #endif | 2139 | #endif |
2138 | break; | 2140 | break; |
2139 | 2141 | ||
@@ -2142,33 +2144,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2142 | break; | 2144 | break; |
2143 | #endif | 2145 | #endif |
2144 | case BC_IITERL: | 2146 | case BC_IITERL: |
2145 | dasm_put(Dst, 13724, LJ_TNIL); | 2147 | dasm_put(Dst, 13745, LJ_TNIL); |
2146 | if (op == BC_JITERL) { | 2148 | if (op == BC_JITERL) { |
2147 | dasm_put(Dst, 13739, BC_JLOOP); | 2149 | dasm_put(Dst, 13760, BC_JLOOP); |
2148 | } else { | 2150 | } else { |
2149 | dasm_put(Dst, 13753, -BCBIAS_J*4); | 2151 | dasm_put(Dst, 13774, -BCBIAS_J*4); |
2150 | } | 2152 | } |
2151 | dasm_put(Dst, 9805); | 2153 | dasm_put(Dst, 9826); |
2152 | break; | 2154 | break; |
2153 | 2155 | ||
2154 | case BC_LOOP: | 2156 | case BC_LOOP: |
2155 | #if LJ_HASJIT | 2157 | #if LJ_HASJIT |
2156 | dasm_put(Dst, 13532, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2158 | dasm_put(Dst, 13553, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2157 | #endif | 2159 | #endif |
2158 | break; | 2160 | break; |
2159 | 2161 | ||
2160 | case BC_ILOOP: | 2162 | case BC_ILOOP: |
2161 | dasm_put(Dst, 9507); | 2163 | dasm_put(Dst, 9528); |
2162 | break; | 2164 | break; |
2163 | 2165 | ||
2164 | case BC_JLOOP: | 2166 | case BC_JLOOP: |
2165 | #if LJ_HASJIT | 2167 | #if LJ_HASJIT |
2166 | dasm_put(Dst, 13769, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), 9*16+4*8, -1*16, -2*16, -3*16, -4*16, -5*16, -6*16, -7*16, -8*16, -9*16); | 2168 | dasm_put(Dst, 13790, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), 9*16+4*8, -1*16, -2*16, -3*16, -4*16, -5*16, -6*16, -7*16, -8*16, -9*16); |
2167 | #endif | 2169 | #endif |
2168 | break; | 2170 | break; |
2169 | 2171 | ||
2170 | case BC_JMP: | 2172 | case BC_JMP: |
2171 | dasm_put(Dst, 13878, -BCBIAS_J*4); | 2173 | dasm_put(Dst, 13899, -BCBIAS_J*4); |
2172 | break; | 2174 | break; |
2173 | 2175 | ||
2174 | /* -- Function headers -------------------------------------------------- */ | 2176 | /* -- Function headers -------------------------------------------------- */ |
@@ -2182,7 +2184,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2182 | 2184 | ||
2183 | case BC_FUNCF: | 2185 | case BC_FUNCF: |
2184 | #if LJ_HASJIT | 2186 | #if LJ_HASJIT |
2185 | dasm_put(Dst, 13903, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2187 | dasm_put(Dst, 13924, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2186 | #endif | 2188 | #endif |
2187 | case BC_FUNCV: /* NYI: compiled vararg functions. */ | 2189 | case BC_FUNCV: /* NYI: compiled vararg functions. */ |
2188 | break; | 2190 | break; |
@@ -2192,47 +2194,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2192 | break; | 2194 | break; |
2193 | #endif | 2195 | #endif |
2194 | case BC_IFUNCF: | 2196 | case BC_IFUNCF: |
2195 | dasm_put(Dst, 13924, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); | 2197 | dasm_put(Dst, 13945, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); |
2196 | if (op == BC_JFUNCF) { | 2198 | if (op == BC_JFUNCF) { |
2197 | dasm_put(Dst, 13954, BC_JLOOP); | 2199 | dasm_put(Dst, 13975, BC_JLOOP); |
2198 | } else { | 2200 | } else { |
2199 | dasm_put(Dst, 9507); | 2201 | dasm_put(Dst, 9528); |
2200 | } | 2202 | } |
2201 | dasm_put(Dst, 13963, LJ_TNIL); | 2203 | dasm_put(Dst, 13984, LJ_TNIL); |
2202 | break; | 2204 | break; |
2203 | 2205 | ||
2204 | case BC_JFUNCV: | 2206 | case BC_JFUNCV: |
2205 | #if !LJ_HASJIT | 2207 | #if !LJ_HASJIT |
2206 | break; | 2208 | break; |
2207 | #endif | 2209 | #endif |
2208 | dasm_put(Dst, 8982); | 2210 | dasm_put(Dst, 9003); |
2209 | break; /* NYI: compiled vararg functions. */ | 2211 | break; /* NYI: compiled vararg functions. */ |
2210 | 2212 | ||
2211 | case BC_IFUNCV: | 2213 | case BC_IFUNCV: |
2212 | dasm_put(Dst, 13985, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); | 2214 | dasm_put(Dst, 14006, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); |
2213 | if (op == BC_JFUNCV) { | 2215 | if (op == BC_JFUNCV) { |
2214 | dasm_put(Dst, 13954, BC_JLOOP); | 2216 | dasm_put(Dst, 13975, BC_JLOOP); |
2215 | } else { | 2217 | } else { |
2216 | dasm_put(Dst, 14076, -4+PC2PROTO(k)); | 2218 | dasm_put(Dst, 14097, -4+PC2PROTO(k)); |
2217 | } | 2219 | } |
2218 | dasm_put(Dst, 14099, LJ_TNIL); | 2220 | dasm_put(Dst, 14120, LJ_TNIL); |
2219 | break; | 2221 | break; |
2220 | 2222 | ||
2221 | case BC_FUNCC: | 2223 | case BC_FUNCC: |
2222 | case BC_FUNCCW: | 2224 | case BC_FUNCCW: |
2223 | dasm_put(Dst, 14121, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); | 2225 | dasm_put(Dst, 14142, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); |
2224 | if (op == BC_FUNCC) { | 2226 | if (op == BC_FUNCC) { |
2225 | dasm_put(Dst, 14151); | 2227 | dasm_put(Dst, 14172); |
2226 | } else { | 2228 | } else { |
2227 | dasm_put(Dst, 14155); | 2229 | dasm_put(Dst, 14176); |
2228 | } | 2230 | } |
2229 | dasm_put(Dst, 14163, DISPATCH_GL(vmstate), ~LJ_VMST_C); | 2231 | dasm_put(Dst, 14184, DISPATCH_GL(vmstate), ~LJ_VMST_C); |
2230 | if (op == BC_FUNCC) { | 2232 | if (op == BC_FUNCC) { |
2231 | dasm_put(Dst, 14172); | 2233 | dasm_put(Dst, 14193); |
2232 | } else { | 2234 | } else { |
2233 | dasm_put(Dst, 14176, DISPATCH_GL(wrapf)); | 2235 | dasm_put(Dst, 14197, DISPATCH_GL(wrapf)); |
2234 | } | 2236 | } |
2235 | dasm_put(Dst, 14181, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); | 2237 | dasm_put(Dst, 14202, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); |
2236 | break; | 2238 | break; |
2237 | 2239 | ||
2238 | /* ---------------------------------------------------------------------- */ | 2240 | /* ---------------------------------------------------------------------- */ |
@@ -2260,7 +2262,7 @@ static int build_backend(BuildCtx *ctx) | |||
2260 | 2262 | ||
2261 | build_subroutines(ctx, cmov, sse); | 2263 | build_subroutines(ctx, cmov, sse); |
2262 | 2264 | ||
2263 | dasm_put(Dst, 14206); | 2265 | dasm_put(Dst, 14227); |
2264 | for (op = 0; op < BC__MAX; op++) | 2266 | for (op = 0; op < BC__MAX; op++) |
2265 | build_ins(ctx, (BCOp)op, op, cmov, sse); | 2267 | build_ins(ctx, (BCOp)op, op, cmov, sse); |
2266 | 2268 | ||
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index e9ecc2c2..e07ef181 100644 --- a/src/buildvm_x86.dasc +++ b/src/buildvm_x86.dasc | |||
@@ -1509,8 +1509,10 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
1509 | | jmp ->fff_res1 | 1509 | | jmp ->fff_res1 |
1510 | | | 1510 | | |
1511 | |.ffunc_1 pairs | 1511 | |.ffunc_1 pairs |
1512 | | mov CFUNC:RB, [BASE-8] | 1512 | | mov TAB:RB, [BASE] |
1513 | | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback | 1513 | | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback |
1514 | | cmp dword TAB:RB->metatable, 0; jne ->fff_fallback | ||
1515 | | mov CFUNC:RB, [BASE-8] | ||
1514 | | mov CFUNC:RD, CFUNC:RB->upvalue[0] | 1516 | | mov CFUNC:RD, CFUNC:RB->upvalue[0] |
1515 | | mov PC, [BASE-4] | 1517 | | mov PC, [BASE-4] |
1516 | | mov dword [BASE-4], LJ_TFUNC | 1518 | | mov dword [BASE-4], LJ_TFUNC |
@@ -1571,8 +1573,10 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
1571 | | jmp ->fff_res | 1573 | | jmp ->fff_res |
1572 | | | 1574 | | |
1573 | |.ffunc_1 ipairs | 1575 | |.ffunc_1 ipairs |
1574 | | mov CFUNC:RB, [BASE-8] | 1576 | | mov TAB:RB, [BASE] |
1575 | | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback | 1577 | | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback |
1578 | | cmp dword TAB:RB->metatable, 0; jne ->fff_fallback | ||
1579 | | mov CFUNC:RB, [BASE-8] | ||
1576 | | mov CFUNC:RD, CFUNC:RB->upvalue[0] | 1580 | | mov CFUNC:RD, CFUNC:RB->upvalue[0] |
1577 | | mov PC, [BASE-4] | 1581 | | mov PC, [BASE-4] |
1578 | | mov dword [BASE-4], LJ_TFUNC | 1582 | | mov dword [BASE-4], LJ_TFUNC |
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h index 8d30b4ef..f68d6c87 100644 --- a/src/buildvm_x86.h +++ b/src/buildvm_x86.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 char build_actionlist[15576] = { | 15 | static const unsigned char build_actionlist[15597] = { |
16 | 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141, | 16 | 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141, |
17 | 76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36, | 17 | 76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36, |
18 | 20,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237,15, | 18 | 20,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237,15, |
@@ -129,33 +129,34 @@ static const unsigned char build_actionlist[15576] = { | |||
129 | 139,149,233,133,192,15,132,244,249,139,106,8,139,66,12,137,106,252,248,137, | 129 | 139,149,233,133,192,15,132,244,249,139,106,8,139,66,12,137,106,252,248,137, |
130 | 66,252,252,139,106,16,139,66,20,137,42,137,66,4,248,68,184,237,252,233,244, | 130 | 66,252,252,139,106,16,139,66,20,137,42,137,66,4,248,68,184,237,252,233,244, |
131 | 69,248,2,199,66,12,237,252,233,244,1,248,3,199,66,252,252,237,252,233,244, | 131 | 69,248,2,199,66,12,237,252,233,244,1,248,3,199,66,252,252,237,252,233,244, |
132 | 58,248,70,129,252,248,239,15,130,244,55,255,139,106,252,248,129,122,253,4, | 132 | 58,248,70,129,252,248,239,15,130,244,55,255,139,42,129,122,253,4,239,15,133, |
133 | 239,15,133,244,55,139,133,233,139,114,252,252,199,66,252,252,237,137,66,252, | 133 | 244,55,131,189,233,0,15,133,244,55,139,106,252,248,139,133,233,139,114,252, |
134 | 248,199,66,12,237,184,237,252,233,244,69,248,71,129,252,248,239,15,130,244, | 134 | 252,199,66,252,252,237,137,66,252,248,199,66,12,237,184,237,252,233,244,69, |
135 | 55,129,122,253,4,239,15,133,244,55,129,122,253,12,239,15,135,244,55,139,114, | 135 | 248,71,129,252,248,239,15,130,244,55,129,122,253,4,239,15,133,244,55,129, |
136 | 252,252,255,252,242,15,16,66,8,189,0,0,252,240,63,102,15,110,205,102,15,112, | 136 | 122,253,12,239,255,15,135,244,55,139,114,252,252,255,252,242,15,16,66,8,189, |
137 | 201,81,252,242,15,88,193,252,242,15,45,192,252,242,15,17,66,252,248,255,221, | 137 | 0,0,252,240,63,102,15,110,205,102,15,112,201,81,252,242,15,88,193,252,242, |
138 | 66,8,217,232,222,193,219,20,36,221,90,252,248,139,4,36,255,139,42,59,133, | 138 | 15,45,192,252,242,15,17,66,252,248,255,221,66,8,217,232,222,193,219,20,36, |
139 | 233,15,131,244,248,193,224,3,3,133,233,248,1,129,120,253,4,239,15,132,244, | 139 | 221,90,252,248,139,4,36,255,139,42,59,133,233,15,131,244,248,193,224,3,3, |
140 | 72,139,40,139,64,4,137,42,137,66,4,252,233,244,68,248,2,131,189,233,0,15, | 140 | 133,233,248,1,129,120,253,4,239,15,132,244,72,139,40,139,64,4,137,42,137, |
141 | 132,244,72,137,252,233,137,213,137,194,232,251,1,12,137,252,234,133,192,15, | 141 | 66,4,252,233,244,68,248,2,131,189,233,0,15,132,244,72,137,252,233,137,213, |
142 | 133,244,1,248,72,184,237,252,233,244,69,248,73,255,129,252,248,239,15,130, | 142 | 137,194,232,251,1,12,137,252,234,133,192,15,133,244,1,248,72,184,237,252, |
143 | 244,55,139,106,252,248,129,122,253,4,239,15,133,244,55,139,133,233,139,114, | 143 | 233,244,69,248,73,255,129,252,248,239,15,130,244,55,139,42,129,122,253,4, |
144 | 252,252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242,15,17,66, | 144 | 239,15,133,244,55,131,189,233,0,15,133,244,55,139,106,252,248,139,133,233, |
145 | 8,255,217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129,252,248, | 145 | 139,114,252,252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242,15, |
146 | 239,15,130,244,55,141,74,8,131,232,1,190,237,248,1,15,182,171,233,193,252, | 146 | 17,66,8,255,217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129,252, |
147 | 237,235,131,229,1,1,252,238,252,233,244,27,248,75,129,252,248,239,15,130, | 147 | 248,239,15,130,244,55,141,74,8,131,232,1,190,237,248,1,15,182,171,233,193, |
148 | 244,55,129,122,253,12,239,15,133,244,55,255,139,106,4,137,106,12,199,66,4, | 148 | 252,237,235,131,229,1,1,252,238,252,233,244,27,248,75,129,252,248,239,15, |
149 | 237,139,42,139,114,8,137,106,8,137,50,141,74,16,131,232,2,190,237,252,233, | 149 | 130,244,55,129,122,253,12,239,15,133,244,55,255,139,106,4,137,106,12,199, |
150 | 244,1,248,76,129,252,248,239,15,130,244,55,139,42,139,114,252,252,137,116, | 150 | 66,4,237,139,42,139,114,8,137,106,8,137,50,141,74,16,131,232,2,190,237,252, |
151 | 36,24,137,44,36,129,122,253,4,239,15,133,244,55,131,189,233,0,15,133,244, | 151 | 233,244,1,248,76,129,252,248,239,15,130,244,55,139,42,139,114,252,252,137, |
152 | 55,128,189,233,235,15,135,244,55,139,141,233,15,132,244,247,255,59,141,233, | 152 | 116,36,24,137,44,36,129,122,253,4,239,15,133,244,55,131,189,233,0,15,133, |
153 | 15,132,244,55,248,1,141,116,193,252,240,59,181,233,15,135,244,55,137,181, | 153 | 244,55,128,189,233,235,15,135,244,55,139,141,233,15,132,244,247,255,59,141, |
154 | 233,139,108,36,48,137,149,233,131,194,8,137,149,233,141,108,194,232,41,252, | 154 | 233,15,132,244,55,248,1,141,116,193,252,240,59,181,233,15,135,244,55,137, |
155 | 245,57,206,15,132,244,249,248,2,139,68,46,4,137,70,252,252,139,4,46,137,70, | 155 | 181,233,139,108,36,48,137,149,233,131,194,8,137,149,233,141,108,194,232,41, |
156 | 252,248,131,252,238,8,57,206,15,133,244,2,248,3,137,76,36,4,49,201,137,76, | 156 | 252,245,57,206,15,132,244,249,248,2,139,68,46,4,137,70,252,252,139,4,46,137, |
157 | 36,12,137,76,36,8,232,244,24,199,131,233,237,255,139,108,36,48,139,52,36, | 157 | 70,252,248,131,252,238,8,57,206,15,133,244,2,248,3,137,76,36,4,49,201,137, |
158 | 139,149,233,129,252,248,239,15,135,244,254,248,4,139,142,233,139,190,233, | 158 | 76,36,12,137,76,36,8,232,244,24,199,131,233,237,255,139,108,36,48,139,52, |
159 | 36,139,149,233,129,252,248,239,15,135,244,254,248,4,139,142,233,139,190,233, | ||
159 | 137,142,233,137,252,254,41,206,15,132,244,252,141,4,50,193,252,238,3,59,133, | 160 | 137,142,233,137,252,254,41,206,15,132,244,252,141,4,50,193,252,238,3,59,133, |
160 | 233,15,135,244,255,137,213,41,205,248,5,139,1,137,4,41,139,65,4,137,68,41, | 161 | 233,15,135,244,255,137,213,41,205,248,5,139,1,137,4,41,139,65,4,137,68,41, |
161 | 4,131,193,8,57,252,249,15,133,244,5,248,6,141,70,2,199,66,252,252,237,248, | 162 | 4,131,193,8,57,252,249,15,133,244,5,248,6,141,70,2,199,66,252,252,237,248, |
@@ -1173,394 +1174,395 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
1173 | dasm_put(Dst, 2164, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1174 | dasm_put(Dst, 2164, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1174 | dasm_put(Dst, 2230, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); | 1175 | dasm_put(Dst, 2230, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); |
1175 | dasm_put(Dst, 2297, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); | 1176 | dasm_put(Dst, 2297, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); |
1176 | dasm_put(Dst, 2402, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); | 1177 | dasm_put(Dst, 2402, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); |
1178 | dasm_put(Dst, 2476); | ||
1177 | if (sse) { | 1179 | if (sse) { |
1178 | dasm_put(Dst, 2474); | 1180 | dasm_put(Dst, 2485); |
1179 | } else { | 1181 | } else { |
1180 | dasm_put(Dst, 2513); | 1182 | dasm_put(Dst, 2524); |
1181 | } | 1183 | } |
1182 | dasm_put(Dst, 2531, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); | 1184 | dasm_put(Dst, 2542, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); |
1183 | dasm_put(Dst, 2612, 1+1, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC); | 1185 | dasm_put(Dst, 2623, 1+1, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC); |
1184 | if (sse) { | 1186 | if (sse) { |
1185 | dasm_put(Dst, 2650); | 1187 | dasm_put(Dst, 2671); |
1186 | } else { | 1188 | } else { |
1187 | dasm_put(Dst, 2660); | 1189 | dasm_put(Dst, 2681); |
1188 | } | 1190 | } |
1189 | dasm_put(Dst, 2667, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); | 1191 | dasm_put(Dst, 2688, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); |
1190 | dasm_put(Dst, 2731, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); | 1192 | dasm_put(Dst, 2752, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); |
1191 | dasm_put(Dst, 2819, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); | 1193 | dasm_put(Dst, 2840, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); |
1192 | dasm_put(Dst, 2920, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); | 1194 | dasm_put(Dst, 2941, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); |
1193 | dasm_put(Dst, 3034, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); | 1195 | dasm_put(Dst, 3055, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); |
1194 | dasm_put(Dst, 3132, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); | 1196 | dasm_put(Dst, 3153, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); |
1195 | dasm_put(Dst, 3198, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); | 1197 | dasm_put(Dst, 3219, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); |
1196 | dasm_put(Dst, 3299, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); | 1198 | dasm_put(Dst, 3320, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); |
1197 | dasm_put(Dst, 3412, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); | 1199 | dasm_put(Dst, 3433, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); |
1198 | if (sse) { | 1200 | if (sse) { |
1199 | dasm_put(Dst, 3438, 1+1, LJ_TISNUM); | 1201 | dasm_put(Dst, 3459, 1+1, LJ_TISNUM); |
1200 | } else { | 1202 | } else { |
1201 | dasm_put(Dst, 3507, 1+1, LJ_TISNUM); | 1203 | dasm_put(Dst, 3528, 1+1, LJ_TISNUM); |
1202 | } | 1204 | } |
1203 | dasm_put(Dst, 3543, 1+1, FRAME_TYPE, LJ_TNIL); | 1205 | dasm_put(Dst, 3564, 1+1, FRAME_TYPE, LJ_TNIL); |
1204 | if (sse) { | 1206 | if (sse) { |
1205 | dasm_put(Dst, 3633, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1207 | dasm_put(Dst, 3654, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1206 | dasm_put(Dst, 3695, 1+1, LJ_TISNUM); | 1208 | dasm_put(Dst, 3716, 1+1, LJ_TISNUM); |
1207 | } else { | 1209 | } else { |
1208 | dasm_put(Dst, 3725, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1210 | dasm_put(Dst, 3746, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1209 | dasm_put(Dst, 3784, 1+1, LJ_TISNUM); | 1211 | dasm_put(Dst, 3805, 1+1, LJ_TISNUM); |
1210 | } | 1212 | } |
1211 | dasm_put(Dst, 3811, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1213 | dasm_put(Dst, 3832, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1212 | dasm_put(Dst, 3880, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1214 | dasm_put(Dst, 3901, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1213 | dasm_put(Dst, 3937, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1215 | dasm_put(Dst, 3958, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1214 | dasm_put(Dst, 4000, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1216 | dasm_put(Dst, 4021, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1215 | dasm_put(Dst, 4090); | 1217 | dasm_put(Dst, 4111); |
1216 | if (sse) { | 1218 | if (sse) { |
1217 | dasm_put(Dst, 4102, 1+1, LJ_TISNUM); | 1219 | dasm_put(Dst, 4123, 1+1, LJ_TISNUM); |
1218 | } else { | 1220 | } else { |
1219 | dasm_put(Dst, 4133, 1+1, LJ_TISNUM); | 1221 | dasm_put(Dst, 4154, 1+1, LJ_TISNUM); |
1220 | } | 1222 | } |
1221 | dasm_put(Dst, 4158); | 1223 | dasm_put(Dst, 4179); |
1222 | if (sse) { | 1224 | if (sse) { |
1223 | dasm_put(Dst, 4172, 1+1, LJ_TISNUM); | 1225 | dasm_put(Dst, 4193, 1+1, LJ_TISNUM); |
1224 | } else { | 1226 | } else { |
1225 | dasm_put(Dst, 4203, 1+1, LJ_TISNUM); | 1227 | dasm_put(Dst, 4224, 1+1, LJ_TISNUM); |
1226 | } | 1228 | } |
1227 | dasm_put(Dst, 4228); | 1229 | dasm_put(Dst, 4249); |
1228 | if (sse) { | 1230 | if (sse) { |
1229 | dasm_put(Dst, 4242, 1+1, LJ_TISNUM); | 1231 | dasm_put(Dst, 4263, 1+1, LJ_TISNUM); |
1230 | } else { | 1232 | } else { |
1231 | dasm_put(Dst, 4273, 1+1, LJ_TISNUM); | 1233 | dasm_put(Dst, 4294, 1+1, LJ_TISNUM); |
1232 | } | 1234 | } |
1233 | dasm_put(Dst, 4298); | 1235 | dasm_put(Dst, 4319); |
1234 | if (sse) { | 1236 | if (sse) { |
1235 | dasm_put(Dst, 4314, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1237 | dasm_put(Dst, 4335, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1236 | } else { | 1238 | } else { |
1237 | dasm_put(Dst, 4353, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1239 | dasm_put(Dst, 4374, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1238 | } | 1240 | } |
1239 | dasm_put(Dst, 4386, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); | 1241 | dasm_put(Dst, 4407, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); |
1240 | dasm_put(Dst, 4451, 1+1, LJ_TISNUM); | 1242 | dasm_put(Dst, 4472, 1+1, LJ_TISNUM); |
1241 | if (sse) { | 1243 | if (sse) { |
1242 | dasm_put(Dst, 4550); | 1244 | dasm_put(Dst, 4571); |
1243 | } else { | 1245 | } else { |
1244 | dasm_put(Dst, 4556); | 1246 | dasm_put(Dst, 4577); |
1245 | } | 1247 | } |
1246 | dasm_put(Dst, 4565); | 1248 | dasm_put(Dst, 4586); |
1247 | if (sse) { | 1249 | if (sse) { |
1248 | dasm_put(Dst, 4590); | 1250 | dasm_put(Dst, 4611); |
1249 | } else { | 1251 | } else { |
1250 | dasm_put(Dst, 4596); | 1252 | dasm_put(Dst, 4617); |
1251 | } | 1253 | } |
1252 | dasm_put(Dst, 4599, 1+2); | 1254 | dasm_put(Dst, 4620, 1+2); |
1253 | if (sse) { | 1255 | if (sse) { |
1254 | dasm_put(Dst, 4608); | 1256 | dasm_put(Dst, 4629); |
1255 | } else { | 1257 | } else { |
1256 | dasm_put(Dst, 4616); | 1258 | dasm_put(Dst, 4637); |
1257 | } | 1259 | } |
1258 | dasm_put(Dst, 4624); | 1260 | dasm_put(Dst, 4645); |
1259 | if (sse) { | 1261 | if (sse) { |
1260 | dasm_put(Dst, 4627); | 1262 | dasm_put(Dst, 4648); |
1261 | } else { | 1263 | } else { |
1262 | dasm_put(Dst, 4659); | 1264 | dasm_put(Dst, 4680); |
1263 | } | 1265 | } |
1264 | dasm_put(Dst, 4678); | 1266 | dasm_put(Dst, 4699); |
1265 | if (sse) { | 1267 | if (sse) { |
1266 | dasm_put(Dst, 4694, 1+1, LJ_TISNUM); | 1268 | dasm_put(Dst, 4715, 1+1, LJ_TISNUM); |
1267 | } else { | 1269 | } else { |
1268 | dasm_put(Dst, 4719, 1+1, LJ_TISNUM); | 1270 | dasm_put(Dst, 4740, 1+1, LJ_TISNUM); |
1269 | } | 1271 | } |
1270 | dasm_put(Dst, 4741); | 1272 | dasm_put(Dst, 4762); |
1271 | if (sse) { | 1273 | if (sse) { |
1272 | dasm_put(Dst, 4763); | 1274 | dasm_put(Dst, 4784); |
1273 | } else { | 1275 | } else { |
1274 | dasm_put(Dst, 4789); | 1276 | dasm_put(Dst, 4810); |
1275 | } | 1277 | } |
1276 | dasm_put(Dst, 4806, 1+2); | 1278 | dasm_put(Dst, 4827, 1+2); |
1277 | if (sse) { | 1279 | if (sse) { |
1278 | dasm_put(Dst, 4846); | 1280 | dasm_put(Dst, 4867); |
1279 | } else { | 1281 | } else { |
1280 | dasm_put(Dst, 4854); | 1282 | dasm_put(Dst, 4875); |
1281 | } | 1283 | } |
1282 | dasm_put(Dst, 4864, 2+1, LJ_TISNUM, LJ_TISNUM); | 1284 | dasm_put(Dst, 4885, 2+1, LJ_TISNUM, LJ_TISNUM); |
1283 | if (sse) { | 1285 | if (sse) { |
1284 | dasm_put(Dst, 4916, 2+1, LJ_TISNUM, LJ_TISNUM); | 1286 | dasm_put(Dst, 4937, 2+1, LJ_TISNUM, LJ_TISNUM); |
1285 | } else { | 1287 | } else { |
1286 | dasm_put(Dst, 4963, 2+1, LJ_TISNUM, LJ_TISNUM); | 1288 | dasm_put(Dst, 4984, 2+1, LJ_TISNUM, LJ_TISNUM); |
1287 | } | 1289 | } |
1288 | if (sse) { | 1290 | if (sse) { |
1289 | dasm_put(Dst, 5004, 1+1, LJ_TISNUM, LJ_TISNUM); | 1291 | dasm_put(Dst, 5025, 1+1, LJ_TISNUM, LJ_TISNUM); |
1290 | } else { | 1292 | } else { |
1291 | dasm_put(Dst, 5075, 1+1, LJ_TISNUM, LJ_TISNUM); | 1293 | dasm_put(Dst, 5096, 1+1, LJ_TISNUM, LJ_TISNUM); |
1292 | if (cmov) { | 1294 | if (cmov) { |
1293 | dasm_put(Dst, 5128); | 1295 | dasm_put(Dst, 5149); |
1294 | } else { | 1296 | } else { |
1295 | dasm_put(Dst, 5136); | 1297 | dasm_put(Dst, 5157); |
1296 | } | 1298 | } |
1297 | dasm_put(Dst, 5067); | 1299 | dasm_put(Dst, 5088); |
1298 | } | 1300 | } |
1299 | if (sse) { | 1301 | if (sse) { |
1300 | dasm_put(Dst, 5157, 1+1, LJ_TISNUM, LJ_TISNUM); | 1302 | dasm_put(Dst, 5178, 1+1, LJ_TISNUM, LJ_TISNUM); |
1301 | } else { | 1303 | } else { |
1302 | dasm_put(Dst, 5228, 1+1, LJ_TISNUM, LJ_TISNUM); | 1304 | dasm_put(Dst, 5249, 1+1, LJ_TISNUM, LJ_TISNUM); |
1303 | if (cmov) { | 1305 | if (cmov) { |
1304 | dasm_put(Dst, 5281); | 1306 | dasm_put(Dst, 5302); |
1305 | } else { | 1307 | } else { |
1306 | dasm_put(Dst, 5289); | 1308 | dasm_put(Dst, 5310); |
1307 | } | 1309 | } |
1308 | dasm_put(Dst, 5067); | 1310 | dasm_put(Dst, 5088); |
1309 | } | 1311 | } |
1310 | if (!sse) { | 1312 | if (!sse) { |
1311 | dasm_put(Dst, 5310); | 1313 | dasm_put(Dst, 5331); |
1312 | } | 1314 | } |
1313 | dasm_put(Dst, 5319, 1+1, LJ_TSTR); | 1315 | dasm_put(Dst, 5340, 1+1, LJ_TSTR); |
1314 | if (sse) { | 1316 | if (sse) { |
1315 | dasm_put(Dst, 5341, Dt5(->len)); | 1317 | dasm_put(Dst, 5362, Dt5(->len)); |
1316 | } else { | 1318 | } else { |
1317 | dasm_put(Dst, 5352, Dt5(->len)); | 1319 | dasm_put(Dst, 5373, Dt5(->len)); |
1318 | } | 1320 | } |
1319 | dasm_put(Dst, 5360, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); | 1321 | dasm_put(Dst, 5381, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); |
1320 | if (sse) { | 1322 | if (sse) { |
1321 | dasm_put(Dst, 5398); | 1323 | dasm_put(Dst, 5419); |
1322 | } else { | 1324 | } else { |
1323 | dasm_put(Dst, 5408); | 1325 | dasm_put(Dst, 5429); |
1324 | } | 1326 | } |
1325 | dasm_put(Dst, 5421, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); | 1327 | dasm_put(Dst, 5442, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); |
1326 | if (sse) { | 1328 | if (sse) { |
1327 | dasm_put(Dst, 5456); | 1329 | dasm_put(Dst, 5477); |
1328 | } else { | 1330 | } else { |
1329 | dasm_put(Dst, 5478); | 1331 | dasm_put(Dst, 5499); |
1330 | } | 1332 | } |
1331 | dasm_put(Dst, 5498, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); | 1333 | dasm_put(Dst, 5519, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); |
1332 | dasm_put(Dst, 2142); | 1334 | dasm_put(Dst, 2142); |
1333 | if (sse) { | 1335 | if (sse) { |
1334 | dasm_put(Dst, 5601); | 1336 | dasm_put(Dst, 5622); |
1335 | } else { | 1337 | } else { |
1336 | dasm_put(Dst, 5612); | 1338 | dasm_put(Dst, 5633); |
1337 | } | 1339 | } |
1338 | dasm_put(Dst, 5620, LJ_TSTR, LJ_TISNUM, Dt5(->len)); | 1340 | dasm_put(Dst, 5641, LJ_TSTR, LJ_TISNUM, Dt5(->len)); |
1339 | if (sse) { | 1341 | if (sse) { |
1340 | dasm_put(Dst, 5650); | 1342 | dasm_put(Dst, 5671); |
1341 | } else { | 1343 | } else { |
1342 | dasm_put(Dst, 5657); | 1344 | dasm_put(Dst, 5678); |
1343 | } | 1345 | } |
1344 | dasm_put(Dst, 5669, sizeof(GCstr)-1); | 1346 | dasm_put(Dst, 5690, sizeof(GCstr)-1); |
1345 | dasm_put(Dst, 5744, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1347 | dasm_put(Dst, 5765, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1346 | dasm_put(Dst, 5803, LJ_TSTR, LJ_TISNUM); | 1348 | dasm_put(Dst, 5824, LJ_TSTR, LJ_TISNUM); |
1347 | if (sse) { | 1349 | if (sse) { |
1348 | dasm_put(Dst, 5824); | 1350 | dasm_put(Dst, 5845); |
1349 | } else { | 1351 | } else { |
1350 | dasm_put(Dst, 5831); | 1352 | dasm_put(Dst, 5852); |
1351 | } | 1353 | } |
1352 | dasm_put(Dst, 5843, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); | 1354 | dasm_put(Dst, 5864, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); |
1353 | dasm_put(Dst, 5908, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1355 | dasm_put(Dst, 5929, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1354 | dasm_put(Dst, 5971, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); | 1356 | dasm_put(Dst, 5992, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); |
1355 | dasm_put(Dst, 6042, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); | 1357 | dasm_put(Dst, 6063, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); |
1356 | dasm_put(Dst, 6127, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1358 | dasm_put(Dst, 6148, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1357 | dasm_put(Dst, 6197, 1+1, LJ_TTAB); | 1359 | dasm_put(Dst, 6218, 1+1, LJ_TTAB); |
1358 | if (sse) { | 1360 | if (sse) { |
1359 | dasm_put(Dst, 6265); | 1361 | dasm_put(Dst, 6286); |
1360 | } else { | 1362 | } else { |
1361 | dasm_put(Dst, 6275); | 1363 | dasm_put(Dst, 6296); |
1362 | } | 1364 | } |
1363 | if (sse) { | 1365 | if (sse) { |
1364 | dasm_put(Dst, 6286, 1+1, LJ_TISNUM); | 1366 | dasm_put(Dst, 6307, 1+1, LJ_TISNUM); |
1365 | } else { | 1367 | } else { |
1366 | dasm_put(Dst, 6343, 1+1, LJ_TISNUM); | 1368 | dasm_put(Dst, 6364, 1+1, LJ_TISNUM); |
1367 | } | 1369 | } |
1368 | if (sse) { | 1370 | if (sse) { |
1369 | dasm_put(Dst, 6387, 1+1, LJ_TISNUM); | 1371 | dasm_put(Dst, 6408, 1+1, LJ_TISNUM); |
1370 | } else { | 1372 | } else { |
1371 | dasm_put(Dst, 6435, 1+1, LJ_TISNUM); | 1373 | dasm_put(Dst, 6456, 1+1, LJ_TISNUM); |
1372 | } | 1374 | } |
1373 | dasm_put(Dst, 6475, LJ_TISNUM); | 1375 | dasm_put(Dst, 6496, LJ_TISNUM); |
1374 | if (sse) { | 1376 | if (sse) { |
1375 | dasm_put(Dst, 6502); | 1377 | dasm_put(Dst, 6523); |
1376 | } else { | 1378 | } else { |
1377 | dasm_put(Dst, 6519); | 1379 | dasm_put(Dst, 6540); |
1378 | } | 1380 | } |
1379 | dasm_put(Dst, 6532); | 1381 | dasm_put(Dst, 6553); |
1380 | if (sse) { | 1382 | if (sse) { |
1381 | dasm_put(Dst, 6540, 1+1, LJ_TISNUM); | 1383 | dasm_put(Dst, 6561, 1+1, LJ_TISNUM); |
1382 | } else { | 1384 | } else { |
1383 | dasm_put(Dst, 6588, 1+1, LJ_TISNUM); | 1385 | dasm_put(Dst, 6609, 1+1, LJ_TISNUM); |
1384 | } | 1386 | } |
1385 | dasm_put(Dst, 6475, LJ_TISNUM); | 1387 | dasm_put(Dst, 6496, LJ_TISNUM); |
1386 | if (sse) { | 1388 | if (sse) { |
1387 | dasm_put(Dst, 6628); | 1389 | dasm_put(Dst, 6649); |
1388 | } else { | 1390 | } else { |
1389 | dasm_put(Dst, 6645); | 1391 | dasm_put(Dst, 6666); |
1390 | } | 1392 | } |
1391 | dasm_put(Dst, 6532); | 1393 | dasm_put(Dst, 6553); |
1392 | if (sse) { | 1394 | if (sse) { |
1393 | dasm_put(Dst, 6658, 1+1, LJ_TISNUM); | 1395 | dasm_put(Dst, 6679, 1+1, LJ_TISNUM); |
1394 | } else { | 1396 | } else { |
1395 | dasm_put(Dst, 6706, 1+1, LJ_TISNUM); | 1397 | dasm_put(Dst, 6727, 1+1, LJ_TISNUM); |
1396 | } | 1398 | } |
1397 | dasm_put(Dst, 6475, LJ_TISNUM); | 1399 | dasm_put(Dst, 6496, LJ_TISNUM); |
1398 | if (sse) { | 1400 | if (sse) { |
1399 | dasm_put(Dst, 6746); | 1401 | dasm_put(Dst, 6767); |
1400 | } else { | 1402 | } else { |
1401 | dasm_put(Dst, 6763); | 1403 | dasm_put(Dst, 6784); |
1402 | } | 1404 | } |
1403 | dasm_put(Dst, 6532); | 1405 | dasm_put(Dst, 6553); |
1404 | if (sse) { | 1406 | if (sse) { |
1405 | dasm_put(Dst, 6776, 1+1, LJ_TISNUM); | 1407 | dasm_put(Dst, 6797, 1+1, LJ_TISNUM); |
1406 | } else { | 1408 | } else { |
1407 | dasm_put(Dst, 6824, 1+1, LJ_TISNUM); | 1409 | dasm_put(Dst, 6845, 1+1, LJ_TISNUM); |
1408 | } | 1410 | } |
1409 | dasm_put(Dst, 6864); | 1411 | dasm_put(Dst, 6885); |
1410 | if (sse) { | 1412 | if (sse) { |
1411 | dasm_put(Dst, 6871, 1+1, LJ_TISNUM); | 1413 | dasm_put(Dst, 6892, 1+1, LJ_TISNUM); |
1412 | } else { | 1414 | } else { |
1413 | dasm_put(Dst, 6919, 1+1, LJ_TISNUM); | 1415 | dasm_put(Dst, 6940, 1+1, LJ_TISNUM); |
1414 | } | 1416 | } |
1415 | dasm_put(Dst, 6959); | 1417 | dasm_put(Dst, 6980); |
1416 | if (sse) { | 1418 | if (sse) { |
1417 | dasm_put(Dst, 6963); | 1419 | dasm_put(Dst, 6984); |
1418 | } else { | 1420 | } else { |
1419 | dasm_put(Dst, 6975); | 1421 | dasm_put(Dst, 6996); |
1420 | } | 1422 | } |
1421 | dasm_put(Dst, 6988); | 1423 | dasm_put(Dst, 7009); |
1422 | if (sse) { | 1424 | if (sse) { |
1423 | dasm_put(Dst, 6999, 2+1, LJ_TISNUM, LJ_TISNUM); | 1425 | dasm_put(Dst, 7020, 2+1, LJ_TISNUM, LJ_TISNUM); |
1424 | } else { | 1426 | } else { |
1425 | dasm_put(Dst, 7073, 2+1, LJ_TISNUM, LJ_TISNUM); | 1427 | dasm_put(Dst, 7094, 2+1, LJ_TISNUM, LJ_TISNUM); |
1426 | } | 1428 | } |
1427 | dasm_put(Dst, 7139); | 1429 | dasm_put(Dst, 7160); |
1428 | if (sse) { | 1430 | if (sse) { |
1429 | dasm_put(Dst, 7148, 2+1, LJ_TISNUM, LJ_TISNUM); | 1431 | dasm_put(Dst, 7169, 2+1, LJ_TISNUM, LJ_TISNUM); |
1430 | } else { | 1432 | } else { |
1431 | dasm_put(Dst, 7222, 2+1, LJ_TISNUM, LJ_TISNUM); | 1433 | dasm_put(Dst, 7243, 2+1, LJ_TISNUM, LJ_TISNUM); |
1432 | } | 1434 | } |
1433 | dasm_put(Dst, 7288); | 1435 | dasm_put(Dst, 7309); |
1434 | if (sse) { | 1436 | if (sse) { |
1435 | dasm_put(Dst, 7298, 2+1, LJ_TISNUM, LJ_TISNUM); | 1437 | dasm_put(Dst, 7319, 2+1, LJ_TISNUM, LJ_TISNUM); |
1436 | } else { | 1438 | } else { |
1437 | dasm_put(Dst, 7372, 2+1, LJ_TISNUM, LJ_TISNUM); | 1439 | dasm_put(Dst, 7393, 2+1, LJ_TISNUM, LJ_TISNUM); |
1438 | } | 1440 | } |
1439 | dasm_put(Dst, 7438); | 1441 | dasm_put(Dst, 7459); |
1440 | if (sse) { | 1442 | if (sse) { |
1441 | dasm_put(Dst, 7448, 2+1, LJ_TISNUM, LJ_TISNUM); | 1443 | dasm_put(Dst, 7469, 2+1, LJ_TISNUM, LJ_TISNUM); |
1442 | } else { | 1444 | } else { |
1443 | dasm_put(Dst, 7522, 2+1, LJ_TISNUM, LJ_TISNUM); | 1445 | dasm_put(Dst, 7543, 2+1, LJ_TISNUM, LJ_TISNUM); |
1444 | } | 1446 | } |
1445 | dasm_put(Dst, 7588); | 1447 | dasm_put(Dst, 7609); |
1446 | if (sse) { | 1448 | if (sse) { |
1447 | dasm_put(Dst, 7597, 2+1, LJ_TISNUM, LJ_TISNUM); | 1449 | dasm_put(Dst, 7618, 2+1, LJ_TISNUM, LJ_TISNUM); |
1448 | } else { | 1450 | } else { |
1449 | dasm_put(Dst, 7671, 2+1, LJ_TISNUM, LJ_TISNUM); | 1451 | dasm_put(Dst, 7692, 2+1, LJ_TISNUM, LJ_TISNUM); |
1450 | } | 1452 | } |
1451 | dasm_put(Dst, 7737, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); | 1453 | dasm_put(Dst, 7758, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); |
1452 | dasm_put(Dst, 7815, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); | 1454 | dasm_put(Dst, 7836, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); |
1453 | dasm_put(Dst, 7939, Dt1(->top), Dt1(->base), Dt1(->top)); | 1455 | dasm_put(Dst, 7960, Dt1(->top), Dt1(->base), Dt1(->top)); |
1454 | #if LJ_HASJIT | 1456 | #if LJ_HASJIT |
1455 | dasm_put(Dst, 7977, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); | 1457 | dasm_put(Dst, 7998, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); |
1456 | #endif | 1458 | #endif |
1457 | dasm_put(Dst, 8008, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); | 1459 | dasm_put(Dst, 8029, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); |
1458 | dasm_put(Dst, 8059, Dt1(->base), Dt1(->base), GG_DISP2STATIC); | 1460 | dasm_put(Dst, 8080, Dt1(->base), Dt1(->base), GG_DISP2STATIC); |
1459 | #if LJ_HASJIT | 1461 | #if LJ_HASJIT |
1460 | dasm_put(Dst, 8125, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); | 1462 | dasm_put(Dst, 8146, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); |
1461 | #endif | 1463 | #endif |
1462 | dasm_put(Dst, 8171); | 1464 | dasm_put(Dst, 8192); |
1463 | #if LJ_HASJIT | 1465 | #if LJ_HASJIT |
1464 | dasm_put(Dst, 8003); | 1466 | dasm_put(Dst, 8024); |
1465 | #endif | 1467 | #endif |
1466 | dasm_put(Dst, 8178); | 1468 | dasm_put(Dst, 8199); |
1467 | #if LJ_HASJIT | 1469 | #if LJ_HASJIT |
1468 | dasm_put(Dst, 8181); | 1470 | dasm_put(Dst, 8202); |
1469 | #endif | 1471 | #endif |
1470 | dasm_put(Dst, 8191, Dt1(->base), Dt1(->top)); | 1472 | dasm_put(Dst, 8212, Dt1(->base), Dt1(->top)); |
1471 | #if LJ_HASJIT | 1473 | #if LJ_HASJIT |
1472 | dasm_put(Dst, 8225); | 1474 | dasm_put(Dst, 8246); |
1473 | #endif | 1475 | #endif |
1474 | dasm_put(Dst, 8230, Dt1(->base), Dt1(->top)); | 1476 | dasm_put(Dst, 8251, Dt1(->base), Dt1(->top)); |
1475 | #if LJ_HASJIT | 1477 | #if LJ_HASJIT |
1476 | dasm_put(Dst, 8259, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); | 1478 | dasm_put(Dst, 8280, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); |
1477 | #endif | 1479 | #endif |
1478 | dasm_put(Dst, 8402); | 1480 | dasm_put(Dst, 8423); |
1479 | #if LJ_HASJIT | 1481 | #if LJ_HASJIT |
1480 | dasm_put(Dst, 8405, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); | 1482 | dasm_put(Dst, 8426, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); |
1481 | #endif | 1483 | #endif |
1482 | dasm_put(Dst, 8483); | 1484 | dasm_put(Dst, 8504); |
1483 | if (!sse) { | 1485 | if (!sse) { |
1484 | dasm_put(Dst, 8486); | 1486 | dasm_put(Dst, 8507); |
1485 | } | 1487 | } |
1486 | dasm_put(Dst, 8531); | 1488 | dasm_put(Dst, 8552); |
1487 | if (!sse) { | 1489 | if (!sse) { |
1488 | dasm_put(Dst, 8633); | 1490 | dasm_put(Dst, 8654); |
1489 | } | 1491 | } |
1490 | dasm_put(Dst, 8678); | 1492 | dasm_put(Dst, 8699); |
1491 | if (!sse) { | 1493 | if (!sse) { |
1492 | dasm_put(Dst, 8780); | 1494 | dasm_put(Dst, 8801); |
1493 | } | 1495 | } |
1494 | dasm_put(Dst, 8819); | 1496 | dasm_put(Dst, 8840); |
1495 | if (sse) { | 1497 | if (sse) { |
1496 | dasm_put(Dst, 8924); | 1498 | dasm_put(Dst, 8945); |
1497 | } else { | 1499 | } else { |
1498 | dasm_put(Dst, 9054); | 1500 | dasm_put(Dst, 9075); |
1499 | } | 1501 | } |
1500 | dasm_put(Dst, 9101); | 1502 | dasm_put(Dst, 9122); |
1501 | if (!sse) { | 1503 | if (!sse) { |
1502 | dasm_put(Dst, 9175); | 1504 | dasm_put(Dst, 9196); |
1503 | if (cmov) { | 1505 | if (cmov) { |
1504 | dasm_put(Dst, 9186); | 1506 | dasm_put(Dst, 9207); |
1505 | } else { | 1507 | } else { |
1506 | dasm_put(Dst, 9190); | 1508 | dasm_put(Dst, 9211); |
1507 | } | 1509 | } |
1508 | dasm_put(Dst, 9197); | 1510 | dasm_put(Dst, 9218); |
1509 | dasm_put(Dst, 9271); | 1511 | dasm_put(Dst, 9292); |
1510 | dasm_put(Dst, 9371); | 1512 | dasm_put(Dst, 9392); |
1511 | if (cmov) { | 1513 | if (cmov) { |
1512 | dasm_put(Dst, 9374); | 1514 | dasm_put(Dst, 9395); |
1513 | } else { | 1515 | } else { |
1514 | dasm_put(Dst, 9378); | 1516 | dasm_put(Dst, 9399); |
1515 | } | 1517 | } |
1516 | dasm_put(Dst, 9385); | 1518 | dasm_put(Dst, 9406); |
1517 | if (cmov) { | 1519 | if (cmov) { |
1518 | dasm_put(Dst, 9186); | 1520 | dasm_put(Dst, 9207); |
1519 | } else { | 1521 | } else { |
1520 | dasm_put(Dst, 9190); | 1522 | dasm_put(Dst, 9211); |
1521 | } | 1523 | } |
1522 | dasm_put(Dst, 9403); | 1524 | dasm_put(Dst, 9424); |
1523 | } else { | 1525 | } else { |
1524 | dasm_put(Dst, 9482); | 1526 | dasm_put(Dst, 9503); |
1525 | } | 1527 | } |
1526 | dasm_put(Dst, 9485); | 1528 | dasm_put(Dst, 9506); |
1527 | dasm_put(Dst, 9570); | 1529 | dasm_put(Dst, 9591); |
1528 | dasm_put(Dst, 9701); | 1530 | dasm_put(Dst, 9722); |
1529 | dasm_put(Dst, 9900); | 1531 | dasm_put(Dst, 9921); |
1530 | #if LJ_HASJIT | 1532 | #if LJ_HASJIT |
1531 | if (sse) { | 1533 | if (sse) { |
1532 | dasm_put(Dst, 9923); | 1534 | dasm_put(Dst, 9944); |
1533 | dasm_put(Dst, 9980); | 1535 | dasm_put(Dst, 10001); |
1534 | dasm_put(Dst, 10071); | 1536 | dasm_put(Dst, 10092); |
1535 | } else { | 1537 | } else { |
1536 | dasm_put(Dst, 10113); | 1538 | dasm_put(Dst, 10134); |
1537 | dasm_put(Dst, 10205); | 1539 | dasm_put(Dst, 10226); |
1538 | } | 1540 | } |
1539 | dasm_put(Dst, 10251); | 1541 | dasm_put(Dst, 10272); |
1540 | #endif | 1542 | #endif |
1541 | dasm_put(Dst, 10255); | 1543 | dasm_put(Dst, 10276); |
1542 | if (sse) { | 1544 | if (sse) { |
1543 | dasm_put(Dst, 10258); | 1545 | dasm_put(Dst, 10279); |
1544 | dasm_put(Dst, 10363); | 1546 | dasm_put(Dst, 10384); |
1545 | dasm_put(Dst, 10446); | 1547 | dasm_put(Dst, 10467); |
1546 | } else { | 1548 | } else { |
1547 | dasm_put(Dst, 10518); | 1549 | dasm_put(Dst, 10539); |
1548 | dasm_put(Dst, 10601); | 1550 | dasm_put(Dst, 10622); |
1549 | if (cmov) { | 1551 | if (cmov) { |
1550 | dasm_put(Dst, 10656); | 1552 | dasm_put(Dst, 10677); |
1551 | } else { | 1553 | } else { |
1552 | dasm_put(Dst, 10675); | 1554 | dasm_put(Dst, 10696); |
1553 | } | 1555 | } |
1554 | dasm_put(Dst, 10251); | 1556 | dasm_put(Dst, 10272); |
1555 | } | 1557 | } |
1556 | dasm_put(Dst, 10716); | 1558 | dasm_put(Dst, 10737); |
1557 | } | 1559 | } |
1558 | 1560 | ||
1559 | /* Generate the code for a single instruction. */ | 1561 | /* Generate the code for a single instruction. */ |
1560 | static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | 1562 | static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) |
1561 | { | 1563 | { |
1562 | int vk = 0; | 1564 | int vk = 0; |
1563 | dasm_put(Dst, 10770, defop); | 1565 | dasm_put(Dst, 10791, defop); |
1564 | 1566 | ||
1565 | switch (op) { | 1567 | switch (op) { |
1566 | 1568 | ||
@@ -1569,634 +1571,634 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
1569 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ | 1571 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ |
1570 | 1572 | ||
1571 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | 1573 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: |
1572 | dasm_put(Dst, 10772, LJ_TISNUM, LJ_TISNUM); | 1574 | dasm_put(Dst, 10793, LJ_TISNUM, LJ_TISNUM); |
1573 | if (sse) { | 1575 | if (sse) { |
1574 | dasm_put(Dst, 10793); | 1576 | dasm_put(Dst, 10814); |
1575 | } else { | 1577 | } else { |
1576 | dasm_put(Dst, 10808); | 1578 | dasm_put(Dst, 10829); |
1577 | if (cmov) { | 1579 | if (cmov) { |
1578 | dasm_put(Dst, 10818); | 1580 | dasm_put(Dst, 10839); |
1579 | } else { | 1581 | } else { |
1580 | dasm_put(Dst, 10824); | 1582 | dasm_put(Dst, 10845); |
1581 | } | 1583 | } |
1582 | } | 1584 | } |
1583 | switch (op) { | 1585 | switch (op) { |
1584 | case BC_ISLT: | 1586 | case BC_ISLT: |
1585 | dasm_put(Dst, 10831); | 1587 | dasm_put(Dst, 10852); |
1586 | break; | 1588 | break; |
1587 | case BC_ISGE: | 1589 | case BC_ISGE: |
1588 | dasm_put(Dst, 10066); | 1590 | dasm_put(Dst, 10087); |
1589 | break; | 1591 | break; |
1590 | case BC_ISLE: | 1592 | case BC_ISLE: |
1591 | dasm_put(Dst, 6192); | 1593 | dasm_put(Dst, 6213); |
1592 | break; | 1594 | break; |
1593 | case BC_ISGT: | 1595 | case BC_ISGT: |
1594 | dasm_put(Dst, 10836); | 1596 | dasm_put(Dst, 10857); |
1595 | break; | 1597 | break; |
1596 | default: break; /* Shut up GCC. */ | 1598 | default: break; /* Shut up GCC. */ |
1597 | } | 1599 | } |
1598 | dasm_put(Dst, 10841, -BCBIAS_J*4); | 1600 | dasm_put(Dst, 10862, -BCBIAS_J*4); |
1599 | break; | 1601 | break; |
1600 | 1602 | ||
1601 | case BC_ISEQV: case BC_ISNEV: | 1603 | case BC_ISEQV: case BC_ISNEV: |
1602 | vk = op == BC_ISEQV; | 1604 | vk = op == BC_ISEQV; |
1603 | dasm_put(Dst, 10874, LJ_TISNUM, LJ_TISNUM); | 1605 | dasm_put(Dst, 10895, LJ_TISNUM, LJ_TISNUM); |
1604 | if (sse) { | 1606 | if (sse) { |
1605 | dasm_put(Dst, 10900); | 1607 | dasm_put(Dst, 10921); |
1606 | } else { | 1608 | } else { |
1607 | dasm_put(Dst, 10912); | 1609 | dasm_put(Dst, 10933); |
1608 | if (cmov) { | 1610 | if (cmov) { |
1609 | dasm_put(Dst, 10818); | 1611 | dasm_put(Dst, 10839); |
1610 | } else { | 1612 | } else { |
1611 | dasm_put(Dst, 10824); | 1613 | dasm_put(Dst, 10845); |
1612 | } | 1614 | } |
1613 | } | 1615 | } |
1614 | iseqne_fp: | 1616 | iseqne_fp: |
1615 | if (vk) { | 1617 | if (vk) { |
1616 | dasm_put(Dst, 10919); | 1618 | dasm_put(Dst, 10940); |
1617 | } else { | 1619 | } else { |
1618 | dasm_put(Dst, 10928); | 1620 | dasm_put(Dst, 10949); |
1619 | } | 1621 | } |
1620 | iseqne_end: | 1622 | iseqne_end: |
1621 | if (vk) { | 1623 | if (vk) { |
1622 | dasm_put(Dst, 10937, -BCBIAS_J*4); | 1624 | dasm_put(Dst, 10958, -BCBIAS_J*4); |
1623 | } else { | 1625 | } else { |
1624 | dasm_put(Dst, 10952, -BCBIAS_J*4); | 1626 | dasm_put(Dst, 10973, -BCBIAS_J*4); |
1625 | } | 1627 | } |
1626 | dasm_put(Dst, 10855); | 1628 | dasm_put(Dst, 10876); |
1627 | if (op == BC_ISEQV || op == BC_ISNEV) { | 1629 | if (op == BC_ISEQV || op == BC_ISNEV) { |
1628 | dasm_put(Dst, 10967, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); | 1630 | dasm_put(Dst, 10988, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); |
1629 | if (vk) { | 1631 | if (vk) { |
1630 | dasm_put(Dst, 11025); | 1632 | dasm_put(Dst, 11046); |
1631 | } else { | 1633 | } else { |
1632 | dasm_put(Dst, 11029); | 1634 | dasm_put(Dst, 11050); |
1633 | } | 1635 | } |
1634 | dasm_put(Dst, 11035); | 1636 | dasm_put(Dst, 11056); |
1635 | } | 1637 | } |
1636 | break; | 1638 | break; |
1637 | case BC_ISEQS: case BC_ISNES: | 1639 | case BC_ISEQS: case BC_ISNES: |
1638 | vk = op == BC_ISEQS; | 1640 | vk = op == BC_ISEQS; |
1639 | dasm_put(Dst, 11040, LJ_TSTR); | 1641 | dasm_put(Dst, 11061, LJ_TSTR); |
1640 | iseqne_test: | 1642 | iseqne_test: |
1641 | if (vk) { | 1643 | if (vk) { |
1642 | dasm_put(Dst, 10923); | 1644 | dasm_put(Dst, 10944); |
1643 | } else { | 1645 | } else { |
1644 | dasm_put(Dst, 2814); | 1646 | dasm_put(Dst, 2835); |
1645 | } | 1647 | } |
1646 | goto iseqne_end; | 1648 | goto iseqne_end; |
1647 | case BC_ISEQN: case BC_ISNEN: | 1649 | case BC_ISEQN: case BC_ISNEN: |
1648 | vk = op == BC_ISEQN; | 1650 | vk = op == BC_ISEQN; |
1649 | dasm_put(Dst, 11063, LJ_TISNUM); | 1651 | dasm_put(Dst, 11084, LJ_TISNUM); |
1650 | if (sse) { | 1652 | if (sse) { |
1651 | dasm_put(Dst, 11077); | 1653 | dasm_put(Dst, 11098); |
1652 | } else { | 1654 | } else { |
1653 | dasm_put(Dst, 11089); | 1655 | dasm_put(Dst, 11110); |
1654 | if (cmov) { | 1656 | if (cmov) { |
1655 | dasm_put(Dst, 10818); | 1657 | dasm_put(Dst, 10839); |
1656 | } else { | 1658 | } else { |
1657 | dasm_put(Dst, 10824); | 1659 | dasm_put(Dst, 10845); |
1658 | } | 1660 | } |
1659 | } | 1661 | } |
1660 | goto iseqne_fp; | 1662 | goto iseqne_fp; |
1661 | case BC_ISEQP: case BC_ISNEP: | 1663 | case BC_ISEQP: case BC_ISNEP: |
1662 | vk = op == BC_ISEQP; | 1664 | vk = op == BC_ISEQP; |
1663 | dasm_put(Dst, 11096); | 1665 | dasm_put(Dst, 11117); |
1664 | goto iseqne_test; | 1666 | goto iseqne_test; |
1665 | 1667 | ||
1666 | /* -- Unary test and copy ops ------------------------------------------- */ | 1668 | /* -- Unary test and copy ops ------------------------------------------- */ |
1667 | 1669 | ||
1668 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | 1670 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: |
1669 | dasm_put(Dst, 11107, LJ_TISTRUECOND); | 1671 | dasm_put(Dst, 11128, LJ_TISTRUECOND); |
1670 | if (op == BC_IST || op == BC_ISTC) { | 1672 | if (op == BC_IST || op == BC_ISTC) { |
1671 | dasm_put(Dst, 11119); | 1673 | dasm_put(Dst, 11140); |
1672 | } else { | 1674 | } else { |
1673 | dasm_put(Dst, 11124); | 1675 | dasm_put(Dst, 11145); |
1674 | } | 1676 | } |
1675 | if (op == BC_ISTC || op == BC_ISFC) { | 1677 | if (op == BC_ISTC || op == BC_ISFC) { |
1676 | dasm_put(Dst, 11129); | 1678 | dasm_put(Dst, 11150); |
1677 | } | 1679 | } |
1678 | dasm_put(Dst, 11140, -BCBIAS_J*4); | 1680 | dasm_put(Dst, 11161, -BCBIAS_J*4); |
1679 | break; | 1681 | break; |
1680 | 1682 | ||
1681 | /* -- Unary ops --------------------------------------------------------- */ | 1683 | /* -- Unary ops --------------------------------------------------------- */ |
1682 | 1684 | ||
1683 | case BC_MOV: | 1685 | case BC_MOV: |
1684 | dasm_put(Dst, 11171); | 1686 | dasm_put(Dst, 11192); |
1685 | break; | 1687 | break; |
1686 | case BC_NOT: | 1688 | case BC_NOT: |
1687 | dasm_put(Dst, 11204, LJ_TISTRUECOND, LJ_TTRUE); | 1689 | dasm_put(Dst, 11225, LJ_TISTRUECOND, LJ_TTRUE); |
1688 | break; | 1690 | break; |
1689 | case BC_UNM: | 1691 | case BC_UNM: |
1690 | dasm_put(Dst, 11239, LJ_TISNUM); | 1692 | dasm_put(Dst, 11260, LJ_TISNUM); |
1691 | if (sse) { | 1693 | if (sse) { |
1692 | dasm_put(Dst, 11250); | 1694 | dasm_put(Dst, 11271); |
1693 | } else { | 1695 | } else { |
1694 | dasm_put(Dst, 11280); | 1696 | dasm_put(Dst, 11301); |
1695 | } | 1697 | } |
1696 | dasm_put(Dst, 10855); | 1698 | dasm_put(Dst, 10876); |
1697 | break; | 1699 | break; |
1698 | case BC_LEN: | 1700 | case BC_LEN: |
1699 | dasm_put(Dst, 11289, LJ_TSTR); | 1701 | dasm_put(Dst, 11310, LJ_TSTR); |
1700 | if (sse) { | 1702 | if (sse) { |
1701 | dasm_put(Dst, 11303, Dt5(->len)); | 1703 | dasm_put(Dst, 11324, Dt5(->len)); |
1702 | } else { | 1704 | } else { |
1703 | dasm_put(Dst, 11321, Dt5(->len)); | 1705 | dasm_put(Dst, 11342, Dt5(->len)); |
1704 | } | 1706 | } |
1705 | dasm_put(Dst, 11330, LJ_TTAB); | 1707 | dasm_put(Dst, 11351, LJ_TTAB); |
1706 | if (sse) { | 1708 | if (sse) { |
1707 | dasm_put(Dst, 11370); | 1709 | dasm_put(Dst, 11391); |
1708 | } else { | 1710 | } else { |
1709 | dasm_put(Dst, 11379); | 1711 | dasm_put(Dst, 11400); |
1710 | } | 1712 | } |
1711 | dasm_put(Dst, 11389); | 1713 | dasm_put(Dst, 11410); |
1712 | break; | 1714 | break; |
1713 | 1715 | ||
1714 | /* -- Binary ops -------------------------------------------------------- */ | 1716 | /* -- Binary ops -------------------------------------------------------- */ |
1715 | 1717 | ||
1716 | 1718 | ||
1717 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | 1719 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: |
1718 | dasm_put(Dst, 11399); | 1720 | dasm_put(Dst, 11420); |
1719 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1721 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1720 | switch (vk) { | 1722 | switch (vk) { |
1721 | case 0: | 1723 | case 0: |
1722 | dasm_put(Dst, 11407, LJ_TISNUM); | 1724 | dasm_put(Dst, 11428, LJ_TISNUM); |
1723 | if (sse) { | 1725 | if (sse) { |
1724 | dasm_put(Dst, 11419); | 1726 | dasm_put(Dst, 11440); |
1725 | } else { | 1727 | } else { |
1726 | dasm_put(Dst, 11433); | 1728 | dasm_put(Dst, 11454); |
1727 | } | 1729 | } |
1728 | break; | 1730 | break; |
1729 | case 1: | 1731 | case 1: |
1730 | dasm_put(Dst, 11441, LJ_TISNUM); | 1732 | dasm_put(Dst, 11462, LJ_TISNUM); |
1731 | if (sse) { | 1733 | if (sse) { |
1732 | dasm_put(Dst, 11453); | 1734 | dasm_put(Dst, 11474); |
1733 | } else { | 1735 | } else { |
1734 | dasm_put(Dst, 11467); | 1736 | dasm_put(Dst, 11488); |
1735 | } | 1737 | } |
1736 | break; | 1738 | break; |
1737 | default: | 1739 | default: |
1738 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1740 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1739 | if (sse) { | 1741 | if (sse) { |
1740 | dasm_put(Dst, 11497); | 1742 | dasm_put(Dst, 11518); |
1741 | } else { | 1743 | } else { |
1742 | dasm_put(Dst, 11511); | 1744 | dasm_put(Dst, 11532); |
1743 | } | 1745 | } |
1744 | break; | 1746 | break; |
1745 | } | 1747 | } |
1746 | if (sse) { | 1748 | if (sse) { |
1747 | dasm_put(Dst, 11273); | 1749 | dasm_put(Dst, 11294); |
1748 | } else { | 1750 | } else { |
1749 | dasm_put(Dst, 11285); | 1751 | dasm_put(Dst, 11306); |
1750 | } | 1752 | } |
1751 | dasm_put(Dst, 10855); | 1753 | dasm_put(Dst, 10876); |
1752 | break; | 1754 | break; |
1753 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | 1755 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |
1754 | dasm_put(Dst, 11399); | 1756 | dasm_put(Dst, 11420); |
1755 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1757 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1756 | switch (vk) { | 1758 | switch (vk) { |
1757 | case 0: | 1759 | case 0: |
1758 | dasm_put(Dst, 11407, LJ_TISNUM); | 1760 | dasm_put(Dst, 11428, LJ_TISNUM); |
1759 | if (sse) { | 1761 | if (sse) { |
1760 | dasm_put(Dst, 11519); | 1762 | dasm_put(Dst, 11540); |
1761 | } else { | 1763 | } else { |
1762 | dasm_put(Dst, 11533); | 1764 | dasm_put(Dst, 11554); |
1763 | } | 1765 | } |
1764 | break; | 1766 | break; |
1765 | case 1: | 1767 | case 1: |
1766 | dasm_put(Dst, 11441, LJ_TISNUM); | 1768 | dasm_put(Dst, 11462, LJ_TISNUM); |
1767 | if (sse) { | 1769 | if (sse) { |
1768 | dasm_put(Dst, 11541); | 1770 | dasm_put(Dst, 11562); |
1769 | } else { | 1771 | } else { |
1770 | dasm_put(Dst, 11555); | 1772 | dasm_put(Dst, 11576); |
1771 | } | 1773 | } |
1772 | break; | 1774 | break; |
1773 | default: | 1775 | default: |
1774 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1776 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1775 | if (sse) { | 1777 | if (sse) { |
1776 | dasm_put(Dst, 11563); | 1778 | dasm_put(Dst, 11584); |
1777 | } else { | 1779 | } else { |
1778 | dasm_put(Dst, 11577); | 1780 | dasm_put(Dst, 11598); |
1779 | } | 1781 | } |
1780 | break; | 1782 | break; |
1781 | } | 1783 | } |
1782 | if (sse) { | 1784 | if (sse) { |
1783 | dasm_put(Dst, 11273); | 1785 | dasm_put(Dst, 11294); |
1784 | } else { | 1786 | } else { |
1785 | dasm_put(Dst, 11285); | 1787 | dasm_put(Dst, 11306); |
1786 | } | 1788 | } |
1787 | dasm_put(Dst, 10855); | 1789 | dasm_put(Dst, 10876); |
1788 | break; | 1790 | break; |
1789 | case BC_MULVN: case BC_MULNV: case BC_MULVV: | 1791 | case BC_MULVN: case BC_MULNV: case BC_MULVV: |
1790 | dasm_put(Dst, 11399); | 1792 | dasm_put(Dst, 11420); |
1791 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1793 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1792 | switch (vk) { | 1794 | switch (vk) { |
1793 | case 0: | 1795 | case 0: |
1794 | dasm_put(Dst, 11407, LJ_TISNUM); | 1796 | dasm_put(Dst, 11428, LJ_TISNUM); |
1795 | if (sse) { | 1797 | if (sse) { |
1796 | dasm_put(Dst, 11585); | 1798 | dasm_put(Dst, 11606); |
1797 | } else { | 1799 | } else { |
1798 | dasm_put(Dst, 11599); | 1800 | dasm_put(Dst, 11620); |
1799 | } | 1801 | } |
1800 | break; | 1802 | break; |
1801 | case 1: | 1803 | case 1: |
1802 | dasm_put(Dst, 11441, LJ_TISNUM); | 1804 | dasm_put(Dst, 11462, LJ_TISNUM); |
1803 | if (sse) { | 1805 | if (sse) { |
1804 | dasm_put(Dst, 11607); | 1806 | dasm_put(Dst, 11628); |
1805 | } else { | 1807 | } else { |
1806 | dasm_put(Dst, 11621); | 1808 | dasm_put(Dst, 11642); |
1807 | } | 1809 | } |
1808 | break; | 1810 | break; |
1809 | default: | 1811 | default: |
1810 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1812 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1811 | if (sse) { | 1813 | if (sse) { |
1812 | dasm_put(Dst, 11629); | 1814 | dasm_put(Dst, 11650); |
1813 | } else { | 1815 | } else { |
1814 | dasm_put(Dst, 11643); | 1816 | dasm_put(Dst, 11664); |
1815 | } | 1817 | } |
1816 | break; | 1818 | break; |
1817 | } | 1819 | } |
1818 | if (sse) { | 1820 | if (sse) { |
1819 | dasm_put(Dst, 11273); | 1821 | dasm_put(Dst, 11294); |
1820 | } else { | 1822 | } else { |
1821 | dasm_put(Dst, 11285); | 1823 | dasm_put(Dst, 11306); |
1822 | } | 1824 | } |
1823 | dasm_put(Dst, 10855); | 1825 | dasm_put(Dst, 10876); |
1824 | break; | 1826 | break; |
1825 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | 1827 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: |
1826 | dasm_put(Dst, 11399); | 1828 | dasm_put(Dst, 11420); |
1827 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1829 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1828 | switch (vk) { | 1830 | switch (vk) { |
1829 | case 0: | 1831 | case 0: |
1830 | dasm_put(Dst, 11407, LJ_TISNUM); | 1832 | dasm_put(Dst, 11428, LJ_TISNUM); |
1831 | if (sse) { | 1833 | if (sse) { |
1832 | dasm_put(Dst, 11651); | 1834 | dasm_put(Dst, 11672); |
1833 | } else { | 1835 | } else { |
1834 | dasm_put(Dst, 11665); | 1836 | dasm_put(Dst, 11686); |
1835 | } | 1837 | } |
1836 | break; | 1838 | break; |
1837 | case 1: | 1839 | case 1: |
1838 | dasm_put(Dst, 11441, LJ_TISNUM); | 1840 | dasm_put(Dst, 11462, LJ_TISNUM); |
1839 | if (sse) { | 1841 | if (sse) { |
1840 | dasm_put(Dst, 11673); | 1842 | dasm_put(Dst, 11694); |
1841 | } else { | 1843 | } else { |
1842 | dasm_put(Dst, 11687); | 1844 | dasm_put(Dst, 11708); |
1843 | } | 1845 | } |
1844 | break; | 1846 | break; |
1845 | default: | 1847 | default: |
1846 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1848 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1847 | if (sse) { | 1849 | if (sse) { |
1848 | dasm_put(Dst, 11695); | 1850 | dasm_put(Dst, 11716); |
1849 | } else { | 1851 | } else { |
1850 | dasm_put(Dst, 11709); | 1852 | dasm_put(Dst, 11730); |
1851 | } | 1853 | } |
1852 | break; | 1854 | break; |
1853 | } | 1855 | } |
1854 | if (sse) { | 1856 | if (sse) { |
1855 | dasm_put(Dst, 11273); | 1857 | dasm_put(Dst, 11294); |
1856 | } else { | 1858 | } else { |
1857 | dasm_put(Dst, 11285); | 1859 | dasm_put(Dst, 11306); |
1858 | } | 1860 | } |
1859 | dasm_put(Dst, 10855); | 1861 | dasm_put(Dst, 10876); |
1860 | break; | 1862 | break; |
1861 | case BC_MODVN: | 1863 | case BC_MODVN: |
1862 | dasm_put(Dst, 11399); | 1864 | dasm_put(Dst, 11420); |
1863 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1865 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1864 | switch (vk) { | 1866 | switch (vk) { |
1865 | case 0: | 1867 | case 0: |
1866 | dasm_put(Dst, 11407, LJ_TISNUM); | 1868 | dasm_put(Dst, 11428, LJ_TISNUM); |
1867 | if (sse) { | 1869 | if (sse) { |
1868 | dasm_put(Dst, 11717); | 1870 | dasm_put(Dst, 11738); |
1869 | } else { | 1871 | } else { |
1870 | dasm_put(Dst, 11731); | 1872 | dasm_put(Dst, 11752); |
1871 | } | 1873 | } |
1872 | break; | 1874 | break; |
1873 | case 1: | 1875 | case 1: |
1874 | dasm_put(Dst, 11441, LJ_TISNUM); | 1876 | dasm_put(Dst, 11462, LJ_TISNUM); |
1875 | if (sse) { | 1877 | if (sse) { |
1876 | dasm_put(Dst, 11739); | 1878 | dasm_put(Dst, 11760); |
1877 | } else { | 1879 | } else { |
1878 | dasm_put(Dst, 11753); | 1880 | dasm_put(Dst, 11774); |
1879 | } | 1881 | } |
1880 | break; | 1882 | break; |
1881 | default: | 1883 | default: |
1882 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1884 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1883 | if (sse) { | 1885 | if (sse) { |
1884 | dasm_put(Dst, 11761); | 1886 | dasm_put(Dst, 11782); |
1885 | } else { | 1887 | } else { |
1886 | dasm_put(Dst, 11775); | 1888 | dasm_put(Dst, 11796); |
1887 | } | 1889 | } |
1888 | break; | 1890 | break; |
1889 | } | 1891 | } |
1890 | dasm_put(Dst, 11783); | 1892 | dasm_put(Dst, 11804); |
1891 | if (sse) { | 1893 | if (sse) { |
1892 | dasm_put(Dst, 11273); | 1894 | dasm_put(Dst, 11294); |
1893 | } else { | 1895 | } else { |
1894 | dasm_put(Dst, 11285); | 1896 | dasm_put(Dst, 11306); |
1895 | } | 1897 | } |
1896 | dasm_put(Dst, 10855); | 1898 | dasm_put(Dst, 10876); |
1897 | break; | 1899 | break; |
1898 | case BC_MODNV: case BC_MODVV: | 1900 | case BC_MODNV: case BC_MODVV: |
1899 | dasm_put(Dst, 11399); | 1901 | dasm_put(Dst, 11420); |
1900 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1902 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1901 | switch (vk) { | 1903 | switch (vk) { |
1902 | case 0: | 1904 | case 0: |
1903 | dasm_put(Dst, 11407, LJ_TISNUM); | 1905 | dasm_put(Dst, 11428, LJ_TISNUM); |
1904 | if (sse) { | 1906 | if (sse) { |
1905 | dasm_put(Dst, 11717); | 1907 | dasm_put(Dst, 11738); |
1906 | } else { | 1908 | } else { |
1907 | dasm_put(Dst, 11731); | 1909 | dasm_put(Dst, 11752); |
1908 | } | 1910 | } |
1909 | break; | 1911 | break; |
1910 | case 1: | 1912 | case 1: |
1911 | dasm_put(Dst, 11441, LJ_TISNUM); | 1913 | dasm_put(Dst, 11462, LJ_TISNUM); |
1912 | if (sse) { | 1914 | if (sse) { |
1913 | dasm_put(Dst, 11739); | 1915 | dasm_put(Dst, 11760); |
1914 | } else { | 1916 | } else { |
1915 | dasm_put(Dst, 11753); | 1917 | dasm_put(Dst, 11774); |
1916 | } | 1918 | } |
1917 | break; | 1919 | break; |
1918 | default: | 1920 | default: |
1919 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1921 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1920 | if (sse) { | 1922 | if (sse) { |
1921 | dasm_put(Dst, 11761); | 1923 | dasm_put(Dst, 11782); |
1922 | } else { | 1924 | } else { |
1923 | dasm_put(Dst, 11775); | 1925 | dasm_put(Dst, 11796); |
1924 | } | 1926 | } |
1925 | break; | 1927 | break; |
1926 | } | 1928 | } |
1927 | dasm_put(Dst, 11789); | 1929 | dasm_put(Dst, 11810); |
1928 | break; | 1930 | break; |
1929 | case BC_POW: | 1931 | case BC_POW: |
1930 | dasm_put(Dst, 11399); | 1932 | dasm_put(Dst, 11420); |
1931 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1933 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1932 | switch (vk) { | 1934 | switch (vk) { |
1933 | case 0: | 1935 | case 0: |
1934 | dasm_put(Dst, 11407, LJ_TISNUM); | 1936 | dasm_put(Dst, 11428, LJ_TISNUM); |
1935 | if (sse) { | 1937 | if (sse) { |
1936 | dasm_put(Dst, 11717); | 1938 | dasm_put(Dst, 11738); |
1937 | } else { | 1939 | } else { |
1938 | dasm_put(Dst, 11731); | 1940 | dasm_put(Dst, 11752); |
1939 | } | 1941 | } |
1940 | break; | 1942 | break; |
1941 | case 1: | 1943 | case 1: |
1942 | dasm_put(Dst, 11441, LJ_TISNUM); | 1944 | dasm_put(Dst, 11462, LJ_TISNUM); |
1943 | if (sse) { | 1945 | if (sse) { |
1944 | dasm_put(Dst, 11739); | 1946 | dasm_put(Dst, 11760); |
1945 | } else { | 1947 | } else { |
1946 | dasm_put(Dst, 11753); | 1948 | dasm_put(Dst, 11774); |
1947 | } | 1949 | } |
1948 | break; | 1950 | break; |
1949 | default: | 1951 | default: |
1950 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1952 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1951 | if (sse) { | 1953 | if (sse) { |
1952 | dasm_put(Dst, 11761); | 1954 | dasm_put(Dst, 11782); |
1953 | } else { | 1955 | } else { |
1954 | dasm_put(Dst, 11775); | 1956 | dasm_put(Dst, 11796); |
1955 | } | 1957 | } |
1956 | break; | 1958 | break; |
1957 | } | 1959 | } |
1958 | dasm_put(Dst, 11794); | 1960 | dasm_put(Dst, 11815); |
1959 | if (sse) { | 1961 | if (sse) { |
1960 | dasm_put(Dst, 11273); | 1962 | dasm_put(Dst, 11294); |
1961 | } else { | 1963 | } else { |
1962 | dasm_put(Dst, 11285); | 1964 | dasm_put(Dst, 11306); |
1963 | } | 1965 | } |
1964 | dasm_put(Dst, 10855); | 1966 | dasm_put(Dst, 10876); |
1965 | break; | 1967 | break; |
1966 | 1968 | ||
1967 | case BC_CAT: | 1969 | case BC_CAT: |
1968 | dasm_put(Dst, 11798, Dt1(->base), Dt1(->base)); | 1970 | dasm_put(Dst, 11819, Dt1(->base), Dt1(->base)); |
1969 | break; | 1971 | break; |
1970 | 1972 | ||
1971 | /* -- Constant ops ------------------------------------------------------ */ | 1973 | /* -- Constant ops ------------------------------------------------------ */ |
1972 | 1974 | ||
1973 | case BC_KSTR: | 1975 | case BC_KSTR: |
1974 | dasm_put(Dst, 11892, LJ_TSTR); | 1976 | dasm_put(Dst, 11913, LJ_TSTR); |
1975 | break; | 1977 | break; |
1976 | case BC_KSHORT: | 1978 | case BC_KSHORT: |
1977 | if (sse) { | 1979 | if (sse) { |
1978 | dasm_put(Dst, 11925); | 1980 | dasm_put(Dst, 11946); |
1979 | } else { | 1981 | } else { |
1980 | dasm_put(Dst, 11940); | 1982 | dasm_put(Dst, 11961); |
1981 | } | 1983 | } |
1982 | dasm_put(Dst, 10855); | 1984 | dasm_put(Dst, 10876); |
1983 | break; | 1985 | break; |
1984 | case BC_KNUM: | 1986 | case BC_KNUM: |
1985 | if (sse) { | 1987 | if (sse) { |
1986 | dasm_put(Dst, 11948); | 1988 | dasm_put(Dst, 11969); |
1987 | } else { | 1989 | } else { |
1988 | dasm_put(Dst, 11961); | 1990 | dasm_put(Dst, 11982); |
1989 | } | 1991 | } |
1990 | dasm_put(Dst, 10855); | 1992 | dasm_put(Dst, 10876); |
1991 | break; | 1993 | break; |
1992 | case BC_KPRI: | 1994 | case BC_KPRI: |
1993 | dasm_put(Dst, 11968); | 1995 | dasm_put(Dst, 11989); |
1994 | break; | 1996 | break; |
1995 | case BC_KNIL: | 1997 | case BC_KNIL: |
1996 | dasm_put(Dst, 11994, LJ_TNIL); | 1998 | dasm_put(Dst, 12015, LJ_TNIL); |
1997 | break; | 1999 | break; |
1998 | 2000 | ||
1999 | /* -- Upvalue and function ops ------------------------------------------ */ | 2001 | /* -- Upvalue and function ops ------------------------------------------ */ |
2000 | 2002 | ||
2001 | case BC_UGET: | 2003 | case BC_UGET: |
2002 | dasm_put(Dst, 12040, offsetof(GCfuncL, uvptr), DtA(->v)); | 2004 | dasm_put(Dst, 12061, offsetof(GCfuncL, uvptr), DtA(->v)); |
2003 | break; | 2005 | break; |
2004 | case BC_USETV: | 2006 | case BC_USETV: |
2005 | #define TV2MARKOFS \ | 2007 | #define TV2MARKOFS \ |
2006 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) | 2008 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) |
2007 | dasm_put(Dst, 12084, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); | 2009 | dasm_put(Dst, 12105, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); |
2008 | dasm_put(Dst, 12174); | 2010 | dasm_put(Dst, 12195); |
2009 | break; | 2011 | break; |
2010 | #undef TV2MARKOFS | 2012 | #undef TV2MARKOFS |
2011 | case BC_USETS: | 2013 | case BC_USETS: |
2012 | dasm_put(Dst, 12186, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); | 2014 | dasm_put(Dst, 12207, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); |
2013 | break; | 2015 | break; |
2014 | case BC_USETN: | 2016 | case BC_USETN: |
2015 | dasm_put(Dst, 12277); | 2017 | dasm_put(Dst, 12298); |
2016 | if (sse) { | 2018 | if (sse) { |
2017 | dasm_put(Dst, 12282); | 2019 | dasm_put(Dst, 12303); |
2018 | } else { | 2020 | } else { |
2019 | dasm_put(Dst, 11092); | 2021 | dasm_put(Dst, 11113); |
2020 | } | 2022 | } |
2021 | dasm_put(Dst, 12289, offsetof(GCfuncL, uvptr), DtA(->v)); | 2023 | dasm_put(Dst, 12310, offsetof(GCfuncL, uvptr), DtA(->v)); |
2022 | if (sse) { | 2024 | if (sse) { |
2023 | dasm_put(Dst, 12298); | 2025 | dasm_put(Dst, 12319); |
2024 | } else { | 2026 | } else { |
2025 | dasm_put(Dst, 12304); | 2027 | dasm_put(Dst, 12325); |
2026 | } | 2028 | } |
2027 | dasm_put(Dst, 10855); | 2029 | dasm_put(Dst, 10876); |
2028 | break; | 2030 | break; |
2029 | case BC_USETP: | 2031 | case BC_USETP: |
2030 | dasm_put(Dst, 12307, offsetof(GCfuncL, uvptr), DtA(->v)); | 2032 | dasm_put(Dst, 12328, offsetof(GCfuncL, uvptr), DtA(->v)); |
2031 | break; | 2033 | break; |
2032 | case BC_UCLO: | 2034 | case BC_UCLO: |
2033 | dasm_put(Dst, 12344, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); | 2035 | dasm_put(Dst, 12365, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); |
2034 | break; | 2036 | break; |
2035 | 2037 | ||
2036 | case BC_FNEW: | 2038 | case BC_FNEW: |
2037 | dasm_put(Dst, 12398, Dt1(->base), Dt1(->base), LJ_TFUNC); | 2039 | dasm_put(Dst, 12419, Dt1(->base), Dt1(->base), LJ_TFUNC); |
2038 | break; | 2040 | break; |
2039 | 2041 | ||
2040 | /* -- Table ops --------------------------------------------------------- */ | 2042 | /* -- Table ops --------------------------------------------------------- */ |
2041 | 2043 | ||
2042 | case BC_TNEW: | 2044 | case BC_TNEW: |
2043 | dasm_put(Dst, 12469, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); | 2045 | dasm_put(Dst, 12490, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); |
2044 | break; | 2046 | break; |
2045 | case BC_TDUP: | 2047 | case BC_TDUP: |
2046 | dasm_put(Dst, 12595, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); | 2048 | dasm_put(Dst, 12616, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); |
2047 | break; | 2049 | break; |
2048 | 2050 | ||
2049 | case BC_GGET: | 2051 | case BC_GGET: |
2050 | dasm_put(Dst, 12687, Dt7(->env)); | 2052 | dasm_put(Dst, 12708, Dt7(->env)); |
2051 | break; | 2053 | break; |
2052 | case BC_GSET: | 2054 | case BC_GSET: |
2053 | dasm_put(Dst, 12705, Dt7(->env)); | 2055 | dasm_put(Dst, 12726, Dt7(->env)); |
2054 | break; | 2056 | break; |
2055 | 2057 | ||
2056 | case BC_TGETV: | 2058 | case BC_TGETV: |
2057 | dasm_put(Dst, 12723, LJ_TTAB, LJ_TISNUM); | 2059 | dasm_put(Dst, 12744, LJ_TTAB, LJ_TISNUM); |
2058 | if (sse) { | 2060 | if (sse) { |
2059 | dasm_put(Dst, 12756); | ||
2060 | } else { | ||
2061 | dasm_put(Dst, 12777); | 2061 | dasm_put(Dst, 12777); |
2062 | } else { | ||
2063 | dasm_put(Dst, 12798); | ||
2062 | if (cmov) { | 2064 | if (cmov) { |
2063 | dasm_put(Dst, 10818); | 2065 | dasm_put(Dst, 10839); |
2064 | } else { | 2066 | } else { |
2065 | dasm_put(Dst, 10824); | 2067 | dasm_put(Dst, 10845); |
2066 | } | 2068 | } |
2067 | dasm_put(Dst, 2527); | 2069 | dasm_put(Dst, 2538); |
2068 | } | 2070 | } |
2069 | dasm_put(Dst, 12787, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 2071 | dasm_put(Dst, 12808, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
2070 | dasm_put(Dst, 12875, LJ_TNIL, LJ_TSTR); | 2072 | dasm_put(Dst, 12896, LJ_TNIL, LJ_TSTR); |
2071 | break; | 2073 | break; |
2072 | case BC_TGETS: | 2074 | case BC_TGETS: |
2073 | dasm_put(Dst, 12904, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 2075 | dasm_put(Dst, 12925, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
2074 | dasm_put(Dst, 12992, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 2076 | dasm_put(Dst, 13013, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
2075 | break; | 2077 | break; |
2076 | case BC_TGETB: | 2078 | case BC_TGETB: |
2077 | dasm_put(Dst, 13062, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 2079 | dasm_put(Dst, 13083, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
2078 | dasm_put(Dst, 13161, LJ_TNIL); | 2080 | dasm_put(Dst, 13182, LJ_TNIL); |
2079 | break; | 2081 | break; |
2080 | 2082 | ||
2081 | case BC_TSETV: | 2083 | case BC_TSETV: |
2082 | dasm_put(Dst, 13178, LJ_TTAB, LJ_TISNUM); | 2084 | dasm_put(Dst, 13199, LJ_TTAB, LJ_TISNUM); |
2083 | if (sse) { | 2085 | if (sse) { |
2084 | dasm_put(Dst, 12756); | ||
2085 | } else { | ||
2086 | dasm_put(Dst, 12777); | 2086 | dasm_put(Dst, 12777); |
2087 | } else { | ||
2088 | dasm_put(Dst, 12798); | ||
2087 | if (cmov) { | 2089 | if (cmov) { |
2088 | dasm_put(Dst, 10818); | 2090 | dasm_put(Dst, 10839); |
2089 | } else { | 2091 | } else { |
2090 | dasm_put(Dst, 10824); | 2092 | dasm_put(Dst, 10845); |
2091 | } | 2093 | } |
2092 | dasm_put(Dst, 2527); | 2094 | dasm_put(Dst, 2538); |
2093 | } | 2095 | } |
2094 | dasm_put(Dst, 13211, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); | 2096 | dasm_put(Dst, 13232, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); |
2095 | dasm_put(Dst, 13294, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 2097 | dasm_put(Dst, 13315, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
2096 | break; | 2098 | break; |
2097 | case BC_TSETS: | 2099 | case BC_TSETS: |
2098 | dasm_put(Dst, 13356, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 2100 | dasm_put(Dst, 13377, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
2099 | dasm_put(Dst, 13431, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); | 2101 | dasm_put(Dst, 13452, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); |
2100 | dasm_put(Dst, 13523, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 2102 | dasm_put(Dst, 13544, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
2101 | break; | 2103 | break; |
2102 | case BC_TSETB: | 2104 | case BC_TSETB: |
2103 | dasm_put(Dst, 13619, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); | 2105 | dasm_put(Dst, 13640, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); |
2104 | dasm_put(Dst, 13717, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 2106 | dasm_put(Dst, 13738, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
2105 | break; | 2107 | break; |
2106 | 2108 | ||
2107 | case BC_TSETM: | 2109 | case BC_TSETM: |
2108 | dasm_put(Dst, 13763, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); | 2110 | dasm_put(Dst, 13784, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); |
2109 | dasm_put(Dst, 13912, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 2111 | dasm_put(Dst, 13933, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
2110 | break; | 2112 | break; |
2111 | 2113 | ||
2112 | /* -- Calls and vararg handling ----------------------------------------- */ | 2114 | /* -- Calls and vararg handling ----------------------------------------- */ |
2113 | 2115 | ||
2114 | case BC_CALL: case BC_CALLM: | 2116 | case BC_CALL: case BC_CALLM: |
2115 | dasm_put(Dst, 11403); | 2117 | dasm_put(Dst, 11424); |
2116 | if (op == BC_CALLM) { | 2118 | if (op == BC_CALLM) { |
2117 | dasm_put(Dst, 13930); | 2119 | dasm_put(Dst, 13951); |
2118 | } | 2120 | } |
2119 | dasm_put(Dst, 13935, LJ_TFUNC, Dt7(->pc)); | 2121 | dasm_put(Dst, 13956, LJ_TFUNC, Dt7(->pc)); |
2120 | break; | 2122 | break; |
2121 | 2123 | ||
2122 | case BC_CALLMT: | 2124 | case BC_CALLMT: |
2123 | dasm_put(Dst, 13930); | 2125 | dasm_put(Dst, 13951); |
2124 | break; | 2126 | break; |
2125 | case BC_CALLT: | 2127 | case BC_CALLT: |
2126 | dasm_put(Dst, 13976, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); | 2128 | dasm_put(Dst, 13997, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); |
2127 | dasm_put(Dst, 14094, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); | 2129 | dasm_put(Dst, 14115, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); |
2128 | break; | 2130 | break; |
2129 | 2131 | ||
2130 | case BC_ITERC: | 2132 | case BC_ITERC: |
2131 | dasm_put(Dst, 14164, LJ_TFUNC, 2+1, Dt7(->pc)); | 2133 | dasm_put(Dst, 14185, LJ_TFUNC, 2+1, Dt7(->pc)); |
2132 | break; | 2134 | break; |
2133 | 2135 | ||
2134 | case BC_ITERN: | 2136 | case BC_ITERN: |
2135 | #if LJ_HASJIT | 2137 | #if LJ_HASJIT |
2136 | #endif | 2138 | #endif |
2137 | dasm_put(Dst, 14244, Dt6(->asize), Dt6(->array), LJ_TNIL); | 2139 | dasm_put(Dst, 14265, Dt6(->asize), Dt6(->array), LJ_TNIL); |
2138 | if (sse) { | 2140 | if (sse) { |
2139 | dasm_put(Dst, 14290); | 2141 | dasm_put(Dst, 14311); |
2140 | } else { | 2142 | } else { |
2141 | dasm_put(Dst, 14296); | 2143 | dasm_put(Dst, 14317); |
2142 | } | 2144 | } |
2143 | dasm_put(Dst, 14302); | 2145 | dasm_put(Dst, 14323); |
2144 | if (sse) { | 2146 | if (sse) { |
2145 | dasm_put(Dst, 11273); | 2147 | dasm_put(Dst, 11294); |
2146 | } else { | 2148 | } else { |
2147 | dasm_put(Dst, 11285); | 2149 | dasm_put(Dst, 11306); |
2148 | } | 2150 | } |
2149 | dasm_put(Dst, 14321, -BCBIAS_J*4); | 2151 | dasm_put(Dst, 14342, -BCBIAS_J*4); |
2150 | if (!sse) { | 2152 | if (!sse) { |
2151 | dasm_put(Dst, 14372); | 2153 | dasm_put(Dst, 14393); |
2152 | } | 2154 | } |
2153 | dasm_put(Dst, 14378, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key.gcr), DtB(->key.it), DtB(->val.gcr), DtB(->val.it)); | 2155 | dasm_put(Dst, 14399, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key.gcr), DtB(->key.it), DtB(->val.gcr), DtB(->val.it)); |
2154 | dasm_put(Dst, 14453); | 2156 | dasm_put(Dst, 14474); |
2155 | break; | 2157 | break; |
2156 | 2158 | ||
2157 | case BC_ISNEXT: | 2159 | case BC_ISNEXT: |
2158 | dasm_put(Dst, 14461, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); | 2160 | dasm_put(Dst, 14482, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); |
2159 | break; | 2161 | break; |
2160 | 2162 | ||
2161 | case BC_VARG: | 2163 | case BC_VARG: |
2162 | dasm_put(Dst, 14560, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); | 2164 | dasm_put(Dst, 14581, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); |
2163 | dasm_put(Dst, 14724, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 2165 | dasm_put(Dst, 14745, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); |
2164 | break; | 2166 | break; |
2165 | 2167 | ||
2166 | /* -- Returns ----------------------------------------------------------- */ | 2168 | /* -- Returns ----------------------------------------------------------- */ |
2167 | 2169 | ||
2168 | case BC_RETM: | 2170 | case BC_RETM: |
2169 | dasm_put(Dst, 13930); | 2171 | dasm_put(Dst, 13951); |
2170 | break; | 2172 | break; |
2171 | 2173 | ||
2172 | case BC_RET: case BC_RET0: case BC_RET1: | 2174 | case BC_RET: case BC_RET0: case BC_RET1: |
2173 | if (op != BC_RET0) { | 2175 | if (op != BC_RET0) { |
2174 | dasm_put(Dst, 14795); | 2176 | dasm_put(Dst, 14816); |
2175 | } | 2177 | } |
2176 | dasm_put(Dst, 14799, FRAME_TYPE); | 2178 | dasm_put(Dst, 14820, FRAME_TYPE); |
2177 | switch (op) { | 2179 | switch (op) { |
2178 | case BC_RET: | 2180 | case BC_RET: |
2179 | dasm_put(Dst, 14818); | 2181 | dasm_put(Dst, 14839); |
2180 | break; | 2182 | break; |
2181 | case BC_RET1: | 2183 | case BC_RET1: |
2182 | dasm_put(Dst, 14876); | 2184 | dasm_put(Dst, 14897); |
2183 | /* fallthrough */ | 2185 | /* fallthrough */ |
2184 | case BC_RET0: | 2186 | case BC_RET0: |
2185 | dasm_put(Dst, 14892); | 2187 | dasm_put(Dst, 14913); |
2186 | default: | 2188 | default: |
2187 | break; | 2189 | break; |
2188 | } | 2190 | } |
2189 | dasm_put(Dst, 14903, Dt7(->pc), PC2PROTO(k)); | 2191 | dasm_put(Dst, 14924, Dt7(->pc), PC2PROTO(k)); |
2190 | if (op == BC_RET) { | 2192 | if (op == BC_RET) { |
2191 | dasm_put(Dst, 14945, LJ_TNIL); | 2193 | dasm_put(Dst, 14966, LJ_TNIL); |
2192 | } else { | 2194 | } else { |
2193 | dasm_put(Dst, 14954, LJ_TNIL); | 2195 | dasm_put(Dst, 14975, LJ_TNIL); |
2194 | } | 2196 | } |
2195 | dasm_put(Dst, 14961, -FRAME_VARG, FRAME_TYPEP); | 2197 | dasm_put(Dst, 14982, -FRAME_VARG, FRAME_TYPEP); |
2196 | if (op != BC_RET0) { | 2198 | if (op != BC_RET0) { |
2197 | dasm_put(Dst, 14985); | 2199 | dasm_put(Dst, 15006); |
2198 | } | 2200 | } |
2199 | dasm_put(Dst, 4689); | 2201 | dasm_put(Dst, 4710); |
2200 | break; | 2202 | break; |
2201 | 2203 | ||
2202 | /* -- Loops and branches ------------------------------------------------ */ | 2204 | /* -- Loops and branches ------------------------------------------------ */ |
@@ -2204,7 +2206,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2204 | 2206 | ||
2205 | case BC_FORL: | 2207 | case BC_FORL: |
2206 | #if LJ_HASJIT | 2208 | #if LJ_HASJIT |
2207 | dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2209 | dasm_put(Dst, 15010, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2208 | #endif | 2210 | #endif |
2209 | break; | 2211 | break; |
2210 | 2212 | ||
@@ -2216,57 +2218,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2216 | case BC_FORI: | 2218 | case BC_FORI: |
2217 | case BC_IFORL: | 2219 | case BC_IFORL: |
2218 | vk = (op == BC_IFORL || op == BC_JFORL); | 2220 | vk = (op == BC_IFORL || op == BC_JFORL); |
2219 | dasm_put(Dst, 15010); | 2221 | dasm_put(Dst, 15031); |
2220 | if (!vk) { | 2222 | if (!vk) { |
2221 | dasm_put(Dst, 15014, LJ_TISNUM, LJ_TISNUM); | 2223 | dasm_put(Dst, 15035, LJ_TISNUM, LJ_TISNUM); |
2222 | } | 2224 | } |
2223 | dasm_put(Dst, 15033); | 2225 | dasm_put(Dst, 15054); |
2224 | if (!vk) { | 2226 | if (!vk) { |
2225 | dasm_put(Dst, 15037, LJ_TISNUM); | 2227 | dasm_put(Dst, 15058, LJ_TISNUM); |
2226 | } | 2228 | } |
2227 | if (sse) { | 2229 | if (sse) { |
2228 | dasm_put(Dst, 15046); | 2230 | dasm_put(Dst, 15067); |
2229 | if (vk) { | 2231 | if (vk) { |
2230 | dasm_put(Dst, 15058); | 2232 | dasm_put(Dst, 15079); |
2231 | } else { | 2233 | } else { |
2232 | dasm_put(Dst, 15077); | 2234 | dasm_put(Dst, 15098); |
2233 | } | 2235 | } |
2234 | dasm_put(Dst, 15082); | 2236 | dasm_put(Dst, 15103); |
2235 | } else { | 2237 | } else { |
2236 | dasm_put(Dst, 15095); | 2238 | dasm_put(Dst, 15116); |
2237 | if (vk) { | 2239 | if (vk) { |
2238 | dasm_put(Dst, 15101); | 2240 | dasm_put(Dst, 15122); |
2239 | } else { | 2241 | } else { |
2240 | dasm_put(Dst, 15117); | 2242 | dasm_put(Dst, 15138); |
2241 | } | 2243 | } |
2242 | dasm_put(Dst, 15125); | 2244 | dasm_put(Dst, 15146); |
2243 | if (cmov) { | 2245 | if (cmov) { |
2244 | dasm_put(Dst, 10818); | 2246 | dasm_put(Dst, 10839); |
2245 | } else { | 2247 | } else { |
2246 | dasm_put(Dst, 10824); | 2248 | dasm_put(Dst, 10845); |
2247 | } | 2249 | } |
2248 | if (!cmov) { | 2250 | if (!cmov) { |
2249 | dasm_put(Dst, 15130); | 2251 | dasm_put(Dst, 15151); |
2250 | } | 2252 | } |
2251 | } | 2253 | } |
2252 | if (op == BC_FORI) { | 2254 | if (op == BC_FORI) { |
2253 | dasm_put(Dst, 15136, -BCBIAS_J*4); | 2255 | dasm_put(Dst, 15157, -BCBIAS_J*4); |
2254 | } else if (op == BC_JFORI) { | 2256 | } else if (op == BC_JFORI) { |
2255 | dasm_put(Dst, 15146, -BCBIAS_J*4, BC_JLOOP); | 2257 | dasm_put(Dst, 15167, -BCBIAS_J*4, BC_JLOOP); |
2256 | } else if (op == BC_IFORL) { | 2258 | } else if (op == BC_IFORL) { |
2257 | dasm_put(Dst, 15160, -BCBIAS_J*4); | 2259 | dasm_put(Dst, 15181, -BCBIAS_J*4); |
2258 | } else { | 2260 | } else { |
2259 | dasm_put(Dst, 15156, BC_JLOOP); | 2261 | dasm_put(Dst, 15177, BC_JLOOP); |
2260 | } | 2262 | } |
2261 | dasm_put(Dst, 10853); | 2263 | dasm_put(Dst, 10874); |
2262 | if (sse) { | 2264 | if (sse) { |
2263 | dasm_put(Dst, 15170); | 2265 | dasm_put(Dst, 15191); |
2264 | } | 2266 | } |
2265 | break; | 2267 | break; |
2266 | 2268 | ||
2267 | case BC_ITERL: | 2269 | case BC_ITERL: |
2268 | #if LJ_HASJIT | 2270 | #if LJ_HASJIT |
2269 | dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2271 | dasm_put(Dst, 15010, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2270 | #endif | 2272 | #endif |
2271 | break; | 2273 | break; |
2272 | 2274 | ||
@@ -2275,33 +2277,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2275 | break; | 2277 | break; |
2276 | #endif | 2278 | #endif |
2277 | case BC_IITERL: | 2279 | case BC_IITERL: |
2278 | dasm_put(Dst, 15181, LJ_TNIL); | 2280 | dasm_put(Dst, 15202, LJ_TNIL); |
2279 | if (op == BC_JITERL) { | 2281 | if (op == BC_JITERL) { |
2280 | dasm_put(Dst, 15196, BC_JLOOP); | 2282 | dasm_put(Dst, 15217, BC_JLOOP); |
2281 | } else { | 2283 | } else { |
2282 | dasm_put(Dst, 15210, -BCBIAS_J*4); | 2284 | dasm_put(Dst, 15231, -BCBIAS_J*4); |
2283 | } | 2285 | } |
2284 | dasm_put(Dst, 11150); | 2286 | dasm_put(Dst, 11171); |
2285 | break; | 2287 | break; |
2286 | 2288 | ||
2287 | case BC_LOOP: | 2289 | case BC_LOOP: |
2288 | #if LJ_HASJIT | 2290 | #if LJ_HASJIT |
2289 | dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2291 | dasm_put(Dst, 15010, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2290 | #endif | 2292 | #endif |
2291 | break; | 2293 | break; |
2292 | 2294 | ||
2293 | case BC_ILOOP: | 2295 | case BC_ILOOP: |
2294 | dasm_put(Dst, 10855); | 2296 | dasm_put(Dst, 10876); |
2295 | break; | 2297 | break; |
2296 | 2298 | ||
2297 | case BC_JLOOP: | 2299 | case BC_JLOOP: |
2298 | #if LJ_HASJIT | 2300 | #if LJ_HASJIT |
2299 | dasm_put(Dst, 15226, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); | 2301 | dasm_put(Dst, 15247, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); |
2300 | #endif | 2302 | #endif |
2301 | break; | 2303 | break; |
2302 | 2304 | ||
2303 | case BC_JMP: | 2305 | case BC_JMP: |
2304 | dasm_put(Dst, 15249, -BCBIAS_J*4); | 2306 | dasm_put(Dst, 15270, -BCBIAS_J*4); |
2305 | break; | 2307 | break; |
2306 | 2308 | ||
2307 | /* -- Function headers -------------------------------------------------- */ | 2309 | /* -- Function headers -------------------------------------------------- */ |
@@ -2315,7 +2317,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2315 | 2317 | ||
2316 | case BC_FUNCF: | 2318 | case BC_FUNCF: |
2317 | #if LJ_HASJIT | 2319 | #if LJ_HASJIT |
2318 | dasm_put(Dst, 15273, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2320 | dasm_put(Dst, 15294, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2319 | #endif | 2321 | #endif |
2320 | case BC_FUNCV: /* NYI: compiled vararg functions. */ | 2322 | case BC_FUNCV: /* NYI: compiled vararg functions. */ |
2321 | break; | 2323 | break; |
@@ -2325,47 +2327,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2325 | break; | 2327 | break; |
2326 | #endif | 2328 | #endif |
2327 | case BC_IFUNCF: | 2329 | case BC_IFUNCF: |
2328 | dasm_put(Dst, 15294, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); | 2330 | dasm_put(Dst, 15315, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); |
2329 | if (op == BC_JFUNCF) { | 2331 | if (op == BC_JFUNCF) { |
2330 | dasm_put(Dst, 15324, BC_JLOOP); | 2332 | dasm_put(Dst, 15345, BC_JLOOP); |
2331 | } else { | 2333 | } else { |
2332 | dasm_put(Dst, 10855); | 2334 | dasm_put(Dst, 10876); |
2333 | } | 2335 | } |
2334 | dasm_put(Dst, 15333, LJ_TNIL); | 2336 | dasm_put(Dst, 15354, LJ_TNIL); |
2335 | break; | 2337 | break; |
2336 | 2338 | ||
2337 | case BC_JFUNCV: | 2339 | case BC_JFUNCV: |
2338 | #if !LJ_HASJIT | 2340 | #if !LJ_HASJIT |
2339 | break; | 2341 | break; |
2340 | #endif | 2342 | #endif |
2341 | dasm_put(Dst, 10253); | 2343 | dasm_put(Dst, 10274); |
2342 | break; /* NYI: compiled vararg functions. */ | 2344 | break; /* NYI: compiled vararg functions. */ |
2343 | 2345 | ||
2344 | case BC_IFUNCV: | 2346 | case BC_IFUNCV: |
2345 | dasm_put(Dst, 15355, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); | 2347 | dasm_put(Dst, 15376, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); |
2346 | if (op == BC_JFUNCV) { | 2348 | if (op == BC_JFUNCV) { |
2347 | dasm_put(Dst, 15324, BC_JLOOP); | 2349 | dasm_put(Dst, 15345, BC_JLOOP); |
2348 | } else { | 2350 | } else { |
2349 | dasm_put(Dst, 15446, -4+PC2PROTO(k)); | 2351 | dasm_put(Dst, 15467, -4+PC2PROTO(k)); |
2350 | } | 2352 | } |
2351 | dasm_put(Dst, 15468, LJ_TNIL); | 2353 | dasm_put(Dst, 15489, LJ_TNIL); |
2352 | break; | 2354 | break; |
2353 | 2355 | ||
2354 | case BC_FUNCC: | 2356 | case BC_FUNCC: |
2355 | case BC_FUNCCW: | 2357 | case BC_FUNCCW: |
2356 | dasm_put(Dst, 15490, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); | 2358 | dasm_put(Dst, 15511, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); |
2357 | if (op == BC_FUNCC) { | 2359 | if (op == BC_FUNCC) { |
2358 | dasm_put(Dst, 15519); | 2360 | dasm_put(Dst, 15540); |
2359 | } else { | 2361 | } else { |
2360 | dasm_put(Dst, 15523); | 2362 | dasm_put(Dst, 15544); |
2361 | } | 2363 | } |
2362 | dasm_put(Dst, 15531, DISPATCH_GL(vmstate), ~LJ_VMST_C); | 2364 | dasm_put(Dst, 15552, DISPATCH_GL(vmstate), ~LJ_VMST_C); |
2363 | if (op == BC_FUNCC) { | 2365 | if (op == BC_FUNCC) { |
2364 | dasm_put(Dst, 15540); | 2366 | dasm_put(Dst, 15561); |
2365 | } else { | 2367 | } else { |
2366 | dasm_put(Dst, 15544, DISPATCH_GL(wrapf)); | 2368 | dasm_put(Dst, 15565, DISPATCH_GL(wrapf)); |
2367 | } | 2369 | } |
2368 | dasm_put(Dst, 15549, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); | 2370 | dasm_put(Dst, 15570, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); |
2369 | break; | 2371 | break; |
2370 | 2372 | ||
2371 | /* ---------------------------------------------------------------------- */ | 2373 | /* ---------------------------------------------------------------------- */ |
@@ -2393,7 +2395,7 @@ static int build_backend(BuildCtx *ctx) | |||
2393 | 2395 | ||
2394 | build_subroutines(ctx, cmov, sse); | 2396 | build_subroutines(ctx, cmov, sse); |
2395 | 2397 | ||
2396 | dasm_put(Dst, 15574); | 2398 | dasm_put(Dst, 15595); |
2397 | for (op = 0; op < BC__MAX; op++) | 2399 | for (op = 0; op < BC__MAX; op++) |
2398 | build_ins(ctx, (BCOp)op, op, cmov, sse); | 2400 | build_ins(ctx, (BCOp)op, op, cmov, sse); |
2399 | 2401 | ||
diff --git a/src/lib_base.c b/src/lib_base.c index 908099d4..aa55faba 100644 --- a/src/lib_base.c +++ b/src/lib_base.c | |||
@@ -246,17 +246,43 @@ LJ_STATIC_ASSERT((int)FF_next == FF_next_N); | |||
246 | LJLIB_ASM(next) | 246 | LJLIB_ASM(next) |
247 | { | 247 | { |
248 | lj_lib_checktab(L, 1); | 248 | lj_lib_checktab(L, 1); |
249 | lj_lib_checknum(L, 2); /* For ipairs_aux. */ | ||
250 | return FFH_UNREACHABLE; | 249 | return FFH_UNREACHABLE; |
251 | } | 250 | } |
252 | 251 | ||
252 | static int ffh_pairs(lua_State *L, MMS mm) | ||
253 | { | ||
254 | TValue *o = lj_lib_checkany(L, 1); | ||
255 | cTValue *mo = lj_meta_lookup(L, o, mm); | ||
256 | if (!tvisnil(mo)) { | ||
257 | L->top = o+1; /* Only keep one argument. */ | ||
258 | copyTV(L, L->base-1, mo); /* Replace callable. */ | ||
259 | return FFH_TAILCALL; | ||
260 | } else { | ||
261 | if (!tvistab(o)) lj_err_argt(L, 1, LUA_TTABLE); | ||
262 | setfuncV(L, o-1, funcV(lj_lib_upvalue(L, 1))); | ||
263 | if (mm == MM_pairs) setnilV(o+1); else setintV(o+1, 0); | ||
264 | return FFH_RES(3); | ||
265 | } | ||
266 | } | ||
267 | |||
253 | LJLIB_PUSH(lastcl) | 268 | LJLIB_PUSH(lastcl) |
254 | LJLIB_ASM_(pairs) | 269 | LJLIB_ASM(pairs) |
270 | { | ||
271 | return ffh_pairs(L, MM_pairs); | ||
272 | } | ||
255 | 273 | ||
256 | LJLIB_NOREGUV LJLIB_ASM_(ipairs_aux) LJLIB_REC(.) | 274 | LJLIB_NOREGUV LJLIB_ASM(ipairs_aux) LJLIB_REC(.) |
275 | { | ||
276 | lj_lib_checktab(L, 1); | ||
277 | lj_lib_checknum(L, 2); | ||
278 | return FFH_UNREACHABLE; | ||
279 | } | ||
257 | 280 | ||
258 | LJLIB_PUSH(lastcl) | 281 | LJLIB_PUSH(lastcl) |
259 | LJLIB_ASM_(ipairs) LJLIB_REC(.) | 282 | LJLIB_ASM(ipairs) LJLIB_REC(.) |
283 | { | ||
284 | return ffh_pairs(L, MM_ipairs); | ||
285 | } | ||
260 | 286 | ||
261 | /* -- Base library: throw and catch errors -------------------------------- */ | 287 | /* -- Base library: throw and catch errors -------------------------------- */ |
262 | 288 | ||
diff --git a/src/lj_obj.h b/src/lj_obj.h index c7b653f3..ea5c69c5 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h | |||
@@ -417,7 +417,7 @@ enum { | |||
417 | /* The following must be in ORDER ARITH. */ \ | 417 | /* The following must be in ORDER ARITH. */ \ |
418 | _(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \ | 418 | _(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \ |
419 | /* The following are used in the standard libraries. */ \ | 419 | /* The following are used in the standard libraries. */ \ |
420 | _(metatable) _(tostring) | 420 | _(metatable) _(tostring) _(pairs) _(ipairs) |
421 | 421 | ||
422 | typedef enum { | 422 | typedef enum { |
423 | #define MMENUM(name) MM_##name, | 423 | #define MMENUM(name) MM_##name, |
diff --git a/src/lj_record.c b/src/lj_record.c index 734adcf5..4ff208f8 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1358,7 +1358,7 @@ static void LJ_FASTCALL recff_tonumber(jit_State *J, RecordFFData *rd) | |||
1358 | UNUSED(rd); | 1358 | UNUSED(rd); |
1359 | } | 1359 | } |
1360 | 1360 | ||
1361 | static TValue *recff_tostring_cp(lua_State *L, lua_CFunction dummy, void *ud) | 1361 | static TValue *recff_metacall_cp(lua_State *L, lua_CFunction dummy, void *ud) |
1362 | { | 1362 | { |
1363 | jit_State *J = (jit_State *)ud; | 1363 | jit_State *J = (jit_State *)ud; |
1364 | rec_tailcall(J, 0, 1); | 1364 | rec_tailcall(J, 0, 1); |
@@ -1366,31 +1366,38 @@ static TValue *recff_tostring_cp(lua_State *L, lua_CFunction dummy, void *ud) | |||
1366 | return NULL; | 1366 | return NULL; |
1367 | } | 1367 | } |
1368 | 1368 | ||
1369 | static int recff_metacall(jit_State *J, RecordFFData *rd, MMS mm) | ||
1370 | { | ||
1371 | RecordIndex ix; | ||
1372 | ix.tab = J->base[0]; | ||
1373 | copyTV(J->L, &ix.tabv, &rd->argv[0]); | ||
1374 | if (rec_mm_lookup(J, &ix, mm)) { /* Has metamethod? */ | ||
1375 | int errcode; | ||
1376 | /* Temporarily insert metamethod below object. */ | ||
1377 | J->base[1] = J->base[0]; | ||
1378 | J->base[0] = ix.mobj; | ||
1379 | copyTV(J->L, &rd->argv[1], &rd->argv[0]); | ||
1380 | copyTV(J->L, &rd->argv[0], &ix.mobjv); | ||
1381 | /* Need to protect rec_tailcall because it may throw. */ | ||
1382 | errcode = lj_vm_cpcall(J->L, NULL, J, recff_metacall_cp); | ||
1383 | /* Always undo Lua stack changes to avoid confusing the interpreter. */ | ||
1384 | copyTV(J->L, &rd->argv[0], &rd->argv[1]); | ||
1385 | if (errcode) | ||
1386 | lj_err_throw(J->L, errcode); /* Propagate errors. */ | ||
1387 | rd->nres = -1; /* Pending call. */ | ||
1388 | return 1; /* Tailcalled to metamethod. */ | ||
1389 | } | ||
1390 | return 0; | ||
1391 | } | ||
1392 | |||
1369 | static void LJ_FASTCALL recff_tostring(jit_State *J, RecordFFData *rd) | 1393 | static void LJ_FASTCALL recff_tostring(jit_State *J, RecordFFData *rd) |
1370 | { | 1394 | { |
1371 | TRef tr = J->base[0]; | 1395 | TRef tr = J->base[0]; |
1372 | if (tref_isstr(tr)) { | 1396 | if (tref_isstr(tr)) { |
1373 | /* Ignore __tostring in the string base metatable. */ | 1397 | /* Ignore __tostring in the string base metatable. */ |
1374 | /* Pass on result in J->base[0]. */ | 1398 | /* Pass on result in J->base[0]. */ |
1375 | } else { | 1399 | } else if (!recff_metacall(J, rd, MM_tostring)) { |
1376 | RecordIndex ix; | 1400 | if (tref_isnumber(tr)) { |
1377 | ix.tab = tr; | ||
1378 | copyTV(J->L, &ix.tabv, &rd->argv[0]); | ||
1379 | if (rec_mm_lookup(J, &ix, MM_tostring)) { /* Has __tostring metamethod? */ | ||
1380 | int errcode; | ||
1381 | /* Temporarily insert metamethod below object. */ | ||
1382 | J->base[1] = tr; | ||
1383 | J->base[0] = ix.mobj; | ||
1384 | copyTV(J->L, &rd->argv[1], &rd->argv[0]); | ||
1385 | copyTV(J->L, &rd->argv[0], &ix.mobjv); | ||
1386 | /* Need to protect rec_tailcall because it may throw. */ | ||
1387 | errcode = lj_vm_cpcall(J->L, NULL, J, recff_tostring_cp); | ||
1388 | /* Always undo Lua stack changes to avoid confusing the interpreter. */ | ||
1389 | copyTV(J->L, &rd->argv[0], &rd->argv[1]); | ||
1390 | if (errcode) | ||
1391 | lj_err_throw(J->L, errcode); /* Propagate errors. */ | ||
1392 | rd->nres = -1; /* Pending call. */ | ||
1393 | } else if (tref_isnumber(tr)) { | ||
1394 | J->base[0] = emitir(IRT(IR_TOSTR, IRT_STR), tr, 0); | 1401 | J->base[0] = emitir(IRT(IR_TOSTR, IRT_STR), tr, 0); |
1395 | } else if (tref_ispri(tr)) { | 1402 | } else if (tref_ispri(tr)) { |
1396 | J->base[0] = lj_ir_kstr(J, strV(&J->fn->c.upvalue[tref_type(tr)])); | 1403 | J->base[0] = lj_ir_kstr(J, strV(&J->fn->c.upvalue[tref_type(tr)])); |
@@ -1419,13 +1426,15 @@ static void LJ_FASTCALL recff_ipairs_aux(jit_State *J, RecordFFData *rd) | |||
1419 | 1426 | ||
1420 | static void LJ_FASTCALL recff_ipairs(jit_State *J, RecordFFData *rd) | 1427 | static void LJ_FASTCALL recff_ipairs(jit_State *J, RecordFFData *rd) |
1421 | { | 1428 | { |
1422 | TRef tab = J->base[0]; | 1429 | if (!recff_metacall(J, rd, MM_ipairs)) { |
1423 | if (tref_istab(tab)) { | 1430 | TRef tab = J->base[0]; |
1424 | J->base[0] = lj_ir_kfunc(J, funcV(&J->fn->c.upvalue[0])); | 1431 | if (tref_istab(tab)) { |
1425 | J->base[1] = tab; | 1432 | J->base[0] = lj_ir_kfunc(J, funcV(&J->fn->c.upvalue[0])); |
1426 | J->base[2] = lj_ir_kint(J, 0); | 1433 | J->base[1] = tab; |
1427 | rd->nres = 3; | 1434 | J->base[2] = lj_ir_kint(J, 0); |
1428 | } /* else: Interpreter will throw. */ | 1435 | rd->nres = 3; |
1436 | } /* else: Interpreter will throw. */ | ||
1437 | } | ||
1429 | } | 1438 | } |
1430 | 1439 | ||
1431 | static void LJ_FASTCALL recff_pcall(jit_State *J, RecordFFData *rd) | 1440 | static void LJ_FASTCALL recff_pcall(jit_State *J, RecordFFData *rd) |