summaryrefslogtreecommitdiff
path: root/src/buildvm_x64win.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x64win.h')
-rw-r--r--src/buildvm_x64win.h620
1 files changed, 310 insertions, 310 deletions
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h
index 9198454a..5e70ad88 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
15static const unsigned char build_actionlist[14046] = { 15static const unsigned char build_actionlist[14047] = {
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,
@@ -346,12 +346,12 @@ static const unsigned char build_actionlist[14046] = {
346 233,244,55,248,119,184,237,248,55,139,108,36,96,139,114,252,252,137,116,36, 346 233,244,55,248,119,184,237,248,55,139,108,36,96,139,114,252,252,137,116,36,
347 100,137,149,233,141,68,194,252,248,141,136,233,137,133,233,139,66,252,248, 347 100,137,149,233,141,68,194,252,248,141,136,233,137,133,233,139,66,252,248,
348 59,141,233,15,135,244,251,137,252,233,252,255,144,233,139,149,233,133,192, 348 59,141,233,15,135,244,251,137,252,233,252,255,144,233,139,149,233,133,192,
349 15,133,244,69,248,1,255,139,133,233,41,208,193,232,3,131,192,1,139,106,252, 349 15,143,244,69,248,1,255,139,141,233,41,209,193,252,233,3,133,192,141,65,1,
350 248,57,114,252,252,15,133,244,248,139,181,233,139,14,15,182,252,233,15,182, 350 139,106,252,248,15,133,244,248,139,181,233,139,14,15,182,252,233,15,182,205,
351 205,131,198,4,252,255,36,252,235,248,2,137,209,252,247,198,237,15,133,244, 351 131,198,4,252,255,36,252,235,248,2,137,209,252,247,198,237,15,133,244,249,
352 249,15,182,110,252,253,72,252,247,213,141,20,252,234,252,233,244,27,248,3, 352 15,182,110,252,253,72,252,247,213,141,20,252,234,252,233,244,27,248,3,137,
353 137,252,245,131,229,252,248,41,252,234,252,233,244,27,248,5,186,237,137,252, 353 252,245,131,229,252,248,41,252,234,252,233,244,27,248,5,186,237,137,252,233,
354 233,232,251,1,0,139,149,233,252,233,244,1,248,66,93,72,137,108,36,32,139, 354 232,251,1,0,139,149,233,49,192,252,233,244,1,248,66,93,72,137,108,36,32,139,
355 108,36,96,137,116,36,100,137,149,233,255,141,68,194,252,248,137,252,233,137, 355 108,36,96,137,116,36,100,137,149,233,255,141,68,194,252,248,137,252,233,137,
356 133,233,232,251,1,19,139,149,233,139,133,233,41,208,193,232,3,131,192,1,72, 356 133,233,232,251,1,19,139,149,233,139,133,233,41,208,193,232,3,131,192,1,72,
357 139,108,36,32,85,195,248,136,255,15,182,131,233,168,235,15,133,244,251,168, 357 139,108,36,32,85,195,248,136,255,15,182,131,233,168,235,15,133,244,251,168,
@@ -1346,89 +1346,89 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1346 } 1346 }
1347 dasm_put(Dst, 6758, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); 1347 dasm_put(Dst, 6758, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base));
1348 dasm_put(Dst, 6836, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); 1348 dasm_put(Dst, 6836, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base));
1349 dasm_put(Dst, 6962, Dt1(->top), Dt1(->base), Dt1(->top)); 1349 dasm_put(Dst, 6963, Dt1(->top), Dt1(->base), Dt1(->top));
1350#if LJ_HASJIT 1350#if LJ_HASJIT
1351 dasm_put(Dst, 7001, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); 1351 dasm_put(Dst, 7002, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount));
1352#endif 1352#endif
1353 dasm_put(Dst, 7032, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); 1353 dasm_put(Dst, 7033, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE);
1354 dasm_put(Dst, 7083, Dt1(->base), Dt1(->base), GG_DISP2STATIC); 1354 dasm_put(Dst, 7084, Dt1(->base), Dt1(->base), GG_DISP2STATIC);
1355#if LJ_HASJIT 1355#if LJ_HASJIT
1356 dasm_put(Dst, 7150, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); 1356 dasm_put(Dst, 7151, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L));
1357#endif 1357#endif
1358 dasm_put(Dst, 7197); 1358 dasm_put(Dst, 7198);
1359#if LJ_HASJIT 1359#if LJ_HASJIT
1360 dasm_put(Dst, 7027); 1360 dasm_put(Dst, 7028);
1361#endif 1361#endif
1362 dasm_put(Dst, 7204); 1362 dasm_put(Dst, 7205);
1363#if LJ_HASJIT 1363#if LJ_HASJIT
1364 dasm_put(Dst, 7207); 1364 dasm_put(Dst, 7208);
1365#endif 1365#endif
1366 dasm_put(Dst, 7217, Dt1(->base), Dt1(->top)); 1366 dasm_put(Dst, 7218, Dt1(->base), Dt1(->top));
1367#if LJ_HASJIT 1367#if LJ_HASJIT
1368 dasm_put(Dst, 7251); 1368 dasm_put(Dst, 7252);
1369#endif 1369#endif
1370 dasm_put(Dst, 7256, Dt1(->base), Dt1(->top)); 1370 dasm_put(Dst, 7257, Dt1(->base), Dt1(->top));
1371#if LJ_HASJIT 1371#if LJ_HASJIT
1372 dasm_put(Dst, 7287, 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); 1372 dasm_put(Dst, 7288, 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);
1373#endif 1373#endif
1374 dasm_put(Dst, 7517); 1374 dasm_put(Dst, 7518);
1375#if LJ_HASJIT 1375#if LJ_HASJIT
1376 dasm_put(Dst, 7520, 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); 1376 dasm_put(Dst, 7521, 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);
1377 dasm_put(Dst, 7662); 1377 dasm_put(Dst, 7663);
1378#endif 1378#endif
1379 dasm_put(Dst, 7688); 1379 dasm_put(Dst, 7689);
1380 if (!sse) { 1380 if (!sse) {
1381 dasm_put(Dst, 7691); 1381 dasm_put(Dst, 7692);
1382 } 1382 }
1383 dasm_put(Dst, 7736, (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)); 1383 dasm_put(Dst, 7737, (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));
1384 if (!sse) { 1384 if (!sse) {
1385 dasm_put(Dst, 7822); 1385 dasm_put(Dst, 7823);
1386 } 1386 }
1387 dasm_put(Dst, 7867, (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)); 1387 dasm_put(Dst, 7868, (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));
1388 if (!sse) { 1388 if (!sse) {
1389 dasm_put(Dst, 7953); 1389 dasm_put(Dst, 7954);
1390 } 1390 }
1391 dasm_put(Dst, 7992, (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, 7993, (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) { 1392 if (sse) {
1393 dasm_put(Dst, 8081, (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, 8082, (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));
1394 } else { 1394 } else {
1395 dasm_put(Dst, 8195); 1395 dasm_put(Dst, 8196);
1396 } 1396 }
1397 dasm_put(Dst, 8242); 1397 dasm_put(Dst, 8243);
1398 if (!sse) { 1398 if (!sse) {
1399 } else { 1399 } else {
1400 dasm_put(Dst, 8316); 1400 dasm_put(Dst, 8317);
1401 } 1401 }
1402 dasm_put(Dst, 8319); 1402 dasm_put(Dst, 8320);
1403 dasm_put(Dst, 8404, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); 1403 dasm_put(Dst, 8405, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32));
1404 dasm_put(Dst, 8505, (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)); 1404 dasm_put(Dst, 8506, (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));
1405 dasm_put(Dst, 8673); 1405 dasm_put(Dst, 8674);
1406#if LJ_HASJIT 1406#if LJ_HASJIT
1407 if (sse) { 1407 if (sse) {
1408 dasm_put(Dst, 8714); 1408 dasm_put(Dst, 8715);
1409 dasm_put(Dst, 8784); 1409 dasm_put(Dst, 8785);
1410 dasm_put(Dst, 8857); 1410 dasm_put(Dst, 8858);
1411 } else { 1411 } else {
1412 dasm_put(Dst, 8907); 1412 dasm_put(Dst, 8908);
1413 dasm_put(Dst, 8999); 1413 dasm_put(Dst, 9000);
1414 } 1414 }
1415 dasm_put(Dst, 9045); 1415 dasm_put(Dst, 9046);
1416#endif 1416#endif
1417 dasm_put(Dst, 9049); 1417 dasm_put(Dst, 9050);
1418 if (sse) { 1418 if (sse) {
1419 dasm_put(Dst, 9052, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 1419 dasm_put(Dst, 9053, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
1420 dasm_put(Dst, 9141, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); 1420 dasm_put(Dst, 9142, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32));
1421 } else { 1421 } else {
1422 dasm_put(Dst, 9265); 1422 dasm_put(Dst, 9266);
1423 dasm_put(Dst, 9348); 1423 dasm_put(Dst, 9349);
1424 if (cmov) { 1424 if (cmov) {
1425 dasm_put(Dst, 9403); 1425 dasm_put(Dst, 9404);
1426 } else { 1426 } else {
1427 dasm_put(Dst, 9422); 1427 dasm_put(Dst, 9423);
1428 } 1428 }
1429 dasm_put(Dst, 9045); 1429 dasm_put(Dst, 9046);
1430 } 1430 }
1431 dasm_put(Dst, 9463); 1431 dasm_put(Dst, 9464);
1432} 1432}
1433 1433
1434/* Generate the code for a single instruction. */ 1434/* Generate the code for a single instruction. */
@@ -1444,595 +1444,595 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1444 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1444 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1445 1445
1446 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1446 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1447 dasm_put(Dst, 9489, LJ_TISNUM, LJ_TISNUM); 1447 dasm_put(Dst, 9490, LJ_TISNUM, LJ_TISNUM);
1448 if (sse) { 1448 if (sse) {
1449 dasm_put(Dst, 9510); 1449 dasm_put(Dst, 9511);
1450 } else { 1450 } else {
1451 dasm_put(Dst, 9525); 1451 dasm_put(Dst, 9526);
1452 if (cmov) { 1452 if (cmov) {
1453 dasm_put(Dst, 9535); 1453 dasm_put(Dst, 9536);
1454 } else { 1454 } else {
1455 dasm_put(Dst, 9541); 1455 dasm_put(Dst, 9542);
1456 } 1456 }
1457 } 1457 }
1458 switch (op) { 1458 switch (op) {
1459 case BC_ISLT: 1459 case BC_ISLT:
1460 dasm_put(Dst, 9548); 1460 dasm_put(Dst, 9549);
1461 break; 1461 break;
1462 case BC_ISGE: 1462 case BC_ISGE:
1463 dasm_put(Dst, 9343); 1463 dasm_put(Dst, 9344);
1464 break; 1464 break;
1465 case BC_ISLE: 1465 case BC_ISLE:
1466 dasm_put(Dst, 5905); 1466 dasm_put(Dst, 5905);
1467 break; 1467 break;
1468 case BC_ISGT: 1468 case BC_ISGT:
1469 dasm_put(Dst, 9553); 1469 dasm_put(Dst, 9554);
1470 break; 1470 break;
1471 default: break; /* Shut up GCC. */ 1471 default: break; /* Shut up GCC. */
1472 } 1472 }
1473 dasm_put(Dst, 9558, -BCBIAS_J*4); 1473 dasm_put(Dst, 9559, -BCBIAS_J*4);
1474 break; 1474 break;
1475 1475
1476 case BC_ISEQV: case BC_ISNEV: 1476 case BC_ISEQV: case BC_ISNEV:
1477 vk = op == BC_ISEQV; 1477 vk = op == BC_ISEQV;
1478 dasm_put(Dst, 9592, LJ_TISNUM, LJ_TISNUM); 1478 dasm_put(Dst, 9593, LJ_TISNUM, LJ_TISNUM);
1479 if (sse) { 1479 if (sse) {
1480 dasm_put(Dst, 9618); 1480 dasm_put(Dst, 9619);
1481 } else { 1481 } else {
1482 dasm_put(Dst, 9630); 1482 dasm_put(Dst, 9631);
1483 if (cmov) { 1483 if (cmov) {
1484 dasm_put(Dst, 9535); 1484 dasm_put(Dst, 9536);
1485 } else { 1485 } else {
1486 dasm_put(Dst, 9541); 1486 dasm_put(Dst, 9542);
1487 } 1487 }
1488 } 1488 }
1489 iseqne_fp: 1489 iseqne_fp:
1490 if (vk) { 1490 if (vk) {
1491 dasm_put(Dst, 9637); 1491 dasm_put(Dst, 9638);
1492 } else { 1492 } else {
1493 dasm_put(Dst, 9646); 1493 dasm_put(Dst, 9647);
1494 } 1494 }
1495 iseqne_end: 1495 iseqne_end:
1496 if (vk) { 1496 if (vk) {
1497 dasm_put(Dst, 9655, -BCBIAS_J*4); 1497 dasm_put(Dst, 9656, -BCBIAS_J*4);
1498 } else { 1498 } else {
1499 dasm_put(Dst, 9670, -BCBIAS_J*4); 1499 dasm_put(Dst, 9671, -BCBIAS_J*4);
1500 } 1500 }
1501 dasm_put(Dst, 9572); 1501 dasm_put(Dst, 9573);
1502 if (op == BC_ISEQV || op == BC_ISNEV) { 1502 if (op == BC_ISEQV || op == BC_ISNEV) {
1503 dasm_put(Dst, 9685, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1503 dasm_put(Dst, 9686, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1504 if (vk) { 1504 if (vk) {
1505 dasm_put(Dst, 9743); 1505 dasm_put(Dst, 9744);
1506 } else { 1506 } else {
1507 dasm_put(Dst, 9747); 1507 dasm_put(Dst, 9748);
1508 } 1508 }
1509 dasm_put(Dst, 9753); 1509 dasm_put(Dst, 9754);
1510 } 1510 }
1511 break; 1511 break;
1512 case BC_ISEQS: case BC_ISNES: 1512 case BC_ISEQS: case BC_ISNES:
1513 vk = op == BC_ISEQS; 1513 vk = op == BC_ISEQS;
1514 dasm_put(Dst, 9758, LJ_TSTR); 1514 dasm_put(Dst, 9759, LJ_TSTR);
1515 iseqne_test: 1515 iseqne_test:
1516 if (vk) { 1516 if (vk) {
1517 dasm_put(Dst, 9641); 1517 dasm_put(Dst, 9642);
1518 } else { 1518 } else {
1519 dasm_put(Dst, 2805); 1519 dasm_put(Dst, 2805);
1520 } 1520 }
1521 goto iseqne_end; 1521 goto iseqne_end;
1522 case BC_ISEQN: case BC_ISNEN: 1522 case BC_ISEQN: case BC_ISNEN:
1523 vk = op == BC_ISEQN; 1523 vk = op == BC_ISEQN;
1524 dasm_put(Dst, 9782, LJ_TISNUM); 1524 dasm_put(Dst, 9783, LJ_TISNUM);
1525 if (sse) { 1525 if (sse) {
1526 dasm_put(Dst, 9796); 1526 dasm_put(Dst, 9797);
1527 } else { 1527 } else {
1528 dasm_put(Dst, 9808); 1528 dasm_put(Dst, 9809);
1529 if (cmov) { 1529 if (cmov) {
1530 dasm_put(Dst, 9535); 1530 dasm_put(Dst, 9536);
1531 } else { 1531 } else {
1532 dasm_put(Dst, 9541); 1532 dasm_put(Dst, 9542);
1533 } 1533 }
1534 } 1534 }
1535 goto iseqne_fp; 1535 goto iseqne_fp;
1536 case BC_ISEQP: case BC_ISNEP: 1536 case BC_ISEQP: case BC_ISNEP:
1537 vk = op == BC_ISEQP; 1537 vk = op == BC_ISEQP;
1538 dasm_put(Dst, 9815); 1538 dasm_put(Dst, 9816);
1539 goto iseqne_test; 1539 goto iseqne_test;
1540 1540
1541 /* -- Unary test and copy ops ------------------------------------------- */ 1541 /* -- Unary test and copy ops ------------------------------------------- */
1542 1542
1543 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1543 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1544 dasm_put(Dst, 9827, LJ_TISTRUECOND); 1544 dasm_put(Dst, 9828, LJ_TISTRUECOND);
1545 if (op == BC_IST || op == BC_ISTC) { 1545 if (op == BC_IST || op == BC_ISTC) {
1546 dasm_put(Dst, 9839); 1546 dasm_put(Dst, 9840);
1547 } else { 1547 } else {
1548 dasm_put(Dst, 9844); 1548 dasm_put(Dst, 9845);
1549 } 1549 }
1550 if (op == BC_ISTC || op == BC_ISFC) { 1550 if (op == BC_ISTC || op == BC_ISFC) {
1551 dasm_put(Dst, 9849); 1551 dasm_put(Dst, 9850);
1552 } 1552 }
1553 dasm_put(Dst, 9860, -BCBIAS_J*4); 1553 dasm_put(Dst, 9861, -BCBIAS_J*4);
1554 break; 1554 break;
1555 1555
1556 /* -- Unary ops --------------------------------------------------------- */ 1556 /* -- Unary ops --------------------------------------------------------- */
1557 1557
1558 case BC_MOV: 1558 case BC_MOV:
1559 dasm_put(Dst, 9892); 1559 dasm_put(Dst, 9893);
1560 break; 1560 break;
1561 case BC_NOT: 1561 case BC_NOT:
1562 dasm_put(Dst, 9926, LJ_TISTRUECOND, LJ_TTRUE); 1562 dasm_put(Dst, 9927, LJ_TISTRUECOND, LJ_TTRUE);
1563 break; 1563 break;
1564 case BC_UNM: 1564 case BC_UNM:
1565 dasm_put(Dst, 9962, LJ_TISNUM); 1565 dasm_put(Dst, 9963, LJ_TISNUM);
1566 if (sse) { 1566 if (sse) {
1567 dasm_put(Dst, 9973, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 1567 dasm_put(Dst, 9974, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
1568 } else { 1568 } else {
1569 dasm_put(Dst, 9998); 1569 dasm_put(Dst, 9999);
1570 } 1570 }
1571 dasm_put(Dst, 9572); 1571 dasm_put(Dst, 9573);
1572 break; 1572 break;
1573 case BC_LEN: 1573 case BC_LEN:
1574 dasm_put(Dst, 10007, LJ_TSTR); 1574 dasm_put(Dst, 10008, LJ_TSTR);
1575 if (sse) { 1575 if (sse) {
1576 dasm_put(Dst, 10021, Dt5(->len)); 1576 dasm_put(Dst, 10022, Dt5(->len));
1577 } else { 1577 } else {
1578 dasm_put(Dst, 10039, Dt5(->len)); 1578 dasm_put(Dst, 10040, Dt5(->len));
1579 } 1579 }
1580 dasm_put(Dst, 10048, LJ_TTAB); 1580 dasm_put(Dst, 10049, LJ_TTAB);
1581 if (sse) { 1581 if (sse) {
1582 dasm_put(Dst, 10089); 1582 dasm_put(Dst, 10090);
1583 } else { 1583 } else {
1584 } 1584 }
1585 dasm_put(Dst, 10098); 1585 dasm_put(Dst, 10099);
1586 break; 1586 break;
1587 1587
1588 /* -- Binary ops -------------------------------------------------------- */ 1588 /* -- Binary ops -------------------------------------------------------- */
1589 1589
1590 1590
1591 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1591 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1592 dasm_put(Dst, 10108); 1592 dasm_put(Dst, 10109);
1593 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1593 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1594 switch (vk) { 1594 switch (vk) {
1595 case 0: 1595 case 0:
1596 dasm_put(Dst, 10116, LJ_TISNUM); 1596 dasm_put(Dst, 10117, LJ_TISNUM);
1597 if (sse) { 1597 if (sse) {
1598 dasm_put(Dst, 10128); 1598 dasm_put(Dst, 10129);
1599 } else { 1599 } else {
1600 dasm_put(Dst, 10142); 1600 dasm_put(Dst, 10143);
1601 } 1601 }
1602 break; 1602 break;
1603 case 1: 1603 case 1:
1604 dasm_put(Dst, 10150, LJ_TISNUM); 1604 dasm_put(Dst, 10151, LJ_TISNUM);
1605 if (sse) { 1605 if (sse) {
1606 dasm_put(Dst, 10162); 1606 dasm_put(Dst, 10163);
1607 } else { 1607 } else {
1608 dasm_put(Dst, 10176); 1608 dasm_put(Dst, 10177);
1609 } 1609 }
1610 break; 1610 break;
1611 default: 1611 default:
1612 dasm_put(Dst, 10184, LJ_TISNUM, LJ_TISNUM); 1612 dasm_put(Dst, 10185, LJ_TISNUM, LJ_TISNUM);
1613 if (sse) { 1613 if (sse) {
1614 dasm_put(Dst, 10206); 1614 dasm_put(Dst, 10207);
1615 } else { 1615 } else {
1616 dasm_put(Dst, 10220); 1616 dasm_put(Dst, 10221);
1617 } 1617 }
1618 break; 1618 break;
1619 } 1619 }
1620 if (sse) { 1620 if (sse) {
1621 dasm_put(Dst, 9991); 1621 dasm_put(Dst, 9992);
1622 } else { 1622 } else {
1623 dasm_put(Dst, 10003); 1623 dasm_put(Dst, 10004);
1624 } 1624 }
1625 dasm_put(Dst, 9572); 1625 dasm_put(Dst, 9573);
1626 break; 1626 break;
1627 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1627 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1628 dasm_put(Dst, 10108); 1628 dasm_put(Dst, 10109);
1629 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1629 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1630 switch (vk) { 1630 switch (vk) {
1631 case 0: 1631 case 0:
1632 dasm_put(Dst, 10116, LJ_TISNUM); 1632 dasm_put(Dst, 10117, LJ_TISNUM);
1633 if (sse) { 1633 if (sse) {
1634 dasm_put(Dst, 10228); 1634 dasm_put(Dst, 10229);
1635 } else { 1635 } else {
1636 dasm_put(Dst, 10242); 1636 dasm_put(Dst, 10243);
1637 } 1637 }
1638 break; 1638 break;
1639 case 1: 1639 case 1:
1640 dasm_put(Dst, 10150, LJ_TISNUM); 1640 dasm_put(Dst, 10151, LJ_TISNUM);
1641 if (sse) { 1641 if (sse) {
1642 dasm_put(Dst, 10250); 1642 dasm_put(Dst, 10251);
1643 } else { 1643 } else {
1644 dasm_put(Dst, 10264); 1644 dasm_put(Dst, 10265);
1645 } 1645 }
1646 break; 1646 break;
1647 default: 1647 default:
1648 dasm_put(Dst, 10184, LJ_TISNUM, LJ_TISNUM); 1648 dasm_put(Dst, 10185, LJ_TISNUM, LJ_TISNUM);
1649 if (sse) { 1649 if (sse) {
1650 dasm_put(Dst, 10272); 1650 dasm_put(Dst, 10273);
1651 } else { 1651 } else {
1652 dasm_put(Dst, 10286); 1652 dasm_put(Dst, 10287);
1653 } 1653 }
1654 break; 1654 break;
1655 } 1655 }
1656 if (sse) { 1656 if (sse) {
1657 dasm_put(Dst, 9991); 1657 dasm_put(Dst, 9992);
1658 } else { 1658 } else {
1659 dasm_put(Dst, 10003); 1659 dasm_put(Dst, 10004);
1660 } 1660 }
1661 dasm_put(Dst, 9572); 1661 dasm_put(Dst, 9573);
1662 break; 1662 break;
1663 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1663 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1664 dasm_put(Dst, 10108); 1664 dasm_put(Dst, 10109);
1665 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1665 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1666 switch (vk) { 1666 switch (vk) {
1667 case 0: 1667 case 0:
1668 dasm_put(Dst, 10116, LJ_TISNUM); 1668 dasm_put(Dst, 10117, LJ_TISNUM);
1669 if (sse) { 1669 if (sse) {
1670 dasm_put(Dst, 10294); 1670 dasm_put(Dst, 10295);
1671 } else { 1671 } else {
1672 dasm_put(Dst, 10308); 1672 dasm_put(Dst, 10309);
1673 } 1673 }
1674 break; 1674 break;
1675 case 1: 1675 case 1:
1676 dasm_put(Dst, 10150, LJ_TISNUM); 1676 dasm_put(Dst, 10151, LJ_TISNUM);
1677 if (sse) { 1677 if (sse) {
1678 dasm_put(Dst, 10316); 1678 dasm_put(Dst, 10317);
1679 } else { 1679 } else {
1680 dasm_put(Dst, 10330); 1680 dasm_put(Dst, 10331);
1681 } 1681 }
1682 break; 1682 break;
1683 default: 1683 default:
1684 dasm_put(Dst, 10184, LJ_TISNUM, LJ_TISNUM); 1684 dasm_put(Dst, 10185, LJ_TISNUM, LJ_TISNUM);
1685 if (sse) { 1685 if (sse) {
1686 dasm_put(Dst, 10338); 1686 dasm_put(Dst, 10339);
1687 } else { 1687 } else {
1688 dasm_put(Dst, 10352); 1688 dasm_put(Dst, 10353);
1689 } 1689 }
1690 break; 1690 break;
1691 } 1691 }
1692 if (sse) { 1692 if (sse) {
1693 dasm_put(Dst, 9991); 1693 dasm_put(Dst, 9992);
1694 } else { 1694 } else {
1695 dasm_put(Dst, 10003); 1695 dasm_put(Dst, 10004);
1696 } 1696 }
1697 dasm_put(Dst, 9572); 1697 dasm_put(Dst, 9573);
1698 break; 1698 break;
1699 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1699 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1700 dasm_put(Dst, 10108); 1700 dasm_put(Dst, 10109);
1701 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1701 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1702 switch (vk) { 1702 switch (vk) {
1703 case 0: 1703 case 0:
1704 dasm_put(Dst, 10116, LJ_TISNUM); 1704 dasm_put(Dst, 10117, LJ_TISNUM);
1705 if (sse) { 1705 if (sse) {
1706 dasm_put(Dst, 10360); 1706 dasm_put(Dst, 10361);
1707 } else { 1707 } else {
1708 dasm_put(Dst, 10374); 1708 dasm_put(Dst, 10375);
1709 } 1709 }
1710 break; 1710 break;
1711 case 1: 1711 case 1:
1712 dasm_put(Dst, 10150, LJ_TISNUM); 1712 dasm_put(Dst, 10151, LJ_TISNUM);
1713 if (sse) { 1713 if (sse) {
1714 dasm_put(Dst, 10382); 1714 dasm_put(Dst, 10383);
1715 } else { 1715 } else {
1716 dasm_put(Dst, 10396); 1716 dasm_put(Dst, 10397);
1717 } 1717 }
1718 break; 1718 break;
1719 default: 1719 default:
1720 dasm_put(Dst, 10184, LJ_TISNUM, LJ_TISNUM); 1720 dasm_put(Dst, 10185, LJ_TISNUM, LJ_TISNUM);
1721 if (sse) { 1721 if (sse) {
1722 dasm_put(Dst, 10404); 1722 dasm_put(Dst, 10405);
1723 } else { 1723 } else {
1724 dasm_put(Dst, 10418); 1724 dasm_put(Dst, 10419);
1725 } 1725 }
1726 break; 1726 break;
1727 } 1727 }
1728 if (sse) { 1728 if (sse) {
1729 dasm_put(Dst, 9991); 1729 dasm_put(Dst, 9992);
1730 } else { 1730 } else {
1731 dasm_put(Dst, 10003); 1731 dasm_put(Dst, 10004);
1732 } 1732 }
1733 dasm_put(Dst, 9572); 1733 dasm_put(Dst, 9573);
1734 break; 1734 break;
1735 case BC_MODVN: 1735 case BC_MODVN:
1736 dasm_put(Dst, 10108); 1736 dasm_put(Dst, 10109);
1737 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1737 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1738 switch (vk) { 1738 switch (vk) {
1739 case 0: 1739 case 0:
1740 dasm_put(Dst, 10116, LJ_TISNUM); 1740 dasm_put(Dst, 10117, LJ_TISNUM);
1741 if (sse) { 1741 if (sse) {
1742 dasm_put(Dst, 10426); 1742 dasm_put(Dst, 10427);
1743 } else { 1743 } else {
1744 dasm_put(Dst, 10440); 1744 dasm_put(Dst, 10441);
1745 } 1745 }
1746 break; 1746 break;
1747 case 1: 1747 case 1:
1748 dasm_put(Dst, 10150, LJ_TISNUM); 1748 dasm_put(Dst, 10151, LJ_TISNUM);
1749 if (sse) { 1749 if (sse) {
1750 dasm_put(Dst, 10448); 1750 dasm_put(Dst, 10449);
1751 } else { 1751 } else {
1752 dasm_put(Dst, 10462); 1752 dasm_put(Dst, 10463);
1753 } 1753 }
1754 break; 1754 break;
1755 default: 1755 default:
1756 dasm_put(Dst, 10184, LJ_TISNUM, LJ_TISNUM); 1756 dasm_put(Dst, 10185, LJ_TISNUM, LJ_TISNUM);
1757 if (sse) { 1757 if (sse) {
1758 dasm_put(Dst, 10470); 1758 dasm_put(Dst, 10471);
1759 } else { 1759 } else {
1760 dasm_put(Dst, 10484); 1760 dasm_put(Dst, 10485);
1761 } 1761 }
1762 break; 1762 break;
1763 } 1763 }
1764 dasm_put(Dst, 10492); 1764 dasm_put(Dst, 10493);
1765 if (sse) { 1765 if (sse) {
1766 dasm_put(Dst, 9991); 1766 dasm_put(Dst, 9992);
1767 } else { 1767 } else {
1768 dasm_put(Dst, 10003); 1768 dasm_put(Dst, 10004);
1769 } 1769 }
1770 dasm_put(Dst, 9572); 1770 dasm_put(Dst, 9573);
1771 break; 1771 break;
1772 case BC_MODNV: case BC_MODVV: 1772 case BC_MODNV: case BC_MODVV:
1773 dasm_put(Dst, 10108); 1773 dasm_put(Dst, 10109);
1774 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1774 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1775 switch (vk) { 1775 switch (vk) {
1776 case 0: 1776 case 0:
1777 dasm_put(Dst, 10116, LJ_TISNUM); 1777 dasm_put(Dst, 10117, LJ_TISNUM);
1778 if (sse) { 1778 if (sse) {
1779 dasm_put(Dst, 10426); 1779 dasm_put(Dst, 10427);
1780 } else { 1780 } else {
1781 dasm_put(Dst, 10440); 1781 dasm_put(Dst, 10441);
1782 } 1782 }
1783 break; 1783 break;
1784 case 1: 1784 case 1:
1785 dasm_put(Dst, 10150, LJ_TISNUM); 1785 dasm_put(Dst, 10151, LJ_TISNUM);
1786 if (sse) { 1786 if (sse) {
1787 dasm_put(Dst, 10448); 1787 dasm_put(Dst, 10449);
1788 } else { 1788 } else {
1789 dasm_put(Dst, 10462); 1789 dasm_put(Dst, 10463);
1790 } 1790 }
1791 break; 1791 break;
1792 default: 1792 default:
1793 dasm_put(Dst, 10184, LJ_TISNUM, LJ_TISNUM); 1793 dasm_put(Dst, 10185, LJ_TISNUM, LJ_TISNUM);
1794 if (sse) { 1794 if (sse) {
1795 dasm_put(Dst, 10470); 1795 dasm_put(Dst, 10471);
1796 } else { 1796 } else {
1797 dasm_put(Dst, 10484); 1797 dasm_put(Dst, 10485);
1798 } 1798 }
1799 break; 1799 break;
1800 } 1800 }
1801 dasm_put(Dst, 10498); 1801 dasm_put(Dst, 10499);
1802 break; 1802 break;
1803 case BC_POW: 1803 case BC_POW:
1804 dasm_put(Dst, 10108); 1804 dasm_put(Dst, 10109);
1805 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1805 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1806 switch (vk) { 1806 switch (vk) {
1807 case 0: 1807 case 0:
1808 dasm_put(Dst, 10116, LJ_TISNUM); 1808 dasm_put(Dst, 10117, LJ_TISNUM);
1809 if (sse) { 1809 if (sse) {
1810 dasm_put(Dst, 10426); 1810 dasm_put(Dst, 10427);
1811 } else { 1811 } else {
1812 dasm_put(Dst, 10440); 1812 dasm_put(Dst, 10441);
1813 } 1813 }
1814 break; 1814 break;
1815 case 1: 1815 case 1:
1816 dasm_put(Dst, 10150, LJ_TISNUM); 1816 dasm_put(Dst, 10151, LJ_TISNUM);
1817 if (sse) { 1817 if (sse) {
1818 dasm_put(Dst, 10448); 1818 dasm_put(Dst, 10449);
1819 } else { 1819 } else {
1820 dasm_put(Dst, 10462); 1820 dasm_put(Dst, 10463);
1821 } 1821 }
1822 break; 1822 break;
1823 default: 1823 default:
1824 dasm_put(Dst, 10184, LJ_TISNUM, LJ_TISNUM); 1824 dasm_put(Dst, 10185, LJ_TISNUM, LJ_TISNUM);
1825 if (sse) { 1825 if (sse) {
1826 dasm_put(Dst, 10470); 1826 dasm_put(Dst, 10471);
1827 } else { 1827 } else {
1828 dasm_put(Dst, 10484); 1828 dasm_put(Dst, 10485);
1829 } 1829 }
1830 break; 1830 break;
1831 } 1831 }
1832 dasm_put(Dst, 10503); 1832 dasm_put(Dst, 10504);
1833 if (sse) { 1833 if (sse) {
1834 dasm_put(Dst, 9991); 1834 dasm_put(Dst, 9992);
1835 } else { 1835 } else {
1836 dasm_put(Dst, 10003); 1836 dasm_put(Dst, 10004);
1837 } 1837 }
1838 dasm_put(Dst, 9572); 1838 dasm_put(Dst, 9573);
1839 break; 1839 break;
1840 1840
1841 case BC_CAT: 1841 case BC_CAT:
1842 dasm_put(Dst, 10507, Dt1(->base), Dt1(->base)); 1842 dasm_put(Dst, 10508, Dt1(->base), Dt1(->base));
1843 break; 1843 break;
1844 1844
1845 /* -- Constant ops ------------------------------------------------------ */ 1845 /* -- Constant ops ------------------------------------------------------ */
1846 1846
1847 case BC_KSTR: 1847 case BC_KSTR:
1848 dasm_put(Dst, 10597, LJ_TSTR); 1848 dasm_put(Dst, 10598, LJ_TSTR);
1849 break; 1849 break;
1850 case BC_KSHORT: 1850 case BC_KSHORT:
1851 if (sse) { 1851 if (sse) {
1852 dasm_put(Dst, 10632); 1852 dasm_put(Dst, 10633);
1853 } else { 1853 } else {
1854 dasm_put(Dst, 10647); 1854 dasm_put(Dst, 10648);
1855 } 1855 }
1856 dasm_put(Dst, 9572); 1856 dasm_put(Dst, 9573);
1857 break; 1857 break;
1858 case BC_KNUM: 1858 case BC_KNUM:
1859 if (sse) { 1859 if (sse) {
1860 dasm_put(Dst, 10655); 1860 dasm_put(Dst, 10656);
1861 } else { 1861 } else {
1862 dasm_put(Dst, 10668); 1862 dasm_put(Dst, 10669);
1863 } 1863 }
1864 dasm_put(Dst, 9572); 1864 dasm_put(Dst, 9573);
1865 break; 1865 break;
1866 case BC_KPRI: 1866 case BC_KPRI:
1867 dasm_put(Dst, 10675); 1867 dasm_put(Dst, 10676);
1868 break; 1868 break;
1869 case BC_KNIL: 1869 case BC_KNIL:
1870 dasm_put(Dst, 10703, LJ_TNIL); 1870 dasm_put(Dst, 10704, LJ_TNIL);
1871 break; 1871 break;
1872 1872
1873 /* -- Upvalue and function ops ------------------------------------------ */ 1873 /* -- Upvalue and function ops ------------------------------------------ */
1874 1874
1875 case BC_UGET: 1875 case BC_UGET:
1876 dasm_put(Dst, 10750, offsetof(GCfuncL, uvptr), DtA(->v)); 1876 dasm_put(Dst, 10751, offsetof(GCfuncL, uvptr), DtA(->v));
1877 break; 1877 break;
1878 case BC_USETV: 1878 case BC_USETV:
1879#define TV2MARKOFS \ 1879#define TV2MARKOFS \
1880 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 1880 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
1881 dasm_put(Dst, 10795, 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); 1881 dasm_put(Dst, 10796, 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);
1882 dasm_put(Dst, 10886); 1882 dasm_put(Dst, 10887);
1883 break; 1883 break;
1884#undef TV2MARKOFS 1884#undef TV2MARKOFS
1885 case BC_USETS: 1885 case BC_USETS:
1886 dasm_put(Dst, 10898, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 1886 dasm_put(Dst, 10899, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
1887 break; 1887 break;
1888 case BC_USETN: 1888 case BC_USETN:
1889 dasm_put(Dst, 10991); 1889 dasm_put(Dst, 10992);
1890 if (sse) { 1890 if (sse) {
1891 dasm_put(Dst, 10996); 1891 dasm_put(Dst, 10997);
1892 } else { 1892 } else {
1893 dasm_put(Dst, 9811); 1893 dasm_put(Dst, 9812);
1894 } 1894 }
1895 dasm_put(Dst, 11003, offsetof(GCfuncL, uvptr), DtA(->v)); 1895 dasm_put(Dst, 11004, offsetof(GCfuncL, uvptr), DtA(->v));
1896 if (sse) { 1896 if (sse) {
1897 dasm_put(Dst, 11012); 1897 dasm_put(Dst, 11013);
1898 } else { 1898 } else {
1899 dasm_put(Dst, 11018); 1899 dasm_put(Dst, 11019);
1900 } 1900 }
1901 dasm_put(Dst, 9572); 1901 dasm_put(Dst, 9573);
1902 break; 1902 break;
1903 case BC_USETP: 1903 case BC_USETP:
1904 dasm_put(Dst, 11021, offsetof(GCfuncL, uvptr), DtA(->v)); 1904 dasm_put(Dst, 11022, offsetof(GCfuncL, uvptr), DtA(->v));
1905 break; 1905 break;
1906 case BC_UCLO: 1906 case BC_UCLO:
1907 dasm_put(Dst, 11060, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 1907 dasm_put(Dst, 11061, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
1908 break; 1908 break;
1909 1909
1910 case BC_FNEW: 1910 case BC_FNEW:
1911 dasm_put(Dst, 11115, Dt1(->base), Dt1(->base), LJ_TFUNC); 1911 dasm_put(Dst, 11116, Dt1(->base), Dt1(->base), LJ_TFUNC);
1912 break; 1912 break;
1913 1913
1914 /* -- Table ops --------------------------------------------------------- */ 1914 /* -- Table ops --------------------------------------------------------- */
1915 1915
1916 case BC_TNEW: 1916 case BC_TNEW:
1917 dasm_put(Dst, 11181, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); 1917 dasm_put(Dst, 11182, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB);
1918 break; 1918 break;
1919 case BC_TDUP: 1919 case BC_TDUP:
1920 dasm_put(Dst, 11303, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 1920 dasm_put(Dst, 11304, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
1921 break; 1921 break;
1922 1922
1923 case BC_GGET: 1923 case BC_GGET:
1924 dasm_put(Dst, 11398, Dt7(->env)); 1924 dasm_put(Dst, 11399, Dt7(->env));
1925 break; 1925 break;
1926 case BC_GSET: 1926 case BC_GSET:
1927 dasm_put(Dst, 11417, Dt7(->env)); 1927 dasm_put(Dst, 11418, Dt7(->env));
1928 break; 1928 break;
1929 1929
1930 case BC_TGETV: 1930 case BC_TGETV:
1931 dasm_put(Dst, 11436, LJ_TTAB, LJ_TISNUM); 1931 dasm_put(Dst, 11437, LJ_TTAB, LJ_TISNUM);
1932 if (sse) { 1932 if (sse) {
1933 dasm_put(Dst, 11469); 1933 dasm_put(Dst, 11470);
1934 } else { 1934 } else {
1935 } 1935 }
1936 dasm_put(Dst, 11490, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1936 dasm_put(Dst, 11491, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1937 dasm_put(Dst, 11583, LJ_TSTR); 1937 dasm_put(Dst, 11584, LJ_TSTR);
1938 break; 1938 break;
1939 case BC_TGETS: 1939 case BC_TGETS:
1940 dasm_put(Dst, 11601, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1940 dasm_put(Dst, 11602, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1941 dasm_put(Dst, 11686, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1941 dasm_put(Dst, 11687, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1942 break; 1942 break;
1943 case BC_TGETB: 1943 case BC_TGETB:
1944 dasm_put(Dst, 11758, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1944 dasm_put(Dst, 11759, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1945 dasm_put(Dst, 10098); 1945 dasm_put(Dst, 10099);
1946 break; 1946 break;
1947 1947
1948 case BC_TSETV: 1948 case BC_TSETV:
1949 dasm_put(Dst, 11858, LJ_TTAB, LJ_TISNUM); 1949 dasm_put(Dst, 11859, LJ_TTAB, LJ_TISNUM);
1950 if (sse) { 1950 if (sse) {
1951 dasm_put(Dst, 11469); 1951 dasm_put(Dst, 11470);
1952 } else { 1952 } else {
1953 } 1953 }
1954 dasm_put(Dst, 11891, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 1954 dasm_put(Dst, 11892, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
1955 dasm_put(Dst, 11975, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1955 dasm_put(Dst, 11976, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1956 break; 1956 break;
1957 case BC_TSETS: 1957 case BC_TSETS:
1958 dasm_put(Dst, 12037, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1958 dasm_put(Dst, 12038, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1959 dasm_put(Dst, 12113, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 1959 dasm_put(Dst, 12114, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
1960 dasm_put(Dst, 12206, 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)); 1960 dasm_put(Dst, 12207, 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));
1961 break; 1961 break;
1962 case BC_TSETB: 1962 case BC_TSETB:
1963 dasm_put(Dst, 12297, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 1963 dasm_put(Dst, 12298, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
1964 dasm_put(Dst, 12396, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1964 dasm_put(Dst, 12397, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1965 break; 1965 break;
1966 1966
1967 case BC_TSETM: 1967 case BC_TSETM:
1968 dasm_put(Dst, 12442); 1968 dasm_put(Dst, 12443);
1969 if (sse) { 1969 if (sse) {
1970 dasm_put(Dst, 12447); 1970 dasm_put(Dst, 12448);
1971 } else { 1971 } else {
1972 } 1972 }
1973 dasm_put(Dst, 12454, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); 1973 dasm_put(Dst, 12455, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
1974 dasm_put(Dst, 12594, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1974 dasm_put(Dst, 12595, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1975 break; 1975 break;
1976 1976
1977 /* -- Calls and vararg handling ----------------------------------------- */ 1977 /* -- Calls and vararg handling ----------------------------------------- */
1978 1978
1979 case BC_CALL: case BC_CALLM: 1979 case BC_CALL: case BC_CALLM:
1980 dasm_put(Dst, 10112); 1980 dasm_put(Dst, 10113);
1981 if (op == BC_CALLM) { 1981 if (op == BC_CALLM) {
1982 dasm_put(Dst, 12612); 1982 dasm_put(Dst, 12613);
1983 } 1983 }
1984 dasm_put(Dst, 12617, LJ_TFUNC, Dt7(->pc)); 1984 dasm_put(Dst, 12618, LJ_TFUNC, Dt7(->pc));
1985 break; 1985 break;
1986 1986
1987 case BC_CALLMT: 1987 case BC_CALLMT:
1988 dasm_put(Dst, 12612); 1988 dasm_put(Dst, 12613);
1989 break; 1989 break;
1990 case BC_CALLT: 1990 case BC_CALLT:
1991 dasm_put(Dst, 12659, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 1991 dasm_put(Dst, 12660, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
1992 dasm_put(Dst, 12778, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 1992 dasm_put(Dst, 12779, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
1993 break; 1993 break;
1994 1994
1995 case BC_ITERC: 1995 case BC_ITERC:
1996 dasm_put(Dst, 12849, LJ_TFUNC, 2+1, Dt7(->pc)); 1996 dasm_put(Dst, 12850, LJ_TFUNC, 2+1, Dt7(->pc));
1997 break; 1997 break;
1998 1998
1999 case BC_VARG: 1999 case BC_VARG:
2000 dasm_put(Dst, 12930, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); 2000 dasm_put(Dst, 12931, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
2001 dasm_put(Dst, 13075, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2001 dasm_put(Dst, 13076, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2002 break; 2002 break;
2003 2003
2004 /* -- Returns ----------------------------------------------------------- */ 2004 /* -- Returns ----------------------------------------------------------- */
2005 2005
2006 case BC_RETM: 2006 case BC_RETM:
2007 dasm_put(Dst, 12612); 2007 dasm_put(Dst, 12613);
2008 break; 2008 break;
2009 2009
2010 case BC_RET: case BC_RET0: case BC_RET1: 2010 case BC_RET: case BC_RET0: case BC_RET1:
2011 if (op != BC_RET0) { 2011 if (op != BC_RET0) {
2012 dasm_put(Dst, 13174); 2012 dasm_put(Dst, 13175);
2013 } 2013 }
2014 dasm_put(Dst, 13178, FRAME_TYPE); 2014 dasm_put(Dst, 13179, FRAME_TYPE);
2015 switch (op) { 2015 switch (op) {
2016 case BC_RET: 2016 case BC_RET:
2017 dasm_put(Dst, 13197); 2017 dasm_put(Dst, 13198);
2018 break; 2018 break;
2019 case BC_RET1: 2019 case BC_RET1:
2020 dasm_put(Dst, 13255); 2020 dasm_put(Dst, 13256);
2021 /* fallthrough */ 2021 /* fallthrough */
2022 case BC_RET0: 2022 case BC_RET0:
2023 dasm_put(Dst, 13271); 2023 dasm_put(Dst, 13272);
2024 default: 2024 default:
2025 break; 2025 break;
2026 } 2026 }
2027 dasm_put(Dst, 13282, Dt7(->pc), PC2PROTO(k)); 2027 dasm_put(Dst, 13283, Dt7(->pc), PC2PROTO(k));
2028 if (op == BC_RET) { 2028 if (op == BC_RET) {
2029 dasm_put(Dst, 13326, LJ_TNIL); 2029 dasm_put(Dst, 13327, LJ_TNIL);
2030 } else { 2030 } else {
2031 dasm_put(Dst, 13335, LJ_TNIL); 2031 dasm_put(Dst, 13336, LJ_TNIL);
2032 } 2032 }
2033 dasm_put(Dst, 13342, -FRAME_VARG, FRAME_TYPEP); 2033 dasm_put(Dst, 13343, -FRAME_VARG, FRAME_TYPEP);
2034 if (op != BC_RET0) { 2034 if (op != BC_RET0) {
2035 dasm_put(Dst, 13366); 2035 dasm_put(Dst, 13367);
2036 } 2036 }
2037 dasm_put(Dst, 4573); 2037 dasm_put(Dst, 4573);
2038 break; 2038 break;
@@ -2042,7 +2042,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2042 2042
2043 case BC_FORL: 2043 case BC_FORL:
2044#if LJ_HASJIT 2044#if LJ_HASJIT
2045 dasm_put(Dst, 13370, HOTCOUNT_PCMASK, GG_DISP2HOT); 2045 dasm_put(Dst, 13371, HOTCOUNT_PCMASK, GG_DISP2HOT);
2046#endif 2046#endif
2047 break; 2047 break;
2048 2048
@@ -2054,57 +2054,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2054 case BC_FORI: 2054 case BC_FORI:
2055 case BC_IFORL: 2055 case BC_IFORL:
2056 vk = (op == BC_IFORL || op == BC_JFORL); 2056 vk = (op == BC_IFORL || op == BC_JFORL);
2057 dasm_put(Dst, 13391); 2057 dasm_put(Dst, 13392);
2058 if (!vk) { 2058 if (!vk) {
2059 dasm_put(Dst, 13395, LJ_TISNUM, LJ_TISNUM); 2059 dasm_put(Dst, 13396, LJ_TISNUM, LJ_TISNUM);
2060 } 2060 }
2061 dasm_put(Dst, 13414); 2061 dasm_put(Dst, 13415);
2062 if (!vk) { 2062 if (!vk) {
2063 dasm_put(Dst, 13418, LJ_TISNUM); 2063 dasm_put(Dst, 13419, LJ_TISNUM);
2064 } 2064 }
2065 if (sse) { 2065 if (sse) {
2066 dasm_put(Dst, 13427); 2066 dasm_put(Dst, 13428);
2067 if (vk) { 2067 if (vk) {
2068 dasm_put(Dst, 13439); 2068 dasm_put(Dst, 13440);
2069 } else { 2069 } else {
2070 dasm_put(Dst, 13458); 2070 dasm_put(Dst, 13459);
2071 } 2071 }
2072 dasm_put(Dst, 13463); 2072 dasm_put(Dst, 13464);
2073 } else { 2073 } else {
2074 dasm_put(Dst, 13476); 2074 dasm_put(Dst, 13477);
2075 if (vk) { 2075 if (vk) {
2076 dasm_put(Dst, 13482); 2076 dasm_put(Dst, 13483);
2077 } else { 2077 } else {
2078 dasm_put(Dst, 13498); 2078 dasm_put(Dst, 13499);
2079 } 2079 }
2080 dasm_put(Dst, 13506); 2080 dasm_put(Dst, 13507);
2081 if (cmov) { 2081 if (cmov) {
2082 dasm_put(Dst, 9535); 2082 dasm_put(Dst, 9536);
2083 } else { 2083 } else {
2084 dasm_put(Dst, 9541); 2084 dasm_put(Dst, 9542);
2085 } 2085 }
2086 if (!cmov) { 2086 if (!cmov) {
2087 dasm_put(Dst, 13511); 2087 dasm_put(Dst, 13512);
2088 } 2088 }
2089 } 2089 }
2090 if (op == BC_FORI) { 2090 if (op == BC_FORI) {
2091 dasm_put(Dst, 13517, -BCBIAS_J*4); 2091 dasm_put(Dst, 13518, -BCBIAS_J*4);
2092 } else if (op == BC_JFORI) { 2092 } else if (op == BC_JFORI) {
2093 dasm_put(Dst, 13527, -BCBIAS_J*4, BC_JLOOP); 2093 dasm_put(Dst, 13528, -BCBIAS_J*4, BC_JLOOP);
2094 } else if (op == BC_IFORL) { 2094 } else if (op == BC_IFORL) {
2095 dasm_put(Dst, 13541, -BCBIAS_J*4); 2095 dasm_put(Dst, 13542, -BCBIAS_J*4);
2096 } else { 2096 } else {
2097 dasm_put(Dst, 13537, BC_JLOOP); 2097 dasm_put(Dst, 13538, BC_JLOOP);
2098 } 2098 }
2099 dasm_put(Dst, 9570); 2099 dasm_put(Dst, 9571);
2100 if (sse) { 2100 if (sse) {
2101 dasm_put(Dst, 13551); 2101 dasm_put(Dst, 13552);
2102 } 2102 }
2103 break; 2103 break;
2104 2104
2105 case BC_ITERL: 2105 case BC_ITERL:
2106#if LJ_HASJIT 2106#if LJ_HASJIT
2107 dasm_put(Dst, 13370, HOTCOUNT_PCMASK, GG_DISP2HOT); 2107 dasm_put(Dst, 13371, HOTCOUNT_PCMASK, GG_DISP2HOT);
2108#endif 2108#endif
2109 break; 2109 break;
2110 2110
@@ -2113,33 +2113,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2113 break; 2113 break;
2114#endif 2114#endif
2115 case BC_IITERL: 2115 case BC_IITERL:
2116 dasm_put(Dst, 13562, LJ_TNIL); 2116 dasm_put(Dst, 13563, LJ_TNIL);
2117 if (op == BC_JITERL) { 2117 if (op == BC_JITERL) {
2118 dasm_put(Dst, 13577, BC_JLOOP); 2118 dasm_put(Dst, 13578, BC_JLOOP);
2119 } else { 2119 } else {
2120 dasm_put(Dst, 13591, -BCBIAS_J*4); 2120 dasm_put(Dst, 13592, -BCBIAS_J*4);
2121 } 2121 }
2122 dasm_put(Dst, 9870); 2122 dasm_put(Dst, 9871);
2123 break; 2123 break;
2124 2124
2125 case BC_LOOP: 2125 case BC_LOOP:
2126#if LJ_HASJIT 2126#if LJ_HASJIT
2127 dasm_put(Dst, 13370, HOTCOUNT_PCMASK, GG_DISP2HOT); 2127 dasm_put(Dst, 13371, HOTCOUNT_PCMASK, GG_DISP2HOT);
2128#endif 2128#endif
2129 break; 2129 break;
2130 2130
2131 case BC_ILOOP: 2131 case BC_ILOOP:
2132 dasm_put(Dst, 9572); 2132 dasm_put(Dst, 9573);
2133 break; 2133 break;
2134 2134
2135 case BC_JLOOP: 2135 case BC_JLOOP:
2136#if LJ_HASJIT 2136#if LJ_HASJIT
2137 dasm_put(Dst, 13607, 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); 2137 dasm_put(Dst, 13608, 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);
2138#endif 2138#endif
2139 break; 2139 break;
2140 2140
2141 case BC_JMP: 2141 case BC_JMP:
2142 dasm_put(Dst, 13716, -BCBIAS_J*4); 2142 dasm_put(Dst, 13717, -BCBIAS_J*4);
2143 break; 2143 break;
2144 2144
2145 /* -- Function headers -------------------------------------------------- */ 2145 /* -- Function headers -------------------------------------------------- */
@@ -2153,7 +2153,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2153 2153
2154 case BC_FUNCF: 2154 case BC_FUNCF:
2155#if LJ_HASJIT 2155#if LJ_HASJIT
2156 dasm_put(Dst, 13741, HOTCOUNT_PCMASK, GG_DISP2HOT); 2156 dasm_put(Dst, 13742, HOTCOUNT_PCMASK, GG_DISP2HOT);
2157#endif 2157#endif
2158 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2158 case BC_FUNCV: /* NYI: compiled vararg functions. */
2159 break; 2159 break;
@@ -2163,47 +2163,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2163 break; 2163 break;
2164#endif 2164#endif
2165 case BC_IFUNCF: 2165 case BC_IFUNCF:
2166 dasm_put(Dst, 13762, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2166 dasm_put(Dst, 13763, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2167 if (op == BC_JFUNCF) { 2167 if (op == BC_JFUNCF) {
2168 dasm_put(Dst, 13792, BC_JLOOP); 2168 dasm_put(Dst, 13793, BC_JLOOP);
2169 } else { 2169 } else {
2170 dasm_put(Dst, 9572); 2170 dasm_put(Dst, 9573);
2171 } 2171 }
2172 dasm_put(Dst, 13801, LJ_TNIL); 2172 dasm_put(Dst, 13802, LJ_TNIL);
2173 break; 2173 break;
2174 2174
2175 case BC_JFUNCV: 2175 case BC_JFUNCV:
2176#if !LJ_HASJIT 2176#if !LJ_HASJIT
2177 break; 2177 break;
2178#endif 2178#endif
2179 dasm_put(Dst, 9047); 2179 dasm_put(Dst, 9048);
2180 break; /* NYI: compiled vararg functions. */ 2180 break; /* NYI: compiled vararg functions. */
2181 2181
2182 case BC_IFUNCV: 2182 case BC_IFUNCV:
2183 dasm_put(Dst, 13823, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2183 dasm_put(Dst, 13824, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2184 if (op == BC_JFUNCV) { 2184 if (op == BC_JFUNCV) {
2185 dasm_put(Dst, 13792, BC_JLOOP); 2185 dasm_put(Dst, 13793, BC_JLOOP);
2186 } else { 2186 } else {
2187 dasm_put(Dst, 13914, -4+PC2PROTO(k)); 2187 dasm_put(Dst, 13915, -4+PC2PROTO(k));
2188 } 2188 }
2189 dasm_put(Dst, 13937, LJ_TNIL); 2189 dasm_put(Dst, 13938, LJ_TNIL);
2190 break; 2190 break;
2191 2191
2192 case BC_FUNCC: 2192 case BC_FUNCC:
2193 case BC_FUNCCW: 2193 case BC_FUNCCW:
2194 dasm_put(Dst, 13959, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2194 dasm_put(Dst, 13960, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2195 if (op == BC_FUNCC) { 2195 if (op == BC_FUNCC) {
2196 dasm_put(Dst, 13989); 2196 dasm_put(Dst, 13990);
2197 } else { 2197 } else {
2198 dasm_put(Dst, 13993); 2198 dasm_put(Dst, 13994);
2199 } 2199 }
2200 dasm_put(Dst, 14001, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2200 dasm_put(Dst, 14002, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2201 if (op == BC_FUNCC) { 2201 if (op == BC_FUNCC) {
2202 dasm_put(Dst, 14010); 2202 dasm_put(Dst, 14011);
2203 } else { 2203 } else {
2204 dasm_put(Dst, 14014, DISPATCH_GL(wrapf)); 2204 dasm_put(Dst, 14015, DISPATCH_GL(wrapf));
2205 } 2205 }
2206 dasm_put(Dst, 14019, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2206 dasm_put(Dst, 14020, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2207 break; 2207 break;
2208 2208
2209 /* ---------------------------------------------------------------------- */ 2209 /* ---------------------------------------------------------------------- */
@@ -2231,7 +2231,7 @@ static int build_backend(BuildCtx *ctx)
2231 2231
2232 build_subroutines(ctx, cmov, sse); 2232 build_subroutines(ctx, cmov, sse);
2233 2233
2234 dasm_put(Dst, 14044); 2234 dasm_put(Dst, 14045);
2235 for (op = 0; op < BC__MAX; op++) 2235 for (op = 0; op < BC__MAX; op++)
2236 build_ins(ctx, (BCOp)op, op, cmov, sse); 2236 build_ins(ctx, (BCOp)op, op, cmov, sse);
2237 2237