summaryrefslogtreecommitdiff
path: root/src/buildvm_x64.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x64.h')
-rw-r--r--src/buildvm_x64.h644
1 files changed, 325 insertions, 319 deletions
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h
index a80a39b8..16bcc65b 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
15static const unsigned char build_actionlist[14436] = { 15static const unsigned char build_actionlist[14438] = {
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,
@@ -470,58 +470,58 @@ static const unsigned char build_actionlist[14436] = {
470 248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133, 470 248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133,
471 244,248,217,201,248,2,221,216,195,255,248,155,137,252,248,83,15,162,137,6, 471 244,248,217,201,248,2,221,216,195,255,248,155,137,252,248,83,15,162,137,6,
472 137,94,4,137,78,8,137,86,12,91,195,248,156,255,85,72,137,229,83,72,137,252, 472 137,94,4,137,78,8,137,86,12,91,195,248,156,255,85,72,137,229,83,72,137,252,
473 251,139,131,233,72,41,196,15,182,139,233,131,252,233,1,15,136,244,248,248, 473 251,139,131,233,72,41,196,255,15,182,139,233,131,252,233,1,15,136,244,248,
474 1,72,139,132,253,203,233,72,137,132,253,204,233,131,252,233,1,15,137,244, 474 248,1,72,139,132,253,203,233,72,137,132,253,204,233,131,252,233,1,15,137,
475 1,248,2,15,182,131,233,72,139,187,233,72,139,179,233,72,139,147,233,72,139, 475 244,1,248,2,15,182,131,233,72,139,187,233,72,139,179,233,72,139,147,233,72,
476 139,233,76,139,131,233,76,139,139,233,133,192,15,132,244,251,15,40,131,233, 476 139,139,233,76,139,131,233,76,139,139,233,133,192,15,132,244,251,15,40,131,
477 255,15,40,139,233,15,40,147,233,15,40,155,233,131,252,248,4,15,134,244,251, 477 233,15,40,139,233,255,15,40,147,233,15,40,155,233,131,252,248,4,15,134,244,
478 15,40,163,233,15,40,171,233,15,40,179,233,15,40,187,233,248,5,252,255,147, 478 251,15,40,163,233,15,40,171,233,15,40,179,233,15,40,187,233,248,5,252,255,
479 233,72,137,131,233,15,41,131,233,72,137,147,233,15,41,139,233,72,139,93,252, 479 147,233,72,137,131,233,15,41,131,233,72,137,147,233,15,41,139,233,255,72,
480 248,201,195,255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,4,239, 480 139,93,252,248,201,195,255,129,124,253,202,4,239,15,135,244,41,129,124,253,
481 15,135,244,41,255,252,242,15,16,4,194,131,195,4,102,15,46,4,202,255,221,4, 481 194,4,239,15,135,244,41,255,252,242,15,16,4,194,131,195,4,102,15,46,4,202,
482 202,221,4,194,131,195,4,255,223,252,233,221,216,255,218,252,233,223,224,158, 482 255,221,4,202,221,4,194,131,195,4,255,223,252,233,221,216,255,218,252,233,
483 255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,67,252,254,141,156, 483 223,224,158,255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,67,252,
484 253,131,233,248,2,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 484 254,141,156,253,131,233,248,2,139,3,15,182,204,15,182,232,131,195,4,193,232,
485 255,36,252,238,255,139,108,194,4,131,195,4,129,252,253,239,15,135,244,251, 485 16,65,252,255,36,252,238,255,139,108,194,4,131,195,4,129,252,253,239,15,135,
486 129,124,253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,4, 486 244,251,129,124,253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,
487 202,255,221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,15,138, 487 15,46,4,202,255,221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,
488 244,248,15,132,244,247,255,248,1,15,183,67,252,254,141,156,253,131,233,248, 488 15,138,244,248,15,132,244,247,255,248,1,15,183,67,252,254,141,156,253,131,
489 2,255,248,2,15,183,67,252,254,141,156,253,131,233,248,1,255,248,5,57,108, 489 233,248,2,255,248,2,15,183,67,252,254,141,156,253,131,233,248,1,255,248,5,
490 202,4,15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193, 490 57,108,202,4,15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,
491 15,132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,15,132, 491 57,193,15,132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,
492 244,2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255, 492 15,132,244,2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,
493 252,233,244,45,255,72,252,247,208,131,195,4,129,124,253,202,4,239,15,133, 493 0,0,255,252,233,244,45,255,72,252,247,208,131,195,4,129,124,253,202,4,239,
494 244,248,139,12,202,65,59,12,135,255,131,195,4,129,124,253,202,4,239,15,135, 494 15,133,244,248,139,12,202,65,59,12,135,255,131,195,4,129,124,253,202,4,239,
495 244,248,255,252,242,65,15,16,4,199,102,15,46,4,202,255,221,4,202,65,221,4, 495 15,135,244,248,255,252,242,65,15,16,4,199,102,15,46,4,202,255,221,4,202,65,
496 199,255,72,252,247,208,131,195,4,57,68,202,4,255,139,108,194,4,131,195,4, 496 221,4,199,255,72,252,247,208,131,195,4,57,68,202,4,255,139,108,194,4,131,
497 129,252,253,239,255,15,131,244,247,255,15,130,244,247,255,137,108,202,4,139, 497 195,4,129,252,253,239,255,15,131,244,247,255,15,130,244,247,255,137,108,202,
498 44,194,137,44,202,255,15,183,67,252,254,141,156,253,131,233,248,1,139,3,15, 498 4,139,44,194,137,44,202,255,15,183,67,252,254,141,156,253,131,233,248,1,139,
499 182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,139, 499 3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,
500 44,194,72,137,44,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, 500 139,44,194,72,137,44,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,
501 252,255,36,252,238,255,49,252,237,129,124,253,194,4,239,129,213,239,137,108, 501 65,252,255,36,252,238,255,49,252,237,129,124,253,194,4,239,129,213,239,137,
502 202,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 502 108,202,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,
503 238,255,129,124,253,194,4,239,15,135,244,48,255,252,242,15,16,4,194,72,184, 503 252,238,255,129,124,253,194,4,239,15,135,244,48,255,252,242,15,16,4,194,72,
504 237,237,102,72,15,110,200,15,87,193,252,242,15,17,4,202,255,221,4,194,217, 504 184,237,237,102,72,15,110,200,15,87,193,252,242,15,17,4,202,255,221,4,194,
505 224,221,28,202,255,129,124,253,194,4,239,15,133,244,248,139,4,194,255,15, 505 217,224,221,28,202,255,129,124,253,194,4,239,15,133,244,248,139,4,194,255,
506 87,192,252,242,15,42,128,233,248,1,252,242,15,17,4,202,255,219,128,233,248, 506 15,87,192,252,242,15,42,128,233,248,1,252,242,15,17,4,202,255,219,128,233,
507 1,221,28,202,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 507 248,1,221,28,202,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,
508 255,36,252,238,248,2,129,124,253,194,4,239,15,133,244,50,139,60,194,137,213, 508 252,255,36,252,238,248,2,129,124,253,194,4,239,15,133,244,50,139,60,194,137,
509 232,251,1,18,255,252,242,15,42,192,137,252,234,255,15,182,75,252,253,252, 509 213,232,251,1,18,255,252,242,15,42,192,137,252,234,255,15,182,75,252,253,
510 233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252,234,4,239,15, 510 252,233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252,234,4,239,
511 135,244,46,255,252,242,15,16,4,252,234,252,242,65,15,88,4,199,255,221,4,252, 511 15,135,244,46,255,252,242,15,16,4,252,234,252,242,65,15,88,4,199,255,221,
512 234,65,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255,252,242, 512 4,252,234,65,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255,252,
513 65,15,16,4,199,252,242,15,88,4,252,234,255,65,221,4,199,220,4,252,234,255, 513 242,65,15,16,4,199,252,242,15,88,4,252,234,255,65,221,4,199,220,4,252,234,
514 129,124,253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15,135,244, 514 255,129,124,253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15,135,
515 49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252,234,220, 515 244,49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252,234,
516 4,194,255,252,242,15,16,4,252,234,252,242,65,15,92,4,199,255,221,4,252,234, 516 220,4,194,255,252,242,15,16,4,252,234,252,242,65,15,92,4,199,255,221,4,252,
517 65,220,36,199,255,252,242,65,15,16,4,199,252,242,15,92,4,252,234,255,65,221, 517 234,65,220,36,199,255,252,242,65,15,16,4,199,252,242,15,92,4,252,234,255,
518 4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,242,15,92,4,194,255, 518 65,221,4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,242,15,92,4,194,
519 221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,252,242,65,15,89,4,199, 519 255,221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,252,242,65,15,89,
520 255,221,4,252,234,65,220,12,199,255,252,242,65,15,16,4,199,252,242,15,89, 520 4,199,255,221,4,252,234,65,220,12,199,255,252,242,65,15,16,4,199,252,242,
521 4,252,234,255,65,221,4,199,220,12,252,234,255,252,242,15,16,4,252,234,252, 521 15,89,4,252,234,255,65,221,4,199,220,12,252,234,255,252,242,15,16,4,252,234,
522 242,15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,4,252,234, 522 252,242,15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,4,252,
523 252,242,65,15,94,4,199,255,221,4,252,234,65,220,52,199,255,252,242,65,15, 523 234,252,242,65,15,94,4,199,255,221,4,252,234,65,220,52,199,255,252,242,65,
524 16,4,199,252,242,15,94,4,252,234,255,65,221,4,199,220,52,252,234,255,252, 524 15,16,4,199,252,242,15,94,4,252,234,255,65,221,4,199,220,52,252,234,255,252,
525 242,15,16,4,252,234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255, 525 242,15,16,4,252,234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255,
526 252,242,15,16,4,252,234,252,242,65,15,16,12,199,255,221,4,252,234,65,221, 526 252,242,15,16,4,252,234,252,242,65,15,16,12,199,255,221,4,252,234,65,221,
527 4,199,255,252,242,65,15,16,4,199,252,242,15,16,12,252,234,255,65,221,4,199, 527 4,199,255,252,242,65,15,16,4,199,252,242,15,16,12,252,234,255,65,221,4,199,
@@ -1455,8 +1455,14 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1455 dasm_put(Dst, 9407); 1455 dasm_put(Dst, 9407);
1456#if LJ_HASFFI 1456#if LJ_HASFFI
1457#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) 1457#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V)
1458 dasm_put(Dst, 9431, DtE(->spadj), DtE(->nsp), offsetof(CCallState, stack), CCALL_SPS_EXTRA*8, DtE(->nfpr), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->gpr[4]), DtE(->gpr[5]), DtE(->fpr[0])); 1458 dasm_put(Dst, 9431, DtE(->spadj));
1459 dasm_put(Dst, 9521, DtE(->fpr[1]), DtE(->fpr[2]), DtE(->fpr[3]), DtE(->fpr[4]), DtE(->fpr[5]), DtE(->fpr[6]), DtE(->fpr[7]), DtE(->func), DtE(->gpr[0]), DtE(->fpr[0]), DtE(->gpr[1]), DtE(->fpr[1])); 1459#if LJ_TARGET_WINDOWS
1460#endif
1461 dasm_put(Dst, 9447, DtE(->nsp), offsetof(CCallState, stack), CCALL_SPS_EXTRA*8, DtE(->nfpr), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->gpr[4]), DtE(->gpr[5]), DtE(->fpr[0]), DtE(->fpr[1]));
1462 dasm_put(Dst, 9526, DtE(->fpr[2]), DtE(->fpr[3]), DtE(->fpr[4]), DtE(->fpr[5]), DtE(->fpr[6]), DtE(->fpr[7]), DtE(->func), DtE(->gpr[0]), DtE(->fpr[0]), DtE(->gpr[1]), DtE(->fpr[1]));
1463#if LJ_TARGET_WINDOWS
1464#endif
1465 dasm_put(Dst, 9581);
1460#endif 1466#endif
1461} 1467}
1462 1468
@@ -1473,20 +1479,20 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1473 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1479 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1474 1480
1475 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1481 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1476 dasm_put(Dst, 9587, LJ_TISNUM, LJ_TISNUM); 1482 dasm_put(Dst, 9589, LJ_TISNUM, LJ_TISNUM);
1477 if (sse) { 1483 if (sse) {
1478 dasm_put(Dst, 9608); 1484 dasm_put(Dst, 9610);
1479 } else { 1485 } else {
1480 dasm_put(Dst, 9623); 1486 dasm_put(Dst, 9625);
1481 if (cmov) { 1487 if (cmov) {
1482 dasm_put(Dst, 9633); 1488 dasm_put(Dst, 9635);
1483 } else { 1489 } else {
1484 dasm_put(Dst, 9639); 1490 dasm_put(Dst, 9641);
1485 } 1491 }
1486 } 1492 }
1487 switch (op) { 1493 switch (op) {
1488 case BC_ISLT: 1494 case BC_ISLT:
1489 dasm_put(Dst, 9646); 1495 dasm_put(Dst, 9648);
1490 break; 1496 break;
1491 case BC_ISGE: 1497 case BC_ISGE:
1492 dasm_put(Dst, 9287); 1498 dasm_put(Dst, 9287);
@@ -1495,599 +1501,599 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1495 dasm_put(Dst, 5894); 1501 dasm_put(Dst, 5894);
1496 break; 1502 break;
1497 case BC_ISGT: 1503 case BC_ISGT:
1498 dasm_put(Dst, 9651); 1504 dasm_put(Dst, 9653);
1499 break; 1505 break;
1500 default: break; /* Shut up GCC. */ 1506 default: break; /* Shut up GCC. */
1501 } 1507 }
1502 dasm_put(Dst, 9656, -BCBIAS_J*4); 1508 dasm_put(Dst, 9658, -BCBIAS_J*4);
1503 break; 1509 break;
1504 1510
1505 case BC_ISEQV: case BC_ISNEV: 1511 case BC_ISEQV: case BC_ISNEV:
1506 vk = op == BC_ISEQV; 1512 vk = op == BC_ISEQV;
1507 dasm_put(Dst, 9691, LJ_TISNUM, LJ_TISNUM); 1513 dasm_put(Dst, 9693, LJ_TISNUM, LJ_TISNUM);
1508 if (sse) { 1514 if (sse) {
1509 dasm_put(Dst, 9717); 1515 dasm_put(Dst, 9719);
1510 } else { 1516 } else {
1511 dasm_put(Dst, 9729); 1517 dasm_put(Dst, 9731);
1512 if (cmov) { 1518 if (cmov) {
1513 dasm_put(Dst, 9633); 1519 dasm_put(Dst, 9635);
1514 } else { 1520 } else {
1515 dasm_put(Dst, 9639); 1521 dasm_put(Dst, 9641);
1516 } 1522 }
1517 } 1523 }
1518 iseqne_fp: 1524 iseqne_fp:
1519 if (vk) { 1525 if (vk) {
1520 dasm_put(Dst, 9736); 1526 dasm_put(Dst, 9738);
1521 } else { 1527 } else {
1522 dasm_put(Dst, 9745); 1528 dasm_put(Dst, 9747);
1523 } 1529 }
1524 iseqne_end: 1530 iseqne_end:
1525 if (vk) { 1531 if (vk) {
1526 dasm_put(Dst, 9754, -BCBIAS_J*4); 1532 dasm_put(Dst, 9756, -BCBIAS_J*4);
1527 } else { 1533 } else {
1528 dasm_put(Dst, 9769, -BCBIAS_J*4); 1534 dasm_put(Dst, 9771, -BCBIAS_J*4);
1529 } 1535 }
1530 dasm_put(Dst, 9670); 1536 dasm_put(Dst, 9672);
1531 if (op == BC_ISEQV || op == BC_ISNEV) { 1537 if (op == BC_ISEQV || op == BC_ISNEV) {
1532 dasm_put(Dst, 9784, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1538 dasm_put(Dst, 9786, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1533 if (vk) { 1539 if (vk) {
1534 dasm_put(Dst, 9842); 1540 dasm_put(Dst, 9844);
1535 } else { 1541 } else {
1536 dasm_put(Dst, 9846); 1542 dasm_put(Dst, 9848);
1537 } 1543 }
1538 dasm_put(Dst, 9852); 1544 dasm_put(Dst, 9854);
1539 } 1545 }
1540 break; 1546 break;
1541 case BC_ISEQS: case BC_ISNES: 1547 case BC_ISEQS: case BC_ISNES:
1542 vk = op == BC_ISEQS; 1548 vk = op == BC_ISEQS;
1543 dasm_put(Dst, 9857, LJ_TSTR); 1549 dasm_put(Dst, 9859, LJ_TSTR);
1544 iseqne_test: 1550 iseqne_test:
1545 if (vk) { 1551 if (vk) {
1546 dasm_put(Dst, 9740); 1552 dasm_put(Dst, 9742);
1547 } else { 1553 } else {
1548 dasm_put(Dst, 2803); 1554 dasm_put(Dst, 2803);
1549 } 1555 }
1550 goto iseqne_end; 1556 goto iseqne_end;
1551 case BC_ISEQN: case BC_ISNEN: 1557 case BC_ISEQN: case BC_ISNEN:
1552 vk = op == BC_ISEQN; 1558 vk = op == BC_ISEQN;
1553 dasm_put(Dst, 9882, LJ_TISNUM); 1559 dasm_put(Dst, 9884, LJ_TISNUM);
1554 if (sse) { 1560 if (sse) {
1555 dasm_put(Dst, 9896); 1561 dasm_put(Dst, 9898);
1556 } else { 1562 } else {
1557 dasm_put(Dst, 9909); 1563 dasm_put(Dst, 9911);
1558 if (cmov) { 1564 if (cmov) {
1559 dasm_put(Dst, 9633); 1565 dasm_put(Dst, 9635);
1560 } else { 1566 } else {
1561 dasm_put(Dst, 9639); 1567 dasm_put(Dst, 9641);
1562 } 1568 }
1563 } 1569 }
1564 goto iseqne_fp; 1570 goto iseqne_fp;
1565 case BC_ISEQP: case BC_ISNEP: 1571 case BC_ISEQP: case BC_ISNEP:
1566 vk = op == BC_ISEQP; 1572 vk = op == BC_ISEQP;
1567 dasm_put(Dst, 9917); 1573 dasm_put(Dst, 9919);
1568 goto iseqne_test; 1574 goto iseqne_test;
1569 1575
1570 /* -- Unary test and copy ops ------------------------------------------- */ 1576 /* -- Unary test and copy ops ------------------------------------------- */
1571 1577
1572 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1578 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1573 dasm_put(Dst, 9929, LJ_TISTRUECOND); 1579 dasm_put(Dst, 9931, LJ_TISTRUECOND);
1574 if (op == BC_IST || op == BC_ISTC) { 1580 if (op == BC_IST || op == BC_ISTC) {
1575 dasm_put(Dst, 9941); 1581 dasm_put(Dst, 9943);
1576 } else { 1582 } else {
1577 dasm_put(Dst, 9946); 1583 dasm_put(Dst, 9948);
1578 } 1584 }
1579 if (op == BC_ISTC || op == BC_ISFC) { 1585 if (op == BC_ISTC || op == BC_ISFC) {
1580 dasm_put(Dst, 9951); 1586 dasm_put(Dst, 9953);
1581 } 1587 }
1582 dasm_put(Dst, 9962, -BCBIAS_J*4); 1588 dasm_put(Dst, 9964, -BCBIAS_J*4);
1583 break; 1589 break;
1584 1590
1585 /* -- Unary ops --------------------------------------------------------- */ 1591 /* -- Unary ops --------------------------------------------------------- */
1586 1592
1587 case BC_MOV: 1593 case BC_MOV:
1588 dasm_put(Dst, 9995); 1594 dasm_put(Dst, 9997);
1589 break; 1595 break;
1590 case BC_NOT: 1596 case BC_NOT:
1591 dasm_put(Dst, 10024, LJ_TISTRUECOND, LJ_TTRUE); 1597 dasm_put(Dst, 10026, LJ_TISTRUECOND, LJ_TTRUE);
1592 break; 1598 break;
1593 case BC_UNM: 1599 case BC_UNM:
1594 dasm_put(Dst, 10061, LJ_TISNUM); 1600 dasm_put(Dst, 10063, LJ_TISNUM);
1595 if (sse) { 1601 if (sse) {
1596 dasm_put(Dst, 10072, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 1602 dasm_put(Dst, 10074, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
1597 } else { 1603 } else {
1598 dasm_put(Dst, 10097); 1604 dasm_put(Dst, 10099);
1599 } 1605 }
1600 dasm_put(Dst, 9670); 1606 dasm_put(Dst, 9672);
1601 break; 1607 break;
1602 case BC_LEN: 1608 case BC_LEN:
1603 dasm_put(Dst, 10106, LJ_TSTR); 1609 dasm_put(Dst, 10108, LJ_TSTR);
1604 if (sse) { 1610 if (sse) {
1605 dasm_put(Dst, 10120, Dt5(->len)); 1611 dasm_put(Dst, 10122, Dt5(->len));
1606 } else { 1612 } else {
1607 dasm_put(Dst, 10138, Dt5(->len)); 1613 dasm_put(Dst, 10140, Dt5(->len));
1608 } 1614 }
1609 dasm_put(Dst, 10147, LJ_TTAB); 1615 dasm_put(Dst, 10149, LJ_TTAB);
1610 if (sse) { 1616 if (sse) {
1611 dasm_put(Dst, 10189); 1617 dasm_put(Dst, 10191);
1612 } else { 1618 } else {
1613 } 1619 }
1614 dasm_put(Dst, 10198); 1620 dasm_put(Dst, 10200);
1615 break; 1621 break;
1616 1622
1617 /* -- Binary ops -------------------------------------------------------- */ 1623 /* -- Binary ops -------------------------------------------------------- */
1618 1624
1619 1625
1620 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1626 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1621 dasm_put(Dst, 10208); 1627 dasm_put(Dst, 10210);
1622 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1628 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1623 switch (vk) { 1629 switch (vk) {
1624 case 0: 1630 case 0:
1625 dasm_put(Dst, 10216, LJ_TISNUM); 1631 dasm_put(Dst, 10218, LJ_TISNUM);
1626 if (sse) { 1632 if (sse) {
1627 dasm_put(Dst, 10228); 1633 dasm_put(Dst, 10230);
1628 } else { 1634 } else {
1629 dasm_put(Dst, 10243); 1635 dasm_put(Dst, 10245);
1630 } 1636 }
1631 break; 1637 break;
1632 case 1: 1638 case 1:
1633 dasm_put(Dst, 10252, LJ_TISNUM); 1639 dasm_put(Dst, 10254, LJ_TISNUM);
1634 if (sse) { 1640 if (sse) {
1635 dasm_put(Dst, 10264); 1641 dasm_put(Dst, 10266);
1636 } else { 1642 } else {
1637 dasm_put(Dst, 10279); 1643 dasm_put(Dst, 10281);
1638 } 1644 }
1639 break; 1645 break;
1640 default: 1646 default:
1641 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1647 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1642 if (sse) { 1648 if (sse) {
1643 dasm_put(Dst, 10310); 1649 dasm_put(Dst, 10312);
1644 } else { 1650 } else {
1645 dasm_put(Dst, 10324); 1651 dasm_put(Dst, 10326);
1646 } 1652 }
1647 break; 1653 break;
1648 } 1654 }
1649 if (sse) { 1655 if (sse) {
1650 dasm_put(Dst, 10090); 1656 dasm_put(Dst, 10092);
1651 } else { 1657 } else {
1652 dasm_put(Dst, 10102); 1658 dasm_put(Dst, 10104);
1653 } 1659 }
1654 dasm_put(Dst, 9670); 1660 dasm_put(Dst, 9672);
1655 break; 1661 break;
1656 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1662 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1657 dasm_put(Dst, 10208); 1663 dasm_put(Dst, 10210);
1658 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1664 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1659 switch (vk) { 1665 switch (vk) {
1660 case 0: 1666 case 0:
1661 dasm_put(Dst, 10216, LJ_TISNUM); 1667 dasm_put(Dst, 10218, LJ_TISNUM);
1662 if (sse) { 1668 if (sse) {
1663 dasm_put(Dst, 10332); 1669 dasm_put(Dst, 10334);
1664 } else { 1670 } else {
1665 dasm_put(Dst, 10347); 1671 dasm_put(Dst, 10349);
1666 } 1672 }
1667 break; 1673 break;
1668 case 1: 1674 case 1:
1669 dasm_put(Dst, 10252, LJ_TISNUM); 1675 dasm_put(Dst, 10254, LJ_TISNUM);
1670 if (sse) { 1676 if (sse) {
1671 dasm_put(Dst, 10356); 1677 dasm_put(Dst, 10358);
1672 } else { 1678 } else {
1673 dasm_put(Dst, 10371); 1679 dasm_put(Dst, 10373);
1674 } 1680 }
1675 break; 1681 break;
1676 default: 1682 default:
1677 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1683 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1678 if (sse) { 1684 if (sse) {
1679 dasm_put(Dst, 10380); 1685 dasm_put(Dst, 10382);
1680 } else { 1686 } else {
1681 dasm_put(Dst, 10394); 1687 dasm_put(Dst, 10396);
1682 } 1688 }
1683 break; 1689 break;
1684 } 1690 }
1685 if (sse) { 1691 if (sse) {
1686 dasm_put(Dst, 10090); 1692 dasm_put(Dst, 10092);
1687 } else { 1693 } else {
1688 dasm_put(Dst, 10102); 1694 dasm_put(Dst, 10104);
1689 } 1695 }
1690 dasm_put(Dst, 9670); 1696 dasm_put(Dst, 9672);
1691 break; 1697 break;
1692 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1698 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1693 dasm_put(Dst, 10208); 1699 dasm_put(Dst, 10210);
1694 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1700 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1695 switch (vk) { 1701 switch (vk) {
1696 case 0: 1702 case 0:
1697 dasm_put(Dst, 10216, LJ_TISNUM); 1703 dasm_put(Dst, 10218, LJ_TISNUM);
1698 if (sse) { 1704 if (sse) {
1699 dasm_put(Dst, 10402); 1705 dasm_put(Dst, 10404);
1700 } else { 1706 } else {
1701 dasm_put(Dst, 10417); 1707 dasm_put(Dst, 10419);
1702 } 1708 }
1703 break; 1709 break;
1704 case 1: 1710 case 1:
1705 dasm_put(Dst, 10252, LJ_TISNUM); 1711 dasm_put(Dst, 10254, LJ_TISNUM);
1706 if (sse) { 1712 if (sse) {
1707 dasm_put(Dst, 10426); 1713 dasm_put(Dst, 10428);
1708 } else { 1714 } else {
1709 dasm_put(Dst, 10441); 1715 dasm_put(Dst, 10443);
1710 } 1716 }
1711 break; 1717 break;
1712 default: 1718 default:
1713 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1719 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1714 if (sse) { 1720 if (sse) {
1715 dasm_put(Dst, 10450); 1721 dasm_put(Dst, 10452);
1716 } else { 1722 } else {
1717 dasm_put(Dst, 10464); 1723 dasm_put(Dst, 10466);
1718 } 1724 }
1719 break; 1725 break;
1720 } 1726 }
1721 if (sse) { 1727 if (sse) {
1722 dasm_put(Dst, 10090); 1728 dasm_put(Dst, 10092);
1723 } else { 1729 } else {
1724 dasm_put(Dst, 10102); 1730 dasm_put(Dst, 10104);
1725 } 1731 }
1726 dasm_put(Dst, 9670); 1732 dasm_put(Dst, 9672);
1727 break; 1733 break;
1728 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1734 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1729 dasm_put(Dst, 10208); 1735 dasm_put(Dst, 10210);
1730 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1736 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1731 switch (vk) { 1737 switch (vk) {
1732 case 0: 1738 case 0:
1733 dasm_put(Dst, 10216, LJ_TISNUM); 1739 dasm_put(Dst, 10218, LJ_TISNUM);
1734 if (sse) { 1740 if (sse) {
1735 dasm_put(Dst, 10472); 1741 dasm_put(Dst, 10474);
1736 } else { 1742 } else {
1737 dasm_put(Dst, 10487); 1743 dasm_put(Dst, 10489);
1738 } 1744 }
1739 break; 1745 break;
1740 case 1: 1746 case 1:
1741 dasm_put(Dst, 10252, LJ_TISNUM); 1747 dasm_put(Dst, 10254, LJ_TISNUM);
1742 if (sse) { 1748 if (sse) {
1743 dasm_put(Dst, 10496); 1749 dasm_put(Dst, 10498);
1744 } else { 1750 } else {
1745 dasm_put(Dst, 10511); 1751 dasm_put(Dst, 10513);
1746 } 1752 }
1747 break; 1753 break;
1748 default: 1754 default:
1749 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1755 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1750 if (sse) { 1756 if (sse) {
1751 dasm_put(Dst, 10520); 1757 dasm_put(Dst, 10522);
1752 } else { 1758 } else {
1753 dasm_put(Dst, 10534); 1759 dasm_put(Dst, 10536);
1754 } 1760 }
1755 break; 1761 break;
1756 } 1762 }
1757 if (sse) { 1763 if (sse) {
1758 dasm_put(Dst, 10090); 1764 dasm_put(Dst, 10092);
1759 } else { 1765 } else {
1760 dasm_put(Dst, 10102); 1766 dasm_put(Dst, 10104);
1761 } 1767 }
1762 dasm_put(Dst, 9670); 1768 dasm_put(Dst, 9672);
1763 break; 1769 break;
1764 case BC_MODVN: 1770 case BC_MODVN:
1765 dasm_put(Dst, 10208); 1771 dasm_put(Dst, 10210);
1766 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1772 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1767 switch (vk) { 1773 switch (vk) {
1768 case 0: 1774 case 0:
1769 dasm_put(Dst, 10216, LJ_TISNUM); 1775 dasm_put(Dst, 10218, LJ_TISNUM);
1770 if (sse) { 1776 if (sse) {
1771 dasm_put(Dst, 10542); 1777 dasm_put(Dst, 10544);
1772 } else { 1778 } else {
1773 dasm_put(Dst, 10557); 1779 dasm_put(Dst, 10559);
1774 } 1780 }
1775 break; 1781 break;
1776 case 1: 1782 case 1:
1777 dasm_put(Dst, 10252, LJ_TISNUM); 1783 dasm_put(Dst, 10254, LJ_TISNUM);
1778 if (sse) { 1784 if (sse) {
1779 dasm_put(Dst, 10566); 1785 dasm_put(Dst, 10568);
1780 } else { 1786 } else {
1781 dasm_put(Dst, 10581); 1787 dasm_put(Dst, 10583);
1782 } 1788 }
1783 break; 1789 break;
1784 default: 1790 default:
1785 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1791 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1786 if (sse) { 1792 if (sse) {
1787 dasm_put(Dst, 10590); 1793 dasm_put(Dst, 10592);
1788 } else { 1794 } else {
1789 dasm_put(Dst, 10604); 1795 dasm_put(Dst, 10606);
1790 } 1796 }
1791 break; 1797 break;
1792 } 1798 }
1793 dasm_put(Dst, 10612); 1799 dasm_put(Dst, 10614);
1794 if (sse) { 1800 if (sse) {
1795 dasm_put(Dst, 10090); 1801 dasm_put(Dst, 10092);
1796 } else { 1802 } else {
1797 dasm_put(Dst, 10102); 1803 dasm_put(Dst, 10104);
1798 } 1804 }
1799 dasm_put(Dst, 9670); 1805 dasm_put(Dst, 9672);
1800 break; 1806 break;
1801 case BC_MODNV: case BC_MODVV: 1807 case BC_MODNV: case BC_MODVV:
1802 dasm_put(Dst, 10208); 1808 dasm_put(Dst, 10210);
1803 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1809 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1804 switch (vk) { 1810 switch (vk) {
1805 case 0: 1811 case 0:
1806 dasm_put(Dst, 10216, LJ_TISNUM); 1812 dasm_put(Dst, 10218, LJ_TISNUM);
1807 if (sse) { 1813 if (sse) {
1808 dasm_put(Dst, 10542); 1814 dasm_put(Dst, 10544);
1809 } else { 1815 } else {
1810 dasm_put(Dst, 10557); 1816 dasm_put(Dst, 10559);
1811 } 1817 }
1812 break; 1818 break;
1813 case 1: 1819 case 1:
1814 dasm_put(Dst, 10252, LJ_TISNUM); 1820 dasm_put(Dst, 10254, LJ_TISNUM);
1815 if (sse) { 1821 if (sse) {
1816 dasm_put(Dst, 10566); 1822 dasm_put(Dst, 10568);
1817 } else { 1823 } else {
1818 dasm_put(Dst, 10581); 1824 dasm_put(Dst, 10583);
1819 } 1825 }
1820 break; 1826 break;
1821 default: 1827 default:
1822 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1828 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1823 if (sse) { 1829 if (sse) {
1824 dasm_put(Dst, 10590); 1830 dasm_put(Dst, 10592);
1825 } else { 1831 } else {
1826 dasm_put(Dst, 10604); 1832 dasm_put(Dst, 10606);
1827 } 1833 }
1828 break; 1834 break;
1829 } 1835 }
1830 dasm_put(Dst, 10618); 1836 dasm_put(Dst, 10620);
1831 break; 1837 break;
1832 case BC_POW: 1838 case BC_POW:
1833 dasm_put(Dst, 10208); 1839 dasm_put(Dst, 10210);
1834 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1840 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1835 switch (vk) { 1841 switch (vk) {
1836 case 0: 1842 case 0:
1837 dasm_put(Dst, 10216, LJ_TISNUM); 1843 dasm_put(Dst, 10218, LJ_TISNUM);
1838 if (sse) { 1844 if (sse) {
1839 dasm_put(Dst, 10542); 1845 dasm_put(Dst, 10544);
1840 } else { 1846 } else {
1841 dasm_put(Dst, 10557); 1847 dasm_put(Dst, 10559);
1842 } 1848 }
1843 break; 1849 break;
1844 case 1: 1850 case 1:
1845 dasm_put(Dst, 10252, LJ_TISNUM); 1851 dasm_put(Dst, 10254, LJ_TISNUM);
1846 if (sse) { 1852 if (sse) {
1847 dasm_put(Dst, 10566); 1853 dasm_put(Dst, 10568);
1848 } else { 1854 } else {
1849 dasm_put(Dst, 10581); 1855 dasm_put(Dst, 10583);
1850 } 1856 }
1851 break; 1857 break;
1852 default: 1858 default:
1853 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1859 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1854 if (sse) { 1860 if (sse) {
1855 dasm_put(Dst, 10590); 1861 dasm_put(Dst, 10592);
1856 } else { 1862 } else {
1857 dasm_put(Dst, 10604); 1863 dasm_put(Dst, 10606);
1858 } 1864 }
1859 break; 1865 break;
1860 } 1866 }
1861 dasm_put(Dst, 10623); 1867 dasm_put(Dst, 10625);
1862 if (sse) { 1868 if (sse) {
1863 dasm_put(Dst, 10090); 1869 dasm_put(Dst, 10092);
1864 } else { 1870 } else {
1865 dasm_put(Dst, 10102); 1871 dasm_put(Dst, 10104);
1866 } 1872 }
1867 dasm_put(Dst, 9670); 1873 dasm_put(Dst, 9672);
1868 break; 1874 break;
1869 1875
1870 case BC_CAT: 1876 case BC_CAT:
1871 dasm_put(Dst, 10627, Dt1(->base), Dt1(->base)); 1877 dasm_put(Dst, 10629, Dt1(->base), Dt1(->base));
1872 break; 1878 break;
1873 1879
1874 /* -- Constant ops ------------------------------------------------------ */ 1880 /* -- Constant ops ------------------------------------------------------ */
1875 1881
1876 case BC_KSTR: 1882 case BC_KSTR:
1877 dasm_put(Dst, 10711, LJ_TSTR); 1883 dasm_put(Dst, 10713, LJ_TSTR);
1878 break; 1884 break;
1879 case BC_KCDATA: 1885 case BC_KCDATA:
1880#if LJ_HASFFI 1886#if LJ_HASFFI
1881 dasm_put(Dst, 10711, LJ_TCDATA); 1887 dasm_put(Dst, 10713, LJ_TCDATA);
1882#endif 1888#endif
1883 break; 1889 break;
1884 case BC_KSHORT: 1890 case BC_KSHORT:
1885 if (sse) { 1891 if (sse) {
1886 dasm_put(Dst, 10748); 1892 dasm_put(Dst, 10750);
1887 } else { 1893 } else {
1888 dasm_put(Dst, 10763); 1894 dasm_put(Dst, 10765);
1889 } 1895 }
1890 dasm_put(Dst, 9670); 1896 dasm_put(Dst, 9672);
1891 break; 1897 break;
1892 case BC_KNUM: 1898 case BC_KNUM:
1893 if (sse) { 1899 if (sse) {
1894 dasm_put(Dst, 10771); 1900 dasm_put(Dst, 10773);
1895 } else { 1901 } else {
1896 dasm_put(Dst, 10785); 1902 dasm_put(Dst, 10787);
1897 } 1903 }
1898 dasm_put(Dst, 9670); 1904 dasm_put(Dst, 9672);
1899 break; 1905 break;
1900 case BC_KPRI: 1906 case BC_KPRI:
1901 dasm_put(Dst, 10793); 1907 dasm_put(Dst, 10795);
1902 break; 1908 break;
1903 case BC_KNIL: 1909 case BC_KNIL:
1904 dasm_put(Dst, 10822, LJ_TNIL); 1910 dasm_put(Dst, 10824, LJ_TNIL);
1905 break; 1911 break;
1906 1912
1907 /* -- Upvalue and function ops ------------------------------------------ */ 1913 /* -- Upvalue and function ops ------------------------------------------ */
1908 1914
1909 case BC_UGET: 1915 case BC_UGET:
1910 dasm_put(Dst, 10870, offsetof(GCfuncL, uvptr), DtA(->v)); 1916 dasm_put(Dst, 10872, offsetof(GCfuncL, uvptr), DtA(->v));
1911 break; 1917 break;
1912 case BC_USETV: 1918 case BC_USETV:
1913#define TV2MARKOFS \ 1919#define TV2MARKOFS \
1914 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 1920 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
1915 dasm_put(Dst, 10911, 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); 1921 dasm_put(Dst, 10913, 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);
1916 dasm_put(Dst, 11007); 1922 dasm_put(Dst, 11009);
1917 break; 1923 break;
1918#undef TV2MARKOFS 1924#undef TV2MARKOFS
1919 case BC_USETS: 1925 case BC_USETS:
1920 dasm_put(Dst, 11019, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 1926 dasm_put(Dst, 11021, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
1921 break; 1927 break;
1922 case BC_USETN: 1928 case BC_USETN:
1923 dasm_put(Dst, 11115); 1929 dasm_put(Dst, 11117);
1924 if (sse) { 1930 if (sse) {
1925 dasm_put(Dst, 11120); 1931 dasm_put(Dst, 11122);
1926 } else { 1932 } else {
1927 dasm_put(Dst, 9912); 1933 dasm_put(Dst, 9914);
1928 } 1934 }
1929 dasm_put(Dst, 11128, offsetof(GCfuncL, uvptr), DtA(->v)); 1935 dasm_put(Dst, 11130, offsetof(GCfuncL, uvptr), DtA(->v));
1930 if (sse) { 1936 if (sse) {
1931 dasm_put(Dst, 11137); 1937 dasm_put(Dst, 11139);
1932 } else { 1938 } else {
1933 dasm_put(Dst, 11143); 1939 dasm_put(Dst, 11145);
1934 } 1940 }
1935 dasm_put(Dst, 9670); 1941 dasm_put(Dst, 9672);
1936 break; 1942 break;
1937 case BC_USETP: 1943 case BC_USETP:
1938 dasm_put(Dst, 11146, offsetof(GCfuncL, uvptr), DtA(->v)); 1944 dasm_put(Dst, 11148, offsetof(GCfuncL, uvptr), DtA(->v));
1939 break; 1945 break;
1940 case BC_UCLO: 1946 case BC_UCLO:
1941 dasm_put(Dst, 11186, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 1947 dasm_put(Dst, 11188, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
1942 break; 1948 break;
1943 1949
1944 case BC_FNEW: 1950 case BC_FNEW:
1945 dasm_put(Dst, 11242, Dt1(->base), Dt1(->base), LJ_TFUNC); 1951 dasm_put(Dst, 11244, Dt1(->base), Dt1(->base), LJ_TFUNC);
1946 break; 1952 break;
1947 1953
1948 /* -- Table ops --------------------------------------------------------- */ 1954 /* -- Table ops --------------------------------------------------------- */
1949 1955
1950 case BC_TNEW: 1956 case BC_TNEW:
1951 dasm_put(Dst, 11309, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); 1957 dasm_put(Dst, 11311, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB);
1952 break; 1958 break;
1953 case BC_TDUP: 1959 case BC_TDUP:
1954 dasm_put(Dst, 11433, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 1960 dasm_put(Dst, 11435, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
1955 break; 1961 break;
1956 1962
1957 case BC_GGET: 1963 case BC_GGET:
1958 dasm_put(Dst, 11532, Dt7(->env)); 1964 dasm_put(Dst, 11534, Dt7(->env));
1959 break; 1965 break;
1960 case BC_GSET: 1966 case BC_GSET:
1961 dasm_put(Dst, 11552, Dt7(->env)); 1967 dasm_put(Dst, 11554, Dt7(->env));
1962 break; 1968 break;
1963 1969
1964 case BC_TGETV: 1970 case BC_TGETV:
1965 dasm_put(Dst, 11572, LJ_TTAB, LJ_TISNUM); 1971 dasm_put(Dst, 11574, LJ_TTAB, LJ_TISNUM);
1966 if (sse) { 1972 if (sse) {
1967 dasm_put(Dst, 11605); 1973 dasm_put(Dst, 11607);
1968 } else { 1974 } else {
1969 } 1975 }
1970 dasm_put(Dst, 11626, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1976 dasm_put(Dst, 11628, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1971 dasm_put(Dst, 11711, LJ_TNIL, LJ_TSTR); 1977 dasm_put(Dst, 11713, LJ_TNIL, LJ_TSTR);
1972 break; 1978 break;
1973 case BC_TGETS: 1979 case BC_TGETS:
1974 dasm_put(Dst, 11740, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1980 dasm_put(Dst, 11742, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1975 dasm_put(Dst, 11825, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1981 dasm_put(Dst, 11827, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1976 break; 1982 break;
1977 case BC_TGETB: 1983 case BC_TGETB:
1978 dasm_put(Dst, 11897, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1984 dasm_put(Dst, 11899, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1979 dasm_put(Dst, 11993, LJ_TNIL); 1985 dasm_put(Dst, 11995, LJ_TNIL);
1980 break; 1986 break;
1981 1987
1982 case BC_TSETV: 1988 case BC_TSETV:
1983 dasm_put(Dst, 12010, LJ_TTAB, LJ_TISNUM); 1989 dasm_put(Dst, 12012, LJ_TTAB, LJ_TISNUM);
1984 if (sse) { 1990 if (sse) {
1985 dasm_put(Dst, 11605); 1991 dasm_put(Dst, 11607);
1986 } else { 1992 } else {
1987 } 1993 }
1988 dasm_put(Dst, 12043, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 1994 dasm_put(Dst, 12045, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
1989 dasm_put(Dst, 12123, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1995 dasm_put(Dst, 12125, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1990 break; 1996 break;
1991 case BC_TSETS: 1997 case BC_TSETS:
1992 dasm_put(Dst, 12187, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1998 dasm_put(Dst, 12189, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1993 dasm_put(Dst, 12264, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 1999 dasm_put(Dst, 12266, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
1994 dasm_put(Dst, 12351, 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)); 2000 dasm_put(Dst, 12353, 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));
1995 break; 2001 break;
1996 case BC_TSETB: 2002 case BC_TSETB:
1997 dasm_put(Dst, 12443, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 2003 dasm_put(Dst, 12445, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
1998 dasm_put(Dst, 12538, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2004 dasm_put(Dst, 12540, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1999 break; 2005 break;
2000 2006
2001 case BC_TSETM: 2007 case BC_TSETM:
2002 dasm_put(Dst, 12586, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); 2008 dasm_put(Dst, 12588, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
2003 dasm_put(Dst, 12736, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2009 dasm_put(Dst, 12738, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2004 break; 2010 break;
2005 2011
2006 /* -- Calls and vararg handling ----------------------------------------- */ 2012 /* -- Calls and vararg handling ----------------------------------------- */
2007 2013
2008 case BC_CALL: case BC_CALLM: 2014 case BC_CALL: case BC_CALLM:
2009 dasm_put(Dst, 10212); 2015 dasm_put(Dst, 10214);
2010 if (op == BC_CALLM) { 2016 if (op == BC_CALLM) {
2011 dasm_put(Dst, 12756); 2017 dasm_put(Dst, 12758);
2012 } 2018 }
2013 dasm_put(Dst, 12761, LJ_TFUNC, Dt7(->pc)); 2019 dasm_put(Dst, 12763, LJ_TFUNC, Dt7(->pc));
2014 break; 2020 break;
2015 2021
2016 case BC_CALLMT: 2022 case BC_CALLMT:
2017 dasm_put(Dst, 12756); 2023 dasm_put(Dst, 12758);
2018 break; 2024 break;
2019 case BC_CALLT: 2025 case BC_CALLT:
2020 dasm_put(Dst, 12804, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 2026 dasm_put(Dst, 12806, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
2021 dasm_put(Dst, 12922, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 2027 dasm_put(Dst, 12924, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
2022 break; 2028 break;
2023 2029
2024 case BC_ITERC: 2030 case BC_ITERC:
2025 dasm_put(Dst, 12996, LJ_TFUNC, 2+1, Dt7(->pc)); 2031 dasm_put(Dst, 12998, LJ_TFUNC, 2+1, Dt7(->pc));
2026 break; 2032 break;
2027 2033
2028 case BC_ITERN: 2034 case BC_ITERN:
2029#if LJ_HASJIT 2035#if LJ_HASJIT
2030#endif 2036#endif
2031 dasm_put(Dst, 13068, Dt6(->asize), Dt6(->array), LJ_TNIL); 2037 dasm_put(Dst, 13070, Dt6(->asize), Dt6(->array), LJ_TNIL);
2032 if (sse) { 2038 if (sse) {
2033 dasm_put(Dst, 13120); 2039 dasm_put(Dst, 13122);
2034 } else { 2040 } else {
2035 dasm_put(Dst, 13126); 2041 dasm_put(Dst, 13128);
2036 } 2042 }
2037 dasm_put(Dst, 13132); 2043 dasm_put(Dst, 13134);
2038 if (sse) { 2044 if (sse) {
2039 dasm_put(Dst, 10090); 2045 dasm_put(Dst, 10092);
2040 } else { 2046 } else {
2041 dasm_put(Dst, 10102); 2047 dasm_put(Dst, 10104);
2042 } 2048 }
2043 dasm_put(Dst, 13145, -BCBIAS_J*4); 2049 dasm_put(Dst, 13147, -BCBIAS_J*4);
2044 if (!sse) { 2050 if (!sse) {
2045 dasm_put(Dst, 13199); 2051 dasm_put(Dst, 13201);
2046 } 2052 }
2047 dasm_put(Dst, 13205, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); 2053 dasm_put(Dst, 13207, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val));
2048 break; 2054 break;
2049 2055
2050 case BC_ISNEXT: 2056 case BC_ISNEXT:
2051 dasm_put(Dst, 13284, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); 2057 dasm_put(Dst, 13286, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC);
2052 break; 2058 break;
2053 2059
2054 case BC_VARG: 2060 case BC_VARG:
2055 dasm_put(Dst, 13385, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); 2061 dasm_put(Dst, 13387, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack));
2056 dasm_put(Dst, 13552, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2062 dasm_put(Dst, 13554, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2057 break; 2063 break;
2058 2064
2059 /* -- Returns ----------------------------------------------------------- */ 2065 /* -- Returns ----------------------------------------------------------- */
2060 2066
2061 case BC_RETM: 2067 case BC_RETM:
2062 dasm_put(Dst, 12756); 2068 dasm_put(Dst, 12758);
2063 break; 2069 break;
2064 2070
2065 case BC_RET: case BC_RET0: case BC_RET1: 2071 case BC_RET: case BC_RET0: case BC_RET1:
2066 if (op != BC_RET0) { 2072 if (op != BC_RET0) {
2067 dasm_put(Dst, 13622); 2073 dasm_put(Dst, 13624);
2068 } 2074 }
2069 dasm_put(Dst, 13626, FRAME_TYPE); 2075 dasm_put(Dst, 13628, FRAME_TYPE);
2070 switch (op) { 2076 switch (op) {
2071 case BC_RET: 2077 case BC_RET:
2072 dasm_put(Dst, 13645); 2078 dasm_put(Dst, 13647);
2073 break; 2079 break;
2074 case BC_RET1: 2080 case BC_RET1:
2075 dasm_put(Dst, 13699); 2081 dasm_put(Dst, 13701);
2076 /* fallthrough */ 2082 /* fallthrough */
2077 case BC_RET0: 2083 case BC_RET0:
2078 dasm_put(Dst, 13709); 2084 dasm_put(Dst, 13711);
2079 default: 2085 default:
2080 break; 2086 break;
2081 } 2087 }
2082 dasm_put(Dst, 13720, Dt7(->pc), PC2PROTO(k)); 2088 dasm_put(Dst, 13722, Dt7(->pc), PC2PROTO(k));
2083 if (op == BC_RET) { 2089 if (op == BC_RET) {
2084 dasm_put(Dst, 13768, LJ_TNIL); 2090 dasm_put(Dst, 13770, LJ_TNIL);
2085 } else { 2091 } else {
2086 dasm_put(Dst, 13779, LJ_TNIL); 2092 dasm_put(Dst, 13781, LJ_TNIL);
2087 } 2093 }
2088 dasm_put(Dst, 13786, -FRAME_VARG, FRAME_TYPEP); 2094 dasm_put(Dst, 13788, -FRAME_VARG, FRAME_TYPEP);
2089 if (op != BC_RET0) { 2095 if (op != BC_RET0) {
2090 dasm_put(Dst, 13810); 2096 dasm_put(Dst, 13812);
2091 } 2097 }
2092 dasm_put(Dst, 4546); 2098 dasm_put(Dst, 4546);
2093 break; 2099 break;
@@ -2097,7 +2103,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2097 2103
2098 case BC_FORL: 2104 case BC_FORL:
2099#if LJ_HASJIT 2105#if LJ_HASJIT
2100 dasm_put(Dst, 13814, HOTCOUNT_PCMASK, GG_DISP2HOT); 2106 dasm_put(Dst, 13816, HOTCOUNT_PCMASK, GG_DISP2HOT);
2101#endif 2107#endif
2102 break; 2108 break;
2103 2109
@@ -2109,57 +2115,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2109 case BC_FORI: 2115 case BC_FORI:
2110 case BC_IFORL: 2116 case BC_IFORL:
2111 vk = (op == BC_IFORL || op == BC_JFORL); 2117 vk = (op == BC_IFORL || op == BC_JFORL);
2112 dasm_put(Dst, 13835); 2118 dasm_put(Dst, 13837);
2113 if (!vk) { 2119 if (!vk) {
2114 dasm_put(Dst, 13839, LJ_TISNUM, LJ_TISNUM); 2120 dasm_put(Dst, 13841, LJ_TISNUM, LJ_TISNUM);
2115 } 2121 }
2116 dasm_put(Dst, 13858); 2122 dasm_put(Dst, 13860);
2117 if (!vk) { 2123 if (!vk) {
2118 dasm_put(Dst, 13862, LJ_TISNUM); 2124 dasm_put(Dst, 13864, LJ_TISNUM);
2119 } 2125 }
2120 if (sse) { 2126 if (sse) {
2121 dasm_put(Dst, 13871); 2127 dasm_put(Dst, 13873);
2122 if (vk) { 2128 if (vk) {
2123 dasm_put(Dst, 13883); 2129 dasm_put(Dst, 13885);
2124 } else { 2130 } else {
2125 dasm_put(Dst, 13902); 2131 dasm_put(Dst, 13904);
2126 } 2132 }
2127 dasm_put(Dst, 13907); 2133 dasm_put(Dst, 13909);
2128 } else { 2134 } else {
2129 dasm_put(Dst, 13920); 2135 dasm_put(Dst, 13922);
2130 if (vk) { 2136 if (vk) {
2131 dasm_put(Dst, 13926); 2137 dasm_put(Dst, 13928);
2132 } else { 2138 } else {
2133 dasm_put(Dst, 13942); 2139 dasm_put(Dst, 13944);
2134 } 2140 }
2135 dasm_put(Dst, 13950); 2141 dasm_put(Dst, 13952);
2136 if (cmov) { 2142 if (cmov) {
2137 dasm_put(Dst, 9633); 2143 dasm_put(Dst, 9635);
2138 } else { 2144 } else {
2139 dasm_put(Dst, 9639); 2145 dasm_put(Dst, 9641);
2140 } 2146 }
2141 if (!cmov) { 2147 if (!cmov) {
2142 dasm_put(Dst, 13955); 2148 dasm_put(Dst, 13957);
2143 } 2149 }
2144 } 2150 }
2145 if (op == BC_FORI) { 2151 if (op == BC_FORI) {
2146 dasm_put(Dst, 13961, -BCBIAS_J*4); 2152 dasm_put(Dst, 13963, -BCBIAS_J*4);
2147 } else if (op == BC_JFORI) { 2153 } else if (op == BC_JFORI) {
2148 dasm_put(Dst, 13971, -BCBIAS_J*4, BC_JLOOP); 2154 dasm_put(Dst, 13973, -BCBIAS_J*4, BC_JLOOP);
2149 } else if (op == BC_IFORL) { 2155 } else if (op == BC_IFORL) {
2150 dasm_put(Dst, 13985, -BCBIAS_J*4); 2156 dasm_put(Dst, 13987, -BCBIAS_J*4);
2151 } else { 2157 } else {
2152 dasm_put(Dst, 13981, BC_JLOOP); 2158 dasm_put(Dst, 13983, BC_JLOOP);
2153 } 2159 }
2154 dasm_put(Dst, 9668); 2160 dasm_put(Dst, 9670);
2155 if (sse) { 2161 if (sse) {
2156 dasm_put(Dst, 13995); 2162 dasm_put(Dst, 13997);
2157 } 2163 }
2158 break; 2164 break;
2159 2165
2160 case BC_ITERL: 2166 case BC_ITERL:
2161#if LJ_HASJIT 2167#if LJ_HASJIT
2162 dasm_put(Dst, 13814, HOTCOUNT_PCMASK, GG_DISP2HOT); 2168 dasm_put(Dst, 13816, HOTCOUNT_PCMASK, GG_DISP2HOT);
2163#endif 2169#endif
2164 break; 2170 break;
2165 2171
@@ -2168,33 +2174,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2168 break; 2174 break;
2169#endif 2175#endif
2170 case BC_IITERL: 2176 case BC_IITERL:
2171 dasm_put(Dst, 14006, LJ_TNIL); 2177 dasm_put(Dst, 14008, LJ_TNIL);
2172 if (op == BC_JITERL) { 2178 if (op == BC_JITERL) {
2173 dasm_put(Dst, 14021, BC_JLOOP); 2179 dasm_put(Dst, 14023, BC_JLOOP);
2174 } else { 2180 } else {
2175 dasm_put(Dst, 14035, -BCBIAS_J*4); 2181 dasm_put(Dst, 14037, -BCBIAS_J*4);
2176 } 2182 }
2177 dasm_put(Dst, 9972); 2183 dasm_put(Dst, 9974);
2178 break; 2184 break;
2179 2185
2180 case BC_LOOP: 2186 case BC_LOOP:
2181#if LJ_HASJIT 2187#if LJ_HASJIT
2182 dasm_put(Dst, 13814, HOTCOUNT_PCMASK, GG_DISP2HOT); 2188 dasm_put(Dst, 13816, HOTCOUNT_PCMASK, GG_DISP2HOT);
2183#endif 2189#endif
2184 break; 2190 break;
2185 2191
2186 case BC_ILOOP: 2192 case BC_ILOOP:
2187 dasm_put(Dst, 9670); 2193 dasm_put(Dst, 9672);
2188 break; 2194 break;
2189 2195
2190 case BC_JLOOP: 2196 case BC_JLOOP:
2191#if LJ_HASJIT 2197#if LJ_HASJIT
2192 dasm_put(Dst, 14051, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2198 dasm_put(Dst, 14053, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2193#endif 2199#endif
2194 break; 2200 break;
2195 2201
2196 case BC_JMP: 2202 case BC_JMP:
2197 dasm_put(Dst, 14092, -BCBIAS_J*4); 2203 dasm_put(Dst, 14094, -BCBIAS_J*4);
2198 break; 2204 break;
2199 2205
2200 /* -- Function headers -------------------------------------------------- */ 2206 /* -- Function headers -------------------------------------------------- */
@@ -2208,7 +2214,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2208 2214
2209 case BC_FUNCF: 2215 case BC_FUNCF:
2210#if LJ_HASJIT 2216#if LJ_HASJIT
2211 dasm_put(Dst, 14118, HOTCOUNT_PCMASK, GG_DISP2HOT); 2217 dasm_put(Dst, 14120, HOTCOUNT_PCMASK, GG_DISP2HOT);
2212#endif 2218#endif
2213 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2219 case BC_FUNCV: /* NYI: compiled vararg functions. */
2214 break; 2220 break;
@@ -2218,13 +2224,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2218 break; 2224 break;
2219#endif 2225#endif
2220 case BC_IFUNCF: 2226 case BC_IFUNCF:
2221 dasm_put(Dst, 14139, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2227 dasm_put(Dst, 14141, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2222 if (op == BC_JFUNCF) { 2228 if (op == BC_JFUNCF) {
2223 dasm_put(Dst, 14170, BC_JLOOP); 2229 dasm_put(Dst, 14172, BC_JLOOP);
2224 } else { 2230 } else {
2225 dasm_put(Dst, 9670); 2231 dasm_put(Dst, 9672);
2226 } 2232 }
2227 dasm_put(Dst, 14179, LJ_TNIL); 2233 dasm_put(Dst, 14181, LJ_TNIL);
2228 break; 2234 break;
2229 2235
2230 case BC_JFUNCV: 2236 case BC_JFUNCV:
@@ -2235,30 +2241,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2235 break; /* NYI: compiled vararg functions. */ 2241 break; /* NYI: compiled vararg functions. */
2236 2242
2237 case BC_IFUNCV: 2243 case BC_IFUNCV:
2238 dasm_put(Dst, 14201, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2244 dasm_put(Dst, 14203, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2239 if (op == BC_JFUNCV) { 2245 if (op == BC_JFUNCV) {
2240 dasm_put(Dst, 14170, BC_JLOOP); 2246 dasm_put(Dst, 14172, BC_JLOOP);
2241 } else { 2247 } else {
2242 dasm_put(Dst, 14298, -4+PC2PROTO(k)); 2248 dasm_put(Dst, 14300, -4+PC2PROTO(k));
2243 } 2249 }
2244 dasm_put(Dst, 14323, LJ_TNIL); 2250 dasm_put(Dst, 14325, LJ_TNIL);
2245 break; 2251 break;
2246 2252
2247 case BC_FUNCC: 2253 case BC_FUNCC:
2248 case BC_FUNCCW: 2254 case BC_FUNCCW:
2249 dasm_put(Dst, 14345, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2255 dasm_put(Dst, 14347, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2250 if (op == BC_FUNCC) { 2256 if (op == BC_FUNCC) {
2251 dasm_put(Dst, 14375); 2257 dasm_put(Dst, 14377);
2252 } else { 2258 } else {
2253 dasm_put(Dst, 14379); 2259 dasm_put(Dst, 14381);
2254 } 2260 }
2255 dasm_put(Dst, 14387, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2261 dasm_put(Dst, 14389, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2256 if (op == BC_FUNCC) { 2262 if (op == BC_FUNCC) {
2257 dasm_put(Dst, 14397); 2263 dasm_put(Dst, 14399);
2258 } else { 2264 } else {
2259 dasm_put(Dst, 14402, DISPATCH_GL(wrapf)); 2265 dasm_put(Dst, 14404, DISPATCH_GL(wrapf));
2260 } 2266 }
2261 dasm_put(Dst, 14408, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2267 dasm_put(Dst, 14410, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2262 break; 2268 break;
2263 2269
2264 /* ---------------------------------------------------------------------- */ 2270 /* ---------------------------------------------------------------------- */
@@ -2286,7 +2292,7 @@ static int build_backend(BuildCtx *ctx)
2286 2292
2287 build_subroutines(ctx, cmov, sse); 2293 build_subroutines(ctx, cmov, sse);
2288 2294
2289 dasm_put(Dst, 14434); 2295 dasm_put(Dst, 14436);
2290 for (op = 0; op < BC__MAX; op++) 2296 for (op = 0; op < BC__MAX; op++)
2291 build_ins(ctx, (BCOp)op, op, cmov, sse); 2297 build_ins(ctx, (BCOp)op, op, cmov, sse);
2292 2298