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.h904
1 files changed, 460 insertions, 444 deletions
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h
index 2e51c32b..5c19f6de 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[15787] = { 15static const unsigned char build_actionlist[15828] = {
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,
@@ -489,15 +489,15 @@ static const unsigned char build_actionlist[15787] = {
489 2,15,182,131,233,72,139,139,233,72,139,147,233,76,139,131,233,76,139,139, 489 2,15,182,131,233,72,139,139,233,72,139,147,233,76,139,131,233,76,139,139,
490 233,133,192,15,132,244,251,15,40,131,233,15,40,139,233,15,40,147,233,15,40, 490 233,133,192,15,132,244,251,15,40,131,233,15,40,139,233,15,40,147,233,15,40,
491 155,233,248,5,255,252,255,147,233,72,137,131,233,15,41,131,233,255,72,139, 491 155,233,248,5,255,252,255,147,233,72,137,131,233,15,41,131,233,255,72,139,
492 93,252,248,201,195,255,249,255,129,124,253,202,4,239,15,133,244,253,129,124, 492 93,252,248,201,195,255,248,162,255,249,255,129,124,253,202,4,239,15,133,244,
493 253,194,4,239,15,133,244,254,139,44,202,131,198,4,59,44,194,255,15,141,244, 493 253,129,124,253,194,4,239,15,133,244,254,139,44,202,131,198,4,59,44,194,255,
494 255,255,15,140,244,255,255,15,143,244,255,255,15,142,244,255,255,248,6,15, 494 15,141,244,255,255,15,140,244,255,255,15,143,244,255,255,15,142,244,255,255,
495 183,70,252,254,141,180,253,134,233,248,9,139,6,15,182,204,15,182,232,131, 495 248,6,15,183,70,252,254,141,180,253,134,233,248,9,139,6,15,182,204,15,182,
496 198,4,193,232,16,252,255,36,252,235,248,7,15,135,244,41,129,124,253,194,4, 496 232,131,198,4,193,232,16,252,255,36,252,235,248,7,15,135,244,41,129,124,253,
497 239,15,130,244,247,15,133,244,41,255,252,242,15,42,4,194,252,233,244,248, 497 194,4,239,15,130,244,247,15,133,244,41,255,252,242,15,42,4,194,252,233,244,
498 255,221,4,202,219,4,194,252,233,244,249,255,248,8,15,135,244,41,255,252,242, 498 248,255,221,4,202,219,4,194,252,233,244,249,255,248,8,15,135,244,41,255,252,
499 15,42,12,202,252,242,15,16,4,194,131,198,4,102,15,46,193,255,15,134,244,9, 499 242,15,42,12,202,252,242,15,16,4,194,131,198,4,102,15,46,193,255,15,134,244,
500 255,15,135,244,9,255,15,130,244,9,255,15,131,244,9,255,252,233,244,6,255, 500 9,255,15,135,244,9,255,15,130,244,9,255,15,131,244,9,255,252,233,244,6,255,
501 219,4,202,252,233,244,248,255,129,124,253,202,4,239,15,131,244,41,129,124, 501 219,4,202,252,233,244,248,255,129,124,253,202,4,239,15,131,244,41,129,124,
502 253,194,4,239,15,131,244,41,255,248,1,252,242,15,16,4,194,248,2,131,198,4, 502 253,194,4,239,15,131,244,41,255,248,1,252,242,15,16,4,194,248,2,131,198,4,
503 102,15,46,4,202,248,3,255,248,1,221,4,202,248,2,221,4,194,248,3,131,198,4, 503 102,15,46,4,202,248,3,255,248,1,221,4,202,248,2,221,4,194,248,3,131,198,4,
@@ -584,8 +584,8 @@ static const unsigned char build_actionlist[15787] = {
584 15,94,4,194,255,221,4,252,234,220,52,194,255,252,242,15,16,4,252,234,252, 584 15,94,4,194,255,221,4,252,234,220,52,194,255,252,242,15,16,4,252,234,252,
585 242,15,16,12,199,255,221,4,252,234,221,4,199,255,252,242,15,16,4,199,252, 585 242,15,16,12,199,255,221,4,252,234,221,4,199,255,252,242,15,16,4,199,252,
586 242,15,16,12,252,234,255,221,4,199,221,4,252,234,255,252,242,15,16,4,252, 586 242,15,16,12,252,234,255,221,4,199,221,4,252,234,255,252,242,15,16,4,252,
587 234,252,242,15,16,12,194,255,221,4,252,234,221,4,194,255,248,162,232,244, 587 234,252,242,15,16,12,194,255,221,4,252,234,221,4,194,255,248,163,232,244,
588 153,255,252,233,244,162,255,232,244,113,255,15,182,252,236,15,182,192,139, 588 153,255,252,233,244,163,255,232,244,113,255,15,182,252,236,15,182,192,139,
589 76,36,96,137,145,233,141,20,194,65,137,192,65,41,232,248,33,137,205,137,116, 589 76,36,96,137,145,233,141,20,194,65,137,192,65,41,232,248,33,137,205,137,116,
590 36,100,232,251,1,27,139,149,233,133,192,15,133,244,42,15,182,110,252,255, 590 36,100,232,251,1,27,139,149,233,133,192,15,133,244,42,15,182,110,252,255,
591 15,182,78,252,253,72,139,4,252,234,72,137,4,202,139,6,15,182,204,15,182,232, 591 15,182,78,252,253,72,139,4,252,234,72,137,4,202,139,6,15,182,204,15,182,232,
@@ -629,8 +629,8 @@ static const unsigned char build_actionlist[15787] = {
629 233,15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182, 629 233,15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182,
630 232,131,198,4,193,232,16,252,255,36,252,235,248,3,137,252,233,232,251,1,32, 630 232,131,198,4,193,232,16,252,255,36,252,235,248,3,137,252,233,232,251,1,32,
631 15,183,70,252,254,72,252,247,208,252,233,244,2,255,72,252,247,208,139,106, 631 15,183,70,252,254,72,252,247,208,252,233,244,2,255,72,252,247,208,139,106,
632 252,248,139,173,233,139,4,135,252,233,244,163,255,72,252,247,208,139,106, 632 252,248,139,173,233,139,4,135,252,233,244,164,255,72,252,247,208,139,106,
633 252,248,139,173,233,139,4,135,252,233,244,164,255,15,182,252,236,15,182,192, 633 252,248,139,173,233,139,4,135,252,233,244,165,255,15,182,252,236,15,182,192,
634 129,124,253,252,234,4,239,15,133,244,36,139,44,252,234,255,129,124,253,194, 634 129,124,253,252,234,4,239,15,133,244,36,139,44,252,234,255,129,124,253,194,
635 4,239,15,133,244,251,139,4,194,255,129,124,253,194,4,239,15,131,244,251,255, 635 4,239,15,133,244,251,139,4,194,255,129,124,253,194,4,239,15,131,244,251,255,
636 252,242,15,16,4,194,252,242,15,45,192,252,242,15,42,200,102,15,46,193,255, 636 252,242,15,16,4,194,252,242,15,45,192,252,242,15,42,200,102,15,46,193,255,
@@ -639,8 +639,8 @@ static const unsigned char build_actionlist[15787] = {
639 232,131,198,4,193,232,16,252,255,36,252,235,248,2,131,189,233,0,15,132,244, 639 232,131,198,4,193,232,16,252,255,36,252,235,248,2,131,189,233,0,15,132,244,
640 249,139,141,233,252,246,129,233,235,15,132,244,36,15,182,78,252,253,248,3, 640 249,139,141,233,252,246,129,233,235,15,132,244,36,15,182,78,252,253,248,3,
641 199,68,202,4,237,252,233,244,1,248,5,255,129,124,253,194,4,239,15,133,244, 641 199,68,202,4,237,252,233,244,1,248,5,255,129,124,253,194,4,239,15,133,244,
642 36,139,4,194,252,233,244,163,255,15,182,252,236,15,182,192,72,252,247,208, 642 36,139,4,194,252,233,244,164,255,15,182,252,236,15,182,192,72,252,247,208,
643 139,4,135,129,124,253,252,234,4,239,15,133,244,34,139,44,252,234,248,163, 643 139,4,135,129,124,253,252,234,4,239,15,133,244,34,139,44,252,234,248,164,
644 139,141,233,35,136,233,105,201,239,3,141,233,248,1,129,185,233,239,15,133, 644 139,141,233,35,136,233,105,201,239,3,141,233,248,1,129,185,233,239,15,133,
645 244,250,57,129,233,15,133,244,250,129,121,253,4,239,15,132,244,251,15,182, 645 244,250,57,129,233,15,133,244,250,129,121,253,4,239,15,132,244,251,15,182,
646 70,252,253,72,139,41,72,137,44,194,248,2,255,139,6,15,182,204,15,182,232, 646 70,252,253,72,139,41,72,137,44,194,248,2,255,139,6,15,182,204,15,182,232,
@@ -659,10 +659,10 @@ static const unsigned char build_actionlist[15787] = {
659 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,3,131,189, 659 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,3,131,189,
660 233,0,15,132,244,1,139,141,233,252,246,129,233,235,255,15,132,244,39,15,182, 660 233,0,15,132,244,1,139,141,233,252,246,129,233,235,255,15,132,244,39,15,182,
661 78,252,253,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244,39,139,4, 661 78,252,253,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244,39,139,4,
662 194,252,233,244,164,248,7,128,165,233,235,139,139,233,137,171,233,137,141, 662 194,252,233,244,165,248,7,128,165,233,235,139,139,233,137,171,233,137,141,
663 233,15,182,78,252,253,252,233,244,2,255,15,182,252,236,15,182,192,72,252, 663 233,15,182,78,252,253,252,233,244,2,255,15,182,252,236,15,182,192,72,252,
664 247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,37,139,44,252,234, 664 247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,37,139,44,252,234,
665 248,164,139,141,233,35,136,233,105,201,239,198,133,233,0,3,141,233,248,1, 665 248,165,139,141,233,35,136,233,105,201,239,198,133,233,0,3,141,233,248,1,
666 129,185,233,239,15,133,244,251,57,129,233,15,133,244,251,129,121,253,4,239, 666 129,185,233,239,15,133,244,251,57,129,233,15,133,244,251,129,121,253,4,239,
667 15,132,244,250,248,2,255,252,246,133,233,235,15,133,244,253,248,3,15,182, 667 15,132,244,250,248,2,255,252,246,133,233,235,15,133,244,253,248,3,15,182,
668 70,252,253,72,139,44,194,72,137,41,139,6,15,182,204,15,182,232,131,198,4, 668 70,252,253,72,139,44,194,72,137,41,139,6,15,182,204,15,182,232,131,198,4,
@@ -739,46 +739,48 @@ static const unsigned char build_actionlist[15787] = {
739 244,14,41,252,234,255,1,252,233,255,137,252,245,209,252,237,129,229,239,102, 739 244,14,41,252,234,255,1,252,233,255,137,252,245,209,252,237,129,229,239,102,
740 131,172,253,43,233,1,15,132,244,145,255,141,12,202,255,129,121,253,4,239, 740 131,172,253,43,233,1,15,132,244,145,255,141,12,202,255,129,121,253,4,239,
741 15,133,244,255,255,129,121,253,12,239,15,133,244,57,129,121,253,20,239,15, 741 15,133,244,255,255,129,121,253,12,239,15,133,244,57,129,121,253,20,239,15,
742 133,244,57,139,41,131,121,16,0,15,140,244,251,255,139,105,16,133,252,237, 742 133,244,57,139,41,131,121,16,0,15,140,244,251,255,129,121,253,12,239,15,133,
743 15,136,244,251,3,41,15,128,244,247,137,41,255,59,105,8,199,65,28,237,137, 743 244,162,129,121,253,20,239,15,133,244,162,255,139,105,16,133,252,237,15,136,
744 105,24,255,15,142,244,253,248,1,248,6,141,180,253,134,233,255,141,180,253, 744 244,251,3,41,15,128,244,247,137,41,255,59,105,8,199,65,28,237,137,105,24,
745 134,233,15,183,70,252,254,15,142,245,248,1,248,6,255,15,143,244,253,248,6, 745 255,15,142,244,253,248,1,248,6,141,180,253,134,233,255,141,180,253,134,233,
746 141,180,253,134,233,248,1,255,248,7,139,6,15,182,204,15,182,232,131,198,4, 746 15,183,70,252,254,15,142,245,248,1,248,6,255,15,143,244,253,248,6,141,180,
747 193,232,16,252,255,36,252,235,248,5,255,3,41,15,128,244,1,137,41,255,15,141, 747 253,134,233,248,1,255,248,7,139,6,15,182,204,15,182,232,131,198,4,193,232,
748 244,7,255,141,180,253,134,233,15,183,70,252,254,15,141,245,255,15,140,244, 748 16,252,255,36,252,235,248,5,255,3,41,15,128,244,1,137,41,255,15,141,244,7,
749 7,255,252,233,244,6,248,9,255,129,121,253,4,239,255,15,131,244,57,129,121, 749 255,141,180,253,134,233,15,183,70,252,254,15,141,245,255,15,140,244,7,255,
750 253,12,239,15,131,244,57,255,139,105,20,255,129,252,253,239,15,131,244,57, 750 252,233,244,6,248,9,255,129,121,253,4,239,255,15,131,244,57,129,121,253,12,
751 255,252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15, 751 239,15,131,244,57,255,129,121,253,12,239,15,131,244,162,129,121,253,20,239,
752 17,1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248, 752 15,131,244,162,255,139,105,20,255,129,252,253,239,15,131,244,57,255,252,242,
753 1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133, 753 15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133,252,
754 252,237,15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255, 754 237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,242,15,
755 15,183,70,252,254,255,15,131,244,7,255,15,131,244,248,141,180,253,134,233, 755 17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237,15,
756 255,141,180,253,134,233,15,183,70,252,254,15,131,245,255,15,130,244,7,255, 756 136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,183,70,
757 15,130,244,248,141,180,253,134,233,255,248,3,102,15,46,193,252,233,244,1, 757 252,254,255,15,131,244,7,255,15,131,244,248,141,180,253,134,233,255,141,180,
758 255,141,12,202,139,105,4,129,252,253,239,15,132,244,247,255,137,105,252,252, 758 253,134,233,15,183,70,252,254,15,131,245,255,15,130,244,7,255,15,130,244,
759 139,41,137,105,252,248,252,233,245,255,141,180,253,134,233,139,1,137,105, 759 248,141,180,253,134,233,255,248,3,102,15,46,193,252,233,244,1,255,141,12,
760 252,252,137,65,252,248,255,139,139,233,139,4,129,72,139,128,233,139,108,36, 760 202,139,105,4,129,252,253,239,15,132,244,247,255,137,105,252,252,139,41,137,
761 96,137,147,233,137,171,233,76,137,100,36,80,76,137,108,36,32,76,137,116,36, 761 105,252,248,252,233,245,255,141,180,253,134,233,139,1,137,105,252,252,137,
762 24,76,137,124,36,16,72,137,225,72,129,252,236,239,102,15,127,49,102,15,127, 762 65,252,248,255,139,139,233,139,4,129,72,139,128,233,139,108,36,96,137,147,
763 185,233,102,68,15,127,129,233,102,68,15,127,137,233,102,68,15,127,145,233, 763 233,137,171,233,76,137,100,36,80,76,137,108,36,32,76,137,116,36,24,76,137,
764 102,68,15,127,153,233,102,68,15,127,161,233,102,68,15,127,169,233,102,68, 764 124,36,16,72,137,225,72,129,252,236,239,102,15,127,49,102,15,127,185,233,
765 15,127,177,233,102,68,15,127,185,233,252,255,224,255,141,180,253,134,233, 765 102,68,15,127,129,233,102,68,15,127,137,233,102,68,15,127,145,233,102,68,
766 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,137, 766 15,127,153,233,102,68,15,127,161,233,102,68,15,127,169,233,102,68,15,127,
767 252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,147,255, 767 177,233,102,68,15,127,185,233,252,255,224,255,141,180,253,134,233,139,6,15,
768 139,190,233,139,108,36,96,141,12,202,59,141,233,15,135,244,23,15,182,142, 768 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,137,252,245,
769 233,57,200,15,134,244,249,248,2,255,15,183,70,252,254,252,233,245,255,248, 769 209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,147,255,139,190,
770 3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255, 770 233,139,108,36,96,141,12,202,59,141,233,15,135,244,23,15,182,142,233,57,200,
771 141,44,197,237,141,4,194,139,122,252,248,137,104,252,252,137,120,252,248, 771 15,134,244,249,248,2,255,15,183,70,252,254,252,233,245,255,248,3,199,68,194,
772 139,108,36,96,141,12,200,59,141,233,15,135,244,22,137,209,137,194,15,182, 772 252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255,141,44,197,237,
773 174,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244,249, 773 141,4,194,139,122,252,248,137,104,252,252,137,120,252,248,139,108,36,96,141,
774 139,121,252,248,137,56,139,121,252,252,137,120,4,131,192,8,199,65,252,252, 774 12,200,59,141,233,15,135,244,22,137,209,137,194,15,182,174,233,133,252,237,
775 237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,139,6,15,182,204,15, 775 15,132,244,248,248,1,131,193,8,57,209,15,131,244,249,139,121,252,248,137,
776 182,232,131,198,4,193,232,16,252,255,36,252,235,255,248,3,199,64,4,237,131, 776 56,139,121,252,252,137,120,4,131,192,8,199,65,252,252,237,131,252,237,1,15,
777 192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,252,248,72,139, 777 133,244,1,248,2,255,139,190,233,139,6,15,182,204,15,182,232,131,198,4,193,
778 189,233,139,108,36,96,141,68,194,252,248,137,149,233,141,136,233,59,141,233, 778 232,16,252,255,36,252,235,255,248,3,199,64,4,237,131,192,8,131,252,237,1,
779 137,133,233,255,72,137,252,250,137,252,233,255,15,135,244,21,199,131,233, 779 15,133,244,3,252,233,244,2,255,139,106,252,248,72,139,189,233,139,108,36,
780 237,255,252,255,215,255,252,255,147,233,255,199,131,233,237,139,149,233,141, 780 96,141,68,194,252,248,137,149,233,141,136,233,59,141,233,137,133,233,255,
781 12,194,252,247,217,3,141,233,139,114,252,252,252,233,244,12,255,254,0 781 72,137,252,250,137,252,233,255,15,135,244,21,199,131,233,237,255,252,255,
782 215,255,252,255,147,233,255,199,131,233,237,139,149,233,141,12,194,252,247,
783 217,3,141,233,139,114,252,252,252,233,244,12,255,254,0
782}; 784};
783 785
784enum { 786enum {
@@ -934,6 +936,7 @@ enum {
934 GLOB_vm_foldarith, 936 GLOB_vm_foldarith,
935 GLOB_vm_cpuid, 937 GLOB_vm_cpuid,
936 GLOB_vm_ffi_call, 938 GLOB_vm_ffi_call,
939 GLOB_assert_bad_for_arg_type,
937 GLOB_BC_MODVN_Z, 940 GLOB_BC_MODVN_Z,
938 GLOB_BC_TGETS_Z, 941 GLOB_BC_TGETS_Z,
939 GLOB_BC_TSETS_Z, 942 GLOB_BC_TSETS_Z,
@@ -1092,6 +1095,7 @@ static const char *const globnames[] = {
1092 "vm_foldarith", 1095 "vm_foldarith",
1093 "vm_cpuid", 1096 "vm_cpuid",
1094 "vm_ffi_call@4", 1097 "vm_ffi_call@4",
1098 "assert_bad_for_arg_type",
1095 "BC_MODVN_Z", 1099 "BC_MODVN_Z",
1096 "BC_TGETS_Z", 1100 "BC_TGETS_Z",
1097 "BC_TSETS_Z", 1101 "BC_TSETS_Z",
@@ -1817,13 +1821,18 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1817#endif 1821#endif
1818 dasm_put(Dst, 9803); 1822 dasm_put(Dst, 9803);
1819#endif 1823#endif
1824 dasm_put(Dst, 9811);
1825#ifdef LUA_USE_ASSERT
1826 dasm_put(Dst, 9250);
1827#endif
1828 dasm_put(Dst, 9250);
1820} 1829}
1821 1830
1822/* Generate the code for a single instruction. */ 1831/* Generate the code for a single instruction. */
1823static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) 1832static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1824{ 1833{
1825 int vk = 0; 1834 int vk = 0;
1826 dasm_put(Dst, 9811, defop); 1835 dasm_put(Dst, 9814, defop);
1827 1836
1828 switch (op) { 1837 switch (op) {
1829 1838
@@ -1834,145 +1843,145 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1834 1843
1835 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1844 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1836 if (LJ_DUALNUM) { 1845 if (LJ_DUALNUM) {
1837 dasm_put(Dst, 9813, LJ_TISNUM, LJ_TISNUM); 1846 dasm_put(Dst, 9816, LJ_TISNUM, LJ_TISNUM);
1838 switch (op) { 1847 switch (op) {
1839 case BC_ISLT: 1848 case BC_ISLT:
1840 dasm_put(Dst, 9843); 1849 dasm_put(Dst, 9846);
1841 break; 1850 break;
1842 case BC_ISGE: 1851 case BC_ISGE:
1843 dasm_put(Dst, 9848); 1852 dasm_put(Dst, 9851);
1844 break; 1853 break;
1845 case BC_ISLE: 1854 case BC_ISLE:
1846 dasm_put(Dst, 9853); 1855 dasm_put(Dst, 9856);
1847 break; 1856 break;
1848 case BC_ISGT: 1857 case BC_ISGT:
1849 dasm_put(Dst, 9858); 1858 dasm_put(Dst, 9861);
1850 break; 1859 break;
1851 default: break; /* Shut up GCC. */ 1860 default: break; /* Shut up GCC. */
1852 } 1861 }
1853 dasm_put(Dst, 9863, -BCBIAS_J*4, LJ_TISNUM); 1862 dasm_put(Dst, 9866, -BCBIAS_J*4, LJ_TISNUM);
1854 if (sse) { 1863 if (sse) {
1855 dasm_put(Dst, 9917); 1864 dasm_put(Dst, 9920);
1856 } else { 1865 } else {
1857 dasm_put(Dst, 9928); 1866 dasm_put(Dst, 9931);
1858 } 1867 }
1859 dasm_put(Dst, 9939); 1868 dasm_put(Dst, 9942);
1860 if (sse) { 1869 if (sse) {
1861 dasm_put(Dst, 9946); 1870 dasm_put(Dst, 9949);
1862 switch (op) { 1871 switch (op) {
1863 case BC_ISLT: 1872 case BC_ISLT:
1864 dasm_put(Dst, 9966); 1873 dasm_put(Dst, 9969);
1865 break; 1874 break;
1866 case BC_ISGE: 1875 case BC_ISGE:
1867 dasm_put(Dst, 9971); 1876 dasm_put(Dst, 9974);
1868 break; 1877 break;
1869 case BC_ISLE: 1878 case BC_ISLE:
1870 dasm_put(Dst, 9976); 1879 dasm_put(Dst, 9979);
1871 break; 1880 break;
1872 case BC_ISGT: 1881 case BC_ISGT:
1873 dasm_put(Dst, 9981); 1882 dasm_put(Dst, 9984);
1874 break; 1883 break;
1875 default: break; /* Shut up GCC. */ 1884 default: break; /* Shut up GCC. */
1876 } 1885 }
1877 dasm_put(Dst, 9986); 1886 dasm_put(Dst, 9989);
1878 } else { 1887 } else {
1879 dasm_put(Dst, 9991); 1888 dasm_put(Dst, 9994);
1880 } 1889 }
1881 } else { 1890 } else {
1882 dasm_put(Dst, 9999, LJ_TISNUM, LJ_TISNUM); 1891 dasm_put(Dst, 10002, LJ_TISNUM, LJ_TISNUM);
1883 } 1892 }
1884 if (sse) { 1893 if (sse) {
1885 dasm_put(Dst, 10020); 1894 dasm_put(Dst, 10023);
1886 } else { 1895 } else {
1887 dasm_put(Dst, 10041); 1896 dasm_put(Dst, 10044);
1888 if (cmov) { 1897 if (cmov) {
1889 dasm_put(Dst, 10057); 1898 dasm_put(Dst, 10060);
1890 } else { 1899 } else {
1891 dasm_put(Dst, 10063); 1900 dasm_put(Dst, 10066);
1892 } 1901 }
1893 } 1902 }
1894 if (LJ_DUALNUM) { 1903 if (LJ_DUALNUM) {
1895 switch (op) { 1904 switch (op) {
1896 case BC_ISLT: 1905 case BC_ISLT:
1897 dasm_put(Dst, 9966); 1906 dasm_put(Dst, 9969);
1898 break; 1907 break;
1899 case BC_ISGE: 1908 case BC_ISGE:
1900 dasm_put(Dst, 9971); 1909 dasm_put(Dst, 9974);
1901 break; 1910 break;
1902 case BC_ISLE: 1911 case BC_ISLE:
1903 dasm_put(Dst, 9976); 1912 dasm_put(Dst, 9979);
1904 break; 1913 break;
1905 case BC_ISGT: 1914 case BC_ISGT:
1906 dasm_put(Dst, 9981); 1915 dasm_put(Dst, 9984);
1907 break; 1916 break;
1908 default: break; /* Shut up GCC. */ 1917 default: break; /* Shut up GCC. */
1909 } 1918 }
1910 dasm_put(Dst, 9986); 1919 dasm_put(Dst, 9989);
1911 } else { 1920 } else {
1912 switch (op) { 1921 switch (op) {
1913 case BC_ISLT: 1922 case BC_ISLT:
1914 dasm_put(Dst, 10070); 1923 dasm_put(Dst, 10073);
1915 break; 1924 break;
1916 case BC_ISGE: 1925 case BC_ISGE:
1917 dasm_put(Dst, 10075); 1926 dasm_put(Dst, 10078);
1918 break; 1927 break;
1919 case BC_ISLE: 1928 case BC_ISLE:
1920 dasm_put(Dst, 10080); 1929 dasm_put(Dst, 10083);
1921 break; 1930 break;
1922 case BC_ISGT: 1931 case BC_ISGT:
1923 dasm_put(Dst, 10085); 1932 dasm_put(Dst, 10088);
1924 break; 1933 break;
1925 default: break; /* Shut up GCC. */ 1934 default: break; /* Shut up GCC. */
1926 } 1935 }
1927 dasm_put(Dst, 10090, -BCBIAS_J*4); 1936 dasm_put(Dst, 10093, -BCBIAS_J*4);
1928 } 1937 }
1929 break; 1938 break;
1930 1939
1931 case BC_ISEQV: case BC_ISNEV: 1940 case BC_ISEQV: case BC_ISNEV:
1932 vk = op == BC_ISEQV; 1941 vk = op == BC_ISEQV;
1933 dasm_put(Dst, 10122); 1942 dasm_put(Dst, 10125);
1934 if (LJ_DUALNUM) { 1943 if (LJ_DUALNUM) {
1935 dasm_put(Dst, 10130, LJ_TISNUM, LJ_TISNUM); 1944 dasm_put(Dst, 10133, LJ_TISNUM, LJ_TISNUM);
1936 if (vk) { 1945 if (vk) {
1937 dasm_put(Dst, 10155); 1946 dasm_put(Dst, 10158);
1938 } else { 1947 } else {
1939 dasm_put(Dst, 10160); 1948 dasm_put(Dst, 10163);
1940 } 1949 }
1941 dasm_put(Dst, 10165, -BCBIAS_J*4, LJ_TISNUM); 1950 dasm_put(Dst, 10168, -BCBIAS_J*4, LJ_TISNUM);
1942 if (sse) { 1951 if (sse) {
1943 dasm_put(Dst, 10217); 1952 dasm_put(Dst, 10220);
1944 } else { 1953 } else {
1945 dasm_put(Dst, 10224); 1954 dasm_put(Dst, 10227);
1946 } 1955 }
1947 dasm_put(Dst, 10228); 1956 dasm_put(Dst, 10231);
1948 if (sse) { 1957 if (sse) {
1949 dasm_put(Dst, 10239); 1958 dasm_put(Dst, 10242);
1950 } else { 1959 } else {
1951 dasm_put(Dst, 10251); 1960 dasm_put(Dst, 10254);
1952 } 1961 }
1953 dasm_put(Dst, 10258); 1962 dasm_put(Dst, 10261);
1954 } else { 1963 } else {
1955 dasm_put(Dst, 10263, LJ_TISNUM, LJ_TISNUM); 1964 dasm_put(Dst, 10266, LJ_TISNUM, LJ_TISNUM);
1956 } 1965 }
1957 if (sse) { 1966 if (sse) {
1958 dasm_put(Dst, 10282); 1967 dasm_put(Dst, 10285);
1959 } else { 1968 } else {
1960 dasm_put(Dst, 10300); 1969 dasm_put(Dst, 10303);
1961 if (cmov) { 1970 if (cmov) {
1962 dasm_put(Dst, 10057); 1971 dasm_put(Dst, 10060);
1963 } else { 1972 } else {
1964 dasm_put(Dst, 10063); 1973 dasm_put(Dst, 10066);
1965 } 1974 }
1966 } 1975 }
1967 iseqne_fp: 1976 iseqne_fp:
1968 if (vk) { 1977 if (vk) {
1969 dasm_put(Dst, 10313); 1978 dasm_put(Dst, 10316);
1970 } else { 1979 } else {
1971 dasm_put(Dst, 10322); 1980 dasm_put(Dst, 10325);
1972 } 1981 }
1973 iseqne_end: 1982 iseqne_end:
1974 if (vk) { 1983 if (vk) {
1975 dasm_put(Dst, 10331, -BCBIAS_J*4); 1984 dasm_put(Dst, 10334, -BCBIAS_J*4);
1976 if (!LJ_HASFFI) { 1985 if (!LJ_HASFFI) {
1977 dasm_put(Dst, 4567); 1986 dasm_put(Dst, 4567);
1978 } 1987 }
@@ -1980,150 +1989,150 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1980 if (!LJ_HASFFI) { 1989 if (!LJ_HASFFI) {
1981 dasm_put(Dst, 4567); 1990 dasm_put(Dst, 4567);
1982 } 1991 }
1983 dasm_put(Dst, 10346, -BCBIAS_J*4); 1992 dasm_put(Dst, 10349, -BCBIAS_J*4);
1984 } 1993 }
1985 if (LJ_DUALNUM && (op == BC_ISEQV || op == BC_ISNEV || 1994 if (LJ_DUALNUM && (op == BC_ISEQV || op == BC_ISNEV ||
1986 op == BC_ISEQN || op == BC_ISNEN)) { 1995 op == BC_ISEQN || op == BC_ISNEN)) {
1987 dasm_put(Dst, 10361); 1996 dasm_put(Dst, 10364);
1988 } else { 1997 } else {
1989 dasm_put(Dst, 10102); 1998 dasm_put(Dst, 10105);
1990 } 1999 }
1991 if (op == BC_ISEQV || op == BC_ISNEV) { 2000 if (op == BC_ISEQV || op == BC_ISNEV) {
1992 dasm_put(Dst, 9787); 2001 dasm_put(Dst, 9787);
1993 if (LJ_HASFFI) { 2002 if (LJ_HASFFI) {
1994 dasm_put(Dst, 10366, LJ_TCDATA, LJ_TCDATA); 2003 dasm_put(Dst, 10369, LJ_TCDATA, LJ_TCDATA);
1995 } 2004 }
1996 dasm_put(Dst, 10385, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 2005 dasm_put(Dst, 10388, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1997 if (vk) { 2006 if (vk) {
1998 dasm_put(Dst, 10441); 2007 dasm_put(Dst, 10444);
1999 } else { 2008 } else {
2000 dasm_put(Dst, 10445); 2009 dasm_put(Dst, 10448);
2001 } 2010 }
2002 dasm_put(Dst, 10451); 2011 dasm_put(Dst, 10454);
2003 } else if (LJ_HASFFI) { 2012 } else if (LJ_HASFFI) {
2004 dasm_put(Dst, 10456, LJ_TCDATA); 2013 dasm_put(Dst, 10459, LJ_TCDATA);
2005 if (LJ_DUALNUM && vk) { 2014 if (LJ_DUALNUM && vk) {
2006 dasm_put(Dst, 10463); 2015 dasm_put(Dst, 10466);
2007 } else { 2016 } else {
2008 dasm_put(Dst, 10436); 2017 dasm_put(Dst, 10439);
2009 } 2018 }
2010 dasm_put(Dst, 10468); 2019 dasm_put(Dst, 10471);
2011 } 2020 }
2012 break; 2021 break;
2013 case BC_ISEQS: case BC_ISNES: 2022 case BC_ISEQS: case BC_ISNES:
2014 vk = op == BC_ISEQS; 2023 vk = op == BC_ISEQS;
2015 dasm_put(Dst, 10473, LJ_TSTR); 2024 dasm_put(Dst, 10476, LJ_TSTR);
2016 iseqne_test: 2025 iseqne_test:
2017 if (vk) { 2026 if (vk) {
2018 dasm_put(Dst, 10317); 2027 dasm_put(Dst, 10320);
2019 } else { 2028 } else {
2020 dasm_put(Dst, 2858); 2029 dasm_put(Dst, 2858);
2021 } 2030 }
2022 goto iseqne_end; 2031 goto iseqne_end;
2023 case BC_ISEQN: case BC_ISNEN: 2032 case BC_ISEQN: case BC_ISNEN:
2024 vk = op == BC_ISEQN; 2033 vk = op == BC_ISEQN;
2025 dasm_put(Dst, 10499); 2034 dasm_put(Dst, 10502);
2026 if (LJ_DUALNUM) { 2035 if (LJ_DUALNUM) {
2027 dasm_put(Dst, 10507, LJ_TISNUM, LJ_TISNUM); 2036 dasm_put(Dst, 10510, LJ_TISNUM, LJ_TISNUM);
2028 if (vk) { 2037 if (vk) {
2029 dasm_put(Dst, 10155); 2038 dasm_put(Dst, 10158);
2030 } else { 2039 } else {
2031 dasm_put(Dst, 10160); 2040 dasm_put(Dst, 10163);
2032 } 2041 }
2033 dasm_put(Dst, 10532, -BCBIAS_J*4, LJ_TISNUM); 2042 dasm_put(Dst, 10535, -BCBIAS_J*4, LJ_TISNUM);
2034 if (sse) { 2043 if (sse) {
2035 dasm_put(Dst, 10580); 2044 dasm_put(Dst, 10583);
2036 } else { 2045 } else {
2037 dasm_put(Dst, 10587); 2046 dasm_put(Dst, 10590);
2038 } 2047 }
2039 dasm_put(Dst, 10591); 2048 dasm_put(Dst, 10594);
2040 if (sse) { 2049 if (sse) {
2041 dasm_put(Dst, 10598); 2050 dasm_put(Dst, 10601);
2042 } else { 2051 } else {
2043 dasm_put(Dst, 10610); 2052 dasm_put(Dst, 10613);
2044 } 2053 }
2045 dasm_put(Dst, 10258); 2054 dasm_put(Dst, 10261);
2046 } else { 2055 } else {
2047 dasm_put(Dst, 10617, LJ_TISNUM); 2056 dasm_put(Dst, 10620, LJ_TISNUM);
2048 } 2057 }
2049 if (sse) { 2058 if (sse) {
2050 dasm_put(Dst, 10626); 2059 dasm_put(Dst, 10629);
2051 } else { 2060 } else {
2052 dasm_put(Dst, 10644); 2061 dasm_put(Dst, 10647);
2053 if (cmov) { 2062 if (cmov) {
2054 dasm_put(Dst, 10057); 2063 dasm_put(Dst, 10060);
2055 } else { 2064 } else {
2056 dasm_put(Dst, 10063); 2065 dasm_put(Dst, 10066);
2057 } 2066 }
2058 } 2067 }
2059 goto iseqne_fp; 2068 goto iseqne_fp;
2060 case BC_ISEQP: case BC_ISNEP: 2069 case BC_ISEQP: case BC_ISNEP:
2061 vk = op == BC_ISEQP; 2070 vk = op == BC_ISEQP;
2062 dasm_put(Dst, 10657); 2071 dasm_put(Dst, 10660);
2063 if (!LJ_HASFFI) goto iseqne_test; 2072 if (!LJ_HASFFI) goto iseqne_test;
2064 if (vk) { 2073 if (vk) {
2065 dasm_put(Dst, 10671, -BCBIAS_J*4, LJ_TCDATA); 2074 dasm_put(Dst, 10674, -BCBIAS_J*4, LJ_TCDATA);
2066 } else { 2075 } else {
2067 dasm_put(Dst, 10721, LJ_TCDATA, -BCBIAS_J*4); 2076 dasm_put(Dst, 10724, LJ_TCDATA, -BCBIAS_J*4);
2068 } 2077 }
2069 break; 2078 break;
2070 2079
2071 /* -- Unary test and copy ops ------------------------------------------- */ 2080 /* -- Unary test and copy ops ------------------------------------------- */
2072 2081
2073 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 2082 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
2074 dasm_put(Dst, 10765, LJ_TISTRUECOND); 2083 dasm_put(Dst, 10768, LJ_TISTRUECOND);
2075 if (op == BC_IST || op == BC_ISTC) { 2084 if (op == BC_IST || op == BC_ISTC) {
2076 dasm_put(Dst, 10085); 2085 dasm_put(Dst, 10088);
2077 } else { 2086 } else {
2078 dasm_put(Dst, 10080); 2087 dasm_put(Dst, 10083);
2079 } 2088 }
2080 if (op == BC_ISTC || op == BC_ISFC) { 2089 if (op == BC_ISTC || op == BC_ISFC) {
2081 dasm_put(Dst, 10777); 2090 dasm_put(Dst, 10780);
2082 } 2091 }
2083 dasm_put(Dst, 10090, -BCBIAS_J*4); 2092 dasm_put(Dst, 10093, -BCBIAS_J*4);
2084 break; 2093 break;
2085 2094
2086 /* -- Unary ops --------------------------------------------------------- */ 2095 /* -- Unary ops --------------------------------------------------------- */
2087 2096
2088 case BC_MOV: 2097 case BC_MOV:
2089 dasm_put(Dst, 10788); 2098 dasm_put(Dst, 10791);
2090 break; 2099 break;
2091 case BC_NOT: 2100 case BC_NOT:
2092 dasm_put(Dst, 10816, LJ_TISTRUECOND, LJ_TTRUE); 2101 dasm_put(Dst, 10819, LJ_TISTRUECOND, LJ_TTRUE);
2093 break; 2102 break;
2094 case BC_UNM: 2103 case BC_UNM:
2095 if (LJ_DUALNUM) { 2104 if (LJ_DUALNUM) {
2096 dasm_put(Dst, 10852, LJ_TISNUM, LJ_TISNUM); 2105 dasm_put(Dst, 10855, LJ_TISNUM, LJ_TISNUM);
2097 } else { 2106 } else {
2098 dasm_put(Dst, 10929, LJ_TISNUM); 2107 dasm_put(Dst, 10932, LJ_TISNUM);
2099 } 2108 }
2100 if (sse) { 2109 if (sse) {
2101 dasm_put(Dst, 10940, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 2110 dasm_put(Dst, 10943, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
2102 } else { 2111 } else {
2103 dasm_put(Dst, 10965); 2112 dasm_put(Dst, 10968);
2104 } 2113 }
2105 if (LJ_DUALNUM) { 2114 if (LJ_DUALNUM) {
2106 dasm_put(Dst, 10361); 2115 dasm_put(Dst, 10364);
2107 } else { 2116 } else {
2108 dasm_put(Dst, 10102); 2117 dasm_put(Dst, 10105);
2109 } 2118 }
2110 break; 2119 break;
2111 case BC_LEN: 2120 case BC_LEN:
2112 dasm_put(Dst, 10974, LJ_TSTR); 2121 dasm_put(Dst, 10977, LJ_TSTR);
2113 if (LJ_DUALNUM) { 2122 if (LJ_DUALNUM) {
2114 dasm_put(Dst, 10988, Dt5(->len), LJ_TISNUM); 2123 dasm_put(Dst, 10991, Dt5(->len), LJ_TISNUM);
2115 } else if (sse) { 2124 } else if (sse) {
2116 dasm_put(Dst, 11002, Dt5(->len)); 2125 dasm_put(Dst, 11005, Dt5(->len));
2117 } else { 2126 } else {
2118 dasm_put(Dst, 11020, Dt5(->len)); 2127 dasm_put(Dst, 11023, Dt5(->len));
2119 } 2128 }
2120 dasm_put(Dst, 11029, LJ_TTAB); 2129 dasm_put(Dst, 11032, LJ_TTAB);
2121 if (LJ_DUALNUM) { 2130 if (LJ_DUALNUM) {
2122 } else if (sse) { 2131 } else if (sse) {
2123 dasm_put(Dst, 11070); 2132 dasm_put(Dst, 11073);
2124 } else { 2133 } else {
2125 } 2134 }
2126 dasm_put(Dst, 11076); 2135 dasm_put(Dst, 11079);
2127 break; 2136 break;
2128 2137
2129 /* -- Binary ops -------------------------------------------------------- */ 2138 /* -- Binary ops -------------------------------------------------------- */
@@ -2131,603 +2140,603 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2131 2140
2132 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 2141 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
2133 if (LJ_DUALNUM) { 2142 if (LJ_DUALNUM) {
2134 dasm_put(Dst, 11089); 2143 dasm_put(Dst, 11092);
2135 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2144 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2136 switch (vk) { 2145 switch (vk) {
2137 case 0: 2146 case 0:
2138 dasm_put(Dst, 11097, LJ_TISNUM, LJ_TISNUM); 2147 dasm_put(Dst, 11100, LJ_TISNUM, LJ_TISNUM);
2139 break; 2148 break;
2140 case 1: 2149 case 1:
2141 dasm_put(Dst, 11130, LJ_TISNUM, LJ_TISNUM); 2150 dasm_put(Dst, 11133, LJ_TISNUM, LJ_TISNUM);
2142 break; 2151 break;
2143 default: 2152 default:
2144 dasm_put(Dst, 11163, LJ_TISNUM, LJ_TISNUM); 2153 dasm_put(Dst, 11166, LJ_TISNUM, LJ_TISNUM);
2145 break; 2154 break;
2146 } 2155 }
2147 dasm_put(Dst, 11196, LJ_TISNUM); 2156 dasm_put(Dst, 11199, LJ_TISNUM);
2148 if (vk == 1) { 2157 if (vk == 1) {
2149 dasm_put(Dst, 10998); 2158 dasm_put(Dst, 11001);
2150 } else { 2159 } else {
2151 dasm_put(Dst, 10784); 2160 dasm_put(Dst, 10787);
2152 } 2161 }
2153 dasm_put(Dst, 10102); 2162 dasm_put(Dst, 10105);
2154 } else { 2163 } else {
2155 dasm_put(Dst, 11089); 2164 dasm_put(Dst, 11092);
2156 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2165 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2157 switch (vk) { 2166 switch (vk) {
2158 case 0: 2167 case 0:
2159 dasm_put(Dst, 11202, LJ_TISNUM); 2168 dasm_put(Dst, 11205, LJ_TISNUM);
2160 if (LJ_DUALNUM) { 2169 if (LJ_DUALNUM) {
2161 dasm_put(Dst, 11214, LJ_TISNUM); 2170 dasm_put(Dst, 11217, LJ_TISNUM);
2162 } 2171 }
2163 if (sse) { 2172 if (sse) {
2164 dasm_put(Dst, 11225); 2173 dasm_put(Dst, 11228);
2165 } else { 2174 } else {
2166 dasm_put(Dst, 11239); 2175 dasm_put(Dst, 11242);
2167 } 2176 }
2168 break; 2177 break;
2169 case 1: 2178 case 1:
2170 dasm_put(Dst, 11247, LJ_TISNUM); 2179 dasm_put(Dst, 11250, LJ_TISNUM);
2171 if (LJ_DUALNUM) { 2180 if (LJ_DUALNUM) {
2172 dasm_put(Dst, 11259, LJ_TISNUM); 2181 dasm_put(Dst, 11262, LJ_TISNUM);
2173 } 2182 }
2174 if (sse) { 2183 if (sse) {
2175 dasm_put(Dst, 11270); 2184 dasm_put(Dst, 11273);
2176 } else { 2185 } else {
2177 dasm_put(Dst, 11284); 2186 dasm_put(Dst, 11287);
2178 } 2187 }
2179 break; 2188 break;
2180 default: 2189 default:
2181 dasm_put(Dst, 11292, LJ_TISNUM, LJ_TISNUM); 2190 dasm_put(Dst, 11295, LJ_TISNUM, LJ_TISNUM);
2182 if (sse) { 2191 if (sse) {
2183 dasm_put(Dst, 11314); 2192 dasm_put(Dst, 11317);
2184 } else { 2193 } else {
2185 dasm_put(Dst, 11328); 2194 dasm_put(Dst, 11331);
2186 } 2195 }
2187 break; 2196 break;
2188 } 2197 }
2189 if (sse) { 2198 if (sse) {
2190 dasm_put(Dst, 10958); 2199 dasm_put(Dst, 10961);
2191 } else { 2200 } else {
2192 dasm_put(Dst, 10970); 2201 dasm_put(Dst, 10973);
2193 } 2202 }
2194 dasm_put(Dst, 10102); 2203 dasm_put(Dst, 10105);
2195 } 2204 }
2196 break; 2205 break;
2197 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 2206 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
2198 if (LJ_DUALNUM) { 2207 if (LJ_DUALNUM) {
2199 dasm_put(Dst, 11089); 2208 dasm_put(Dst, 11092);
2200 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2209 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2201 switch (vk) { 2210 switch (vk) {
2202 case 0: 2211 case 0:
2203 dasm_put(Dst, 11336, LJ_TISNUM, LJ_TISNUM); 2212 dasm_put(Dst, 11339, LJ_TISNUM, LJ_TISNUM);
2204 break; 2213 break;
2205 case 1: 2214 case 1:
2206 dasm_put(Dst, 11369, LJ_TISNUM, LJ_TISNUM); 2215 dasm_put(Dst, 11372, LJ_TISNUM, LJ_TISNUM);
2207 break; 2216 break;
2208 default: 2217 default:
2209 dasm_put(Dst, 11402, LJ_TISNUM, LJ_TISNUM); 2218 dasm_put(Dst, 11405, LJ_TISNUM, LJ_TISNUM);
2210 break; 2219 break;
2211 } 2220 }
2212 dasm_put(Dst, 11196, LJ_TISNUM); 2221 dasm_put(Dst, 11199, LJ_TISNUM);
2213 if (vk == 1) { 2222 if (vk == 1) {
2214 dasm_put(Dst, 10998); 2223 dasm_put(Dst, 11001);
2215 } else { 2224 } else {
2216 dasm_put(Dst, 10784); 2225 dasm_put(Dst, 10787);
2217 } 2226 }
2218 dasm_put(Dst, 10102); 2227 dasm_put(Dst, 10105);
2219 } else { 2228 } else {
2220 dasm_put(Dst, 11089); 2229 dasm_put(Dst, 11092);
2221 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2230 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2222 switch (vk) { 2231 switch (vk) {
2223 case 0: 2232 case 0:
2224 dasm_put(Dst, 11202, LJ_TISNUM); 2233 dasm_put(Dst, 11205, LJ_TISNUM);
2225 if (LJ_DUALNUM) { 2234 if (LJ_DUALNUM) {
2226 dasm_put(Dst, 11214, LJ_TISNUM); 2235 dasm_put(Dst, 11217, LJ_TISNUM);
2227 } 2236 }
2228 if (sse) { 2237 if (sse) {
2229 dasm_put(Dst, 11435); 2238 dasm_put(Dst, 11438);
2230 } else { 2239 } else {
2231 dasm_put(Dst, 11449); 2240 dasm_put(Dst, 11452);
2232 } 2241 }
2233 break; 2242 break;
2234 case 1: 2243 case 1:
2235 dasm_put(Dst, 11247, LJ_TISNUM); 2244 dasm_put(Dst, 11250, LJ_TISNUM);
2236 if (LJ_DUALNUM) { 2245 if (LJ_DUALNUM) {
2237 dasm_put(Dst, 11259, LJ_TISNUM); 2246 dasm_put(Dst, 11262, LJ_TISNUM);
2238 } 2247 }
2239 if (sse) { 2248 if (sse) {
2240 dasm_put(Dst, 11457); 2249 dasm_put(Dst, 11460);
2241 } else { 2250 } else {
2242 dasm_put(Dst, 11471); 2251 dasm_put(Dst, 11474);
2243 } 2252 }
2244 break; 2253 break;
2245 default: 2254 default:
2246 dasm_put(Dst, 11292, LJ_TISNUM, LJ_TISNUM); 2255 dasm_put(Dst, 11295, LJ_TISNUM, LJ_TISNUM);
2247 if (sse) { 2256 if (sse) {
2248 dasm_put(Dst, 11479); 2257 dasm_put(Dst, 11482);
2249 } else { 2258 } else {
2250 dasm_put(Dst, 11493); 2259 dasm_put(Dst, 11496);
2251 } 2260 }
2252 break; 2261 break;
2253 } 2262 }
2254 if (sse) { 2263 if (sse) {
2255 dasm_put(Dst, 10958); 2264 dasm_put(Dst, 10961);
2256 } else { 2265 } else {
2257 dasm_put(Dst, 10970); 2266 dasm_put(Dst, 10973);
2258 } 2267 }
2259 dasm_put(Dst, 10102); 2268 dasm_put(Dst, 10105);
2260 } 2269 }
2261 break; 2270 break;
2262 case BC_MULVN: case BC_MULNV: case BC_MULVV: 2271 case BC_MULVN: case BC_MULNV: case BC_MULVV:
2263 if (LJ_DUALNUM) { 2272 if (LJ_DUALNUM) {
2264 dasm_put(Dst, 11089); 2273 dasm_put(Dst, 11092);
2265 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2274 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2266 switch (vk) { 2275 switch (vk) {
2267 case 0: 2276 case 0:
2268 dasm_put(Dst, 11501, LJ_TISNUM, LJ_TISNUM); 2277 dasm_put(Dst, 11504, LJ_TISNUM, LJ_TISNUM);
2269 break; 2278 break;
2270 case 1: 2279 case 1:
2271 dasm_put(Dst, 11535, LJ_TISNUM, LJ_TISNUM); 2280 dasm_put(Dst, 11538, LJ_TISNUM, LJ_TISNUM);
2272 break; 2281 break;
2273 default: 2282 default:
2274 dasm_put(Dst, 11569, LJ_TISNUM, LJ_TISNUM); 2283 dasm_put(Dst, 11572, LJ_TISNUM, LJ_TISNUM);
2275 break; 2284 break;
2276 } 2285 }
2277 dasm_put(Dst, 11196, LJ_TISNUM); 2286 dasm_put(Dst, 11199, LJ_TISNUM);
2278 if (vk == 1) { 2287 if (vk == 1) {
2279 dasm_put(Dst, 10998); 2288 dasm_put(Dst, 11001);
2280 } else { 2289 } else {
2281 dasm_put(Dst, 10784); 2290 dasm_put(Dst, 10787);
2282 } 2291 }
2283 dasm_put(Dst, 10102); 2292 dasm_put(Dst, 10105);
2284 } else { 2293 } else {
2285 dasm_put(Dst, 11089); 2294 dasm_put(Dst, 11092);
2286 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2295 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2287 switch (vk) { 2296 switch (vk) {
2288 case 0: 2297 case 0:
2289 dasm_put(Dst, 11202, LJ_TISNUM); 2298 dasm_put(Dst, 11205, LJ_TISNUM);
2290 if (LJ_DUALNUM) { 2299 if (LJ_DUALNUM) {
2291 dasm_put(Dst, 11214, LJ_TISNUM); 2300 dasm_put(Dst, 11217, LJ_TISNUM);
2292 } 2301 }
2293 if (sse) { 2302 if (sse) {
2294 dasm_put(Dst, 11603); 2303 dasm_put(Dst, 11606);
2295 } else { 2304 } else {
2296 dasm_put(Dst, 11617); 2305 dasm_put(Dst, 11620);
2297 } 2306 }
2298 break; 2307 break;
2299 case 1: 2308 case 1:
2300 dasm_put(Dst, 11247, LJ_TISNUM); 2309 dasm_put(Dst, 11250, LJ_TISNUM);
2301 if (LJ_DUALNUM) { 2310 if (LJ_DUALNUM) {
2302 dasm_put(Dst, 11259, LJ_TISNUM); 2311 dasm_put(Dst, 11262, LJ_TISNUM);
2303 } 2312 }
2304 if (sse) { 2313 if (sse) {
2305 dasm_put(Dst, 11625); 2314 dasm_put(Dst, 11628);
2306 } else { 2315 } else {
2307 dasm_put(Dst, 11639); 2316 dasm_put(Dst, 11642);
2308 } 2317 }
2309 break; 2318 break;
2310 default: 2319 default:
2311 dasm_put(Dst, 11292, LJ_TISNUM, LJ_TISNUM); 2320 dasm_put(Dst, 11295, LJ_TISNUM, LJ_TISNUM);
2312 if (sse) { 2321 if (sse) {
2313 dasm_put(Dst, 11647); 2322 dasm_put(Dst, 11650);
2314 } else { 2323 } else {
2315 dasm_put(Dst, 11661); 2324 dasm_put(Dst, 11664);
2316 } 2325 }
2317 break; 2326 break;
2318 } 2327 }
2319 if (sse) { 2328 if (sse) {
2320 dasm_put(Dst, 10958); 2329 dasm_put(Dst, 10961);
2321 } else { 2330 } else {
2322 dasm_put(Dst, 10970); 2331 dasm_put(Dst, 10973);
2323 } 2332 }
2324 dasm_put(Dst, 10102); 2333 dasm_put(Dst, 10105);
2325 } 2334 }
2326 break; 2335 break;
2327 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 2336 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
2328 dasm_put(Dst, 11089); 2337 dasm_put(Dst, 11092);
2329 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2338 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2330 switch (vk) { 2339 switch (vk) {
2331 case 0: 2340 case 0:
2332 dasm_put(Dst, 11202, LJ_TISNUM); 2341 dasm_put(Dst, 11205, LJ_TISNUM);
2333 if (LJ_DUALNUM) { 2342 if (LJ_DUALNUM) {
2334 dasm_put(Dst, 11214, LJ_TISNUM); 2343 dasm_put(Dst, 11217, LJ_TISNUM);
2335 } 2344 }
2336 if (sse) { 2345 if (sse) {
2337 dasm_put(Dst, 11669); 2346 dasm_put(Dst, 11672);
2338 } else { 2347 } else {
2339 dasm_put(Dst, 11683); 2348 dasm_put(Dst, 11686);
2340 } 2349 }
2341 break; 2350 break;
2342 case 1: 2351 case 1:
2343 dasm_put(Dst, 11247, LJ_TISNUM); 2352 dasm_put(Dst, 11250, LJ_TISNUM);
2344 if (LJ_DUALNUM) { 2353 if (LJ_DUALNUM) {
2345 dasm_put(Dst, 11259, LJ_TISNUM); 2354 dasm_put(Dst, 11262, LJ_TISNUM);
2346 } 2355 }
2347 if (sse) { 2356 if (sse) {
2348 dasm_put(Dst, 11691); 2357 dasm_put(Dst, 11694);
2349 } else { 2358 } else {
2350 dasm_put(Dst, 11705); 2359 dasm_put(Dst, 11708);
2351 } 2360 }
2352 break; 2361 break;
2353 default: 2362 default:
2354 dasm_put(Dst, 11292, LJ_TISNUM, LJ_TISNUM); 2363 dasm_put(Dst, 11295, LJ_TISNUM, LJ_TISNUM);
2355 if (sse) { 2364 if (sse) {
2356 dasm_put(Dst, 11713); 2365 dasm_put(Dst, 11716);
2357 } else { 2366 } else {
2358 dasm_put(Dst, 11727); 2367 dasm_put(Dst, 11730);
2359 } 2368 }
2360 break; 2369 break;
2361 } 2370 }
2362 if (sse) { 2371 if (sse) {
2363 dasm_put(Dst, 10958); 2372 dasm_put(Dst, 10961);
2364 } else { 2373 } else {
2365 dasm_put(Dst, 10970); 2374 dasm_put(Dst, 10973);
2366 } 2375 }
2367 dasm_put(Dst, 10102); 2376 dasm_put(Dst, 10105);
2368 break; 2377 break;
2369 case BC_MODVN: 2378 case BC_MODVN:
2370 dasm_put(Dst, 11089); 2379 dasm_put(Dst, 11092);
2371 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2380 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2372 switch (vk) { 2381 switch (vk) {
2373 case 0: 2382 case 0:
2374 dasm_put(Dst, 11202, LJ_TISNUM); 2383 dasm_put(Dst, 11205, LJ_TISNUM);
2375 if (LJ_DUALNUM) { 2384 if (LJ_DUALNUM) {
2376 dasm_put(Dst, 11214, LJ_TISNUM); 2385 dasm_put(Dst, 11217, LJ_TISNUM);
2377 } 2386 }
2378 if (sse) { 2387 if (sse) {
2379 dasm_put(Dst, 11735); 2388 dasm_put(Dst, 11738);
2380 } else { 2389 } else {
2381 dasm_put(Dst, 11749); 2390 dasm_put(Dst, 11752);
2382 } 2391 }
2383 break; 2392 break;
2384 case 1: 2393 case 1:
2385 dasm_put(Dst, 11247, LJ_TISNUM); 2394 dasm_put(Dst, 11250, LJ_TISNUM);
2386 if (LJ_DUALNUM) { 2395 if (LJ_DUALNUM) {
2387 dasm_put(Dst, 11259, LJ_TISNUM); 2396 dasm_put(Dst, 11262, LJ_TISNUM);
2388 } 2397 }
2389 if (sse) { 2398 if (sse) {
2390 dasm_put(Dst, 11757); 2399 dasm_put(Dst, 11760);
2391 } else { 2400 } else {
2392 dasm_put(Dst, 11771); 2401 dasm_put(Dst, 11774);
2393 } 2402 }
2394 break; 2403 break;
2395 default: 2404 default:
2396 dasm_put(Dst, 11292, LJ_TISNUM, LJ_TISNUM); 2405 dasm_put(Dst, 11295, LJ_TISNUM, LJ_TISNUM);
2397 if (sse) { 2406 if (sse) {
2398 dasm_put(Dst, 11779); 2407 dasm_put(Dst, 11782);
2399 } else { 2408 } else {
2400 dasm_put(Dst, 11793); 2409 dasm_put(Dst, 11796);
2401 } 2410 }
2402 break; 2411 break;
2403 } 2412 }
2404 dasm_put(Dst, 11801); 2413 dasm_put(Dst, 11804);
2405 if (sse) { 2414 if (sse) {
2406 dasm_put(Dst, 10958); 2415 dasm_put(Dst, 10961);
2407 } else { 2416 } else {
2408 dasm_put(Dst, 10970); 2417 dasm_put(Dst, 10973);
2409 } 2418 }
2410 dasm_put(Dst, 10102); 2419 dasm_put(Dst, 10105);
2411 break; 2420 break;
2412 case BC_MODNV: case BC_MODVV: 2421 case BC_MODNV: case BC_MODVV:
2413 dasm_put(Dst, 11089); 2422 dasm_put(Dst, 11092);
2414 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2423 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2415 switch (vk) { 2424 switch (vk) {
2416 case 0: 2425 case 0:
2417 dasm_put(Dst, 11202, LJ_TISNUM); 2426 dasm_put(Dst, 11205, LJ_TISNUM);
2418 if (LJ_DUALNUM) { 2427 if (LJ_DUALNUM) {
2419 dasm_put(Dst, 11214, LJ_TISNUM); 2428 dasm_put(Dst, 11217, LJ_TISNUM);
2420 } 2429 }
2421 if (sse) { 2430 if (sse) {
2422 dasm_put(Dst, 11735); 2431 dasm_put(Dst, 11738);
2423 } else { 2432 } else {
2424 dasm_put(Dst, 11749); 2433 dasm_put(Dst, 11752);
2425 } 2434 }
2426 break; 2435 break;
2427 case 1: 2436 case 1:
2428 dasm_put(Dst, 11247, LJ_TISNUM); 2437 dasm_put(Dst, 11250, LJ_TISNUM);
2429 if (LJ_DUALNUM) { 2438 if (LJ_DUALNUM) {
2430 dasm_put(Dst, 11259, LJ_TISNUM); 2439 dasm_put(Dst, 11262, LJ_TISNUM);
2431 } 2440 }
2432 if (sse) { 2441 if (sse) {
2433 dasm_put(Dst, 11757); 2442 dasm_put(Dst, 11760);
2434 } else { 2443 } else {
2435 dasm_put(Dst, 11771); 2444 dasm_put(Dst, 11774);
2436 } 2445 }
2437 break; 2446 break;
2438 default: 2447 default:
2439 dasm_put(Dst, 11292, LJ_TISNUM, LJ_TISNUM); 2448 dasm_put(Dst, 11295, LJ_TISNUM, LJ_TISNUM);
2440 if (sse) { 2449 if (sse) {
2441 dasm_put(Dst, 11779); 2450 dasm_put(Dst, 11782);
2442 } else { 2451 } else {
2443 dasm_put(Dst, 11793); 2452 dasm_put(Dst, 11796);
2444 } 2453 }
2445 break; 2454 break;
2446 } 2455 }
2447 dasm_put(Dst, 11807); 2456 dasm_put(Dst, 11810);
2448 break; 2457 break;
2449 case BC_POW: 2458 case BC_POW:
2450 dasm_put(Dst, 11089); 2459 dasm_put(Dst, 11092);
2451 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 2460 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
2452 switch (vk) { 2461 switch (vk) {
2453 case 0: 2462 case 0:
2454 dasm_put(Dst, 11202, LJ_TISNUM); 2463 dasm_put(Dst, 11205, LJ_TISNUM);
2455 if (LJ_DUALNUM) { 2464 if (LJ_DUALNUM) {
2456 dasm_put(Dst, 11214, LJ_TISNUM); 2465 dasm_put(Dst, 11217, LJ_TISNUM);
2457 } 2466 }
2458 if (sse) { 2467 if (sse) {
2459 dasm_put(Dst, 11735); 2468 dasm_put(Dst, 11738);
2460 } else { 2469 } else {
2461 dasm_put(Dst, 11749); 2470 dasm_put(Dst, 11752);
2462 } 2471 }
2463 break; 2472 break;
2464 case 1: 2473 case 1:
2465 dasm_put(Dst, 11247, LJ_TISNUM); 2474 dasm_put(Dst, 11250, LJ_TISNUM);
2466 if (LJ_DUALNUM) { 2475 if (LJ_DUALNUM) {
2467 dasm_put(Dst, 11259, LJ_TISNUM); 2476 dasm_put(Dst, 11262, LJ_TISNUM);
2468 } 2477 }
2469 if (sse) { 2478 if (sse) {
2470 dasm_put(Dst, 11757); 2479 dasm_put(Dst, 11760);
2471 } else { 2480 } else {
2472 dasm_put(Dst, 11771); 2481 dasm_put(Dst, 11774);
2473 } 2482 }
2474 break; 2483 break;
2475 default: 2484 default:
2476 dasm_put(Dst, 11292, LJ_TISNUM, LJ_TISNUM); 2485 dasm_put(Dst, 11295, LJ_TISNUM, LJ_TISNUM);
2477 if (sse) { 2486 if (sse) {
2478 dasm_put(Dst, 11779); 2487 dasm_put(Dst, 11782);
2479 } else { 2488 } else {
2480 dasm_put(Dst, 11793); 2489 dasm_put(Dst, 11796);
2481 } 2490 }
2482 break; 2491 break;
2483 } 2492 }
2484 dasm_put(Dst, 11812); 2493 dasm_put(Dst, 11815);
2485 if (sse) { 2494 if (sse) {
2486 dasm_put(Dst, 10958); 2495 dasm_put(Dst, 10961);
2487 } else { 2496 } else {
2488 dasm_put(Dst, 10970); 2497 dasm_put(Dst, 10973);
2489 } 2498 }
2490 dasm_put(Dst, 10102); 2499 dasm_put(Dst, 10105);
2491 break; 2500 break;
2492 2501
2493 case BC_CAT: 2502 case BC_CAT:
2494 dasm_put(Dst, 11816, Dt1(->base), Dt1(->base)); 2503 dasm_put(Dst, 11819, Dt1(->base), Dt1(->base));
2495 break; 2504 break;
2496 2505
2497 /* -- Constant ops ------------------------------------------------------ */ 2506 /* -- Constant ops ------------------------------------------------------ */
2498 2507
2499 case BC_KSTR: 2508 case BC_KSTR:
2500 dasm_put(Dst, 11899, LJ_TSTR); 2509 dasm_put(Dst, 11902, LJ_TSTR);
2501 break; 2510 break;
2502 case BC_KCDATA: 2511 case BC_KCDATA:
2503#if LJ_HASFFI 2512#if LJ_HASFFI
2504 dasm_put(Dst, 11899, LJ_TCDATA); 2513 dasm_put(Dst, 11902, LJ_TCDATA);
2505#endif 2514#endif
2506 break; 2515 break;
2507 case BC_KSHORT: 2516 case BC_KSHORT:
2508 if (LJ_DUALNUM) { 2517 if (LJ_DUALNUM) {
2509 dasm_put(Dst, 11934, LJ_TISNUM); 2518 dasm_put(Dst, 11937, LJ_TISNUM);
2510 } else if (sse) { 2519 } else if (sse) {
2511 dasm_put(Dst, 11946); 2520 dasm_put(Dst, 11949);
2512 } else { 2521 } else {
2513 dasm_put(Dst, 11961); 2522 dasm_put(Dst, 11964);
2514 } 2523 }
2515 dasm_put(Dst, 10102); 2524 dasm_put(Dst, 10105);
2516 break; 2525 break;
2517 case BC_KNUM: 2526 case BC_KNUM:
2518 if (sse) { 2527 if (sse) {
2519 dasm_put(Dst, 11969); 2528 dasm_put(Dst, 11972);
2520 } else { 2529 } else {
2521 dasm_put(Dst, 11982); 2530 dasm_put(Dst, 11985);
2522 } 2531 }
2523 dasm_put(Dst, 10102); 2532 dasm_put(Dst, 10105);
2524 break; 2533 break;
2525 case BC_KPRI: 2534 case BC_KPRI:
2526 dasm_put(Dst, 11989); 2535 dasm_put(Dst, 11992);
2527 break; 2536 break;
2528 case BC_KNIL: 2537 case BC_KNIL:
2529 dasm_put(Dst, 12017, LJ_TNIL); 2538 dasm_put(Dst, 12020, LJ_TNIL);
2530 break; 2539 break;
2531 2540
2532 /* -- Upvalue and function ops ------------------------------------------ */ 2541 /* -- Upvalue and function ops ------------------------------------------ */
2533 2542
2534 case BC_UGET: 2543 case BC_UGET:
2535 dasm_put(Dst, 12064, offsetof(GCfuncL, uvptr), DtA(->v)); 2544 dasm_put(Dst, 12067, offsetof(GCfuncL, uvptr), DtA(->v));
2536 break; 2545 break;
2537 case BC_USETV: 2546 case BC_USETV:
2538#define TV2MARKOFS \ 2547#define TV2MARKOFS \
2539 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 2548 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
2540 dasm_put(Dst, 12104, 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); 2549 dasm_put(Dst, 12107, 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);
2541 dasm_put(Dst, 12195); 2550 dasm_put(Dst, 12198);
2542 break; 2551 break;
2543#undef TV2MARKOFS 2552#undef TV2MARKOFS
2544 case BC_USETS: 2553 case BC_USETS:
2545 dasm_put(Dst, 12207, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 2554 dasm_put(Dst, 12210, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
2546 break; 2555 break;
2547 case BC_USETN: 2556 case BC_USETN:
2548 dasm_put(Dst, 12300); 2557 dasm_put(Dst, 12303);
2549 if (sse) { 2558 if (sse) {
2550 dasm_put(Dst, 12305); 2559 dasm_put(Dst, 12308);
2551 } else { 2560 } else {
2552 dasm_put(Dst, 10613); 2561 dasm_put(Dst, 10616);
2553 } 2562 }
2554 dasm_put(Dst, 12312, offsetof(GCfuncL, uvptr), DtA(->v)); 2563 dasm_put(Dst, 12315, offsetof(GCfuncL, uvptr), DtA(->v));
2555 if (sse) { 2564 if (sse) {
2556 dasm_put(Dst, 12321); 2565 dasm_put(Dst, 12324);
2557 } else { 2566 } else {
2558 dasm_put(Dst, 12327); 2567 dasm_put(Dst, 12330);
2559 } 2568 }
2560 dasm_put(Dst, 10102); 2569 dasm_put(Dst, 10105);
2561 break; 2570 break;
2562 case BC_USETP: 2571 case BC_USETP:
2563 dasm_put(Dst, 12330, offsetof(GCfuncL, uvptr), DtA(->v)); 2572 dasm_put(Dst, 12333, offsetof(GCfuncL, uvptr), DtA(->v));
2564 break; 2573 break;
2565 case BC_UCLO: 2574 case BC_UCLO:
2566 dasm_put(Dst, 12369, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 2575 dasm_put(Dst, 12372, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
2567 break; 2576 break;
2568 2577
2569 case BC_FNEW: 2578 case BC_FNEW:
2570 dasm_put(Dst, 12424, Dt1(->base), Dt1(->base), LJ_TFUNC); 2579 dasm_put(Dst, 12427, Dt1(->base), Dt1(->base), LJ_TFUNC);
2571 break; 2580 break;
2572 2581
2573 /* -- Table ops --------------------------------------------------------- */ 2582 /* -- Table ops --------------------------------------------------------- */
2574 2583
2575 case BC_TNEW: 2584 case BC_TNEW:
2576 dasm_put(Dst, 12490, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); 2585 dasm_put(Dst, 12493, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB);
2577 break; 2586 break;
2578 case BC_TDUP: 2587 case BC_TDUP:
2579 dasm_put(Dst, 12612, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 2588 dasm_put(Dst, 12615, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
2580 break; 2589 break;
2581 2590
2582 case BC_GGET: 2591 case BC_GGET:
2583 dasm_put(Dst, 12707, Dt7(->env)); 2592 dasm_put(Dst, 12710, Dt7(->env));
2584 break; 2593 break;
2585 case BC_GSET: 2594 case BC_GSET:
2586 dasm_put(Dst, 12726, Dt7(->env)); 2595 dasm_put(Dst, 12729, Dt7(->env));
2587 break; 2596 break;
2588 2597
2589 case BC_TGETV: 2598 case BC_TGETV:
2590 dasm_put(Dst, 12745, LJ_TTAB); 2599 dasm_put(Dst, 12748, LJ_TTAB);
2591 if (LJ_DUALNUM) { 2600 if (LJ_DUALNUM) {
2592 dasm_put(Dst, 12768, LJ_TISNUM); 2601 dasm_put(Dst, 12771, LJ_TISNUM);
2593 } else { 2602 } else {
2594 dasm_put(Dst, 12782, LJ_TISNUM); 2603 dasm_put(Dst, 12785, LJ_TISNUM);
2595 if (sse) { 2604 if (sse) {
2596 dasm_put(Dst, 12793); 2605 dasm_put(Dst, 12796);
2597 } else { 2606 } else {
2598 } 2607 }
2599 dasm_put(Dst, 12814); 2608 dasm_put(Dst, 12817);
2600 } 2609 }
2601 dasm_put(Dst, 12819, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index, LJ_TNIL); 2610 dasm_put(Dst, 12822, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index, LJ_TNIL);
2602 dasm_put(Dst, 12910, LJ_TSTR); 2611 dasm_put(Dst, 12913, LJ_TSTR);
2603 break; 2612 break;
2604 case BC_TGETS: 2613 case BC_TGETS:
2605 dasm_put(Dst, 12928, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2614 dasm_put(Dst, 12931, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2606 dasm_put(Dst, 13012, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2615 dasm_put(Dst, 13015, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2607 break; 2616 break;
2608 case BC_TGETB: 2617 case BC_TGETB:
2609 dasm_put(Dst, 13083, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2618 dasm_put(Dst, 13086, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2610 dasm_put(Dst, 13178, LJ_TNIL); 2619 dasm_put(Dst, 13181, LJ_TNIL);
2611 break; 2620 break;
2612 2621
2613 case BC_TSETV: 2622 case BC_TSETV:
2614 dasm_put(Dst, 13195, LJ_TTAB); 2623 dasm_put(Dst, 13198, LJ_TTAB);
2615 if (LJ_DUALNUM) { 2624 if (LJ_DUALNUM) {
2616 dasm_put(Dst, 12768, LJ_TISNUM); 2625 dasm_put(Dst, 12771, LJ_TISNUM);
2617 } else { 2626 } else {
2618 dasm_put(Dst, 12782, LJ_TISNUM); 2627 dasm_put(Dst, 12785, LJ_TISNUM);
2619 if (sse) { 2628 if (sse) {
2620 dasm_put(Dst, 12793); 2629 dasm_put(Dst, 12796);
2621 } else { 2630 } else {
2622 } 2631 }
2623 dasm_put(Dst, 13218); 2632 dasm_put(Dst, 13221);
2624 } 2633 }
2625 dasm_put(Dst, 13223, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); 2634 dasm_put(Dst, 13226, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex);
2626 dasm_put(Dst, 13303, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2635 dasm_put(Dst, 13306, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2627 break; 2636 break;
2628 case BC_TSETS: 2637 case BC_TSETS:
2629 dasm_put(Dst, 13360, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2638 dasm_put(Dst, 13363, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2630 dasm_put(Dst, 13436, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 2639 dasm_put(Dst, 13439, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
2631 dasm_put(Dst, 13524, 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)); 2640 dasm_put(Dst, 13527, 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));
2632 break; 2641 break;
2633 case BC_TSETB: 2642 case BC_TSETB:
2634 dasm_put(Dst, 13615, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 2643 dasm_put(Dst, 13618, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
2635 dasm_put(Dst, 13709, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2644 dasm_put(Dst, 13712, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2636 break; 2645 break;
2637 2646
2638 case BC_TSETM: 2647 case BC_TSETM:
2639 dasm_put(Dst, 13755, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); 2648 dasm_put(Dst, 13758, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
2640 dasm_put(Dst, 13898, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2649 dasm_put(Dst, 13901, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2641 break; 2650 break;
2642 2651
2643 /* -- Calls and vararg handling ----------------------------------------- */ 2652 /* -- Calls and vararg handling ----------------------------------------- */
2644 2653
2645 case BC_CALL: case BC_CALLM: 2654 case BC_CALL: case BC_CALLM:
2646 dasm_put(Dst, 11093); 2655 dasm_put(Dst, 11096);
2647 if (op == BC_CALLM) { 2656 if (op == BC_CALLM) {
2648 dasm_put(Dst, 13916); 2657 dasm_put(Dst, 13919);
2649 } 2658 }
2650 dasm_put(Dst, 13921, LJ_TFUNC, Dt7(->pc)); 2659 dasm_put(Dst, 13924, LJ_TFUNC, Dt7(->pc));
2651 break; 2660 break;
2652 2661
2653 case BC_CALLMT: 2662 case BC_CALLMT:
2654 dasm_put(Dst, 13916); 2663 dasm_put(Dst, 13919);
2655 break; 2664 break;
2656 case BC_CALLT: 2665 case BC_CALLT:
2657 dasm_put(Dst, 13963, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 2666 dasm_put(Dst, 13966, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
2658 dasm_put(Dst, 14078, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 2667 dasm_put(Dst, 14081, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
2659 break; 2668 break;
2660 2669
2661 case BC_ITERC: 2670 case BC_ITERC:
2662 dasm_put(Dst, 14149, LJ_TFUNC, 2+1, Dt7(->pc)); 2671 dasm_put(Dst, 14152, LJ_TFUNC, 2+1, Dt7(->pc));
2663 break; 2672 break;
2664 2673
2665 case BC_ITERN: 2674 case BC_ITERN:
2666#if LJ_HASJIT 2675#if LJ_HASJIT
2667#endif 2676#endif
2668 dasm_put(Dst, 14220, Dt6(->asize), Dt6(->array), LJ_TNIL); 2677 dasm_put(Dst, 14223, Dt6(->asize), Dt6(->array), LJ_TNIL);
2669 if (LJ_DUALNUM) { 2678 if (LJ_DUALNUM) {
2670 dasm_put(Dst, 10993, LJ_TISNUM); 2679 dasm_put(Dst, 10996, LJ_TISNUM);
2671 } else if (sse) { 2680 } else if (sse) {
2672 dasm_put(Dst, 11070); 2681 dasm_put(Dst, 11073);
2673 } else { 2682 } else {
2674 dasm_put(Dst, 14266); 2683 dasm_put(Dst, 14269);
2675 } 2684 }
2676 dasm_put(Dst, 14272); 2685 dasm_put(Dst, 14275);
2677 if (LJ_DUALNUM) { 2686 if (LJ_DUALNUM) {
2678 } else if (sse) { 2687 } else if (sse) {
2679 dasm_put(Dst, 10958); 2688 dasm_put(Dst, 10961);
2680 } else { 2689 } else {
2681 dasm_put(Dst, 10970); 2690 dasm_put(Dst, 10973);
2682 } 2691 }
2683 dasm_put(Dst, 14285, -BCBIAS_J*4); 2692 dasm_put(Dst, 14288, -BCBIAS_J*4);
2684 if (!LJ_DUALNUM && !sse) { 2693 if (!LJ_DUALNUM && !sse) {
2685 dasm_put(Dst, 14337); 2694 dasm_put(Dst, 14340);
2686 } 2695 }
2687 dasm_put(Dst, 14343, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); 2696 dasm_put(Dst, 14346, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val));
2688 break; 2697 break;
2689 2698
2690 case BC_ISNEXT: 2699 case BC_ISNEXT:
2691 dasm_put(Dst, 14415, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); 2700 dasm_put(Dst, 14418, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC);
2692 break; 2701 break;
2693 2702
2694 case BC_VARG: 2703 case BC_VARG:
2695 dasm_put(Dst, 14515, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); 2704 dasm_put(Dst, 14518, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack));
2696 dasm_put(Dst, 14675, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2705 dasm_put(Dst, 14678, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2697 break; 2706 break;
2698 2707
2699 /* -- Returns ----------------------------------------------------------- */ 2708 /* -- Returns ----------------------------------------------------------- */
2700 2709
2701 case BC_RETM: 2710 case BC_RETM:
2702 dasm_put(Dst, 13916); 2711 dasm_put(Dst, 13919);
2703 break; 2712 break;
2704 2713
2705 case BC_RET: case BC_RET0: case BC_RET1: 2714 case BC_RET: case BC_RET0: case BC_RET1:
2706 if (op != BC_RET0) { 2715 if (op != BC_RET0) {
2707 dasm_put(Dst, 14741); 2716 dasm_put(Dst, 14744);
2708 } 2717 }
2709 dasm_put(Dst, 14745, FRAME_TYPE); 2718 dasm_put(Dst, 14748, FRAME_TYPE);
2710 switch (op) { 2719 switch (op) {
2711 case BC_RET: 2720 case BC_RET:
2712 dasm_put(Dst, 14764); 2721 dasm_put(Dst, 14767);
2713 break; 2722 break;
2714 case BC_RET1: 2723 case BC_RET1:
2715 dasm_put(Dst, 14816); 2724 dasm_put(Dst, 14819);
2716 /* fallthrough */ 2725 /* fallthrough */
2717 case BC_RET0: 2726 case BC_RET0:
2718 dasm_put(Dst, 14826); 2727 dasm_put(Dst, 14829);
2719 default: 2728 default:
2720 break; 2729 break;
2721 } 2730 }
2722 dasm_put(Dst, 14837, Dt7(->pc), PC2PROTO(k)); 2731 dasm_put(Dst, 14840, Dt7(->pc), PC2PROTO(k));
2723 if (op == BC_RET) { 2732 if (op == BC_RET) {
2724 dasm_put(Dst, 14881, LJ_TNIL); 2733 dasm_put(Dst, 14884, LJ_TNIL);
2725 } else { 2734 } else {
2726 dasm_put(Dst, 14890, LJ_TNIL); 2735 dasm_put(Dst, 14893, LJ_TNIL);
2727 } 2736 }
2728 dasm_put(Dst, 14897, -FRAME_VARG, FRAME_TYPEP); 2737 dasm_put(Dst, 14900, -FRAME_VARG, FRAME_TYPEP);
2729 if (op != BC_RET0) { 2738 if (op != BC_RET0) {
2730 dasm_put(Dst, 14921); 2739 dasm_put(Dst, 14924);
2731 } 2740 }
2732 dasm_put(Dst, 4646); 2741 dasm_put(Dst, 4646);
2733 break; 2742 break;
@@ -2737,7 +2746,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2737 2746
2738 case BC_FORL: 2747 case BC_FORL:
2739#if LJ_HASJIT 2748#if LJ_HASJIT
2740 dasm_put(Dst, 14925, HOTCOUNT_PCMASK, GG_DISP2HOT); 2749 dasm_put(Dst, 14928, HOTCOUNT_PCMASK, GG_DISP2HOT);
2741#endif 2750#endif
2742 break; 2751 break;
2743 2752
@@ -2749,104 +2758,111 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2749 case BC_FORI: 2758 case BC_FORI:
2750 case BC_IFORL: 2759 case BC_IFORL:
2751 vk = (op == BC_IFORL || op == BC_JFORL); 2760 vk = (op == BC_IFORL || op == BC_JFORL);
2752 dasm_put(Dst, 14946); 2761 dasm_put(Dst, 14949);
2753 if (LJ_DUALNUM) { 2762 if (LJ_DUALNUM) {
2754 dasm_put(Dst, 14950, LJ_TISNUM); 2763 dasm_put(Dst, 14953, LJ_TISNUM);
2755 if (!vk) { 2764 if (!vk) {
2756 dasm_put(Dst, 14960, LJ_TISNUM, LJ_TISNUM); 2765 dasm_put(Dst, 14963, LJ_TISNUM, LJ_TISNUM);
2757 } else { 2766 } else {
2758 dasm_put(Dst, 14989); 2767#ifdef LUA_USE_ASSERT
2768 dasm_put(Dst, 14992, LJ_TISNUM, LJ_TISNUM);
2769#endif
2770 dasm_put(Dst, 15011);
2759 } 2771 }
2760 dasm_put(Dst, 15008, LJ_TISNUM); 2772 dasm_put(Dst, 15030, LJ_TISNUM);
2761 if (op == BC_FORI) { 2773 if (op == BC_FORI) {
2762 dasm_put(Dst, 15019, -BCBIAS_J*4); 2774 dasm_put(Dst, 15041, -BCBIAS_J*4);
2763 } else if (op == BC_JFORI) { 2775 } else if (op == BC_JFORI) {
2764 dasm_put(Dst, 15033, -BCBIAS_J*4, BC_JLOOP); 2776 dasm_put(Dst, 15055, -BCBIAS_J*4, BC_JLOOP);
2765 } else if (op == BC_IFORL) { 2777 } else if (op == BC_IFORL) {
2766 dasm_put(Dst, 15051, -BCBIAS_J*4); 2778 dasm_put(Dst, 15073, -BCBIAS_J*4);
2767 } else { 2779 } else {
2768 dasm_put(Dst, 15043, BC_JLOOP); 2780 dasm_put(Dst, 15065, BC_JLOOP);
2769 } 2781 }
2770 dasm_put(Dst, 15065); 2782 dasm_put(Dst, 15087);
2771 if (vk) { 2783 if (vk) {
2772 dasm_put(Dst, 15089); 2784 dasm_put(Dst, 15111);
2773 } 2785 }
2774 dasm_put(Dst, 15008, LJ_TISNUM); 2786 dasm_put(Dst, 15030, LJ_TISNUM);
2775 if (op == BC_FORI) { 2787 if (op == BC_FORI) {
2776 dasm_put(Dst, 15098); 2788 dasm_put(Dst, 15120);
2777 } else if (op == BC_JFORI) { 2789 } else if (op == BC_JFORI) {
2778 dasm_put(Dst, 15103, -BCBIAS_J*4, BC_JLOOP); 2790 dasm_put(Dst, 15125, -BCBIAS_J*4, BC_JLOOP);
2779 } else if (op == BC_IFORL) { 2791 } else if (op == BC_IFORL) {
2780 dasm_put(Dst, 15117); 2792 dasm_put(Dst, 15139);
2781 } else { 2793 } else {
2782 dasm_put(Dst, 15113, BC_JLOOP); 2794 dasm_put(Dst, 15135, BC_JLOOP);
2783 } 2795 }
2784 dasm_put(Dst, 15122); 2796 dasm_put(Dst, 15144);
2785 } else if (!vk) { 2797 } else if (!vk) {
2786 dasm_put(Dst, 15129, LJ_TISNUM); 2798 dasm_put(Dst, 15151, LJ_TISNUM);
2787 } 2799 }
2788 if (!vk) { 2800 if (!vk) {
2789 dasm_put(Dst, 15135, LJ_TISNUM); 2801 dasm_put(Dst, 15157, LJ_TISNUM);
2802 } else {
2803#ifdef LUA_USE_ASSERT
2804 dasm_put(Dst, 15171, LJ_TISNUM, LJ_TISNUM);
2805#endif
2790 } 2806 }
2791 dasm_put(Dst, 15149); 2807 dasm_put(Dst, 15190);
2792 if (!vk) { 2808 if (!vk) {
2793 dasm_put(Dst, 15153, LJ_TISNUM); 2809 dasm_put(Dst, 15194, LJ_TISNUM);
2794 } 2810 }
2795 if (sse) { 2811 if (sse) {
2796 dasm_put(Dst, 15162); 2812 dasm_put(Dst, 15203);
2797 if (vk) { 2813 if (vk) {
2798 dasm_put(Dst, 15174); 2814 dasm_put(Dst, 15215);
2799 } else { 2815 } else {
2800 dasm_put(Dst, 15193); 2816 dasm_put(Dst, 15234);
2801 } 2817 }
2802 dasm_put(Dst, 15198); 2818 dasm_put(Dst, 15239);
2803 } else { 2819 } else {
2804 dasm_put(Dst, 15211); 2820 dasm_put(Dst, 15252);
2805 if (vk) { 2821 if (vk) {
2806 dasm_put(Dst, 15217); 2822 dasm_put(Dst, 15258);
2807 } else { 2823 } else {
2808 dasm_put(Dst, 15233); 2824 dasm_put(Dst, 15274);
2809 } 2825 }
2810 dasm_put(Dst, 15241); 2826 dasm_put(Dst, 15282);
2811 if (cmov) { 2827 if (cmov) {
2812 dasm_put(Dst, 10057); 2828 dasm_put(Dst, 10060);
2813 } else { 2829 } else {
2814 dasm_put(Dst, 10063); 2830 dasm_put(Dst, 10066);
2815 } 2831 }
2816 if (!cmov) { 2832 if (!cmov) {
2817 dasm_put(Dst, 15246); 2833 dasm_put(Dst, 15287);
2818 } 2834 }
2819 } 2835 }
2820 if (op == BC_FORI) { 2836 if (op == BC_FORI) {
2821 if (LJ_DUALNUM) { 2837 if (LJ_DUALNUM) {
2822 dasm_put(Dst, 15252); 2838 dasm_put(Dst, 15293);
2823 } else { 2839 } else {
2824 dasm_put(Dst, 15257, -BCBIAS_J*4); 2840 dasm_put(Dst, 15298, -BCBIAS_J*4);
2825 } 2841 }
2826 } else if (op == BC_JFORI) { 2842 } else if (op == BC_JFORI) {
2827 dasm_put(Dst, 15267, -BCBIAS_J*4, BC_JLOOP); 2843 dasm_put(Dst, 15308, -BCBIAS_J*4, BC_JLOOP);
2828 } else if (op == BC_IFORL) { 2844 } else if (op == BC_IFORL) {
2829 if (LJ_DUALNUM) { 2845 if (LJ_DUALNUM) {
2830 dasm_put(Dst, 15281); 2846 dasm_put(Dst, 15322);
2831 } else { 2847 } else {
2832 dasm_put(Dst, 15286, -BCBIAS_J*4); 2848 dasm_put(Dst, 15327, -BCBIAS_J*4);
2833 } 2849 }
2834 } else { 2850 } else {
2835 dasm_put(Dst, 15277, BC_JLOOP); 2851 dasm_put(Dst, 15318, BC_JLOOP);
2836 } 2852 }
2837 if (LJ_DUALNUM) { 2853 if (LJ_DUALNUM) {
2838 dasm_put(Dst, 9986); 2854 dasm_put(Dst, 9989);
2839 } else { 2855 } else {
2840 dasm_put(Dst, 10743); 2856 dasm_put(Dst, 10746);
2841 } 2857 }
2842 if (sse) { 2858 if (sse) {
2843 dasm_put(Dst, 15296); 2859 dasm_put(Dst, 15337);
2844 } 2860 }
2845 break; 2861 break;
2846 2862
2847 case BC_ITERL: 2863 case BC_ITERL:
2848#if LJ_HASJIT 2864#if LJ_HASJIT
2849 dasm_put(Dst, 14925, HOTCOUNT_PCMASK, GG_DISP2HOT); 2865 dasm_put(Dst, 14928, HOTCOUNT_PCMASK, GG_DISP2HOT);
2850#endif 2866#endif
2851 break; 2867 break;
2852 2868
@@ -2855,33 +2871,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2855 break; 2871 break;
2856#endif 2872#endif
2857 case BC_IITERL: 2873 case BC_IITERL:
2858 dasm_put(Dst, 15307, LJ_TNIL); 2874 dasm_put(Dst, 15348, LJ_TNIL);
2859 if (op == BC_JITERL) { 2875 if (op == BC_JITERL) {
2860 dasm_put(Dst, 15322, BC_JLOOP); 2876 dasm_put(Dst, 15363, BC_JLOOP);
2861 } else { 2877 } else {
2862 dasm_put(Dst, 15336, -BCBIAS_J*4); 2878 dasm_put(Dst, 15377, -BCBIAS_J*4);
2863 } 2879 }
2864 dasm_put(Dst, 10100); 2880 dasm_put(Dst, 10103);
2865 break; 2881 break;
2866 2882
2867 case BC_LOOP: 2883 case BC_LOOP:
2868#if LJ_HASJIT 2884#if LJ_HASJIT
2869 dasm_put(Dst, 14925, HOTCOUNT_PCMASK, GG_DISP2HOT); 2885 dasm_put(Dst, 14928, HOTCOUNT_PCMASK, GG_DISP2HOT);
2870#endif 2886#endif
2871 break; 2887 break;
2872 2888
2873 case BC_ILOOP: 2889 case BC_ILOOP:
2874 dasm_put(Dst, 10102); 2890 dasm_put(Dst, 10105);
2875 break; 2891 break;
2876 2892
2877 case BC_JLOOP: 2893 case BC_JLOOP:
2878#if LJ_HASJIT 2894#if LJ_HASJIT
2879 dasm_put(Dst, 15352, 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); 2895 dasm_put(Dst, 15393, 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);
2880#endif 2896#endif
2881 break; 2897 break;
2882 2898
2883 case BC_JMP: 2899 case BC_JMP:
2884 dasm_put(Dst, 15461, -BCBIAS_J*4); 2900 dasm_put(Dst, 15502, -BCBIAS_J*4);
2885 break; 2901 break;
2886 2902
2887 /* -- Function headers -------------------------------------------------- */ 2903 /* -- Function headers -------------------------------------------------- */
@@ -2895,7 +2911,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2895 2911
2896 case BC_FUNCF: 2912 case BC_FUNCF:
2897#if LJ_HASJIT 2913#if LJ_HASJIT
2898 dasm_put(Dst, 15486, HOTCOUNT_PCMASK, GG_DISP2HOT); 2914 dasm_put(Dst, 15527, HOTCOUNT_PCMASK, GG_DISP2HOT);
2899#endif 2915#endif
2900 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2916 case BC_FUNCV: /* NYI: compiled vararg functions. */
2901 break; 2917 break;
@@ -2905,13 +2921,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2905 break; 2921 break;
2906#endif 2922#endif
2907 case BC_IFUNCF: 2923 case BC_IFUNCF:
2908 dasm_put(Dst, 15507, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2924 dasm_put(Dst, 15548, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2909 if (op == BC_JFUNCF) { 2925 if (op == BC_JFUNCF) {
2910 dasm_put(Dst, 15537, BC_JLOOP); 2926 dasm_put(Dst, 15578, BC_JLOOP);
2911 } else { 2927 } else {
2912 dasm_put(Dst, 10102); 2928 dasm_put(Dst, 10105);
2913 } 2929 }
2914 dasm_put(Dst, 15546, LJ_TNIL); 2930 dasm_put(Dst, 15587, LJ_TNIL);
2915 break; 2931 break;
2916 2932
2917 case BC_JFUNCV: 2933 case BC_JFUNCV:
@@ -2922,30 +2938,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2922 break; /* NYI: compiled vararg functions. */ 2938 break; /* NYI: compiled vararg functions. */
2923 2939
2924 case BC_IFUNCV: 2940 case BC_IFUNCV:
2925 dasm_put(Dst, 15568, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2941 dasm_put(Dst, 15609, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2926 if (op == BC_JFUNCV) { 2942 if (op == BC_JFUNCV) {
2927 dasm_put(Dst, 15537, BC_JLOOP); 2943 dasm_put(Dst, 15578, BC_JLOOP);
2928 } else { 2944 } else {
2929 dasm_put(Dst, 15659, -4+PC2PROTO(k)); 2945 dasm_put(Dst, 15700, -4+PC2PROTO(k));
2930 } 2946 }
2931 dasm_put(Dst, 15682, LJ_TNIL); 2947 dasm_put(Dst, 15723, LJ_TNIL);
2932 break; 2948 break;
2933 2949
2934 case BC_FUNCC: 2950 case BC_FUNCC:
2935 case BC_FUNCCW: 2951 case BC_FUNCCW:
2936 dasm_put(Dst, 15704, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2952 dasm_put(Dst, 15745, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2937 if (op == BC_FUNCC) { 2953 if (op == BC_FUNCC) {
2938 dasm_put(Dst, 2310); 2954 dasm_put(Dst, 2310);
2939 } else { 2955 } else {
2940 dasm_put(Dst, 15734); 2956 dasm_put(Dst, 15775);
2941 } 2957 }
2942 dasm_put(Dst, 15742, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2958 dasm_put(Dst, 15783, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2943 if (op == BC_FUNCC) { 2959 if (op == BC_FUNCC) {
2944 dasm_put(Dst, 15751); 2960 dasm_put(Dst, 15792);
2945 } else { 2961 } else {
2946 dasm_put(Dst, 15755, DISPATCH_GL(wrapf)); 2962 dasm_put(Dst, 15796, DISPATCH_GL(wrapf));
2947 } 2963 }
2948 dasm_put(Dst, 15760, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2964 dasm_put(Dst, 15801, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2949 break; 2965 break;
2950 2966
2951 /* ---------------------------------------------------------------------- */ 2967 /* ---------------------------------------------------------------------- */
@@ -2973,7 +2989,7 @@ static int build_backend(BuildCtx *ctx)
2973 2989
2974 build_subroutines(ctx, cmov, sse); 2990 build_subroutines(ctx, cmov, sse);
2975 2991
2976 dasm_put(Dst, 15785); 2992 dasm_put(Dst, 15826);
2977 for (op = 0; op < BC__MAX; op++) 2993 for (op = 0; op < BC__MAX; op++)
2978 build_ins(ctx, (BCOp)op, op, cmov, sse); 2994 build_ins(ctx, (BCOp)op, op, cmov, sse);
2979 2995