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.h556
1 files changed, 278 insertions, 278 deletions
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index 8608bf07..83b1ed98 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[12298] = { 15static const unsigned char build_actionlist[12300] = {
16 254,1,248,10,137,202,139,173,233,137,114,252,252,15,182,141,233,139,181,233, 16 254,1,248,10,137,202,139,173,233,137,114,252,252,15,182,141,233,139,181,233,
17 139,189,233,139,108,36,48,141,12,202,141,68,194,252,252,59,141,233,15,135, 17 139,189,233,139,108,36,48,141,12,202,141,68,194,252,252,59,141,233,15,135,
18 244,11,248,9,189,237,248,1,137,40,137,104,8,131,192,16,57,200,15,130,244, 18 244,11,248,9,189,237,248,1,137,40,137,104,8,131,192,16,57,200,15,130,244,
@@ -24,11 +24,11 @@ static const unsigned char build_actionlist[12298] = {
24 252,252,137,56,131,192,8,199,65,252,252,237,131,252,238,1,15,133,244,1,248, 24 252,252,137,56,131,192,8,199,65,252,252,237,131,252,238,1,15,133,244,1,248,
25 2,15,182,141,233,139,181,233,255,139,189,233,141,12,202,252,233,244,9,248, 25 2,15,182,141,233,139,181,233,255,139,189,233,141,12,202,252,233,244,9,248,
26 14,137,113,252,252,139,189,233,139,108,36,48,141,68,193,252,248,137,141,233, 26 14,137,113,252,252,139,189,233,139,108,36,48,141,68,193,252,248,137,141,233,
27 141,136,233,137,124,36,4,137,44,36,137,133,233,59,141,233,15,135,244,15,199, 27 141,136,233,137,133,233,59,141,233,137,124,36,4,137,44,36,15,135,244,15,199,
28 131,233,237,252,255,147,233,199,131,233,237,139,149,233,141,12,194,252,247, 28 131,233,237,252,255,147,233,199,131,233,237,139,149,233,141,12,194,252,247,
29 217,3,141,233,248,16,131,192,1,137,68,36,20,252,247,198,237,255,15,132,244, 29 217,3,141,233,248,16,131,192,1,137,68,36,20,252,247,198,237,255,15,132,244,
30 17,252,233,244,18,248,19,137,113,252,252,139,189,233,139,108,36,48,141,68, 30 17,252,233,244,18,248,19,137,113,252,252,139,189,233,139,108,36,48,141,68,
31 193,252,248,137,141,233,141,136,233,137,44,36,137,133,233,59,141,233,15,135, 31 193,252,248,137,141,233,141,136,233,137,133,233,59,141,233,137,44,36,15,135,
32 244,15,199,131,233,237,252,255,215,199,131,233,237,139,149,233,141,12,194, 32 244,15,199,131,233,237,252,255,215,199,131,233,237,139,149,233,141,12,194,
33 252,247,217,3,141,233,248,16,131,192,1,137,68,36,20,252,247,198,237,255,15, 33 252,247,217,3,141,233,248,16,131,192,1,137,68,36,20,252,247,198,237,255,15,
34 132,244,17,248,18,252,247,198,237,15,132,244,20,199,131,233,237,131,230,252, 34 132,244,17,248,18,252,247,198,237,15,132,244,20,199,131,233,237,131,230,252,
@@ -50,9 +50,9 @@ static const unsigned char build_actionlist[12298] = {
50 181,233,139,108,36,48,248,11,131,232,4,41,209,193,252,233,3,131,198,4,137, 50 181,233,139,108,36,48,248,11,131,232,4,41,209,193,252,233,3,131,198,4,137,
51 149,233,137,133,233,137,116,36,24,137,76,36,4,137,44,36,248,1,232,251,1,0, 51 149,233,137,133,233,137,116,36,24,137,76,36,4,137,44,36,248,1,232,251,1,0,
52 139,141,233,139,133,233,139,105,252,248,139,113,252,252,41,200,193,232,3, 52 139,141,233,139,133,233,139,105,252,248,139,113,252,252,41,200,193,232,3,
53 131,192,1,252,255,165,233,248,26,255,85,87,86,83,131,252,236,28,190,237,49, 53 131,192,1,252,255,165,233,248,26,255,85,87,86,83,131,252,236,28,139,108,36,
54 192,139,108,36,48,141,188,253,36,233,139,76,36,52,139,157,233,129,195,239, 54 48,139,76,36,52,190,237,49,192,141,188,253,36,233,139,157,233,129,195,239,
55 137,189,233,137,68,36,52,137,68,36,24,56,133,233,15,132,244,249,199,131,233, 55 137,189,233,137,68,36,24,137,68,36,52,56,133,233,15,132,244,249,199,131,233,
56 237,136,133,233,139,149,233,139,133,233,41,200,193,232,3,131,192,1,41,209, 56 237,136,133,233,139,149,233,139,133,233,41,200,193,232,3,131,192,1,41,209,
57 139,114,252,252,137,68,36,20,252,247,198,237,15,132,244,17,252,233,244,18, 57 139,114,252,252,137,68,36,20,252,247,198,237,15,132,244,17,252,233,244,18,
58 248,27,85,87,86,83,131,252,236,28,190,237,255,252,233,244,247,248,28,85,87, 58 248,27,85,87,86,83,131,252,236,28,190,237,255,252,233,244,247,248,28,85,87,
@@ -60,27 +60,27 @@ static const unsigned char build_actionlist[12298] = {
60 233,137,124,36,52,137,108,36,24,137,165,233,139,157,233,129,195,239,248,3, 60 233,137,124,36,52,137,108,36,24,137,165,233,139,157,233,129,195,239,248,3,
61 199,131,233,237,139,149,233,1,206,41,214,139,133,233,41,200,193,232,3,131, 61 199,131,233,237,139,149,233,1,206,41,214,139,133,233,41,200,193,232,3,131,
62 192,1,139,105,252,248,129,121,253,252,252,239,15,133,244,29,252,255,165,233, 62 192,1,139,105,252,248,129,121,253,252,252,239,15,133,244,29,252,255,165,233,
63 248,30,255,85,87,86,83,131,252,236,28,139,108,36,48,139,68,36,60,139,76,36, 63 248,30,255,85,87,86,83,131,252,236,28,139,108,36,48,139,68,36,56,139,76,36,
64 56,139,84,36,52,137,108,36,24,139,189,233,43,189,233,199,68,36,60,0,0,0,0, 64 52,139,84,36,60,137,108,36,24,139,189,233,43,189,233,199,68,36,60,0,0,0,0,
65 137,124,36,56,137,68,36,8,137,76,36,4,137,44,36,139,189,233,137,124,36,52, 65 137,124,36,56,137,68,36,8,137,76,36,4,137,44,36,139,189,233,137,124,36,52,
66 137,165,233,252,255,210,133,192,15,132,244,21,137,193,190,237,252,233,244, 66 137,165,233,252,255,210,133,192,15,132,244,21,137,193,190,237,252,233,244,
67 2,248,25,1,209,131,230,252,248,137,213,41,252,242,199,68,193,252,252,237, 67 2,248,25,1,209,131,230,252,248,137,213,41,252,242,199,68,193,252,252,237,
68 137,200,139,117,252,244,139,122,252,248,139,191,233,139,191,233,252,255,101, 68 137,200,139,117,252,244,139,77,252,240,139,122,252,248,139,191,233,139,191,
69 252,240,248,31,15,182,78,252,255,131,252,237,16,141,12,202,41,252,233,15, 69 233,252,255,225,248,31,15,182,78,252,255,131,252,237,16,141,12,202,41,252,
70 132,244,32,252,247,217,193,252,233,3,137,76,36,8,139,72,4,139,0,137,77,4, 70 233,15,132,244,32,252,247,217,193,252,233,3,137,76,36,8,139,72,4,139,0,137,
71 137,69,0,137,108,36,4,252,233,244,33,248,34,137,68,36,16,199,68,36,20,237, 71 77,4,137,69,0,137,108,36,4,252,233,244,33,248,34,137,68,36,16,199,68,36,20,
72 255,141,68,36,16,128,126,252,252,235,15,133,244,247,141,139,233,137,41,199, 72 237,255,141,68,36,16,128,126,252,252,235,15,133,244,247,141,139,233,137,41,
73 65,4,237,137,205,252,233,244,248,248,35,15,182,70,252,254,137,68,36,12,219, 73 199,65,4,237,137,205,252,233,244,248,248,35,15,182,70,252,254,137,68,36,12,
74 68,36,12,221,92,36,16,141,68,36,16,252,233,244,247,248,36,15,182,70,252,254, 74 219,68,36,12,221,92,36,16,141,68,36,16,252,233,244,247,248,36,15,182,70,252,
75 141,4,194,248,1,15,182,110,252,255,141,44,252,234,248,2,137,108,36,4,139, 75 254,141,4,194,248,1,15,182,110,252,255,141,44,252,234,248,2,137,108,36,4,
76 108,36,48,137,68,36,8,137,44,36,137,116,36,24,137,149,233,232,251,1,1,139, 76 139,108,36,48,137,68,36,8,137,44,36,137,116,36,24,137,149,233,232,251,1,1,
77 149,233,133,192,15,132,244,249,248,32,15,182,78,252,253,139,104,4,139,0,137, 77 139,149,233,133,192,15,132,244,249,248,32,15,182,78,252,253,139,104,4,139,
78 108,202,4,137,4,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 78 0,137,108,202,4,137,4,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
79 255,36,171,248,3,139,141,233,255,137,113,252,244,141,177,233,41,214,139,105, 79 252,255,36,171,248,3,139,141,233,255,137,113,252,244,141,177,233,41,214,139,
80 252,248,184,3,0,0,0,252,255,165,233,248,37,137,68,36,16,199,68,36,20,237, 80 105,252,248,184,3,0,0,0,252,255,165,233,248,37,137,68,36,16,199,68,36,20,
81 141,68,36,16,128,126,252,252,235,15,133,244,247,141,139,233,137,41,199,65, 81 237,141,68,36,16,128,126,252,252,235,15,133,244,247,141,139,233,137,41,199,
82 4,237,137,205,252,233,244,248,248,38,15,182,70,252,254,137,68,36,12,219,68, 82 65,4,237,137,205,252,233,244,248,248,38,15,182,70,252,254,137,68,36,12,219,
83 36,12,221,92,36,16,141,68,36,16,252,233,244,247,248,39,15,182,70,252,254, 83 68,36,12,221,92,36,16,141,68,36,16,252,233,244,247,248,39,15,182,70,252,254,
84 141,4,194,248,1,15,182,110,252,255,141,44,252,234,248,2,137,108,36,4,139, 84 141,4,194,248,1,15,182,110,252,255,141,44,252,234,248,2,137,108,36,4,139,
85 108,36,48,137,68,36,8,137,44,36,137,116,36,24,137,149,233,232,251,1,2,139, 85 108,36,48,137,68,36,8,137,44,36,137,116,36,24,137,149,233,232,251,1,2,139,
86 149,233,133,192,15,132,244,249,255,15,182,78,252,253,139,108,202,4,139,12, 86 149,233,133,192,15,132,244,249,255,15,182,78,252,253,139,108,202,4,139,12,
@@ -963,140 +963,140 @@ static void build_subroutines(BuildCtx *ctx, int cmov)
963 dasm_put(Dst, 766, FRAME_C, CFRAME_RESUME, Dt1(->glref), GG_G2DISP, Dt1(->cframe), Dt1(->status), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->status), Dt1(->base), Dt1(->top), FRAME_TYPE, FRAME_CP); 963 dasm_put(Dst, 766, FRAME_C, CFRAME_RESUME, Dt1(->glref), GG_G2DISP, Dt1(->cframe), Dt1(->status), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->status), Dt1(->base), Dt1(->top), FRAME_TYPE, FRAME_CP);
964 dasm_put(Dst, 871, FRAME_C, Dt1(->cframe), Dt1(->cframe), Dt1(->glref), GG_G2DISP, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top), LJ_TFUNC, Dt7(->gate)); 964 dasm_put(Dst, 871, FRAME_C, Dt1(->cframe), Dt1(->cframe), Dt1(->glref), GG_G2DISP, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top), LJ_TFUNC, Dt7(->gate));
965 dasm_put(Dst, 964, Dt1(->stack), Dt1(->top), Dt1(->cframe), Dt1(->cframe), FRAME_CP, LJ_TNIL, Dt7(->pt), Dt9(->k), LJ_TSTR); 965 dasm_put(Dst, 964, Dt1(->stack), Dt1(->top), Dt1(->cframe), Dt1(->cframe), FRAME_CP, LJ_TNIL, Dt7(->pt), Dt9(->k), LJ_TSTR);
966 dasm_put(Dst, 1151, BC_GGET, DISPATCH_GL(tmptv), LJ_TTAB, Dt1(->base), Dt1(->base), Dt1(->top)); 966 dasm_put(Dst, 1153, BC_GGET, DISPATCH_GL(tmptv), LJ_TTAB, Dt1(->base), Dt1(->base), Dt1(->top));
967 dasm_put(Dst, 1307, FRAME_CONT, Dt7(->gate), LJ_TSTR, BC_GSET, DISPATCH_GL(tmptv), LJ_TTAB, Dt1(->base), Dt1(->base)); 967 dasm_put(Dst, 1309, FRAME_CONT, Dt7(->gate), LJ_TSTR, BC_GSET, DISPATCH_GL(tmptv), LJ_TTAB, Dt1(->base), Dt1(->base));
968 dasm_put(Dst, 1454, Dt1(->top), FRAME_CONT, Dt7(->gate), Dt1(->base), Dt1(->base), -BCBIAS_J*4, LJ_TISTRUECOND); 968 dasm_put(Dst, 1456, Dt1(->top), FRAME_CONT, Dt7(->gate), Dt1(->base), Dt1(->base), -BCBIAS_J*4, LJ_TISTRUECOND);
969 dasm_put(Dst, 1648, LJ_TISTRUECOND, Dt1(->base)); 969 dasm_put(Dst, 1650, LJ_TISTRUECOND, Dt1(->base));
970 dasm_put(Dst, 1740, Dt1(->base), Dt1(->base), FRAME_CONT, LJ_TFUNC, Dt7(->gate), Dt1(->base), Dt1(->base), Dt1(->base), Dt1(->base)); 970 dasm_put(Dst, 1742, Dt1(->base), Dt1(->base), FRAME_CONT, LJ_TFUNC, Dt7(->gate), Dt1(->base), Dt1(->base), Dt1(->base), Dt1(->base));
971 dasm_put(Dst, 1919, Dt7(->gate), Dt1(->base), Dt1(->base), GG_DISP_STATIC*4, 1+1, LJ_TISTRUECOND); 971 dasm_put(Dst, 1921, Dt7(->gate), Dt1(->base), Dt1(->base), GG_DISP_STATIC*4, 1+1, LJ_TISTRUECOND);
972 dasm_put(Dst, 2066, 1+1, ~LJ_TNUMX); 972 dasm_put(Dst, 2068, 1+1, ~LJ_TNUMX);
973 if (cmov) { 973 if (cmov) {
974 dasm_put(Dst, 2095); 974 dasm_put(Dst, 2097);
975 } else { 975 } else {
976 dasm_put(Dst, 2099); 976 dasm_put(Dst, 2101);
977 } 977 }
978 dasm_put(Dst, 2108, ((char *)(&((GCfuncC *)0)->upvalue)), LJ_TSTR, 1+1, LJ_TTAB, Dt6(->metatable), LJ_TNIL, DISPATCH_GL(mmname)+4*MM_metatable, LJ_TTAB, Dt6(->hmask)); 978 dasm_put(Dst, 2110, ((char *)(&((GCfuncC *)0)->upvalue)), LJ_TSTR, 1+1, LJ_TTAB, Dt6(->metatable), LJ_TNIL, DISPATCH_GL(mmname)+4*MM_metatable, LJ_TTAB, Dt6(->hmask));
979 dasm_put(Dst, 2195, Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), DtB(->next), LJ_TNIL); 979 dasm_put(Dst, 2197, Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), DtB(->next), LJ_TNIL);
980 dasm_put(Dst, 2250, LJ_TUDATA, LJ_TISNUM, LJ_TNUMX, DISPATCH_GL(gcroot[GCROOT_BASEMT]), 2+1, LJ_TTAB); 980 dasm_put(Dst, 2252, LJ_TUDATA, LJ_TISNUM, LJ_TNUMX, DISPATCH_GL(gcroot[GCROOT_BASEMT]), 2+1, LJ_TTAB);
981 dasm_put(Dst, 2321, Dt6(->metatable), LJ_TTAB, Dt6(->metatable), LJ_TTAB, Dt6(->marked), LJ_GC_BLACK, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 981 dasm_put(Dst, 2323, Dt6(->metatable), LJ_TTAB, Dt6(->metatable), LJ_TTAB, Dt6(->marked), LJ_GC_BLACK, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
982 dasm_put(Dst, 2386, 2+1, LJ_TTAB, 1+1, LJ_TISNUM, 1+1); 982 dasm_put(Dst, 2388, 2+1, LJ_TTAB, 1+1, LJ_TISNUM, 1+1);
983 dasm_put(Dst, 2493, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); 983 dasm_put(Dst, 2495, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold));
984 dasm_put(Dst, 2554, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base), Dt1(->base), 1+2); 984 dasm_put(Dst, 2556, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base), Dt1(->base), 1+2);
985 dasm_put(Dst, 2700, LJ_TNIL, LJ_TNIL, 1+1, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL); 985 dasm_put(Dst, 2702, LJ_TNIL, LJ_TNIL, 1+1, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL);
986 dasm_put(Dst, 2761, 1+3, 1+1, LJ_TTAB, LJ_TISNUM, Dt6(->asize), Dt6(->array), LJ_TNIL); 986 dasm_put(Dst, 2763, 1+3, 1+1, LJ_TTAB, LJ_TISNUM, Dt6(->asize), Dt6(->array), LJ_TNIL);
987 dasm_put(Dst, 2841, Dt6(->hmask), 1+0, 1+1, LJ_TTAB, Dt8(->upvalue[0])); 987 dasm_put(Dst, 2843, Dt6(->hmask), 1+0, 1+1, LJ_TTAB, Dt8(->upvalue[0]));
988 dasm_put(Dst, 2922, LJ_TFUNC, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE, LJ_TFUNC, Dt7(->gate)); 988 dasm_put(Dst, 2924, LJ_TFUNC, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE, LJ_TFUNC, Dt7(->gate));
989 dasm_put(Dst, 3001, 2+1, LJ_TFUNC, LJ_TFUNC, 2*8+FRAME_PCALL, 2*8, 1+1); 989 dasm_put(Dst, 3003, 2+1, LJ_TFUNC, LJ_TFUNC, 2*8+FRAME_PCALL, 2*8, 1+1);
990 dasm_put(Dst, 3086, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack)); 990 dasm_put(Dst, 3088, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack));
991 dasm_put(Dst, 3157, Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top)); 991 dasm_put(Dst, 3159, Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top));
992 dasm_put(Dst, 3265, Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top)); 992 dasm_put(Dst, 3267, Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top));
993 dasm_put(Dst, 3371, Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe), Dt1(->status), LUA_YIELD); 993 dasm_put(Dst, 3373, Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe), Dt1(->status), LUA_YIELD);
994 dasm_put(Dst, 3463, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); 994 dasm_put(Dst, 3465, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top));
995 dasm_put(Dst, 3571, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); 995 dasm_put(Dst, 3573, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack));
996 dasm_put(Dst, 3663, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_CANYIELD, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD); 996 dasm_put(Dst, 3665, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_CANYIELD, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD);
997 dasm_put(Dst, 3762, Dt1(->status), 1+1, LJ_TISNUM, 1+1, FRAME_TYPE); 997 dasm_put(Dst, 3764, Dt1(->status), 1+1, LJ_TISNUM, 1+1, FRAME_TYPE);
998 dasm_put(Dst, 3829, LJ_TNIL, 1+1, LJ_TISNUM, 1+1); 998 dasm_put(Dst, 3831, LJ_TNIL, 1+1, LJ_TISNUM, 1+1);
999 dasm_put(Dst, 3914, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); 999 dasm_put(Dst, 3916, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1);
1000 dasm_put(Dst, 3971, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); 1000 dasm_put(Dst, 3973, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1);
1001 dasm_put(Dst, 4038, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); 1001 dasm_put(Dst, 4040, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1);
1002 dasm_put(Dst, 4095, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); 1002 dasm_put(Dst, 4097, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM);
1003 dasm_put(Dst, 4163, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); 1003 dasm_put(Dst, 4165, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM);
1004 dasm_put(Dst, 4257, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); 1004 dasm_put(Dst, 4259, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1);
1005 dasm_put(Dst, 4356, LJ_TISNUM, 1+1, LJ_TISNUM, Dt8(->upvalue[0]), 2+1); 1005 dasm_put(Dst, 4358, LJ_TISNUM, 1+1, LJ_TISNUM, Dt8(->upvalue[0]), 2+1);
1006 dasm_put(Dst, 4432, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); 1006 dasm_put(Dst, 4434, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM);
1007 dasm_put(Dst, 4507, 1+1, LJ_TISNUM, 1+2); 1007 dasm_put(Dst, 4509, 1+1, LJ_TISNUM, 1+2);
1008 dasm_put(Dst, 4631, 1+1, LJ_TISNUM, 1+2); 1008 dasm_put(Dst, 4633, 1+1, LJ_TISNUM, 1+2);
1009 dasm_put(Dst, 4740, 2+1, LJ_TISNUM, LJ_TISNUM); 1009 dasm_put(Dst, 4742, 2+1, LJ_TISNUM, LJ_TISNUM);
1010 dasm_put(Dst, 4819, 2+1, LJ_TISNUM, LJ_TISNUM, 1+1, LJ_TISNUM); 1010 dasm_put(Dst, 4821, 2+1, LJ_TISNUM, LJ_TISNUM, 1+1, LJ_TISNUM);
1011 dasm_put(Dst, 4877, LJ_TISNUM); 1011 dasm_put(Dst, 4879, LJ_TISNUM);
1012 if (cmov) { 1012 if (cmov) {
1013 dasm_put(Dst, 4911); 1013 dasm_put(Dst, 4913);
1014 } else { 1014 } else {
1015 dasm_put(Dst, 4919); 1015 dasm_put(Dst, 4921);
1016 } 1016 }
1017 dasm_put(Dst, 4940, 1+1, LJ_TISNUM, LJ_TISNUM); 1017 dasm_put(Dst, 4942, 1+1, LJ_TISNUM, LJ_TISNUM);
1018 if (cmov) { 1018 if (cmov) {
1019 dasm_put(Dst, 5000); 1019 dasm_put(Dst, 5002);
1020 } else { 1020 } else {
1021 dasm_put(Dst, 5008); 1021 dasm_put(Dst, 5010);
1022 } 1022 }
1023 dasm_put(Dst, 5029, 1+1, LJ_TSTR, Dt5(->len), 1+1, LJ_TSTR); 1023 dasm_put(Dst, 5031, 1+1, LJ_TSTR, Dt5(->len), 1+1, LJ_TSTR);
1024 dasm_put(Dst, 5088, Dt5(->len), Dt5([1]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); 1024 dasm_put(Dst, 5090, Dt5(->len), Dt5([1]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM);
1025 dasm_put(Dst, 5147, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2); 1025 dasm_put(Dst, 5149, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2);
1026 dasm_put(Dst, 5272, LJ_TISNUM, LJ_TSTR, LJ_TISNUM, Dt5(->len)); 1026 dasm_put(Dst, 5274, LJ_TISNUM, LJ_TSTR, LJ_TISNUM, Dt5(->len));
1027 dasm_put(Dst, 5363, sizeof(GCstr)-1); 1027 dasm_put(Dst, 5365, sizeof(GCstr)-1);
1028 dasm_put(Dst, 5437, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, LJ_TISNUM); 1028 dasm_put(Dst, 5439, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, LJ_TISNUM);
1029 dasm_put(Dst, 5510, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), 1+1, DISPATCH_GL(gc.total)); 1029 dasm_put(Dst, 5512, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), 1+1, DISPATCH_GL(gc.total));
1030 dasm_put(Dst, 5577, DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); 1030 dasm_put(Dst, 5579, DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf));
1031 dasm_put(Dst, 5658, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); 1031 dasm_put(Dst, 5660, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz));
1032 dasm_put(Dst, 5717, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1, DISPATCH_GL(gc.total)); 1032 dasm_put(Dst, 5719, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1, DISPATCH_GL(gc.total));
1033 dasm_put(Dst, 5802, DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); 1033 dasm_put(Dst, 5804, DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf));
1034 dasm_put(Dst, 5877, 1+1, LJ_TTAB, 1+1); 1034 dasm_put(Dst, 5879, 1+1, LJ_TTAB, 1+1);
1035 dasm_put(Dst, 5970, LJ_TISNUM, 1+1, LJ_TISNUM, LJ_TISNUM); 1035 dasm_put(Dst, 5972, LJ_TISNUM, 1+1, LJ_TISNUM, LJ_TISNUM);
1036 dasm_put(Dst, 6090, 1+1, LJ_TISNUM, LJ_TISNUM, 1+1, LJ_TISNUM); 1036 dasm_put(Dst, 6092, 1+1, LJ_TISNUM, LJ_TISNUM, 1+1, LJ_TISNUM);
1037 dasm_put(Dst, 6192, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); 1037 dasm_put(Dst, 6194, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1);
1038 dasm_put(Dst, 6313, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); 1038 dasm_put(Dst, 6315, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM);
1039 dasm_put(Dst, 6443, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); 1039 dasm_put(Dst, 6445, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM);
1040 dasm_put(Dst, 6544, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM); 1040 dasm_put(Dst, 6546, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM);
1041 dasm_put(Dst, 6683, LJ_TISNUM, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f)); 1041 dasm_put(Dst, 6685, LJ_TISNUM, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f));
1042 dasm_put(Dst, 6810, Dt1(->base), Dt1(->top), Dt7(->gate), LJ_TFUNC, Dt7(->gate), Dt1(->base), LUA_MINSTACK, Dt1(->base)); 1042 dasm_put(Dst, 6812, Dt1(->base), Dt1(->top), Dt7(->gate), LJ_TFUNC, Dt7(->gate), Dt1(->base), LUA_MINSTACK, Dt1(->base));
1043 dasm_put(Dst, 6921, Dt1(->top), Dt1(->base), Dt1(->top)); 1043 dasm_put(Dst, 6923, Dt1(->top), Dt1(->base), Dt1(->top));
1044#if LJ_HASJIT 1044#if LJ_HASJIT
1045 dasm_put(Dst, 6973, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); 1045 dasm_put(Dst, 6975, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount));
1046#endif 1046#endif
1047 dasm_put(Dst, 7004, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base), GG_DISP_STATIC*4); 1047 dasm_put(Dst, 7006, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base), GG_DISP_STATIC*4);
1048#if LJ_HASJIT 1048#if LJ_HASJIT
1049 dasm_put(Dst, 7095, GG_DISP2J, DISPATCH_J(L), Dt1(->base)); 1049 dasm_put(Dst, 7097, GG_DISP2J, DISPATCH_J(L), Dt1(->base));
1050#endif 1050#endif
1051 dasm_put(Dst, 7128); 1051 dasm_put(Dst, 7130);
1052#if LJ_HASJIT 1052#if LJ_HASJIT
1053 dasm_put(Dst, 7131, GG_DISP2J, DISPATCH_J(L), Dt1(->base), Dt1(->base)); 1053 dasm_put(Dst, 7133, GG_DISP2J, DISPATCH_J(L), Dt1(->base), Dt1(->base));
1054#endif 1054#endif
1055 dasm_put(Dst, 7181); 1055 dasm_put(Dst, 7183);
1056#if LJ_HASJIT 1056#if LJ_HASJIT
1057 dasm_put(Dst, 7184, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_J(flags), JIT_F_SSE2, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), Dt1(->base), GG_DISP2J, Dt1(->base)); 1057 dasm_put(Dst, 7186, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_J(flags), JIT_F_SSE2, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), Dt1(->base), GG_DISP2J, Dt1(->base));
1058#endif 1058#endif
1059 dasm_put(Dst, 7334); 1059 dasm_put(Dst, 7336);
1060#if LJ_HASJIT 1060#if LJ_HASJIT
1061 dasm_put(Dst, 7337, Dt7(->pt), Dt9(->k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); 1061 dasm_put(Dst, 7339, Dt7(->pt), Dt9(->k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP);
1062#endif 1062#endif
1063 dasm_put(Dst, 7377); 1063 dasm_put(Dst, 7379);
1064 if (cmov) { 1064 if (cmov) {
1065 dasm_put(Dst, 7641); 1065 dasm_put(Dst, 7643);
1066 } else { 1066 } else {
1067 dasm_put(Dst, 7645); 1067 dasm_put(Dst, 7647);
1068 } 1068 }
1069 dasm_put(Dst, 7654); 1069 dasm_put(Dst, 7656);
1070 dasm_put(Dst, 7723); 1070 dasm_put(Dst, 7725);
1071 dasm_put(Dst, 7825); 1071 dasm_put(Dst, 7827);
1072 if (cmov) { 1072 if (cmov) {
1073 dasm_put(Dst, 7838); 1073 dasm_put(Dst, 7840);
1074 } else { 1074 } else {
1075 dasm_put(Dst, 7842); 1075 dasm_put(Dst, 7844);
1076 } 1076 }
1077 dasm_put(Dst, 7851); 1077 dasm_put(Dst, 7853);
1078 if (cmov) { 1078 if (cmov) {
1079 dasm_put(Dst, 7641); 1079 dasm_put(Dst, 7643);
1080 } else { 1080 } else {
1081 dasm_put(Dst, 7869); 1081 dasm_put(Dst, 7871);
1082 } 1082 }
1083 dasm_put(Dst, 7876); 1083 dasm_put(Dst, 7878);
1084 dasm_put(Dst, 7991); 1084 dasm_put(Dst, 7993);
1085 dasm_put(Dst, 8084); 1085 dasm_put(Dst, 8086);
1086 dasm_put(Dst, 8180); 1086 dasm_put(Dst, 8182);
1087 if (cmov) { 1087 if (cmov) {
1088 dasm_put(Dst, 8239); 1088 dasm_put(Dst, 8241);
1089 } else { 1089 } else {
1090 dasm_put(Dst, 8258); 1090 dasm_put(Dst, 8260);
1091 } 1091 }
1092 dasm_put(Dst, 8299); 1092 dasm_put(Dst, 8301);
1093} 1093}
1094 1094
1095/* Generate the code for a single instruction. */ 1095/* Generate the code for a single instruction. */
1096static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov) 1096static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov)
1097{ 1097{
1098 int vk = 0; 1098 int vk = 0;
1099 dasm_put(Dst, 1452, defop); 1099 dasm_put(Dst, 1454, defop);
1100 1100
1101 switch (op) { 1101 switch (op) {
1102 1102
@@ -1105,403 +1105,403 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov)
1105 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1105 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1106 1106
1107 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1107 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1108 dasm_put(Dst, 8356, LJ_TISNUM, LJ_TISNUM); 1108 dasm_put(Dst, 8358, LJ_TISNUM, LJ_TISNUM);
1109 if (cmov) { 1109 if (cmov) {
1110 dasm_put(Dst, 8386); 1110 dasm_put(Dst, 8388);
1111 } else { 1111 } else {
1112 dasm_put(Dst, 8392); 1112 dasm_put(Dst, 8394);
1113 } 1113 }
1114 switch (op) { 1114 switch (op) {
1115 case BC_ISLT: 1115 case BC_ISLT:
1116 dasm_put(Dst, 8399); 1116 dasm_put(Dst, 8401);
1117 break; 1117 break;
1118 case BC_ISGE: 1118 case BC_ISGE:
1119 dasm_put(Dst, 8404); 1119 dasm_put(Dst, 8406);
1120 break; 1120 break;
1121 case BC_ISLE: 1121 case BC_ISLE:
1122 dasm_put(Dst, 5872); 1122 dasm_put(Dst, 5874);
1123 break; 1123 break;
1124 case BC_ISGT: 1124 case BC_ISGT:
1125 dasm_put(Dst, 8409); 1125 dasm_put(Dst, 8411);
1126 break; 1126 break;
1127 default: break; /* Shut up GCC. */ 1127 default: break; /* Shut up GCC. */
1128 } 1128 }
1129 dasm_put(Dst, 8414, -BCBIAS_J*4); 1129 dasm_put(Dst, 8416, -BCBIAS_J*4);
1130 break; 1130 break;
1131 1131
1132 case BC_ISEQV: case BC_ISNEV: 1132 case BC_ISEQV: case BC_ISNEV:
1133 vk = op == BC_ISEQV; 1133 vk = op == BC_ISEQV;
1134 dasm_put(Dst, 8447, LJ_TISNUM, LJ_TISNUM); 1134 dasm_put(Dst, 8449, LJ_TISNUM, LJ_TISNUM);
1135 if (cmov) { 1135 if (cmov) {
1136 dasm_put(Dst, 8386); 1136 dasm_put(Dst, 8388);
1137 } else { 1137 } else {
1138 dasm_put(Dst, 8392); 1138 dasm_put(Dst, 8394);
1139 } 1139 }
1140 iseqne_fp: 1140 iseqne_fp:
1141 if (vk) { 1141 if (vk) {
1142 dasm_put(Dst, 8479); 1142 dasm_put(Dst, 8481);
1143 } else { 1143 } else {
1144 dasm_put(Dst, 8488); 1144 dasm_put(Dst, 8490);
1145 } 1145 }
1146 iseqne_end: 1146 iseqne_end:
1147 if (vk) { 1147 if (vk) {
1148 dasm_put(Dst, 8497, -BCBIAS_J*4); 1148 dasm_put(Dst, 8499, -BCBIAS_J*4);
1149 } else { 1149 } else {
1150 dasm_put(Dst, 8512, -BCBIAS_J*4); 1150 dasm_put(Dst, 8514, -BCBIAS_J*4);
1151 } 1151 }
1152 dasm_put(Dst, 7162); 1152 dasm_put(Dst, 7164);
1153 if (op == BC_ISEQV || op == BC_ISNEV) { 1153 if (op == BC_ISEQV || op == BC_ISNEV) {
1154 dasm_put(Dst, 8527, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1154 dasm_put(Dst, 8529, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1155 if (vk) { 1155 if (vk) {
1156 dasm_put(Dst, 8585); 1156 dasm_put(Dst, 8587);
1157 } else { 1157 } else {
1158 dasm_put(Dst, 8589); 1158 dasm_put(Dst, 8591);
1159 } 1159 }
1160 dasm_put(Dst, 8595); 1160 dasm_put(Dst, 8597);
1161 } 1161 }
1162 break; 1162 break;
1163 case BC_ISEQS: case BC_ISNES: 1163 case BC_ISEQS: case BC_ISNES:
1164 vk = op == BC_ISEQS; 1164 vk = op == BC_ISEQS;
1165 dasm_put(Dst, 8600, LJ_TSTR); 1165 dasm_put(Dst, 8602, LJ_TSTR);
1166 iseqne_test: 1166 iseqne_test:
1167 if (vk) { 1167 if (vk) {
1168 dasm_put(Dst, 8483); 1168 dasm_put(Dst, 8485);
1169 } else { 1169 } else {
1170 dasm_put(Dst, 8175); 1170 dasm_put(Dst, 8177);
1171 } 1171 }
1172 goto iseqne_end; 1172 goto iseqne_end;
1173 case BC_ISEQN: case BC_ISNEN: 1173 case BC_ISEQN: case BC_ISNEN:
1174 vk = op == BC_ISEQN; 1174 vk = op == BC_ISEQN;
1175 dasm_put(Dst, 8623, LJ_TISNUM); 1175 dasm_put(Dst, 8625, LJ_TISNUM);
1176 if (cmov) { 1176 if (cmov) {
1177 dasm_put(Dst, 8386); 1177 dasm_put(Dst, 8388);
1178 } else { 1178 } else {
1179 dasm_put(Dst, 8392); 1179 dasm_put(Dst, 8394);
1180 } 1180 }
1181 goto iseqne_fp; 1181 goto iseqne_fp;
1182 case BC_ISEQP: case BC_ISNEP: 1182 case BC_ISEQP: case BC_ISNEP:
1183 vk = op == BC_ISEQP; 1183 vk = op == BC_ISEQP;
1184 dasm_put(Dst, 8643); 1184 dasm_put(Dst, 8645);
1185 goto iseqne_test; 1185 goto iseqne_test;
1186 1186
1187 /* -- Unary test and copy ops ------------------------------------------- */ 1187 /* -- Unary test and copy ops ------------------------------------------- */
1188 1188
1189 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1189 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1190 dasm_put(Dst, 8654, LJ_TISTRUECOND); 1190 dasm_put(Dst, 8656, LJ_TISTRUECOND);
1191 if (op == BC_IST || op == BC_ISTC) { 1191 if (op == BC_IST || op == BC_ISTC) {
1192 dasm_put(Dst, 8666); 1192 dasm_put(Dst, 8668);
1193 } else { 1193 } else {
1194 dasm_put(Dst, 8671); 1194 dasm_put(Dst, 8673);
1195 } 1195 }
1196 if (op == BC_ISTC || op == BC_ISFC) { 1196 if (op == BC_ISTC || op == BC_ISFC) {
1197 dasm_put(Dst, 8676); 1197 dasm_put(Dst, 8678);
1198 } 1198 }
1199 dasm_put(Dst, 8687, -BCBIAS_J*4); 1199 dasm_put(Dst, 8689, -BCBIAS_J*4);
1200 break; 1200 break;
1201 1201
1202 /* -- Unary ops --------------------------------------------------------- */ 1202 /* -- Unary ops --------------------------------------------------------- */
1203 1203
1204 case BC_MOV: 1204 case BC_MOV:
1205 dasm_put(Dst, 8718); 1205 dasm_put(Dst, 8720);
1206 break; 1206 break;
1207 case BC_NOT: 1207 case BC_NOT:
1208 dasm_put(Dst, 8751, LJ_TISTRUECOND, LJ_TTRUE); 1208 dasm_put(Dst, 8753, LJ_TISTRUECOND, LJ_TTRUE);
1209 break; 1209 break;
1210 case BC_UNM: 1210 case BC_UNM:
1211 dasm_put(Dst, 8786, LJ_TISNUM); 1211 dasm_put(Dst, 8788, LJ_TISNUM);
1212 break; 1212 break;
1213 case BC_LEN: 1213 case BC_LEN:
1214 dasm_put(Dst, 8823, LJ_TSTR, Dt5(->len), LJ_TTAB); 1214 dasm_put(Dst, 8825, LJ_TSTR, Dt5(->len), LJ_TTAB);
1215 break; 1215 break;
1216 1216
1217 /* -- Binary ops -------------------------------------------------------- */ 1217 /* -- Binary ops -------------------------------------------------------- */
1218 1218
1219 1219
1220 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1220 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1221 dasm_put(Dst, 8902); 1221 dasm_put(Dst, 8904);
1222 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1222 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1223 switch (vk) { 1223 switch (vk) {
1224 case 0: 1224 case 0:
1225 dasm_put(Dst, 8910, LJ_TISNUM); 1225 dasm_put(Dst, 8912, LJ_TISNUM);
1226 break; 1226 break;
1227 case 1: 1227 case 1:
1228 dasm_put(Dst, 8929, LJ_TISNUM); 1228 dasm_put(Dst, 8931, LJ_TISNUM);
1229 break; 1229 break;
1230 default: 1230 default:
1231 dasm_put(Dst, 8948, LJ_TISNUM, LJ_TISNUM); 1231 dasm_put(Dst, 8950, LJ_TISNUM, LJ_TISNUM);
1232 break; 1232 break;
1233 } 1233 }
1234 dasm_put(Dst, 8801); 1234 dasm_put(Dst, 8803);
1235 break; 1235 break;
1236 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1236 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1237 dasm_put(Dst, 8902); 1237 dasm_put(Dst, 8904);
1238 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1238 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1239 switch (vk) { 1239 switch (vk) {
1240 case 0: 1240 case 0:
1241 dasm_put(Dst, 8977, LJ_TISNUM); 1241 dasm_put(Dst, 8979, LJ_TISNUM);
1242 break; 1242 break;
1243 case 1: 1243 case 1:
1244 dasm_put(Dst, 8996, LJ_TISNUM); 1244 dasm_put(Dst, 8998, LJ_TISNUM);
1245 break; 1245 break;
1246 default: 1246 default:
1247 dasm_put(Dst, 9015, LJ_TISNUM, LJ_TISNUM); 1247 dasm_put(Dst, 9017, LJ_TISNUM, LJ_TISNUM);
1248 break; 1248 break;
1249 } 1249 }
1250 dasm_put(Dst, 8801); 1250 dasm_put(Dst, 8803);
1251 break; 1251 break;
1252 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1252 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1253 dasm_put(Dst, 8902); 1253 dasm_put(Dst, 8904);
1254 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1254 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1255 switch (vk) { 1255 switch (vk) {
1256 case 0: 1256 case 0:
1257 dasm_put(Dst, 9044, LJ_TISNUM); 1257 dasm_put(Dst, 9046, LJ_TISNUM);
1258 break; 1258 break;
1259 case 1: 1259 case 1:
1260 dasm_put(Dst, 9063, LJ_TISNUM); 1260 dasm_put(Dst, 9065, LJ_TISNUM);
1261 break; 1261 break;
1262 default: 1262 default:
1263 dasm_put(Dst, 9082, LJ_TISNUM, LJ_TISNUM); 1263 dasm_put(Dst, 9084, LJ_TISNUM, LJ_TISNUM);
1264 break; 1264 break;
1265 } 1265 }
1266 dasm_put(Dst, 8801); 1266 dasm_put(Dst, 8803);
1267 break; 1267 break;
1268 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1268 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1269 dasm_put(Dst, 8902); 1269 dasm_put(Dst, 8904);
1270 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1270 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1271 switch (vk) { 1271 switch (vk) {
1272 case 0: 1272 case 0:
1273 dasm_put(Dst, 9111, LJ_TISNUM); 1273 dasm_put(Dst, 9113, LJ_TISNUM);
1274 break; 1274 break;
1275 case 1: 1275 case 1:
1276 dasm_put(Dst, 9130, LJ_TISNUM); 1276 dasm_put(Dst, 9132, LJ_TISNUM);
1277 break; 1277 break;
1278 default: 1278 default:
1279 dasm_put(Dst, 9149, LJ_TISNUM, LJ_TISNUM); 1279 dasm_put(Dst, 9151, LJ_TISNUM, LJ_TISNUM);
1280 break; 1280 break;
1281 } 1281 }
1282 dasm_put(Dst, 8801); 1282 dasm_put(Dst, 8803);
1283 break; 1283 break;
1284 case BC_MODVN: 1284 case BC_MODVN:
1285 dasm_put(Dst, 8902); 1285 dasm_put(Dst, 8904);
1286 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1286 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1287 switch (vk) { 1287 switch (vk) {
1288 case 0: 1288 case 0:
1289 dasm_put(Dst, 9178, LJ_TISNUM); 1289 dasm_put(Dst, 9180, LJ_TISNUM);
1290 break; 1290 break;
1291 case 1: 1291 case 1:
1292 dasm_put(Dst, 9197, LJ_TISNUM); 1292 dasm_put(Dst, 9199, LJ_TISNUM);
1293 break; 1293 break;
1294 default: 1294 default:
1295 dasm_put(Dst, 9216, LJ_TISNUM, LJ_TISNUM); 1295 dasm_put(Dst, 9218, LJ_TISNUM, LJ_TISNUM);
1296 break; 1296 break;
1297 } 1297 }
1298 dasm_put(Dst, 9245); 1298 dasm_put(Dst, 9247);
1299 break; 1299 break;
1300 case BC_MODNV: case BC_MODVV: 1300 case BC_MODNV: case BC_MODVV:
1301 dasm_put(Dst, 8902); 1301 dasm_put(Dst, 8904);
1302 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1302 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1303 switch (vk) { 1303 switch (vk) {
1304 case 0: 1304 case 0:
1305 dasm_put(Dst, 9178, LJ_TISNUM); 1305 dasm_put(Dst, 9180, LJ_TISNUM);
1306 break; 1306 break;
1307 case 1: 1307 case 1:
1308 dasm_put(Dst, 9197, LJ_TISNUM); 1308 dasm_put(Dst, 9199, LJ_TISNUM);
1309 break; 1309 break;
1310 default: 1310 default:
1311 dasm_put(Dst, 9216, LJ_TISNUM, LJ_TISNUM); 1311 dasm_put(Dst, 9218, LJ_TISNUM, LJ_TISNUM);
1312 break; 1312 break;
1313 } 1313 }
1314 dasm_put(Dst, 9272); 1314 dasm_put(Dst, 9274);
1315 break; 1315 break;
1316 case BC_POW: 1316 case BC_POW:
1317 dasm_put(Dst, 8902); 1317 dasm_put(Dst, 8904);
1318 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1318 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1319 switch (vk) { 1319 switch (vk) {
1320 case 0: 1320 case 0:
1321 dasm_put(Dst, 9178, LJ_TISNUM); 1321 dasm_put(Dst, 9180, LJ_TISNUM);
1322 break; 1322 break;
1323 case 1: 1323 case 1:
1324 dasm_put(Dst, 9197, LJ_TISNUM); 1324 dasm_put(Dst, 9199, LJ_TISNUM);
1325 break; 1325 break;
1326 default: 1326 default:
1327 dasm_put(Dst, 9216, LJ_TISNUM, LJ_TISNUM); 1327 dasm_put(Dst, 9218, LJ_TISNUM, LJ_TISNUM);
1328 break; 1328 break;
1329 } 1329 }
1330 dasm_put(Dst, 9277); 1330 dasm_put(Dst, 9279);
1331 break; 1331 break;
1332 1332
1333 case BC_CAT: 1333 case BC_CAT:
1334 dasm_put(Dst, 9302, Dt1(->base), Dt1(->base)); 1334 dasm_put(Dst, 9304, Dt1(->base), Dt1(->base));
1335 break; 1335 break;
1336 1336
1337 /* -- Constant ops ------------------------------------------------------ */ 1337 /* -- Constant ops ------------------------------------------------------ */
1338 1338
1339 case BC_KSTR: 1339 case BC_KSTR:
1340 dasm_put(Dst, 9396, LJ_TSTR); 1340 dasm_put(Dst, 9398, LJ_TSTR);
1341 break; 1341 break;
1342 case BC_KSHORT: 1342 case BC_KSHORT:
1343 dasm_put(Dst, 9429); 1343 dasm_put(Dst, 9431);
1344 break; 1344 break;
1345 case BC_KNUM: 1345 case BC_KNUM:
1346 dasm_put(Dst, 9455); 1346 dasm_put(Dst, 9457);
1347 break; 1347 break;
1348 case BC_KPRI: 1348 case BC_KPRI:
1349 dasm_put(Dst, 9480); 1349 dasm_put(Dst, 9482);
1350 break; 1350 break;
1351 case BC_KNIL: 1351 case BC_KNIL:
1352 dasm_put(Dst, 9506, LJ_TNIL); 1352 dasm_put(Dst, 9508, LJ_TNIL);
1353 break; 1353 break;
1354 1354
1355 /* -- Upvalue and function ops ------------------------------------------ */ 1355 /* -- Upvalue and function ops ------------------------------------------ */
1356 1356
1357 case BC_UGET: 1357 case BC_UGET:
1358 dasm_put(Dst, 9552, offsetof(GCfuncL, uvptr), DtA(->v)); 1358 dasm_put(Dst, 9554, offsetof(GCfuncL, uvptr), DtA(->v));
1359 break; 1359 break;
1360 case BC_USETV: 1360 case BC_USETV:
1361#define TV2MARKOFS \ 1361#define TV2MARKOFS \
1362 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 1362 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
1363 dasm_put(Dst, 9596, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); 1363 dasm_put(Dst, 9598, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G);
1364 dasm_put(Dst, 9686); 1364 dasm_put(Dst, 9688);
1365 break; 1365 break;
1366#undef TV2MARKOFS 1366#undef TV2MARKOFS
1367 case BC_USETS: 1367 case BC_USETS:
1368 dasm_put(Dst, 9698, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 1368 dasm_put(Dst, 9700, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
1369 break; 1369 break;
1370 case BC_USETN: 1370 case BC_USETN:
1371 dasm_put(Dst, 9789, offsetof(GCfuncL, uvptr), DtA(->v)); 1371 dasm_put(Dst, 9791, offsetof(GCfuncL, uvptr), DtA(->v));
1372 break; 1372 break;
1373 case BC_USETP: 1373 case BC_USETP:
1374 dasm_put(Dst, 9825, offsetof(GCfuncL, uvptr), DtA(->v)); 1374 dasm_put(Dst, 9827, offsetof(GCfuncL, uvptr), DtA(->v));
1375 break; 1375 break;
1376 case BC_UCLO: 1376 case BC_UCLO:
1377 dasm_put(Dst, 9862, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 1377 dasm_put(Dst, 9864, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
1378 break; 1378 break;
1379 1379
1380 case BC_FNEW: 1380 case BC_FNEW:
1381 dasm_put(Dst, 9920, Dt1(->base), Dt1(->base), LJ_TFUNC); 1381 dasm_put(Dst, 9922, Dt1(->base), Dt1(->base), LJ_TFUNC);
1382 break; 1382 break;
1383 1383
1384 /* -- Table ops --------------------------------------------------------- */ 1384 /* -- Table ops --------------------------------------------------------- */
1385 1385
1386 case BC_TNEW: 1386 case BC_TNEW:
1387 dasm_put(Dst, 9991, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 1387 dasm_put(Dst, 9993, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
1388 break; 1388 break;
1389 case BC_TDUP: 1389 case BC_TDUP:
1390 dasm_put(Dst, 10102, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 1390 dasm_put(Dst, 10104, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
1391 break; 1391 break;
1392 1392
1393 case BC_GGET: 1393 case BC_GGET:
1394 dasm_put(Dst, 10194, Dt7(->env)); 1394 dasm_put(Dst, 10196, Dt7(->env));
1395 break; 1395 break;
1396 case BC_GSET: 1396 case BC_GSET:
1397 dasm_put(Dst, 10212, Dt7(->env)); 1397 dasm_put(Dst, 10214, Dt7(->env));
1398 break; 1398 break;
1399 1399
1400 case BC_TGETV: 1400 case BC_TGETV:
1401 dasm_put(Dst, 10230, LJ_TTAB, LJ_TISNUM); 1401 dasm_put(Dst, 10232, LJ_TTAB, LJ_TISNUM);
1402 if (cmov) { 1402 if (cmov) {
1403 dasm_put(Dst, 8386); 1403 dasm_put(Dst, 8388);
1404 } else { 1404 } else {
1405 dasm_put(Dst, 8392); 1405 dasm_put(Dst, 8394);
1406 } 1406 }
1407 dasm_put(Dst, 10272, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1407 dasm_put(Dst, 10274, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1408 dasm_put(Dst, 10367, LJ_TSTR); 1408 dasm_put(Dst, 10369, LJ_TSTR);
1409 break; 1409 break;
1410 case BC_TGETS: 1410 case BC_TGETS:
1411 dasm_put(Dst, 10385, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1411 dasm_put(Dst, 10387, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1412 dasm_put(Dst, 10469, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1412 dasm_put(Dst, 10471, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1413 break; 1413 break;
1414 case BC_TGETB: 1414 case BC_TGETB:
1415 dasm_put(Dst, 10540, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1415 dasm_put(Dst, 10542, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1416 dasm_put(Dst, 8892); 1416 dasm_put(Dst, 8894);
1417 break; 1417 break;
1418 1418
1419 case BC_TSETV: 1419 case BC_TSETV:
1420 dasm_put(Dst, 10639, LJ_TTAB, LJ_TISNUM); 1420 dasm_put(Dst, 10641, LJ_TTAB, LJ_TISNUM);
1421 if (cmov) { 1421 if (cmov) {
1422 dasm_put(Dst, 8386); 1422 dasm_put(Dst, 8388);
1423 } else { 1423 } else {
1424 dasm_put(Dst, 8392); 1424 dasm_put(Dst, 8394);
1425 } 1425 }
1426 dasm_put(Dst, 10681, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 1426 dasm_put(Dst, 10683, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
1427 dasm_put(Dst, 10767, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1427 dasm_put(Dst, 10769, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1428 break; 1428 break;
1429 case BC_TSETS: 1429 case BC_TSETS:
1430 dasm_put(Dst, 10829, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1430 dasm_put(Dst, 10831, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1431 dasm_put(Dst, 10904, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 1431 dasm_put(Dst, 10906, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
1432 dasm_put(Dst, 10994, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1432 dasm_put(Dst, 10996, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1433 break; 1433 break;
1434 case BC_TSETB: 1434 case BC_TSETB:
1435 dasm_put(Dst, 11090, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 1435 dasm_put(Dst, 11092, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
1436 dasm_put(Dst, 11188, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1436 dasm_put(Dst, 11190, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1437 break; 1437 break;
1438 1438
1439 case BC_TSETM: 1439 case BC_TSETM:
1440 dasm_put(Dst, 11234, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); 1440 dasm_put(Dst, 11236, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
1441 dasm_put(Dst, 11391, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1441 dasm_put(Dst, 11393, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1442 break; 1442 break;
1443 1443
1444 /* -- Calls and vararg handling ----------------------------------------- */ 1444 /* -- Calls and vararg handling ----------------------------------------- */
1445 1445
1446 case BC_CALL: case BC_CALLM: 1446 case BC_CALL: case BC_CALLM:
1447 dasm_put(Dst, 8906); 1447 dasm_put(Dst, 8908);
1448 if (op == BC_CALLM) { 1448 if (op == BC_CALLM) {
1449 dasm_put(Dst, 11409); 1449 dasm_put(Dst, 11411);
1450 } 1450 }
1451 dasm_put(Dst, 11414, LJ_TFUNC, Dt7(->gate)); 1451 dasm_put(Dst, 11416, LJ_TFUNC, Dt7(->gate));
1452 break; 1452 break;
1453 1453
1454 case BC_CALLMT: 1454 case BC_CALLMT:
1455 dasm_put(Dst, 11409); 1455 dasm_put(Dst, 11411);
1456 break; 1456 break;
1457 case BC_CALLT: 1457 case BC_CALLT:
1458 dasm_put(Dst, 11437, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->gate)); 1458 dasm_put(Dst, 11439, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->gate));
1459 dasm_put(Dst, 11542, FRAME_TYPE, Dt7(->pt), Dt9(->k)); 1459 dasm_put(Dst, 11544, FRAME_TYPE, Dt7(->pt), Dt9(->k));
1460 break; 1460 break;
1461 1461
1462 case BC_ITERC: 1462 case BC_ITERC:
1463 dasm_put(Dst, 11599, LJ_TFUNC, Dt7(->gate)); 1463 dasm_put(Dst, 11601, LJ_TFUNC, Dt7(->gate));
1464 break; 1464 break;
1465 1465
1466 case BC_VARG: 1466 case BC_VARG:
1467 dasm_put(Dst, 11661, Dt7(->pt), Dt9(->numparams), (8+FRAME_VARG), LJ_TNIL); 1467 dasm_put(Dst, 11663, Dt7(->pt), Dt9(->numparams), (8+FRAME_VARG), LJ_TNIL);
1468 dasm_put(Dst, 11805, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 1468 dasm_put(Dst, 11807, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
1469 break; 1469 break;
1470 1470
1471 /* -- Returns ----------------------------------------------------------- */ 1471 /* -- Returns ----------------------------------------------------------- */
1472 1472
1473 case BC_RETM: 1473 case BC_RETM:
1474 dasm_put(Dst, 11409); 1474 dasm_put(Dst, 11411);
1475 break; 1475 break;
1476 1476
1477 case BC_RET: case BC_RET0: case BC_RET1: 1477 case BC_RET: case BC_RET0: case BC_RET1:
1478 if (op != BC_RET0) { 1478 if (op != BC_RET0) {
1479 dasm_put(Dst, 11900); 1479 dasm_put(Dst, 11902);
1480 } 1480 }
1481 dasm_put(Dst, 11904, FRAME_TYPE); 1481 dasm_put(Dst, 11906, FRAME_TYPE);
1482 switch (op) { 1482 switch (op) {
1483 case BC_RET: 1483 case BC_RET:
1484 dasm_put(Dst, 11923); 1484 dasm_put(Dst, 11925);
1485 break; 1485 break;
1486 case BC_RET1: 1486 case BC_RET1:
1487 dasm_put(Dst, 11981); 1487 dasm_put(Dst, 11983);
1488 /* fallthrough */ 1488 /* fallthrough */
1489 case BC_RET0: 1489 case BC_RET0:
1490 dasm_put(Dst, 3818); 1490 dasm_put(Dst, 3820);
1491 default: 1491 default:
1492 break; 1492 break;
1493 } 1493 }
1494 dasm_put(Dst, 11997, Dt7(->pt), Dt9(->k)); 1494 dasm_put(Dst, 11999, Dt7(->pt), Dt9(->k));
1495 if (op == BC_RET) { 1495 if (op == BC_RET) {
1496 dasm_put(Dst, 12039, LJ_TNIL); 1496 dasm_put(Dst, 12041, LJ_TNIL);
1497 } else { 1497 } else {
1498 dasm_put(Dst, 12048, LJ_TNIL); 1498 dasm_put(Dst, 12050, LJ_TNIL);
1499 } 1499 }
1500 dasm_put(Dst, 12055); 1500 dasm_put(Dst, 12057);
1501 if (op != BC_RET0) { 1501 if (op != BC_RET0) {
1502 dasm_put(Dst, 12076); 1502 dasm_put(Dst, 12078);
1503 } 1503 }
1504 dasm_put(Dst, 8897); 1504 dasm_put(Dst, 8899);
1505 break; 1505 break;
1506 1506
1507 /* -- Loops and branches ------------------------------------------------ */ 1507 /* -- Loops and branches ------------------------------------------------ */
@@ -1509,7 +1509,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov)
1509 1509
1510 case BC_FORL: 1510 case BC_FORL:
1511#if LJ_HASJIT 1511#if LJ_HASJIT
1512 dasm_put(Dst, 12080, HOTCOUNT_PCMASK, GG_DISP2HOT); 1512 dasm_put(Dst, 12082, HOTCOUNT_PCMASK, GG_DISP2HOT);
1513#endif 1513#endif
1514 break; 1514 break;
1515 1515
@@ -1521,42 +1521,42 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov)
1521 case BC_FORI: 1521 case BC_FORI:
1522 case BC_IFORL: 1522 case BC_IFORL:
1523 vk = (op == BC_IFORL || op == BC_JFORL); 1523 vk = (op == BC_IFORL || op == BC_JFORL);
1524 dasm_put(Dst, 12101); 1524 dasm_put(Dst, 12103);
1525 if (!vk) { 1525 if (!vk) {
1526 dasm_put(Dst, 12105, LJ_TISNUM, LJ_TISNUM); 1526 dasm_put(Dst, 12107, LJ_TISNUM, LJ_TISNUM);
1527 } 1527 }
1528 dasm_put(Dst, 12124); 1528 dasm_put(Dst, 12126);
1529 if (!vk) { 1529 if (!vk) {
1530 dasm_put(Dst, 12128, LJ_TISNUM); 1530 dasm_put(Dst, 12130, LJ_TISNUM);
1531 } 1531 }
1532 dasm_put(Dst, 12137); 1532 dasm_put(Dst, 12139);
1533 if (vk) { 1533 if (vk) {
1534 dasm_put(Dst, 12143); 1534 dasm_put(Dst, 12145);
1535 } 1535 }
1536 dasm_put(Dst, 12149); 1536 dasm_put(Dst, 12151);
1537 if (cmov) { 1537 if (cmov) {
1538 dasm_put(Dst, 8386); 1538 dasm_put(Dst, 8388);
1539 } else { 1539 } else {
1540 dasm_put(Dst, 8392); 1540 dasm_put(Dst, 8394);
1541 } 1541 }
1542 if (!cmov) { 1542 if (!cmov) {
1543 dasm_put(Dst, 12164); 1543 dasm_put(Dst, 12166);
1544 } 1544 }
1545 if (op == BC_FORI) { 1545 if (op == BC_FORI) {
1546 dasm_put(Dst, 12170, -BCBIAS_J*4); 1546 dasm_put(Dst, 12172, -BCBIAS_J*4);
1547 } else if (op == BC_JFORI) { 1547 } else if (op == BC_JFORI) {
1548 dasm_put(Dst, 12180, -BCBIAS_J*4, BC_JLOOP); 1548 dasm_put(Dst, 12182, -BCBIAS_J*4, BC_JLOOP);
1549 } else if (op == BC_IFORL) { 1549 } else if (op == BC_IFORL) {
1550 dasm_put(Dst, 12194, -BCBIAS_J*4); 1550 dasm_put(Dst, 12196, -BCBIAS_J*4);
1551 } else { 1551 } else {
1552 dasm_put(Dst, 12190, BC_JLOOP); 1552 dasm_put(Dst, 12192, BC_JLOOP);
1553 } 1553 }
1554 dasm_put(Dst, 8426); 1554 dasm_put(Dst, 8428);
1555 break; 1555 break;
1556 1556
1557 case BC_ITERL: 1557 case BC_ITERL:
1558#if LJ_HASJIT 1558#if LJ_HASJIT
1559 dasm_put(Dst, 12080, HOTCOUNT_PCMASK, GG_DISP2HOT); 1559 dasm_put(Dst, 12082, HOTCOUNT_PCMASK, GG_DISP2HOT);
1560#endif 1560#endif
1561 break; 1561 break;
1562 1562
@@ -1565,33 +1565,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov)
1565 break; 1565 break;
1566#endif 1566#endif
1567 case BC_IITERL: 1567 case BC_IITERL:
1568 dasm_put(Dst, 12204, LJ_TNIL); 1568 dasm_put(Dst, 12206, LJ_TNIL);
1569 if (op == BC_JITERL) { 1569 if (op == BC_JITERL) {
1570 dasm_put(Dst, 12219, BC_JLOOP); 1570 dasm_put(Dst, 12221, BC_JLOOP);
1571 } else { 1571 } else {
1572 dasm_put(Dst, 12233, -BCBIAS_J*4); 1572 dasm_put(Dst, 12235, -BCBIAS_J*4);
1573 } 1573 }
1574 dasm_put(Dst, 8697); 1574 dasm_put(Dst, 8699);
1575 break; 1575 break;
1576 1576
1577 case BC_LOOP: 1577 case BC_LOOP:
1578#if LJ_HASJIT 1578#if LJ_HASJIT
1579 dasm_put(Dst, 12080, HOTCOUNT_PCMASK, GG_DISP2HOT); 1579 dasm_put(Dst, 12082, HOTCOUNT_PCMASK, GG_DISP2HOT);
1580#endif 1580#endif
1581 break; 1581 break;
1582 1582
1583 case BC_ILOOP: 1583 case BC_ILOOP:
1584 dasm_put(Dst, 7162); 1584 dasm_put(Dst, 7164);
1585 break; 1585 break;
1586 1586
1587 case BC_JLOOP: 1587 case BC_JLOOP:
1588#if LJ_HASJIT 1588#if LJ_HASJIT
1589 dasm_put(Dst, 12249, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 1589 dasm_put(Dst, 12251, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
1590#endif 1590#endif
1591 break; 1591 break;
1592 1592
1593 case BC_JMP: 1593 case BC_JMP:
1594 dasm_put(Dst, 12272, -BCBIAS_J*4); 1594 dasm_put(Dst, 12274, -BCBIAS_J*4);
1595 break; 1595 break;
1596 1596
1597 /* ---------------------------------------------------------------------- */ 1597 /* ---------------------------------------------------------------------- */
@@ -1615,7 +1615,7 @@ static int build_backend(BuildCtx *ctx)
1615 1615
1616 build_subroutines(ctx, cmov); 1616 build_subroutines(ctx, cmov);
1617 1617
1618 dasm_put(Dst, 12296); 1618 dasm_put(Dst, 12298);
1619 for (op = 0; op < BC__MAX; op++) 1619 for (op = 0; op < BC__MAX; op++)
1620 build_ins(ctx, (BCOp)op, op, cmov); 1620 build_ins(ctx, (BCOp)op, op, cmov);
1621 1621