aboutsummaryrefslogtreecommitdiff
path: root/src/buildvm_x86.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-09-30 21:55:32 +0200
committerMike Pall <mike>2010-09-30 21:55:32 +0200
commitac76493df113e6e648b03e61c0fa56c5754e832d (patch)
treee79e60ea60be028b1ae10587b80eb5f2aa33857d /src/buildvm_x86.h
parentfce05fd6e18a9b1f032f5c7409e1516214220f3c (diff)
downloadluajit-ac76493df113e6e648b03e61c0fa56c5754e832d.tar.gz
luajit-ac76493df113e6e648b03e61c0fa56c5754e832d.tar.bz2
luajit-ac76493df113e6e648b03e61c0fa56c5754e832d.zip
Specialize bytecode for pairs()/next() iterator. Speedup: 3.5x.
Parser predict pairs/next and emits specialized bytecode. Bytecode is descpecialized at runtime if the prediction was wrong. Store slot index in hidden control var to avoid key lookups.
Diffstat (limited to 'src/buildvm_x86.h')
-rw-r--r--src/buildvm_x86.h253
1 files changed, 148 insertions, 105 deletions
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index 6b8f4af4..8d30b4ef 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[15260] = { 15static const unsigned char build_actionlist[15576] = {
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,
@@ -699,56 +699,72 @@ static const unsigned char build_actionlist[15260] = {
699 139,65,252,236,137,41,137,65,4,139,105,252,240,139,65,252,244,137,105,8,137, 699 139,65,252,236,137,41,137,65,4,139,105,252,240,139,65,252,244,137,105,8,137,
700 65,12,139,105,224,139,65,228,137,105,252,248,137,65,252,252,129,252,248,239, 700 65,12,139,105,224,139,65,228,137,105,252,248,137,65,252,252,129,252,248,239,
701 184,237,15,133,244,28,137,202,137,114,252,252,139,181,233,139,14,15,182,252, 701 184,237,15,133,244,28,137,202,137,114,252,252,139,181,233,139,14,15,182,252,
702 233,15,182,205,131,198,4,252,255,36,171,255,15,182,252,236,15,182,192,137, 702 233,15,182,205,131,198,4,252,255,36,171,255,137,124,36,16,137,92,36,20,139,
703 124,36,16,141,188,253,194,233,141,12,202,43,122,252,252,133,252,237,15,132, 703 108,202,252,240,139,68,202,252,248,139,157,233,131,198,4,139,189,233,248,
704 244,251,141,108,252,233,252,248,57,215,15,131,244,248,248,1,139,71,252,248, 704 1,57,216,15,131,244,251,129,124,253,199,4,239,15,132,244,250,255,252,242,
705 137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,252,233,15,131,244,249, 705 15,42,192,255,219,68,202,252,248,255,139,108,199,4,137,108,202,12,139,44,
706 57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,233,15,130,244,2, 706 199,137,108,202,8,131,192,1,255,137,68,202,252,248,248,2,15,183,70,252,254,
707 248,3,139,124,36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 707 141,180,253,134,233,248,3,139,92,36,20,139,124,36,16,139,6,15,182,204,15,
708 255,36,171,248,5,199,68,36,20,1,0,0,0,137,208,41,252,248,15,134,244,3,137, 708 182,232,131,198,4,193,232,16,252,255,36,171,248,4,131,192,1,255,137,68,202,
709 197,193,252,237,3,131,197,1,137,108,36,20,139,108,36,48,1,200,59,133,233, 709 252,248,255,252,233,244,1,248,5,41,216,248,6,59,133,233,15,135,244,3,105,
710 15,135,244,253,248,6,255,139,71,252,248,137,1,139,71,252,252,131,199,8,137, 710 252,248,239,3,189,233,129,191,233,239,15,132,244,253,141,92,24,1,139,175,
711 65,4,131,193,8,57,215,15,130,244,6,252,233,244,3,248,7,137,149,233,137,141, 711 233,139,135,233,137,44,202,137,68,202,4,139,175,233,139,135,233,137,108,202,
712 233,137,116,36,24,41,215,139,84,36,20,131,252,234,1,137,252,233,232,251,1, 712 8,137,68,202,12,137,92,202,252,248,252,233,244,2,248,7,255,131,192,1,252,
713 0,139,149,233,139,141,233,1,215,252,233,244,6,255,193,225,3,255,248,1,139, 713 233,244,6,255,129,124,253,202,252,236,239,15,133,244,251,139,108,202,232,
714 114,252,252,137,68,36,20,252,247,198,237,15,133,244,253,255,248,13,137,215, 714 129,124,253,202,252,244,239,15,133,244,251,129,124,253,202,252,252,239,15,
715 131,232,1,15,132,244,249,248,2,139,44,15,137,111,252,248,139,108,15,4,137, 715 133,244,251,128,189,233,235,15,133,244,251,141,180,253,134,233,199,68,202,
716 111,252,252,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,20,15,182,110, 716 252,248,0,0,0,0,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,
717 252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,252,252,139, 717 255,36,171,248,5,198,70,252,252,235,141,180,253,134,233,198,6,235,252,233,
718 44,10,137,106,252,248,255,248,5,56,70,252,255,15,135,244,252,255,15,182,78, 718 244,1,255,15,182,252,236,15,182,192,137,124,36,16,141,188,253,194,233,141,
719 252,253,252,247,209,141,20,202,139,122,252,248,139,191,233,139,191,233,139, 719 12,202,43,122,252,252,133,252,237,15,132,244,251,141,108,252,233,252,248,
720 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,6,255,199, 720 57,215,15,131,244,248,248,1,139,71,252,248,137,1,139,71,252,252,131,199,8,
721 71,252,252,237,131,199,8,255,199,68,194,252,244,237,255,131,192,1,252,233, 721 137,65,4,131,193,8,57,252,233,15,131,244,249,57,215,15,130,244,1,248,2,199,
722 244,5,248,7,141,174,233,252,247,197,237,15,133,244,14,41,252,234,255,1,252, 722 65,4,237,131,193,8,57,252,233,15,130,244,2,248,3,139,124,36,16,139,6,15,182,
723 233,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132, 723 204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,5,199,68,36,20,1,0,
724 244,140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121,253,12, 724 0,0,137,208,41,252,248,15,134,244,3,137,197,193,252,237,3,131,197,1,137,108,
725 239,15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,53,255,252, 725 36,20,139,108,36,48,1,200,59,133,233,15,135,244,253,248,6,255,139,71,252,
726 242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133, 726 248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,215,15,130,244,6,
727 252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,242, 727 252,233,244,3,248,7,137,149,233,137,141,233,137,116,36,24,41,215,139,84,36,
728 15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237, 728 20,131,252,234,1,137,252,233,232,251,1,0,139,149,233,139,141,233,1,215,252,
729 15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,183, 729 233,244,6,255,193,225,3,255,248,1,139,114,252,252,137,68,36,20,252,247,198,
730 70,252,254,255,15,131,244,248,141,180,253,134,233,255,141,180,253,134,233, 730 237,15,133,244,253,255,248,13,137,215,131,232,1,15,132,244,249,248,2,139,
731 15,183,70,252,254,15,131,245,255,15,130,244,248,141,180,253,134,233,255,248, 731 44,15,137,111,252,248,139,108,15,4,137,111,252,252,131,199,8,131,232,1,15,
732 3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,239,15, 732 133,244,2,248,3,139,68,36,20,15,182,110,252,255,248,5,57,197,15,135,244,252,
733 132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,255,141, 733 255,139,108,10,4,137,106,252,252,139,44,10,137,106,252,248,255,248,5,56,70,
734 180,253,134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,233,139, 734 252,255,15,135,244,252,255,15,182,78,252,253,252,247,209,141,20,202,139,122,
735 4,129,139,128,233,139,108,36,48,137,147,233,137,171,233,252,255,224,255,141, 735 252,248,139,191,233,139,191,233,139,6,15,182,204,15,182,232,131,198,4,193,
736 180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 736 232,16,252,255,36,171,248,6,255,199,71,252,252,237,131,199,8,255,199,68,194,
737 36,171,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15, 737 252,244,237,255,131,192,1,252,233,244,5,248,7,141,174,233,252,247,197,237,
738 132,244,142,255,139,190,233,139,108,36,48,141,12,202,59,141,233,15,135,244, 738 15,133,244,14,41,252,234,255,1,252,233,255,137,252,245,209,252,237,129,229,
739 23,15,182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,254,252,233, 739 239,102,131,172,253,43,233,1,15,132,244,140,255,141,12,202,255,129,121,253,
740 245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233, 740 4,239,15,135,244,53,129,121,253,12,239,15,135,244,53,255,139,105,20,255,129,
741 244,2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,252,252,137,120, 741 252,253,239,15,135,244,53,255,252,242,15,16,1,252,242,15,16,73,8,255,252,
742 252,248,139,108,36,48,141,12,200,59,141,233,15,135,244,22,137,209,137,194, 742 242,15,88,65,16,252,242,15,17,1,133,252,237,15,136,244,249,255,15,140,244,
743 15,182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244, 743 249,255,102,15,46,200,248,1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,
744 249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,192,8,199,65,252, 744 65,16,221,17,221,81,24,133,252,237,15,136,244,247,255,221,81,24,15,140,244,
745 252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,139,6,15,182,204, 745 247,255,217,201,248,1,255,15,183,70,252,254,255,15,131,244,248,141,180,253,
746 15,182,232,131,198,4,193,232,16,252,255,36,171,255,248,3,199,64,4,237,131, 746 134,233,255,141,180,253,134,233,15,183,70,252,254,15,131,245,255,15,130,244,
747 192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,252,248,139,189, 747 248,141,180,253,134,233,255,248,3,102,15,46,193,252,233,244,1,255,141,12,
748 233,139,108,36,48,141,68,194,252,248,137,149,233,141,136,233,59,141,233,137, 748 202,139,105,4,129,252,253,239,15,132,244,247,255,137,105,252,252,139,41,137,
749 133,233,255,137,44,36,255,137,124,36,4,137,44,36,255,15,135,244,21,199,131, 749 105,252,248,252,233,245,255,141,180,253,134,233,139,1,137,105,252,252,137,
750 233,237,255,252,255,215,255,252,255,147,233,255,199,131,233,237,139,149,233, 750 65,252,248,255,139,139,233,139,4,129,139,128,233,139,108,36,48,137,147,233,
751 141,12,194,252,247,217,3,141,233,139,114,252,252,252,233,244,12,255,254,0 751 137,171,233,252,255,224,255,141,180,253,134,233,139,6,15,182,204,15,182,232,
752 131,198,4,193,232,16,252,255,36,171,255,137,252,245,209,252,237,129,229,239,
753 102,131,172,253,43,233,1,15,132,244,142,255,139,190,233,139,108,36,48,141,
754 12,202,59,141,233,15,135,244,23,15,182,142,233,57,200,15,134,244,249,248,
755 2,255,15,183,70,252,254,252,233,245,255,248,3,199,68,194,252,252,237,131,
756 192,1,57,200,15,134,244,3,252,233,244,2,255,141,44,197,237,141,4,194,139,
757 122,252,248,137,104,252,252,137,120,252,248,139,108,36,48,141,12,200,59,141,
758 233,15,135,244,22,137,209,137,194,15,182,174,233,133,252,237,15,132,244,248,
759 248,1,131,193,8,57,209,15,131,244,249,139,121,252,248,137,56,139,121,252,
760 252,137,120,4,131,192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,
761 2,255,139,190,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,
762 36,171,255,248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,
763 244,2,255,139,106,252,248,139,189,233,139,108,36,48,141,68,194,252,248,137,
764 149,233,141,136,233,59,141,233,137,133,233,255,137,44,36,255,137,124,36,4,
765 137,44,36,255,15,135,244,21,199,131,233,237,255,252,255,215,255,252,255,147,
766 233,255,199,131,233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,
767 114,252,252,252,233,244,12,255,254,0
752}; 768};
753 769
754enum { 770enum {
@@ -2115,9 +2131,36 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2115 dasm_put(Dst, 14164, LJ_TFUNC, 2+1, Dt7(->pc)); 2131 dasm_put(Dst, 14164, LJ_TFUNC, 2+1, Dt7(->pc));
2116 break; 2132 break;
2117 2133
2134 case BC_ITERN:
2135#if LJ_HASJIT
2136#endif
2137 dasm_put(Dst, 14244, Dt6(->asize), Dt6(->array), LJ_TNIL);
2138 if (sse) {
2139 dasm_put(Dst, 14290);
2140 } else {
2141 dasm_put(Dst, 14296);
2142 }
2143 dasm_put(Dst, 14302);
2144 if (sse) {
2145 dasm_put(Dst, 11273);
2146 } else {
2147 dasm_put(Dst, 11285);
2148 }
2149 dasm_put(Dst, 14321, -BCBIAS_J*4);
2150 if (!sse) {
2151 dasm_put(Dst, 14372);
2152 }
2153 dasm_put(Dst, 14378, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key.gcr), DtB(->key.it), DtB(->val.gcr), DtB(->val.it));
2154 dasm_put(Dst, 14453);
2155 break;
2156
2157 case BC_ISNEXT:
2158 dasm_put(Dst, 14461, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC);
2159 break;
2160
2118 case BC_VARG: 2161 case BC_VARG:
2119 dasm_put(Dst, 14244, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); 2162 dasm_put(Dst, 14560, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack));
2120 dasm_put(Dst, 14408, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2163 dasm_put(Dst, 14724, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2121 break; 2164 break;
2122 2165
2123 /* -- Returns ----------------------------------------------------------- */ 2166 /* -- Returns ----------------------------------------------------------- */
@@ -2128,30 +2171,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2128 2171
2129 case BC_RET: case BC_RET0: case BC_RET1: 2172 case BC_RET: case BC_RET0: case BC_RET1:
2130 if (op != BC_RET0) { 2173 if (op != BC_RET0) {
2131 dasm_put(Dst, 14479); 2174 dasm_put(Dst, 14795);
2132 } 2175 }
2133 dasm_put(Dst, 14483, FRAME_TYPE); 2176 dasm_put(Dst, 14799, FRAME_TYPE);
2134 switch (op) { 2177 switch (op) {
2135 case BC_RET: 2178 case BC_RET:
2136 dasm_put(Dst, 14502); 2179 dasm_put(Dst, 14818);
2137 break; 2180 break;
2138 case BC_RET1: 2181 case BC_RET1:
2139 dasm_put(Dst, 14560); 2182 dasm_put(Dst, 14876);
2140 /* fallthrough */ 2183 /* fallthrough */
2141 case BC_RET0: 2184 case BC_RET0:
2142 dasm_put(Dst, 14576); 2185 dasm_put(Dst, 14892);
2143 default: 2186 default:
2144 break; 2187 break;
2145 } 2188 }
2146 dasm_put(Dst, 14587, Dt7(->pc), PC2PROTO(k)); 2189 dasm_put(Dst, 14903, Dt7(->pc), PC2PROTO(k));
2147 if (op == BC_RET) { 2190 if (op == BC_RET) {
2148 dasm_put(Dst, 14629, LJ_TNIL); 2191 dasm_put(Dst, 14945, LJ_TNIL);
2149 } else { 2192 } else {
2150 dasm_put(Dst, 14638, LJ_TNIL); 2193 dasm_put(Dst, 14954, LJ_TNIL);
2151 } 2194 }
2152 dasm_put(Dst, 14645, -FRAME_VARG, FRAME_TYPEP); 2195 dasm_put(Dst, 14961, -FRAME_VARG, FRAME_TYPEP);
2153 if (op != BC_RET0) { 2196 if (op != BC_RET0) {
2154 dasm_put(Dst, 14669); 2197 dasm_put(Dst, 14985);
2155 } 2198 }
2156 dasm_put(Dst, 4689); 2199 dasm_put(Dst, 4689);
2157 break; 2200 break;
@@ -2161,7 +2204,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2161 2204
2162 case BC_FORL: 2205 case BC_FORL:
2163#if LJ_HASJIT 2206#if LJ_HASJIT
2164 dasm_put(Dst, 14673, HOTCOUNT_PCMASK, GG_DISP2HOT); 2207 dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT);
2165#endif 2208#endif
2166 break; 2209 break;
2167 2210
@@ -2173,57 +2216,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2173 case BC_FORI: 2216 case BC_FORI:
2174 case BC_IFORL: 2217 case BC_IFORL:
2175 vk = (op == BC_IFORL || op == BC_JFORL); 2218 vk = (op == BC_IFORL || op == BC_JFORL);
2176 dasm_put(Dst, 14694); 2219 dasm_put(Dst, 15010);
2177 if (!vk) { 2220 if (!vk) {
2178 dasm_put(Dst, 14698, LJ_TISNUM, LJ_TISNUM); 2221 dasm_put(Dst, 15014, LJ_TISNUM, LJ_TISNUM);
2179 } 2222 }
2180 dasm_put(Dst, 14717); 2223 dasm_put(Dst, 15033);
2181 if (!vk) { 2224 if (!vk) {
2182 dasm_put(Dst, 14721, LJ_TISNUM); 2225 dasm_put(Dst, 15037, LJ_TISNUM);
2183 } 2226 }
2184 if (sse) { 2227 if (sse) {
2185 dasm_put(Dst, 14730); 2228 dasm_put(Dst, 15046);
2186 if (vk) { 2229 if (vk) {
2187 dasm_put(Dst, 14742); 2230 dasm_put(Dst, 15058);
2188 } else { 2231 } else {
2189 dasm_put(Dst, 14761); 2232 dasm_put(Dst, 15077);
2190 } 2233 }
2191 dasm_put(Dst, 14766); 2234 dasm_put(Dst, 15082);
2192 } else { 2235 } else {
2193 dasm_put(Dst, 14779); 2236 dasm_put(Dst, 15095);
2194 if (vk) { 2237 if (vk) {
2195 dasm_put(Dst, 14785); 2238 dasm_put(Dst, 15101);
2196 } else { 2239 } else {
2197 dasm_put(Dst, 14801); 2240 dasm_put(Dst, 15117);
2198 } 2241 }
2199 dasm_put(Dst, 14809); 2242 dasm_put(Dst, 15125);
2200 if (cmov) { 2243 if (cmov) {
2201 dasm_put(Dst, 10818); 2244 dasm_put(Dst, 10818);
2202 } else { 2245 } else {
2203 dasm_put(Dst, 10824); 2246 dasm_put(Dst, 10824);
2204 } 2247 }
2205 if (!cmov) { 2248 if (!cmov) {
2206 dasm_put(Dst, 14814); 2249 dasm_put(Dst, 15130);
2207 } 2250 }
2208 } 2251 }
2209 if (op == BC_FORI) { 2252 if (op == BC_FORI) {
2210 dasm_put(Dst, 14820, -BCBIAS_J*4); 2253 dasm_put(Dst, 15136, -BCBIAS_J*4);
2211 } else if (op == BC_JFORI) { 2254 } else if (op == BC_JFORI) {
2212 dasm_put(Dst, 14830, -BCBIAS_J*4, BC_JLOOP); 2255 dasm_put(Dst, 15146, -BCBIAS_J*4, BC_JLOOP);
2213 } else if (op == BC_IFORL) { 2256 } else if (op == BC_IFORL) {
2214 dasm_put(Dst, 14844, -BCBIAS_J*4); 2257 dasm_put(Dst, 15160, -BCBIAS_J*4);
2215 } else { 2258 } else {
2216 dasm_put(Dst, 14840, BC_JLOOP); 2259 dasm_put(Dst, 15156, BC_JLOOP);
2217 } 2260 }
2218 dasm_put(Dst, 10853); 2261 dasm_put(Dst, 10853);
2219 if (sse) { 2262 if (sse) {
2220 dasm_put(Dst, 14854); 2263 dasm_put(Dst, 15170);
2221 } 2264 }
2222 break; 2265 break;
2223 2266
2224 case BC_ITERL: 2267 case BC_ITERL:
2225#if LJ_HASJIT 2268#if LJ_HASJIT
2226 dasm_put(Dst, 14673, HOTCOUNT_PCMASK, GG_DISP2HOT); 2269 dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT);
2227#endif 2270#endif
2228 break; 2271 break;
2229 2272
@@ -2232,18 +2275,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2232 break; 2275 break;
2233#endif 2276#endif
2234 case BC_IITERL: 2277 case BC_IITERL:
2235 dasm_put(Dst, 14865, LJ_TNIL); 2278 dasm_put(Dst, 15181, LJ_TNIL);
2236 if (op == BC_JITERL) { 2279 if (op == BC_JITERL) {
2237 dasm_put(Dst, 14880, BC_JLOOP); 2280 dasm_put(Dst, 15196, BC_JLOOP);
2238 } else { 2281 } else {
2239 dasm_put(Dst, 14894, -BCBIAS_J*4); 2282 dasm_put(Dst, 15210, -BCBIAS_J*4);
2240 } 2283 }
2241 dasm_put(Dst, 11150); 2284 dasm_put(Dst, 11150);
2242 break; 2285 break;
2243 2286
2244 case BC_LOOP: 2287 case BC_LOOP:
2245#if LJ_HASJIT 2288#if LJ_HASJIT
2246 dasm_put(Dst, 14673, HOTCOUNT_PCMASK, GG_DISP2HOT); 2289 dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT);
2247#endif 2290#endif
2248 break; 2291 break;
2249 2292
@@ -2253,12 +2296,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2253 2296
2254 case BC_JLOOP: 2297 case BC_JLOOP:
2255#if LJ_HASJIT 2298#if LJ_HASJIT
2256 dasm_put(Dst, 14910, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2299 dasm_put(Dst, 15226, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2257#endif 2300#endif
2258 break; 2301 break;
2259 2302
2260 case BC_JMP: 2303 case BC_JMP:
2261 dasm_put(Dst, 14933, -BCBIAS_J*4); 2304 dasm_put(Dst, 15249, -BCBIAS_J*4);
2262 break; 2305 break;
2263 2306
2264 /* -- Function headers -------------------------------------------------- */ 2307 /* -- Function headers -------------------------------------------------- */
@@ -2272,7 +2315,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2272 2315
2273 case BC_FUNCF: 2316 case BC_FUNCF:
2274#if LJ_HASJIT 2317#if LJ_HASJIT
2275 dasm_put(Dst, 14957, HOTCOUNT_PCMASK, GG_DISP2HOT); 2318 dasm_put(Dst, 15273, HOTCOUNT_PCMASK, GG_DISP2HOT);
2276#endif 2319#endif
2277 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2320 case BC_FUNCV: /* NYI: compiled vararg functions. */
2278 break; 2321 break;
@@ -2282,13 +2325,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2282 break; 2325 break;
2283#endif 2326#endif
2284 case BC_IFUNCF: 2327 case BC_IFUNCF:
2285 dasm_put(Dst, 14978, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2328 dasm_put(Dst, 15294, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2286 if (op == BC_JFUNCF) { 2329 if (op == BC_JFUNCF) {
2287 dasm_put(Dst, 15008, BC_JLOOP); 2330 dasm_put(Dst, 15324, BC_JLOOP);
2288 } else { 2331 } else {
2289 dasm_put(Dst, 10855); 2332 dasm_put(Dst, 10855);
2290 } 2333 }
2291 dasm_put(Dst, 15017, LJ_TNIL); 2334 dasm_put(Dst, 15333, LJ_TNIL);
2292 break; 2335 break;
2293 2336
2294 case BC_JFUNCV: 2337 case BC_JFUNCV:
@@ -2299,30 +2342,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2299 break; /* NYI: compiled vararg functions. */ 2342 break; /* NYI: compiled vararg functions. */
2300 2343
2301 case BC_IFUNCV: 2344 case BC_IFUNCV:
2302 dasm_put(Dst, 15039, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2345 dasm_put(Dst, 15355, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2303 if (op == BC_JFUNCV) { 2346 if (op == BC_JFUNCV) {
2304 dasm_put(Dst, 15008, BC_JLOOP); 2347 dasm_put(Dst, 15324, BC_JLOOP);
2305 } else { 2348 } else {
2306 dasm_put(Dst, 15130, -4+PC2PROTO(k)); 2349 dasm_put(Dst, 15446, -4+PC2PROTO(k));
2307 } 2350 }
2308 dasm_put(Dst, 15152, LJ_TNIL); 2351 dasm_put(Dst, 15468, LJ_TNIL);
2309 break; 2352 break;
2310 2353
2311 case BC_FUNCC: 2354 case BC_FUNCC:
2312 case BC_FUNCCW: 2355 case BC_FUNCCW:
2313 dasm_put(Dst, 15174, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2356 dasm_put(Dst, 15490, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2314 if (op == BC_FUNCC) { 2357 if (op == BC_FUNCC) {
2315 dasm_put(Dst, 15203); 2358 dasm_put(Dst, 15519);
2316 } else { 2359 } else {
2317 dasm_put(Dst, 15207); 2360 dasm_put(Dst, 15523);
2318 } 2361 }
2319 dasm_put(Dst, 15215, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2362 dasm_put(Dst, 15531, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2320 if (op == BC_FUNCC) { 2363 if (op == BC_FUNCC) {
2321 dasm_put(Dst, 15224); 2364 dasm_put(Dst, 15540);
2322 } else { 2365 } else {
2323 dasm_put(Dst, 15228, DISPATCH_GL(wrapf)); 2366 dasm_put(Dst, 15544, DISPATCH_GL(wrapf));
2324 } 2367 }
2325 dasm_put(Dst, 15233, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2368 dasm_put(Dst, 15549, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2326 break; 2369 break;
2327 2370
2328 /* ---------------------------------------------------------------------- */ 2371 /* ---------------------------------------------------------------------- */
@@ -2350,7 +2393,7 @@ static int build_backend(BuildCtx *ctx)
2350 2393
2351 build_subroutines(ctx, cmov, sse); 2394 build_subroutines(ctx, cmov, sse);
2352 2395
2353 dasm_put(Dst, 15258); 2396 dasm_put(Dst, 15574);
2354 for (op = 0; op < BC__MAX; op++) 2397 for (op = 0; op < BC__MAX; op++)
2355 build_ins(ctx, (BCOp)op, op, cmov, sse); 2398 build_ins(ctx, (BCOp)op, op, cmov, sse);
2356 2399