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.h287
1 files changed, 141 insertions, 146 deletions
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h
index f2816d14..4474ae1b 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[14100] = { 15static const unsigned char build_actionlist[14095] = {
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,
@@ -616,84 +616,84 @@ static const unsigned char build_actionlist[14100] = {
616 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3,131,189,233,0, 616 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3,131,189,233,0,
617 15,132,244,1,255,139,141,233,252,246,129,233,235,15,132,244,38,15,182,75, 617 15,132,244,1,255,139,141,233,252,246,129,233,235,15,132,244,38,15,182,75,
618 252,253,252,233,244,1,248,7,128,165,233,235,65,139,142,233,65,137,174,233, 618 252,253,252,233,244,1,248,7,128,165,233,235,65,139,142,233,65,137,174,233,
619 137,141,233,15,182,75,252,253,252,233,244,2,255,68,137,60,36,255,252,242, 619 137,141,233,15,182,75,252,253,252,233,244,2,255,68,137,60,36,69,139,60,199,
620 69,15,45,60,199,255,248,1,141,12,202,139,105,252,248,252,246,133,233,235, 620 248,1,141,12,202,139,105,252,248,252,246,133,233,235,15,133,244,253,248,2,
621 15,133,244,253,248,2,139,68,36,4,131,232,1,15,132,244,250,68,1,252,248,59, 621 139,68,36,4,131,232,1,15,132,244,250,68,1,252,248,59,133,233,15,131,244,251,
622 133,233,15,131,244,251,68,41,252,248,65,193,231,3,68,3,189,233,248,3,139, 622 68,41,252,248,65,193,231,3,68,3,189,233,248,3,139,41,65,137,47,139,105,4,
623 41,65,137,47,139,105,4,131,193,8,65,137,111,4,65,131,199,8,131,232,1,15,133, 623 131,193,8,65,137,111,4,65,131,199,8,131,232,1,15,133,244,3,248,4,68,139,60,
624 244,3,248,4,68,139,60,36,139,3,15,182,204,15,182,232,131,195,4,193,232,16, 624 36,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,
625 65,252,255,36,252,238,248,5,139,124,36,24,137,151,233,137,252,238,137,194, 625 248,5,139,124,36,24,137,151,233,137,252,238,137,194,137,252,253,137,92,36,
626 137,252,253,137,92,36,28,232,251,1,33,139,149,233,15,182,75,252,253,252,233, 626 28,232,251,1,33,139,149,233,15,182,75,252,253,252,233,244,1,248,7,255,128,
627 244,1,248,7,255,128,165,233,235,65,139,134,233,65,137,174,233,137,133,233, 627 165,233,235,65,139,134,233,65,137,174,233,137,133,233,252,233,244,2,255,3,
628 252,233,244,2,255,3,68,36,4,255,129,124,253,202,4,239,139,44,202,15,133,244, 628 68,36,4,255,129,124,253,202,4,239,139,44,202,15,133,244,51,141,84,202,8,137,
629 51,141,84,202,8,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205, 629 90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,
630 131,195,4,65,252,255,36,252,238,255,141,76,202,8,65,137,215,139,105,252,248, 630 255,36,252,238,255,141,76,202,8,65,137,215,139,105,252,248,129,121,253,252,
631 129,121,253,252,252,239,15,133,244,28,248,52,139,90,252,252,252,247,195,237, 631 252,239,15,133,244,28,248,52,139,90,252,252,252,247,195,237,15,133,244,253,
632 15,133,244,253,248,1,137,106,252,248,137,68,36,4,131,232,1,15,132,244,249, 632 248,1,137,106,252,248,137,68,36,4,131,232,1,15,132,244,249,248,2,139,41,65,
633 248,2,139,41,65,137,47,139,105,4,65,137,111,4,65,131,199,8,131,193,8,131, 633 137,47,139,105,4,65,137,111,4,65,131,199,8,131,193,8,131,232,1,15,133,244,
634 232,1,15,133,244,2,139,106,252,248,248,3,139,68,36,4,128,189,233,1,15,135, 634 2,139,106,252,248,248,3,139,68,36,4,128,189,233,1,15,135,244,251,248,4,139,
635 244,251,248,4,139,157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,
636 255,36,252,238,248,5,255,252,247,195,237,15,133,244,4,15,182,75,252,253,72,
637 252,247,209,141,12,202,68,139,121,252,248,69,139,191,233,69,139,191,233,252,
638 233,244,4,248,7,129,252,235,239,252,247,195,237,15,133,244,254,41,218,65,
639 137,215,139,90,252,252,252,233,244,1,248,8,129,195,239,252,233,244,1,255,
640 141,76,202,8,139,105,232,139,65,252,236,137,41,137,65,4,139,105,252,240,139,
641 65,252,244,137,105,8,137,65,12,139,105,224,139,65,228,137,105,252,248,137,
642 65,252,252,129,252,248,239,184,237,15,133,244,28,137,202,137,90,252,252,139,
643 157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,255,36,252,238, 635 157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,255,36,252,238,
644 255,15,182,252,236,139,66,252,248,141,12,202,139,128,233,15,182,128,233,68, 636 248,5,255,252,247,195,237,15,133,244,4,15,182,75,252,253,72,252,247,209,141,
645 137,60,36,68,141,188,253,194,233,68,43,122,252,252,133,252,237,15,132,244, 637 12,202,68,139,121,252,248,69,139,191,233,69,139,191,233,252,233,244,4,248,
646 251,141,108,252,233,252,248,65,57,215,15,131,244,248,248,1,65,139,71,252, 638 7,129,252,235,239,252,247,195,237,15,133,244,254,41,218,65,137,215,139,90,
647 248,137,1,65,139,71,252,252,65,131,199,8,137,65,4,131,193,8,57,252,233,15, 639 252,252,252,233,244,1,248,8,129,195,239,252,233,244,1,255,141,76,202,8,139,
648 131,244,249,65,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,233, 640 105,232,139,65,252,236,137,41,137,65,4,139,105,252,240,139,65,252,244,137,
649 15,130,244,2,248,3,68,139,60,36,139,3,15,182,204,15,182,232,131,195,4,193, 641 105,8,137,65,12,139,105,224,139,65,228,137,105,252,248,137,65,252,252,129,
650 232,16,65,252,255,36,252,238,248,5,199,68,36,4,1,0,0,0,137,208,68,41,252, 642 252,248,239,184,237,15,133,244,28,137,202,137,90,252,252,139,157,233,139,
651 248,15,134,244,3,255,137,197,193,252,237,3,131,197,1,137,108,36,4,139,108, 643 11,15,182,252,233,15,182,205,131,195,4,65,252,255,36,252,238,255,15,182,252,
652 36,24,1,200,59,133,233,15,135,244,253,248,6,65,139,71,252,248,137,1,65,139, 644 236,139,66,252,248,141,12,202,139,128,233,15,182,128,233,68,137,60,36,68,
653 71,252,252,65,131,199,8,137,65,4,131,193,8,65,57,215,15,130,244,6,252,233, 645 141,188,253,194,233,68,43,122,252,252,133,252,237,15,132,244,251,141,108,
654 244,3,248,7,137,149,233,137,141,233,137,92,36,28,65,41,215,139,116,36,4,131, 646 252,233,252,248,65,57,215,15,131,244,248,248,1,65,139,71,252,248,137,1,65,
655 252,238,1,137,252,239,232,251,1,0,139,149,233,139,141,233,65,1,215,252,233, 647 139,71,252,252,65,131,199,8,137,65,4,131,193,8,57,252,233,15,131,244,249,
656 244,6,255,193,225,3,255,248,1,139,90,252,252,137,68,36,4,252,247,195,237, 648 65,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,233,15,130,244,
657 15,133,244,253,255,248,13,65,137,215,131,232,1,15,132,244,249,248,2,65,139, 649 2,248,3,68,139,60,36,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,
658 44,15,65,137,111,252,248,65,139,108,15,4,65,137,111,252,252,65,131,199,8, 650 252,255,36,252,238,248,5,199,68,36,4,1,0,0,0,137,208,68,41,252,248,15,134,
659 131,232,1,15,133,244,2,248,3,139,68,36,4,15,182,107,252,255,248,5,57,197, 651 244,3,255,137,197,193,252,237,3,131,197,1,137,108,36,4,139,108,36,24,1,200,
660 15,135,244,252,255,139,108,10,4,137,106,252,252,139,44,10,137,106,252,248, 652 59,133,233,15,135,244,253,248,6,65,139,71,252,248,137,1,65,139,71,252,252,
661 255,248,5,56,67,252,255,15,135,244,252,255,15,182,75,252,253,72,252,247,209, 653 65,131,199,8,137,65,4,131,193,8,65,57,215,15,130,244,6,252,233,244,3,248,
662 141,20,202,68,139,122,252,248,69,139,191,233,69,139,191,233,139,3,15,182, 654 7,137,149,233,137,141,233,137,92,36,28,65,41,215,139,116,36,4,131,252,238,
663 204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,6,255,65,199, 655 1,137,252,239,232,251,1,0,139,149,233,139,141,233,65,1,215,252,233,244,6,
664 71,252,252,237,65,131,199,8,255,199,68,194,252,244,237,255,131,192,1,252, 656 255,193,225,3,255,248,1,139,90,252,252,137,68,36,4,252,247,195,237,15,133,
665 233,244,5,248,7,141,171,233,252,247,197,237,15,133,244,14,41,252,234,255, 657 244,253,255,248,13,65,137,215,131,232,1,15,132,244,249,248,2,65,139,44,15,
666 1,252,233,255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1, 658 65,137,111,252,248,65,139,108,15,4,65,137,111,252,252,65,131,199,8,131,232,
667 15,132,244,140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121, 659 1,15,133,244,2,248,3,139,68,36,4,15,182,107,252,255,248,5,57,197,15,135,244,
668 253,12,239,15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,53, 660 252,255,139,108,10,4,137,106,252,252,139,44,10,137,106,252,248,255,248,5,
669 255,252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15, 661 56,67,252,255,15,135,244,252,255,15,182,75,252,253,72,252,247,209,141,20,
670 17,1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248, 662 202,68,139,122,252,248,69,139,191,233,69,139,191,233,139,3,15,182,204,15,
671 1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133, 663 182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,6,255,65,199,71,252,
672 252,237,15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255, 664 252,237,65,131,199,8,255,199,68,194,252,244,237,255,131,192,1,252,233,244,
673 15,183,67,252,254,255,15,131,244,248,141,156,253,131,233,255,141,156,253, 665 5,248,7,141,171,233,252,247,197,237,15,133,244,14,41,252,234,255,1,252,233,
674 131,233,15,183,67,252,254,15,131,245,255,15,130,244,248,141,156,253,131,233, 666 255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132,244,
675 255,248,3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253, 667 140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121,253,12,239,
676 239,15,132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245, 668 15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,53,255,252,242,
677 255,141,156,253,131,233,139,1,137,105,252,252,137,65,252,248,255,65,139,142, 669 15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133,252,
678 233,139,4,129,72,139,128,233,139,108,36,24,65,137,150,233,65,137,174,233, 670 237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,242,15,
679 76,137,36,36,76,137,108,36,8,72,131,252,236,16,252,255,224,255,141,156,253, 671 17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237,15,
680 131,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 672 136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,183,67,
681 238,255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132, 673 252,254,255,15,131,244,248,141,156,253,131,233,255,141,156,253,131,233,15,
682 244,142,255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244, 674 183,67,252,254,15,131,245,255,15,130,244,248,141,156,253,131,233,255,248,
683 23,15,182,139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233, 675 3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,239,15,
684 245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233, 676 132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,255,141,
685 244,2,255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68, 677 156,253,131,233,139,1,137,105,252,252,137,65,252,248,255,65,139,142,233,139,
686 137,120,252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,22,137,209, 678 4,129,72,139,128,233,139,108,36,24,65,137,150,233,65,137,174,233,76,137,36,
687 137,194,15,182,171,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209, 679 36,76,137,108,36,8,72,131,252,236,16,252,255,224,255,141,156,253,131,233,
688 15,131,244,249,68,139,121,252,248,68,137,56,68,139,121,252,252,68,137,120, 680 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,
689 4,131,192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,68,139, 681 137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132,244,142,
690 187,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 682 255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244,23,15,182,
691 238,255,248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244, 683 139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233,245,255,
692 2,255,139,106,252,248,76,139,189,233,139,108,36,24,141,68,194,252,248,137, 684 248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,
693 149,233,141,136,233,59,141,233,137,133,233,255,137,252,239,255,76,137,252, 685 255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68,137,120,
694 254,137,252,239,255,15,135,244,21,65,199,134,233,237,255,65,252,255,215,255, 686 252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,22,137,209,137,194,
695 65,252,255,150,233,255,65,199,134,233,237,139,149,233,141,12,194,252,247, 687 15,182,171,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244,
696 217,3,141,233,139,90,252,252,252,233,244,12,255,254,0 688 249,68,139,121,252,248,68,137,56,68,139,121,252,252,68,137,120,4,131,192,
689 8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,68,139,187,233,
690 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,
691 248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,
692 139,106,252,248,76,139,189,233,139,108,36,24,141,68,194,252,248,137,149,233,
693 141,136,233,59,141,233,137,133,233,255,137,252,239,255,76,137,252,254,137,
694 252,239,255,15,135,244,21,65,199,134,233,237,255,65,252,255,215,255,65,252,
695 255,150,233,255,65,199,134,233,237,139,149,233,141,12,194,252,247,217,3,141,
696 233,139,90,252,252,252,233,244,12,255,254,0
697}; 697};
698 698
699enum { 699enum {
@@ -1962,13 +1962,8 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1962 break; 1962 break;
1963 1963
1964 case BC_TSETM: 1964 case BC_TSETM:
1965 dasm_put(Dst, 12502); 1965 dasm_put(Dst, 12502, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
1966 if (sse) { 1966 dasm_put(Dst, 12658, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1967 dasm_put(Dst, 12507);
1968 } else {
1969 }
1970 dasm_put(Dst, 12515, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
1971 dasm_put(Dst, 12663, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1972 break; 1967 break;
1973 1968
1974 /* -- Calls and vararg handling ----------------------------------------- */ 1969 /* -- Calls and vararg handling ----------------------------------------- */
@@ -1976,60 +1971,60 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1976 case BC_CALL: case BC_CALLM: 1971 case BC_CALL: case BC_CALLM:
1977 dasm_put(Dst, 10113); 1972 dasm_put(Dst, 10113);
1978 if (op == BC_CALLM) { 1973 if (op == BC_CALLM) {
1979 dasm_put(Dst, 12683); 1974 dasm_put(Dst, 12678);
1980 } 1975 }
1981 dasm_put(Dst, 12688, LJ_TFUNC, Dt7(->pc)); 1976 dasm_put(Dst, 12683, LJ_TFUNC, Dt7(->pc));
1982 break; 1977 break;
1983 1978
1984 case BC_CALLMT: 1979 case BC_CALLMT:
1985 dasm_put(Dst, 12683); 1980 dasm_put(Dst, 12678);
1986 break; 1981 break;
1987 case BC_CALLT: 1982 case BC_CALLT:
1988 dasm_put(Dst, 12731, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 1983 dasm_put(Dst, 12726, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
1989 dasm_put(Dst, 12855, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 1984 dasm_put(Dst, 12850, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
1990 break; 1985 break;
1991 1986
1992 case BC_ITERC: 1987 case BC_ITERC:
1993 dasm_put(Dst, 12929, LJ_TFUNC, 2+1, Dt7(->pc)); 1988 dasm_put(Dst, 12924, LJ_TFUNC, 2+1, Dt7(->pc));
1994 break; 1989 break;
1995 1990
1996 case BC_VARG: 1991 case BC_VARG:
1997 dasm_put(Dst, 13011, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); 1992 dasm_put(Dst, 13006, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
1998 dasm_put(Dst, 13165, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 1993 dasm_put(Dst, 13160, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
1999 break; 1994 break;
2000 1995
2001 /* -- Returns ----------------------------------------------------------- */ 1996 /* -- Returns ----------------------------------------------------------- */
2002 1997
2003 case BC_RETM: 1998 case BC_RETM:
2004 dasm_put(Dst, 12683); 1999 dasm_put(Dst, 12678);
2005 break; 2000 break;
2006 2001
2007 case BC_RET: case BC_RET0: case BC_RET1: 2002 case BC_RET: case BC_RET0: case BC_RET1:
2008 if (op != BC_RET0) { 2003 if (op != BC_RET0) {
2009 dasm_put(Dst, 13270); 2004 dasm_put(Dst, 13265);
2010 } 2005 }
2011 dasm_put(Dst, 13274, FRAME_TYPE); 2006 dasm_put(Dst, 13269, FRAME_TYPE);
2012 switch (op) { 2007 switch (op) {
2013 case BC_RET: 2008 case BC_RET:
2014 dasm_put(Dst, 13293); 2009 dasm_put(Dst, 13288);
2015 break; 2010 break;
2016 case BC_RET1: 2011 case BC_RET1:
2017 dasm_put(Dst, 13357); 2012 dasm_put(Dst, 13352);
2018 /* fallthrough */ 2013 /* fallthrough */
2019 case BC_RET0: 2014 case BC_RET0:
2020 dasm_put(Dst, 13373); 2015 dasm_put(Dst, 13368);
2021 default: 2016 default:
2022 break; 2017 break;
2023 } 2018 }
2024 dasm_put(Dst, 13384, Dt7(->pc), PC2PROTO(k)); 2019 dasm_put(Dst, 13379, Dt7(->pc), PC2PROTO(k));
2025 if (op == BC_RET) { 2020 if (op == BC_RET) {
2026 dasm_put(Dst, 13432, LJ_TNIL); 2021 dasm_put(Dst, 13427, LJ_TNIL);
2027 } else { 2022 } else {
2028 dasm_put(Dst, 13443, LJ_TNIL); 2023 dasm_put(Dst, 13438, LJ_TNIL);
2029 } 2024 }
2030 dasm_put(Dst, 13450, -FRAME_VARG, FRAME_TYPEP); 2025 dasm_put(Dst, 13445, -FRAME_VARG, FRAME_TYPEP);
2031 if (op != BC_RET0) { 2026 if (op != BC_RET0) {
2032 dasm_put(Dst, 13474); 2027 dasm_put(Dst, 13469);
2033 } 2028 }
2034 dasm_put(Dst, 4599); 2029 dasm_put(Dst, 4599);
2035 break; 2030 break;
@@ -2039,7 +2034,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2039 2034
2040 case BC_FORL: 2035 case BC_FORL:
2041#if LJ_HASJIT 2036#if LJ_HASJIT
2042 dasm_put(Dst, 13478, HOTCOUNT_PCMASK, GG_DISP2HOT); 2037 dasm_put(Dst, 13473, HOTCOUNT_PCMASK, GG_DISP2HOT);
2043#endif 2038#endif
2044 break; 2039 break;
2045 2040
@@ -2051,57 +2046,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2051 case BC_FORI: 2046 case BC_FORI:
2052 case BC_IFORL: 2047 case BC_IFORL:
2053 vk = (op == BC_IFORL || op == BC_JFORL); 2048 vk = (op == BC_IFORL || op == BC_JFORL);
2054 dasm_put(Dst, 13499); 2049 dasm_put(Dst, 13494);
2055 if (!vk) { 2050 if (!vk) {
2056 dasm_put(Dst, 13503, LJ_TISNUM, LJ_TISNUM); 2051 dasm_put(Dst, 13498, LJ_TISNUM, LJ_TISNUM);
2057 } 2052 }
2058 dasm_put(Dst, 13522); 2053 dasm_put(Dst, 13517);
2059 if (!vk) { 2054 if (!vk) {
2060 dasm_put(Dst, 13526, LJ_TISNUM); 2055 dasm_put(Dst, 13521, LJ_TISNUM);
2061 } 2056 }
2062 if (sse) { 2057 if (sse) {
2063 dasm_put(Dst, 13535); 2058 dasm_put(Dst, 13530);
2064 if (vk) { 2059 if (vk) {
2065 dasm_put(Dst, 13547); 2060 dasm_put(Dst, 13542);
2066 } else { 2061 } else {
2067 dasm_put(Dst, 13566); 2062 dasm_put(Dst, 13561);
2068 } 2063 }
2069 dasm_put(Dst, 13571); 2064 dasm_put(Dst, 13566);
2070 } else { 2065 } else {
2071 dasm_put(Dst, 13584); 2066 dasm_put(Dst, 13579);
2072 if (vk) { 2067 if (vk) {
2073 dasm_put(Dst, 13590); 2068 dasm_put(Dst, 13585);
2074 } else { 2069 } else {
2075 dasm_put(Dst, 13606); 2070 dasm_put(Dst, 13601);
2076 } 2071 }
2077 dasm_put(Dst, 13614); 2072 dasm_put(Dst, 13609);
2078 if (cmov) { 2073 if (cmov) {
2079 dasm_put(Dst, 9528); 2074 dasm_put(Dst, 9528);
2080 } else { 2075 } else {
2081 dasm_put(Dst, 9534); 2076 dasm_put(Dst, 9534);
2082 } 2077 }
2083 if (!cmov) { 2078 if (!cmov) {
2084 dasm_put(Dst, 13619); 2079 dasm_put(Dst, 13614);
2085 } 2080 }
2086 } 2081 }
2087 if (op == BC_FORI) { 2082 if (op == BC_FORI) {
2088 dasm_put(Dst, 13625, -BCBIAS_J*4); 2083 dasm_put(Dst, 13620, -BCBIAS_J*4);
2089 } else if (op == BC_JFORI) { 2084 } else if (op == BC_JFORI) {
2090 dasm_put(Dst, 13635, -BCBIAS_J*4, BC_JLOOP); 2085 dasm_put(Dst, 13630, -BCBIAS_J*4, BC_JLOOP);
2091 } else if (op == BC_IFORL) { 2086 } else if (op == BC_IFORL) {
2092 dasm_put(Dst, 13649, -BCBIAS_J*4); 2087 dasm_put(Dst, 13644, -BCBIAS_J*4);
2093 } else { 2088 } else {
2094 dasm_put(Dst, 13645, BC_JLOOP); 2089 dasm_put(Dst, 13640, BC_JLOOP);
2095 } 2090 }
2096 dasm_put(Dst, 9563); 2091 dasm_put(Dst, 9563);
2097 if (sse) { 2092 if (sse) {
2098 dasm_put(Dst, 13659); 2093 dasm_put(Dst, 13654);
2099 } 2094 }
2100 break; 2095 break;
2101 2096
2102 case BC_ITERL: 2097 case BC_ITERL:
2103#if LJ_HASJIT 2098#if LJ_HASJIT
2104 dasm_put(Dst, 13478, HOTCOUNT_PCMASK, GG_DISP2HOT); 2099 dasm_put(Dst, 13473, HOTCOUNT_PCMASK, GG_DISP2HOT);
2105#endif 2100#endif
2106 break; 2101 break;
2107 2102
@@ -2110,18 +2105,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2110 break; 2105 break;
2111#endif 2106#endif
2112 case BC_IITERL: 2107 case BC_IITERL:
2113 dasm_put(Dst, 13670, LJ_TNIL); 2108 dasm_put(Dst, 13665, LJ_TNIL);
2114 if (op == BC_JITERL) { 2109 if (op == BC_JITERL) {
2115 dasm_put(Dst, 13685, BC_JLOOP); 2110 dasm_put(Dst, 13680, BC_JLOOP);
2116 } else { 2111 } else {
2117 dasm_put(Dst, 13699, -BCBIAS_J*4); 2112 dasm_put(Dst, 13694, -BCBIAS_J*4);
2118 } 2113 }
2119 dasm_put(Dst, 9867); 2114 dasm_put(Dst, 9867);
2120 break; 2115 break;
2121 2116
2122 case BC_LOOP: 2117 case BC_LOOP:
2123#if LJ_HASJIT 2118#if LJ_HASJIT
2124 dasm_put(Dst, 13478, HOTCOUNT_PCMASK, GG_DISP2HOT); 2119 dasm_put(Dst, 13473, HOTCOUNT_PCMASK, GG_DISP2HOT);
2125#endif 2120#endif
2126 break; 2121 break;
2127 2122
@@ -2131,12 +2126,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2131 2126
2132 case BC_JLOOP: 2127 case BC_JLOOP:
2133#if LJ_HASJIT 2128#if LJ_HASJIT
2134 dasm_put(Dst, 13715, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2129 dasm_put(Dst, 13710, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2135#endif 2130#endif
2136 break; 2131 break;
2137 2132
2138 case BC_JMP: 2133 case BC_JMP:
2139 dasm_put(Dst, 13756, -BCBIAS_J*4); 2134 dasm_put(Dst, 13751, -BCBIAS_J*4);
2140 break; 2135 break;
2141 2136
2142 /* -- Function headers -------------------------------------------------- */ 2137 /* -- Function headers -------------------------------------------------- */
@@ -2150,7 +2145,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2150 2145
2151 case BC_FUNCF: 2146 case BC_FUNCF:
2152#if LJ_HASJIT 2147#if LJ_HASJIT
2153 dasm_put(Dst, 13782, HOTCOUNT_PCMASK, GG_DISP2HOT); 2148 dasm_put(Dst, 13777, HOTCOUNT_PCMASK, GG_DISP2HOT);
2154#endif 2149#endif
2155 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2150 case BC_FUNCV: /* NYI: compiled vararg functions. */
2156 break; 2151 break;
@@ -2160,13 +2155,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2160 break; 2155 break;
2161#endif 2156#endif
2162 case BC_IFUNCF: 2157 case BC_IFUNCF:
2163 dasm_put(Dst, 13803, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2158 dasm_put(Dst, 13798, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2164 if (op == BC_JFUNCF) { 2159 if (op == BC_JFUNCF) {
2165 dasm_put(Dst, 13834, BC_JLOOP); 2160 dasm_put(Dst, 13829, BC_JLOOP);
2166 } else { 2161 } else {
2167 dasm_put(Dst, 9565); 2162 dasm_put(Dst, 9565);
2168 } 2163 }
2169 dasm_put(Dst, 13843, LJ_TNIL); 2164 dasm_put(Dst, 13838, LJ_TNIL);
2170 break; 2165 break;
2171 2166
2172 case BC_JFUNCV: 2167 case BC_JFUNCV:
@@ -2177,30 +2172,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2177 break; /* NYI: compiled vararg functions. */ 2172 break; /* NYI: compiled vararg functions. */
2178 2173
2179 case BC_IFUNCV: 2174 case BC_IFUNCV:
2180 dasm_put(Dst, 13865, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2175 dasm_put(Dst, 13860, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2181 if (op == BC_JFUNCV) { 2176 if (op == BC_JFUNCV) {
2182 dasm_put(Dst, 13834, BC_JLOOP); 2177 dasm_put(Dst, 13829, BC_JLOOP);
2183 } else { 2178 } else {
2184 dasm_put(Dst, 13962, -4+PC2PROTO(k)); 2179 dasm_put(Dst, 13957, -4+PC2PROTO(k));
2185 } 2180 }
2186 dasm_put(Dst, 13987, LJ_TNIL); 2181 dasm_put(Dst, 13982, LJ_TNIL);
2187 break; 2182 break;
2188 2183
2189 case BC_FUNCC: 2184 case BC_FUNCC:
2190 case BC_FUNCCW: 2185 case BC_FUNCCW:
2191 dasm_put(Dst, 14009, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2186 dasm_put(Dst, 14004, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2192 if (op == BC_FUNCC) { 2187 if (op == BC_FUNCC) {
2193 dasm_put(Dst, 14039); 2188 dasm_put(Dst, 14034);
2194 } else { 2189 } else {
2195 dasm_put(Dst, 14043); 2190 dasm_put(Dst, 14038);
2196 } 2191 }
2197 dasm_put(Dst, 14051, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2192 dasm_put(Dst, 14046, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2198 if (op == BC_FUNCC) { 2193 if (op == BC_FUNCC) {
2199 dasm_put(Dst, 14061); 2194 dasm_put(Dst, 14056);
2200 } else { 2195 } else {
2201 dasm_put(Dst, 14066, DISPATCH_GL(wrapf)); 2196 dasm_put(Dst, 14061, DISPATCH_GL(wrapf));
2202 } 2197 }
2203 dasm_put(Dst, 14072, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2198 dasm_put(Dst, 14067, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2204 break; 2199 break;
2205 2200
2206 /* ---------------------------------------------------------------------- */ 2201 /* ---------------------------------------------------------------------- */
@@ -2228,7 +2223,7 @@ static int build_backend(BuildCtx *ctx)
2228 2223
2229 build_subroutines(ctx, cmov, sse); 2224 build_subroutines(ctx, cmov, sse);
2230 2225
2231 dasm_put(Dst, 14098); 2226 dasm_put(Dst, 14093);
2232 for (op = 0; op < BC__MAX; op++) 2227 for (op = 0; op < BC__MAX; op++)
2233 build_ins(ctx, (BCOp)op, op, cmov, sse); 2228 build_ins(ctx, (BCOp)op, op, cmov, sse);
2234 2229