aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2010-03-01 06:46:45 +0100
committerMike Pall <mike>2010-03-01 06:54:35 +0100
commit5d0b65519cca129913e598045d94bef0387164db (patch)
treeda657c18bb60dea5211efe9baa3820fdcacdde86
parente7b737aa1202b06950b4ca4ec206b04bdd5a3681 (diff)
downloadluajit-5d0b65519cca129913e598045d94bef0387164db.tar.gz
luajit-5d0b65519cca129913e598045d94bef0387164db.tar.bz2
luajit-5d0b65519cca129913e598045d94bef0387164db.zip
Enable tracing of recursion.
Now compiles tail-recursion, up-recursion and down-recursion. Benchmarks vs. Lua: fib 20x, ack 23x, binary-trees 4.7x.
-rw-r--r--doc/status.html4
-rw-r--r--src/buildvm_x64.h38
-rw-r--r--src/buildvm_x64win.h40
-rw-r--r--src/buildvm_x86.dasc3
-rw-r--r--src/buildvm_x86.h64
5 files changed, 75 insertions, 74 deletions
diff --git a/doc/status.html b/doc/status.html
index d7cdffb5..2d750ee1 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -136,10 +136,6 @@ with me, before writing major improvements, to avoid duplication of
136effort. 136effort.
137</li> 137</li>
138<li> 138<li>
139<b>Recursion</b> is not traced yet. Often no trace will be generated at
140all or some unroll limit will catch it and abort the trace.
141</li>
142<li>
143The trace compiler currently does not back off specialization for 139The trace compiler currently does not back off specialization for
144function call dispatch. It should really fall back to specializing on 140function call dispatch. It should really fall back to specializing on
145the prototype, not the closure identity. This can lead to the so-called 141the prototype, not the closure identity. This can lead to the so-called
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h
index c394624d..57508e89 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[14028] = { 15static const unsigned char build_actionlist[14049] = {
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,252,247,195,237,15,132,244,10,65,199, 18 252,247,195,237,15,132,244,13,248,14,252,247,195,237,15,132,244,10,65,199,
@@ -676,8 +676,9 @@ static const unsigned char build_actionlist[14028] = {
676 233,139,4,193,72,139,128,233,139,108,36,24,65,137,150,233,65,137,174,233, 676 233,139,4,193,72,139,128,233,139,108,36,24,65,137,150,233,65,137,174,233,
677 76,137,36,36,76,137,108,36,8,72,131,252,236,16,252,255,224,255,141,156,253, 677 76,137,36,36,76,137,108,36,8,72,131,252,236,16,252,255,224,255,141,156,253,
678 131,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 678 131,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,
679 238,255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244,23, 679 238,255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132,
680 15,182,139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233, 680 244,142,255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244,
681 23,15,182,139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233,
681 245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233, 682 245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,
682 244,2,255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68, 683 244,2,255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68,
683 137,120,252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,22,137,209, 684 137,120,252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,22,137,209,
@@ -2150,6 +2151,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2150 2151
2151 case BC_FUNCF: 2152 case BC_FUNCF:
2152#if LJ_HASJIT 2153#if LJ_HASJIT
2154 dasm_put(Dst, 13731, HOTCOUNT_PCMASK, GG_DISP2HOT);
2153#endif 2155#endif
2154 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2156 case BC_FUNCV: /* NYI: compiled vararg functions. */
2155 break; 2157 break;
@@ -2159,13 +2161,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2159 break; 2161 break;
2160#endif 2162#endif
2161 case BC_IFUNCF: 2163 case BC_IFUNCF:
2162 dasm_put(Dst, 13731, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2164 dasm_put(Dst, 13752, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2163 if (op == BC_JFUNCF) { 2165 if (op == BC_JFUNCF) {
2164 dasm_put(Dst, 13762, BC_JLOOP); 2166 dasm_put(Dst, 13783, BC_JLOOP);
2165 } else { 2167 } else {
2166 dasm_put(Dst, 9531); 2168 dasm_put(Dst, 9531);
2167 } 2169 }
2168 dasm_put(Dst, 13771, LJ_TNIL); 2170 dasm_put(Dst, 13792, LJ_TNIL);
2169 break; 2171 break;
2170 2172
2171 case BC_JFUNCV: 2173 case BC_JFUNCV:
@@ -2176,30 +2178,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2176 break; /* NYI: compiled vararg functions. */ 2178 break; /* NYI: compiled vararg functions. */
2177 2179
2178 case BC_IFUNCV: 2180 case BC_IFUNCV:
2179 dasm_put(Dst, 13793, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2181 dasm_put(Dst, 13814, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2180 if (op == BC_JFUNCV) { 2182 if (op == BC_JFUNCV) {
2181 dasm_put(Dst, 13762, BC_JLOOP); 2183 dasm_put(Dst, 13783, BC_JLOOP);
2182 } else { 2184 } else {
2183 dasm_put(Dst, 13890, -4+PC2PROTO(k)); 2185 dasm_put(Dst, 13911, -4+PC2PROTO(k));
2184 } 2186 }
2185 dasm_put(Dst, 13915, LJ_TNIL); 2187 dasm_put(Dst, 13936, LJ_TNIL);
2186 break; 2188 break;
2187 2189
2188 case BC_FUNCC: 2190 case BC_FUNCC:
2189 case BC_FUNCCW: 2191 case BC_FUNCCW:
2190 dasm_put(Dst, 13937, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2192 dasm_put(Dst, 13958, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2191 if (op == BC_FUNCC) { 2193 if (op == BC_FUNCC) {
2192 dasm_put(Dst, 13967); 2194 dasm_put(Dst, 13988);
2193 } else { 2195 } else {
2194 dasm_put(Dst, 13971); 2196 dasm_put(Dst, 13992);
2195 } 2197 }
2196 dasm_put(Dst, 13979, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2198 dasm_put(Dst, 14000, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2197 if (op == BC_FUNCC) { 2199 if (op == BC_FUNCC) {
2198 dasm_put(Dst, 13989); 2200 dasm_put(Dst, 14010);
2199 } else { 2201 } else {
2200 dasm_put(Dst, 13994, DISPATCH_GL(wrapf)); 2202 dasm_put(Dst, 14015, DISPATCH_GL(wrapf));
2201 } 2203 }
2202 dasm_put(Dst, 14000, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2204 dasm_put(Dst, 14021, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2203 break; 2205 break;
2204 2206
2205 /* ---------------------------------------------------------------------- */ 2207 /* ---------------------------------------------------------------------- */
@@ -2227,7 +2229,7 @@ static int build_backend(BuildCtx *ctx)
2227 2229
2228 build_subroutines(ctx, cmov, sse); 2230 build_subroutines(ctx, cmov, sse);
2229 2231
2230 dasm_put(Dst, 14026); 2232 dasm_put(Dst, 14047);
2231 for (op = 0; op < BC__MAX; op++) 2233 for (op = 0; op < BC__MAX; op++)
2232 build_ins(ctx, (BCOp)op, op, cmov, sse); 2234 build_ins(ctx, (BCOp)op, op, cmov, sse);
2233 2235
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h
index de65f400..97ab59d9 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[13976] = { 15static const unsigned char build_actionlist[13997] = {
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,252,247,198,237,15,132,244,10, 18 36,84,252,247,198,237,15,132,244,13,248,14,252,247,198,237,15,132,244,10,
@@ -676,9 +676,10 @@ static const unsigned char build_actionlist[13976] = {
676 233,102,68,15,127,129,233,102,68,15,127,137,233,102,68,15,127,145,233,102, 676 233,102,68,15,127,129,233,102,68,15,127,137,233,102,68,15,127,145,233,102,
677 68,15,127,153,233,102,68,15,127,161,233,102,68,15,127,169,233,102,68,15,127, 677 68,15,127,153,233,102,68,15,127,161,233,102,68,15,127,169,233,102,68,15,127,
678 177,233,102,68,15,127,185,233,252,255,224,255,141,180,253,134,233,139,6,15, 678 177,233,102,68,15,127,185,233,252,255,224,255,141,180,253,134,233,139,6,15,
679 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,139,190,233, 679 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,137,252,245,
680 139,108,36,96,141,12,202,59,141,233,15,135,244,23,15,182,142,233,57,200,15, 680 209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,142,255,139,190,
681 134,244,249,248,2,255,15,183,70,252,254,252,233,245,255,248,3,199,68,194, 681 233,139,108,36,96,141,12,202,59,141,233,15,135,244,23,15,182,142,233,57,200,
682 15,134,244,249,248,2,255,15,183,70,252,254,252,233,245,255,248,3,199,68,194,
682 252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255,141,44,197,237, 683 252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255,141,44,197,237,
683 141,4,194,139,122,252,248,137,104,252,252,137,120,252,248,139,108,36,96,141, 684 141,4,194,139,122,252,248,137,104,252,252,137,120,252,248,139,108,36,96,141,
684 12,200,59,141,233,15,135,244,22,137,209,137,194,15,182,174,233,133,252,237, 685 12,200,59,141,233,15,135,244,22,137,209,137,194,15,182,174,233,133,252,237,
@@ -2150,6 +2151,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2150 2151
2151 case BC_FUNCF: 2152 case BC_FUNCF:
2152#if LJ_HASJIT 2153#if LJ_HASJIT
2154 dasm_put(Dst, 13692, HOTCOUNT_PCMASK, GG_DISP2HOT);
2153#endif 2155#endif
2154 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2156 case BC_FUNCV: /* NYI: compiled vararg functions. */
2155 break; 2157 break;
@@ -2159,13 +2161,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2159 break; 2161 break;
2160#endif 2162#endif
2161 case BC_IFUNCF: 2163 case BC_IFUNCF:
2162 dasm_put(Dst, 13692, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2164 dasm_put(Dst, 13713, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2163 if (op == BC_JFUNCF) { 2165 if (op == BC_JFUNCF) {
2164 dasm_put(Dst, 13722, BC_JLOOP); 2166 dasm_put(Dst, 13743, BC_JLOOP);
2165 } else { 2167 } else {
2166 dasm_put(Dst, 9539); 2168 dasm_put(Dst, 9539);
2167 } 2169 }
2168 dasm_put(Dst, 13731, LJ_TNIL); 2170 dasm_put(Dst, 13752, LJ_TNIL);
2169 break; 2171 break;
2170 2172
2171 case BC_JFUNCV: 2173 case BC_JFUNCV:
@@ -2176,30 +2178,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2176 break; /* NYI: compiled vararg functions. */ 2178 break; /* NYI: compiled vararg functions. */
2177 2179
2178 case BC_IFUNCV: 2180 case BC_IFUNCV:
2179 dasm_put(Dst, 13753, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2181 dasm_put(Dst, 13774, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2180 if (op == BC_JFUNCV) { 2182 if (op == BC_JFUNCV) {
2181 dasm_put(Dst, 13722, BC_JLOOP); 2183 dasm_put(Dst, 13743, BC_JLOOP);
2182 } else { 2184 } else {
2183 dasm_put(Dst, 13844, -4+PC2PROTO(k)); 2185 dasm_put(Dst, 13865, -4+PC2PROTO(k));
2184 } 2186 }
2185 dasm_put(Dst, 13867, LJ_TNIL); 2187 dasm_put(Dst, 13888, LJ_TNIL);
2186 break; 2188 break;
2187 2189
2188 case BC_FUNCC: 2190 case BC_FUNCC:
2189 case BC_FUNCCW: 2191 case BC_FUNCCW:
2190 dasm_put(Dst, 13889, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2192 dasm_put(Dst, 13910, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2191 if (op == BC_FUNCC) { 2193 if (op == BC_FUNCC) {
2192 dasm_put(Dst, 13919); 2194 dasm_put(Dst, 13940);
2193 } else { 2195 } else {
2194 dasm_put(Dst, 13923); 2196 dasm_put(Dst, 13944);
2195 } 2197 }
2196 dasm_put(Dst, 13931, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2198 dasm_put(Dst, 13952, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2197 if (op == BC_FUNCC) { 2199 if (op == BC_FUNCC) {
2198 dasm_put(Dst, 13940); 2200 dasm_put(Dst, 13961);
2199 } else { 2201 } else {
2200 dasm_put(Dst, 13944, DISPATCH_GL(wrapf)); 2202 dasm_put(Dst, 13965, DISPATCH_GL(wrapf));
2201 } 2203 }
2202 dasm_put(Dst, 13949, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2204 dasm_put(Dst, 13970, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2203 break; 2205 break;
2204 2206
2205 /* ---------------------------------------------------------------------- */ 2207 /* ---------------------------------------------------------------------- */
@@ -2227,7 +2229,7 @@ static int build_backend(BuildCtx *ctx)
2227 2229
2228 build_subroutines(ctx, cmov, sse); 2230 build_subroutines(ctx, cmov, sse);
2229 2231
2230 dasm_put(Dst, 13974); 2232 dasm_put(Dst, 13995);
2231 for (op = 0; op < BC__MAX; op++) 2233 for (op = 0; op < BC__MAX; op++)
2232 build_ins(ctx, (BCOp)op, op, cmov, sse); 2234 build_ins(ctx, (BCOp)op, op, cmov, sse);
2233 2235
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index a3e65174..fbeb4f29 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -4790,8 +4790,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
4790 4790
4791 case BC_FUNCF: 4791 case BC_FUNCF:
4792#if LJ_HASJIT 4792#if LJ_HASJIT
4793 | // NYI: Disabled, until the tracer supports recursion/upcalls/leaves. 4793 | hotcall RB
4794 | // hotcall RB
4795#endif 4794#endif
4796 case BC_FUNCV: /* NYI: compiled vararg functions. */ 4795 case BC_FUNCV: /* NYI: compiled vararg functions. */
4797 | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow and ins_AD is a no-op. 4796 | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow and ins_AD is a no-op.
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index 5bf7e60c..8a421ec8 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[15177] = { 15static const unsigned char build_actionlist[15198] = {
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,252,247,198,237,15,132,244,10,199, 18 20,252,247,198,237,15,132,244,13,248,14,252,247,198,237,15,132,244,10,199,
@@ -730,21 +730,22 @@ static const unsigned char build_actionlist[15177] = {
730 255,141,180,253,134,233,139,1,137,105,252,252,137,65,252,248,255,139,139, 730 255,141,180,253,134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,
731 233,139,4,129,139,128,233,139,108,36,48,137,147,233,137,171,233,252,255,224, 731 233,139,4,129,139,128,233,139,108,36,48,137,147,233,137,171,233,252,255,224,
732 255,141,180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16, 732 255,141,180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
733 252,255,36,171,255,139,190,233,139,108,36,48,141,12,202,59,141,233,15,135, 733 252,255,36,171,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,
734 244,23,15,182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,254,252, 734 233,1,15,132,244,142,255,139,190,233,139,108,36,48,141,12,202,59,141,233,
735 233,245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252, 735 15,135,244,23,15,182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,
736 233,244,2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,252,252,137, 736 254,252,233,245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,
737 120,252,248,139,108,36,48,141,12,200,59,141,233,15,135,244,22,137,209,137, 737 244,3,252,233,244,2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,
738 194,15,182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131, 738 252,252,137,120,252,248,139,108,36,48,141,12,200,59,141,233,15,135,244,22,
739 244,249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,192,8,199,65, 739 137,209,137,194,15,182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,
740 252,252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,139,6,15,182, 740 57,209,15,131,244,249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,
741 204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,248,3,199,64,4,237, 741 192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,
742 131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,252,248,139, 742 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,248,3,
743 189,233,139,108,36,48,141,68,194,252,248,137,149,233,141,136,233,59,141,233, 743 199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,
744 137,133,233,255,137,44,36,255,137,124,36,4,137,44,36,255,15,135,244,21,199, 744 252,248,139,189,233,139,108,36,48,141,68,194,252,248,137,149,233,141,136,
745 131,233,237,255,252,255,215,255,252,255,147,233,255,199,131,233,237,139,149, 745 233,59,141,233,137,133,233,255,137,44,36,255,137,124,36,4,137,44,36,255,15,
746 233,141,12,194,252,247,217,3,141,233,139,114,252,252,252,233,244,12,255,254, 746 135,244,21,199,131,233,237,255,252,255,215,255,252,255,147,233,255,199,131,
747 0 747 233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,114,252,252,252,
748 233,244,12,255,254,0
748}; 749};
749 750
750enum { 751enum {
@@ -2278,6 +2279,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2278 2279
2279 case BC_FUNCF: 2280 case BC_FUNCF:
2280#if LJ_HASJIT 2281#if LJ_HASJIT
2282 dasm_put(Dst, 14895, HOTCOUNT_PCMASK, GG_DISP2HOT);
2281#endif 2283#endif
2282 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2284 case BC_FUNCV: /* NYI: compiled vararg functions. */
2283 break; 2285 break;
@@ -2287,13 +2289,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2287 break; 2289 break;
2288#endif 2290#endif
2289 case BC_IFUNCF: 2291 case BC_IFUNCF:
2290 dasm_put(Dst, 14895, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2292 dasm_put(Dst, 14916, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2291 if (op == BC_JFUNCF) { 2293 if (op == BC_JFUNCF) {
2292 dasm_put(Dst, 14925, BC_JLOOP); 2294 dasm_put(Dst, 14946, BC_JLOOP);
2293 } else { 2295 } else {
2294 dasm_put(Dst, 10814); 2296 dasm_put(Dst, 10814);
2295 } 2297 }
2296 dasm_put(Dst, 14934, LJ_TNIL); 2298 dasm_put(Dst, 14955, LJ_TNIL);
2297 break; 2299 break;
2298 2300
2299 case BC_JFUNCV: 2301 case BC_JFUNCV:
@@ -2304,30 +2306,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2304 break; /* NYI: compiled vararg functions. */ 2306 break; /* NYI: compiled vararg functions. */
2305 2307
2306 case BC_IFUNCV: 2308 case BC_IFUNCV:
2307 dasm_put(Dst, 14956, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2309 dasm_put(Dst, 14977, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2308 if (op == BC_JFUNCV) { 2310 if (op == BC_JFUNCV) {
2309 dasm_put(Dst, 14925, BC_JLOOP); 2311 dasm_put(Dst, 14946, BC_JLOOP);
2310 } else { 2312 } else {
2311 dasm_put(Dst, 15047, -4+PC2PROTO(k)); 2313 dasm_put(Dst, 15068, -4+PC2PROTO(k));
2312 } 2314 }
2313 dasm_put(Dst, 15069, LJ_TNIL); 2315 dasm_put(Dst, 15090, LJ_TNIL);
2314 break; 2316 break;
2315 2317
2316 case BC_FUNCC: 2318 case BC_FUNCC:
2317 case BC_FUNCCW: 2319 case BC_FUNCCW:
2318 dasm_put(Dst, 15091, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2320 dasm_put(Dst, 15112, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2319 if (op == BC_FUNCC) { 2321 if (op == BC_FUNCC) {
2320 dasm_put(Dst, 15120); 2322 dasm_put(Dst, 15141);
2321 } else { 2323 } else {
2322 dasm_put(Dst, 15124); 2324 dasm_put(Dst, 15145);
2323 } 2325 }
2324 dasm_put(Dst, 15132, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2326 dasm_put(Dst, 15153, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2325 if (op == BC_FUNCC) { 2327 if (op == BC_FUNCC) {
2326 dasm_put(Dst, 15141); 2328 dasm_put(Dst, 15162);
2327 } else { 2329 } else {
2328 dasm_put(Dst, 15145, DISPATCH_GL(wrapf)); 2330 dasm_put(Dst, 15166, DISPATCH_GL(wrapf));
2329 } 2331 }
2330 dasm_put(Dst, 15150, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2332 dasm_put(Dst, 15171, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2331 break; 2333 break;
2332 2334
2333 /* ---------------------------------------------------------------------- */ 2335 /* ---------------------------------------------------------------------- */
@@ -2355,7 +2357,7 @@ static int build_backend(BuildCtx *ctx)
2355 2357
2356 build_subroutines(ctx, cmov, sse); 2358 build_subroutines(ctx, cmov, sse);
2357 2359
2358 dasm_put(Dst, 15175); 2360 dasm_put(Dst, 15196);
2359 for (op = 0; op < BC__MAX; op++) 2361 for (op = 0; op < BC__MAX; op++)
2360 build_ins(ctx, (BCOp)op, op, cmov, sse); 2362 build_ins(ctx, (BCOp)op, op, cmov, sse);
2361 2363