summaryrefslogtreecommitdiff
path: root/src/buildvm_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm_x86.h')
-rw-r--r--src/buildvm_x86.h280
1 files changed, 137 insertions, 143 deletions
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index bb1645ab..10392991 100644
--- a/src/buildvm_x86.h
+++ b/src/buildvm_x86.h
@@ -12,7 +12,7 @@
12#define DASM_SECTION_CODE_OP 0 12#define DASM_SECTION_CODE_OP 0
13#define DASM_SECTION_CODE_SUB 1 13#define DASM_SECTION_CODE_SUB 1
14#define DASM_MAXSECTION 2 14#define DASM_MAXSECTION 2
15static const unsigned char build_actionlist[15252] = { 15static const unsigned char build_actionlist[15235] = {
16 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141, 16 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141,
17 76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36, 17 76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,
18 20,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237,15, 18 20,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237,15,
@@ -675,80 +675,80 @@ static const unsigned char build_actionlist[15252] = {
675 255,36,171,248,3,131,189,233,0,15,132,244,1,255,139,141,233,252,246,129,233, 675 255,36,171,248,3,131,189,233,0,15,132,244,1,255,139,141,233,252,246,129,233,
676 235,15,132,244,38,15,182,78,252,253,252,233,244,1,248,7,128,165,233,235,139, 676 235,15,132,244,38,15,182,78,252,253,252,233,244,1,248,7,128,165,233,235,139,
677 139,233,137,171,233,137,141,233,15,182,78,252,253,252,233,244,2,255,137,124, 677 139,233,137,171,233,137,141,233,15,182,78,252,253,252,233,244,2,255,137,124,
678 36,16,255,252,242,15,45,60,199,255,221,4,199,219,92,36,12,139,124,36,12,255, 678 36,16,139,60,199,248,1,141,12,202,139,105,252,248,252,246,133,233,235,15,
679 248,1,141,12,202,139,105,252,248,252,246,133,233,235,15,133,244,253,248,2, 679 133,244,253,248,2,139,68,36,20,131,232,1,15,132,244,250,1,252,248,59,133,
680 139,68,36,20,131,232,1,15,132,244,250,1,252,248,59,133,233,15,131,244,251, 680 233,15,131,244,251,41,252,248,193,231,3,3,189,233,248,3,139,41,137,47,139,
681 41,252,248,193,231,3,3,189,233,248,3,139,41,137,47,139,105,4,131,193,8,137, 681 105,4,131,193,8,137,111,4,131,199,8,131,232,1,15,133,244,3,248,4,139,124,
682 111,4,131,199,8,131,232,1,15,133,244,3,248,4,139,124,36,16,139,6,15,182,204,
683 15,182,232,131,198,4,193,232,16,252,255,36,171,248,5,137,108,36,4,139,108,
684 36,48,137,149,233,137,68,36,8,137,44,36,137,116,36,24,232,251,1,33,139,149,
685 233,15,182,78,252,253,252,233,244,1,248,7,255,128,165,233,235,139,131,233,
686 137,171,233,137,133,233,252,233,244,2,255,3,68,36,20,255,129,124,253,202,
687 4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,252,252,139,181,233,139,
688 14,15,182,252,233,15,182,205,131,198,4,252,255,36,171,255,141,76,202,8,137,
689 215,139,105,252,248,129,121,253,252,252,239,15,133,244,28,248,52,139,114,
690 252,252,252,247,198,237,15,133,244,253,248,1,137,106,252,248,137,68,36,20,
691 131,232,1,15,132,244,249,248,2,139,41,137,47,139,105,4,137,111,4,131,199,
692 8,131,193,8,131,232,1,15,133,244,2,139,106,252,248,248,3,139,68,36,20,128,
693 189,233,1,15,135,244,251,248,4,139,181,233,139,14,15,182,252,233,15,182,205,
694 131,198,4,252,255,36,171,248,5,255,252,247,198,237,15,133,244,4,15,182,78,
695 252,253,252,247,209,141,12,202,139,121,252,248,139,191,233,139,191,233,252,
696 233,244,4,248,7,129,252,238,239,252,247,198,237,15,133,244,254,41,252,242,
697 137,215,139,114,252,252,252,233,244,1,248,8,129,198,239,252,233,244,1,255,
698 141,76,202,8,139,105,232,139,65,252,236,137,41,137,65,4,139,105,252,240,139,
699 65,252,244,137,105,8,137,65,12,139,105,224,139,65,228,137,105,252,248,137,
700 65,252,252,129,252,248,239,184,237,15,133,244,28,137,202,137,114,252,252,
701 139,181,233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,171,255,
702 15,182,252,236,139,66,252,248,141,12,202,139,128,233,15,182,128,233,137,124,
703 36,16,141,188,253,194,233,43,122,252,252,133,252,237,15,132,244,251,141,108,
704 252,233,252,248,57,215,15,131,244,248,248,1,139,71,252,248,137,1,139,71,252,
705 252,131,199,8,137,65,4,131,193,8,57,252,233,15,131,244,249,57,215,15,130,
706 244,1,248,2,199,65,4,237,131,193,8,57,252,233,15,130,244,2,248,3,139,124,
707 36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248, 682 36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,
708 5,199,68,36,20,1,0,0,0,137,208,41,252,248,15,134,244,3,255,137,197,193,252, 683 5,137,108,36,4,139,108,36,48,137,149,233,137,68,36,8,137,44,36,137,116,36,
709 237,3,131,197,1,137,108,36,20,139,108,36,48,1,200,59,133,233,15,135,244,253, 684 24,232,251,1,33,139,149,233,15,182,78,252,253,252,233,244,1,248,7,255,128,
710 248,6,139,71,252,248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57, 685 165,233,235,139,131,233,137,171,233,137,133,233,252,233,244,2,255,3,68,36,
711 215,15,130,244,6,252,233,244,3,248,7,137,149,233,137,141,233,137,116,36,24, 686 20,255,129,124,253,202,4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,
712 41,215,139,84,36,20,131,252,234,1,137,252,233,232,251,1,0,139,149,233,139, 687 252,252,139,181,233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,
713 141,233,1,215,252,233,244,6,255,193,225,3,255,248,1,139,114,252,252,137,68, 688 171,255,141,76,202,8,137,215,139,105,252,248,129,121,253,252,252,239,15,133,
714 36,20,252,247,198,237,15,133,244,253,255,248,13,137,215,131,232,1,15,132, 689 244,28,248,52,139,114,252,252,252,247,198,237,15,133,244,253,248,1,137,106,
715 244,249,248,2,139,44,15,137,111,252,248,139,108,15,4,137,111,252,252,131, 690 252,248,137,68,36,20,131,232,1,15,132,244,249,248,2,139,41,137,47,139,105,
716 199,8,131,232,1,15,133,244,2,248,3,139,68,36,20,15,182,110,252,255,248,5, 691 4,137,111,4,131,199,8,131,193,8,131,232,1,15,133,244,2,139,106,252,248,248,
717 57,197,15,135,244,252,255,139,108,10,4,137,106,252,252,139,44,10,137,106, 692 3,139,68,36,20,128,189,233,1,15,135,244,251,248,4,139,181,233,139,14,15,182,
718 252,248,255,248,5,56,70,252,255,15,135,244,252,255,15,182,78,252,253,252, 693 252,233,15,182,205,131,198,4,252,255,36,171,248,5,255,252,247,198,237,15,
719 247,209,141,20,202,139,122,252,248,139,191,233,139,191,233,139,6,15,182,204, 694 133,244,4,15,182,78,252,253,252,247,209,141,12,202,139,121,252,248,139,191,
720 15,182,232,131,198,4,193,232,16,252,255,36,171,248,6,255,199,71,252,252,237, 695 233,139,191,233,252,233,244,4,248,7,129,252,238,239,252,247,198,237,15,133,
721 131,199,8,255,199,68,194,252,244,237,255,131,192,1,252,233,244,5,248,7,141, 696 244,254,41,252,242,137,215,139,114,252,252,252,233,244,1,248,8,129,198,239,
722 174,233,252,247,197,237,15,133,244,14,41,252,234,255,1,252,233,255,137,252, 697 252,233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,137,41,137,65,4,
723 245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,140,255,141, 698 139,105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,224,139,65,228,
724 12,202,255,129,121,253,4,239,15,135,244,53,129,121,253,12,239,15,135,244, 699 137,105,252,248,137,65,252,252,129,252,248,239,184,237,15,133,244,28,137,
725 53,255,139,105,20,255,129,252,253,239,15,135,244,53,255,252,242,15,16,1,252, 700 202,137,114,252,252,139,181,233,139,14,15,182,252,233,15,182,205,131,198,
726 242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133,252,237,15,136, 701 4,252,255,36,171,255,15,182,252,236,139,66,252,248,141,12,202,139,128,233,
727 244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,242,15,17,65,24,255, 702 15,182,128,233,137,124,36,16,141,188,253,194,233,43,122,252,252,133,252,237,
728 221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237,15,136,244,247, 703 15,132,244,251,141,108,252,233,252,248,57,215,15,131,244,248,248,1,139,71,
729 255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,183,70,252,254,255, 704 252,248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,252,233,15,131,
730 15,131,244,248,141,180,253,134,233,255,141,180,253,134,233,15,183,70,252, 705 244,249,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,233,15,130,
731 254,15,131,245,255,15,130,244,248,141,180,253,134,233,255,248,3,102,15,46, 706 244,2,248,3,139,124,36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
732 193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,239,15,132,244,247, 707 252,255,36,171,248,5,199,68,36,20,1,0,0,0,137,208,41,252,248,15,134,244,3,
733 255,137,105,252,252,139,41,137,105,252,248,252,233,245,255,141,180,253,134, 708 255,137,197,193,252,237,3,131,197,1,137,108,36,20,139,108,36,48,1,200,59,
734 233,139,1,137,105,252,252,137,65,252,248,255,139,139,233,139,4,129,139,128, 709 133,233,15,135,244,253,248,6,139,71,252,248,137,1,139,71,252,252,131,199,
735 233,139,108,36,48,137,147,233,137,171,233,252,255,224,255,141,180,253,134, 710 8,137,65,4,131,193,8,57,215,15,130,244,6,252,233,244,3,248,7,137,149,233,
736 233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,137, 711 137,141,233,137,116,36,24,41,215,139,84,36,20,131,252,234,1,137,252,233,232,
737 252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,142,255, 712 251,1,0,139,149,233,139,141,233,1,215,252,233,244,6,255,193,225,3,255,248,
738 139,190,233,139,108,36,48,141,12,202,59,141,233,15,135,244,23,15,182,142, 713 1,139,114,252,252,137,68,36,20,252,247,198,237,15,133,244,253,255,248,13,
739 233,57,200,15,134,244,249,248,2,255,15,183,70,252,254,252,233,245,255,248, 714 137,215,131,232,1,15,132,244,249,248,2,139,44,15,137,111,252,248,139,108,
740 3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255, 715 15,4,137,111,252,252,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,20,
741 141,44,197,237,141,4,194,139,122,252,248,137,104,252,252,137,120,252,248, 716 15,182,110,252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,252,
742 139,108,36,48,141,12,200,59,141,233,15,135,244,22,137,209,137,194,15,182, 717 252,139,44,10,137,106,252,248,255,248,5,56,70,252,255,15,135,244,252,255,
743 174,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244,249, 718 15,182,78,252,253,252,247,209,141,20,202,139,122,252,248,139,191,233,139,
744 139,121,252,248,137,56,139,121,252,252,137,120,4,131,192,8,199,65,252,252, 719 191,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,
745 237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,139,6,15,182,204,15, 720 6,255,199,71,252,252,237,131,199,8,255,199,68,194,252,244,237,255,131,192,
746 182,232,131,198,4,193,232,16,252,255,36,171,255,248,3,199,64,4,237,131,192, 721 1,252,233,244,5,248,7,141,174,233,252,247,197,237,15,133,244,14,41,252,234,
747 8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,252,248,139,189,233, 722 255,1,252,233,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,
748 139,108,36,48,141,68,194,252,248,137,149,233,141,136,233,59,141,233,137,133, 723 233,1,15,132,244,140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,
749 233,255,137,44,36,255,137,124,36,4,137,44,36,255,15,135,244,21,199,131,233, 724 121,253,12,239,15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,
750 237,255,252,255,215,255,252,255,147,233,255,199,131,233,237,139,149,233,141, 725 53,255,252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,
751 12,194,252,247,217,3,141,233,139,114,252,252,252,233,244,12,255,254,0 726 15,17,1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,
727 1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,
728 252,237,15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,
729 15,183,70,252,254,255,15,131,244,248,141,180,253,134,233,255,141,180,253,
730 134,233,15,183,70,252,254,15,131,245,255,15,130,244,248,141,180,253,134,233,
731 255,248,3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,
732 239,15,132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,
733 255,141,180,253,134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,
734 233,139,4,129,139,128,233,139,108,36,48,137,147,233,137,171,233,252,255,224,
735 255,141,180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
736 252,255,36,171,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,
737 233,1,15,132,244,142,255,139,190,233,139,108,36,48,141,12,202,59,141,233,
738 15,135,244,23,15,182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,
739 254,252,233,245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,
740 244,3,252,233,244,2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,
741 252,252,137,120,252,248,139,108,36,48,141,12,200,59,141,233,15,135,244,22,
742 137,209,137,194,15,182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,
743 57,209,15,131,244,249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,
744 192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,
745 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,248,3,
746 199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,
747 252,248,139,189,233,139,108,36,48,141,68,194,252,248,137,149,233,141,136,
748 233,59,141,233,137,133,233,255,137,44,36,255,137,124,36,4,137,44,36,255,15,
749 135,244,21,199,131,233,237,255,252,255,215,255,252,255,147,233,255,199,131,
750 233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,114,252,252,252,
751 233,244,12,255,254,0
752}; 752};
753 753
754enum { 754enum {
@@ -2089,14 +2089,8 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2089 break; 2089 break;
2090 2090
2091 case BC_TSETM: 2091 case BC_TSETM:
2092 dasm_put(Dst, 13730); 2092 dasm_put(Dst, 13730, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
2093 if (sse) { 2093 dasm_put(Dst, 13879, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2094 dasm_put(Dst, 13735);
2095 } else {
2096 dasm_put(Dst, 13742);
2097 }
2098 dasm_put(Dst, 13754, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
2099 dasm_put(Dst, 13896, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2100 break; 2094 break;
2101 2095
2102 /* -- Calls and vararg handling ----------------------------------------- */ 2096 /* -- Calls and vararg handling ----------------------------------------- */
@@ -2104,60 +2098,60 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2104 case BC_CALL: case BC_CALLM: 2098 case BC_CALL: case BC_CALLM:
2105 dasm_put(Dst, 11397); 2099 dasm_put(Dst, 11397);
2106 if (op == BC_CALLM) { 2100 if (op == BC_CALLM) {
2107 dasm_put(Dst, 13914); 2101 dasm_put(Dst, 13897);
2108 } 2102 }
2109 dasm_put(Dst, 13919, LJ_TFUNC, Dt7(->pc)); 2103 dasm_put(Dst, 13902, LJ_TFUNC, Dt7(->pc));
2110 break; 2104 break;
2111 2105
2112 case BC_CALLMT: 2106 case BC_CALLMT:
2113 dasm_put(Dst, 13914); 2107 dasm_put(Dst, 13897);
2114 break; 2108 break;
2115 case BC_CALLT: 2109 case BC_CALLT:
2116 dasm_put(Dst, 13960, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 2110 dasm_put(Dst, 13943, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
2117 dasm_put(Dst, 14078, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 2111 dasm_put(Dst, 14061, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
2118 break; 2112 break;
2119 2113
2120 case BC_ITERC: 2114 case BC_ITERC:
2121 dasm_put(Dst, 14148, LJ_TFUNC, 2+1, Dt7(->pc)); 2115 dasm_put(Dst, 14131, LJ_TFUNC, 2+1, Dt7(->pc));
2122 break; 2116 break;
2123 2117
2124 case BC_VARG: 2118 case BC_VARG:
2125 dasm_put(Dst, 14228, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); 2119 dasm_put(Dst, 14211, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
2126 dasm_put(Dst, 14372, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2120 dasm_put(Dst, 14355, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2127 break; 2121 break;
2128 2122
2129 /* -- Returns ----------------------------------------------------------- */ 2123 /* -- Returns ----------------------------------------------------------- */
2130 2124
2131 case BC_RETM: 2125 case BC_RETM:
2132 dasm_put(Dst, 13914); 2126 dasm_put(Dst, 13897);
2133 break; 2127 break;
2134 2128
2135 case BC_RET: case BC_RET0: case BC_RET1: 2129 case BC_RET: case BC_RET0: case BC_RET1:
2136 if (op != BC_RET0) { 2130 if (op != BC_RET0) {
2137 dasm_put(Dst, 14471); 2131 dasm_put(Dst, 14454);
2138 } 2132 }
2139 dasm_put(Dst, 14475, FRAME_TYPE); 2133 dasm_put(Dst, 14458, FRAME_TYPE);
2140 switch (op) { 2134 switch (op) {
2141 case BC_RET: 2135 case BC_RET:
2142 dasm_put(Dst, 14494); 2136 dasm_put(Dst, 14477);
2143 break; 2137 break;
2144 case BC_RET1: 2138 case BC_RET1:
2145 dasm_put(Dst, 14552); 2139 dasm_put(Dst, 14535);
2146 /* fallthrough */ 2140 /* fallthrough */
2147 case BC_RET0: 2141 case BC_RET0:
2148 dasm_put(Dst, 14568); 2142 dasm_put(Dst, 14551);
2149 default: 2143 default:
2150 break; 2144 break;
2151 } 2145 }
2152 dasm_put(Dst, 14579, Dt7(->pc), PC2PROTO(k)); 2146 dasm_put(Dst, 14562, Dt7(->pc), PC2PROTO(k));
2153 if (op == BC_RET) { 2147 if (op == BC_RET) {
2154 dasm_put(Dst, 14621, LJ_TNIL); 2148 dasm_put(Dst, 14604, LJ_TNIL);
2155 } else { 2149 } else {
2156 dasm_put(Dst, 14630, LJ_TNIL); 2150 dasm_put(Dst, 14613, LJ_TNIL);
2157 } 2151 }
2158 dasm_put(Dst, 14637, -FRAME_VARG, FRAME_TYPEP); 2152 dasm_put(Dst, 14620, -FRAME_VARG, FRAME_TYPEP);
2159 if (op != BC_RET0) { 2153 if (op != BC_RET0) {
2160 dasm_put(Dst, 14661); 2154 dasm_put(Dst, 14644);
2161 } 2155 }
2162 dasm_put(Dst, 4683); 2156 dasm_put(Dst, 4683);
2163 break; 2157 break;
@@ -2167,7 +2161,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2167 2161
2168 case BC_FORL: 2162 case BC_FORL:
2169#if LJ_HASJIT 2163#if LJ_HASJIT
2170 dasm_put(Dst, 14665, HOTCOUNT_PCMASK, GG_DISP2HOT); 2164 dasm_put(Dst, 14648, HOTCOUNT_PCMASK, GG_DISP2HOT);
2171#endif 2165#endif
2172 break; 2166 break;
2173 2167
@@ -2179,57 +2173,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2179 case BC_FORI: 2173 case BC_FORI:
2180 case BC_IFORL: 2174 case BC_IFORL:
2181 vk = (op == BC_IFORL || op == BC_JFORL); 2175 vk = (op == BC_IFORL || op == BC_JFORL);
2182 dasm_put(Dst, 14686); 2176 dasm_put(Dst, 14669);
2183 if (!vk) { 2177 if (!vk) {
2184 dasm_put(Dst, 14690, LJ_TISNUM, LJ_TISNUM); 2178 dasm_put(Dst, 14673, LJ_TISNUM, LJ_TISNUM);
2185 } 2179 }
2186 dasm_put(Dst, 14709); 2180 dasm_put(Dst, 14692);
2187 if (!vk) { 2181 if (!vk) {
2188 dasm_put(Dst, 14713, LJ_TISNUM); 2182 dasm_put(Dst, 14696, LJ_TISNUM);
2189 } 2183 }
2190 if (sse) { 2184 if (sse) {
2191 dasm_put(Dst, 14722); 2185 dasm_put(Dst, 14705);
2192 if (vk) { 2186 if (vk) {
2193 dasm_put(Dst, 14734); 2187 dasm_put(Dst, 14717);
2194 } else { 2188 } else {
2195 dasm_put(Dst, 14753); 2189 dasm_put(Dst, 14736);
2196 } 2190 }
2197 dasm_put(Dst, 14758); 2191 dasm_put(Dst, 14741);
2198 } else { 2192 } else {
2199 dasm_put(Dst, 14771); 2193 dasm_put(Dst, 14754);
2200 if (vk) { 2194 if (vk) {
2201 dasm_put(Dst, 14777); 2195 dasm_put(Dst, 14760);
2202 } else { 2196 } else {
2203 dasm_put(Dst, 14793); 2197 dasm_put(Dst, 14776);
2204 } 2198 }
2205 dasm_put(Dst, 14801); 2199 dasm_put(Dst, 14784);
2206 if (cmov) { 2200 if (cmov) {
2207 dasm_put(Dst, 10812); 2201 dasm_put(Dst, 10812);
2208 } else { 2202 } else {
2209 dasm_put(Dst, 10818); 2203 dasm_put(Dst, 10818);
2210 } 2204 }
2211 if (!cmov) { 2205 if (!cmov) {
2212 dasm_put(Dst, 14806); 2206 dasm_put(Dst, 14789);
2213 } 2207 }
2214 } 2208 }
2215 if (op == BC_FORI) { 2209 if (op == BC_FORI) {
2216 dasm_put(Dst, 14812, -BCBIAS_J*4); 2210 dasm_put(Dst, 14795, -BCBIAS_J*4);
2217 } else if (op == BC_JFORI) { 2211 } else if (op == BC_JFORI) {
2218 dasm_put(Dst, 14822, -BCBIAS_J*4, BC_JLOOP); 2212 dasm_put(Dst, 14805, -BCBIAS_J*4, BC_JLOOP);
2219 } else if (op == BC_IFORL) { 2213 } else if (op == BC_IFORL) {
2220 dasm_put(Dst, 14836, -BCBIAS_J*4); 2214 dasm_put(Dst, 14819, -BCBIAS_J*4);
2221 } else { 2215 } else {
2222 dasm_put(Dst, 14832, BC_JLOOP); 2216 dasm_put(Dst, 14815, BC_JLOOP);
2223 } 2217 }
2224 dasm_put(Dst, 10847); 2218 dasm_put(Dst, 10847);
2225 if (sse) { 2219 if (sse) {
2226 dasm_put(Dst, 14846); 2220 dasm_put(Dst, 14829);
2227 } 2221 }
2228 break; 2222 break;
2229 2223
2230 case BC_ITERL: 2224 case BC_ITERL:
2231#if LJ_HASJIT 2225#if LJ_HASJIT
2232 dasm_put(Dst, 14665, HOTCOUNT_PCMASK, GG_DISP2HOT); 2226 dasm_put(Dst, 14648, HOTCOUNT_PCMASK, GG_DISP2HOT);
2233#endif 2227#endif
2234 break; 2228 break;
2235 2229
@@ -2238,18 +2232,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2238 break; 2232 break;
2239#endif 2233#endif
2240 case BC_IITERL: 2234 case BC_IITERL:
2241 dasm_put(Dst, 14857, LJ_TNIL); 2235 dasm_put(Dst, 14840, LJ_TNIL);
2242 if (op == BC_JITERL) { 2236 if (op == BC_JITERL) {
2243 dasm_put(Dst, 14872, BC_JLOOP); 2237 dasm_put(Dst, 14855, BC_JLOOP);
2244 } else { 2238 } else {
2245 dasm_put(Dst, 14886, -BCBIAS_J*4); 2239 dasm_put(Dst, 14869, -BCBIAS_J*4);
2246 } 2240 }
2247 dasm_put(Dst, 11144); 2241 dasm_put(Dst, 11144);
2248 break; 2242 break;
2249 2243
2250 case BC_LOOP: 2244 case BC_LOOP:
2251#if LJ_HASJIT 2245#if LJ_HASJIT
2252 dasm_put(Dst, 14665, HOTCOUNT_PCMASK, GG_DISP2HOT); 2246 dasm_put(Dst, 14648, HOTCOUNT_PCMASK, GG_DISP2HOT);
2253#endif 2247#endif
2254 break; 2248 break;
2255 2249
@@ -2259,12 +2253,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2259 2253
2260 case BC_JLOOP: 2254 case BC_JLOOP:
2261#if LJ_HASJIT 2255#if LJ_HASJIT
2262 dasm_put(Dst, 14902, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2256 dasm_put(Dst, 14885, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2263#endif 2257#endif
2264 break; 2258 break;
2265 2259
2266 case BC_JMP: 2260 case BC_JMP:
2267 dasm_put(Dst, 14925, -BCBIAS_J*4); 2261 dasm_put(Dst, 14908, -BCBIAS_J*4);
2268 break; 2262 break;
2269 2263
2270 /* -- Function headers -------------------------------------------------- */ 2264 /* -- Function headers -------------------------------------------------- */
@@ -2278,7 +2272,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2278 2272
2279 case BC_FUNCF: 2273 case BC_FUNCF:
2280#if LJ_HASJIT 2274#if LJ_HASJIT
2281 dasm_put(Dst, 14949, HOTCOUNT_PCMASK, GG_DISP2HOT); 2275 dasm_put(Dst, 14932, HOTCOUNT_PCMASK, GG_DISP2HOT);
2282#endif 2276#endif
2283 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2277 case BC_FUNCV: /* NYI: compiled vararg functions. */
2284 break; 2278 break;
@@ -2288,13 +2282,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2288 break; 2282 break;
2289#endif 2283#endif
2290 case BC_IFUNCF: 2284 case BC_IFUNCF:
2291 dasm_put(Dst, 14970, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2285 dasm_put(Dst, 14953, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2292 if (op == BC_JFUNCF) { 2286 if (op == BC_JFUNCF) {
2293 dasm_put(Dst, 15000, BC_JLOOP); 2287 dasm_put(Dst, 14983, BC_JLOOP);
2294 } else { 2288 } else {
2295 dasm_put(Dst, 10849); 2289 dasm_put(Dst, 10849);
2296 } 2290 }
2297 dasm_put(Dst, 15009, LJ_TNIL); 2291 dasm_put(Dst, 14992, LJ_TNIL);
2298 break; 2292 break;
2299 2293
2300 case BC_JFUNCV: 2294 case BC_JFUNCV:
@@ -2305,30 +2299,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2305 break; /* NYI: compiled vararg functions. */ 2299 break; /* NYI: compiled vararg functions. */
2306 2300
2307 case BC_IFUNCV: 2301 case BC_IFUNCV:
2308 dasm_put(Dst, 15031, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2302 dasm_put(Dst, 15014, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2309 if (op == BC_JFUNCV) { 2303 if (op == BC_JFUNCV) {
2310 dasm_put(Dst, 15000, BC_JLOOP); 2304 dasm_put(Dst, 14983, BC_JLOOP);
2311 } else { 2305 } else {
2312 dasm_put(Dst, 15122, -4+PC2PROTO(k)); 2306 dasm_put(Dst, 15105, -4+PC2PROTO(k));
2313 } 2307 }
2314 dasm_put(Dst, 15144, LJ_TNIL); 2308 dasm_put(Dst, 15127, LJ_TNIL);
2315 break; 2309 break;
2316 2310
2317 case BC_FUNCC: 2311 case BC_FUNCC:
2318 case BC_FUNCCW: 2312 case BC_FUNCCW:
2319 dasm_put(Dst, 15166, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2313 dasm_put(Dst, 15149, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2320 if (op == BC_FUNCC) { 2314 if (op == BC_FUNCC) {
2321 dasm_put(Dst, 15195); 2315 dasm_put(Dst, 15178);
2322 } else { 2316 } else {
2323 dasm_put(Dst, 15199); 2317 dasm_put(Dst, 15182);
2324 } 2318 }
2325 dasm_put(Dst, 15207, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2319 dasm_put(Dst, 15190, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2326 if (op == BC_FUNCC) { 2320 if (op == BC_FUNCC) {
2327 dasm_put(Dst, 15216); 2321 dasm_put(Dst, 15199);
2328 } else { 2322 } else {
2329 dasm_put(Dst, 15220, DISPATCH_GL(wrapf)); 2323 dasm_put(Dst, 15203, DISPATCH_GL(wrapf));
2330 } 2324 }
2331 dasm_put(Dst, 15225, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2325 dasm_put(Dst, 15208, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2332 break; 2326 break;
2333 2327
2334 /* ---------------------------------------------------------------------- */ 2328 /* ---------------------------------------------------------------------- */
@@ -2356,7 +2350,7 @@ static int build_backend(BuildCtx *ctx)
2356 2350
2357 build_subroutines(ctx, cmov, sse); 2351 build_subroutines(ctx, cmov, sse);
2358 2352
2359 dasm_put(Dst, 15250); 2353 dasm_put(Dst, 15233);
2360 for (op = 0; op < BC__MAX; op++) 2354 for (op = 0; op < BC__MAX; op++)
2361 build_ins(ctx, (BCOp)op, op, cmov, sse); 2355 build_ins(ctx, (BCOp)op, op, cmov, sse);
2362 2356