diff options
author | Mike Pall <mike> | 2010-11-18 00:23:24 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-11-18 00:23:24 +0100 |
commit | ba602c9578e01b1d692beddf7e974fa70b6eecf2 (patch) | |
tree | 3ec1beecf5205801d9c1048aca92c97b5bafe859 /src/buildvm_x86.h | |
parent | 3754a8fe7a820bcfc5e2633d15c648a194dd4144 (diff) | |
download | luajit-ba602c9578e01b1d692beddf7e974fa70b6eecf2.tar.gz luajit-ba602c9578e01b1d692beddf7e974fa70b6eecf2.tar.bz2 luajit-ba602c9578e01b1d692beddf7e974fa70b6eecf2.zip |
Add support for __pairs and __ipairs metamethods (from Lua 5.2).
Diffstat (limited to 'src/buildvm_x86.h')
-rw-r--r-- | src/buildvm_x86.h | 1028 |
1 files changed, 515 insertions, 513 deletions
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h index 8d30b4ef..f68d6c87 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 |
15 | static const unsigned char build_actionlist[15576] = { | 15 | static const unsigned char build_actionlist[15597] = { |
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, |
@@ -129,33 +129,34 @@ static const unsigned char build_actionlist[15576] = { | |||
129 | 139,149,233,133,192,15,132,244,249,139,106,8,139,66,12,137,106,252,248,137, | 129 | 139,149,233,133,192,15,132,244,249,139,106,8,139,66,12,137,106,252,248,137, |
130 | 66,252,252,139,106,16,139,66,20,137,42,137,66,4,248,68,184,237,252,233,244, | 130 | 66,252,252,139,106,16,139,66,20,137,42,137,66,4,248,68,184,237,252,233,244, |
131 | 69,248,2,199,66,12,237,252,233,244,1,248,3,199,66,252,252,237,252,233,244, | 131 | 69,248,2,199,66,12,237,252,233,244,1,248,3,199,66,252,252,237,252,233,244, |
132 | 58,248,70,129,252,248,239,15,130,244,55,255,139,106,252,248,129,122,253,4, | 132 | 58,248,70,129,252,248,239,15,130,244,55,255,139,42,129,122,253,4,239,15,133, |
133 | 239,15,133,244,55,139,133,233,139,114,252,252,199,66,252,252,237,137,66,252, | 133 | 244,55,131,189,233,0,15,133,244,55,139,106,252,248,139,133,233,139,114,252, |
134 | 248,199,66,12,237,184,237,252,233,244,69,248,71,129,252,248,239,15,130,244, | 134 | 252,199,66,252,252,237,137,66,252,248,199,66,12,237,184,237,252,233,244,69, |
135 | 55,129,122,253,4,239,15,133,244,55,129,122,253,12,239,15,135,244,55,139,114, | 135 | 248,71,129,252,248,239,15,130,244,55,129,122,253,4,239,15,133,244,55,129, |
136 | 252,252,255,252,242,15,16,66,8,189,0,0,252,240,63,102,15,110,205,102,15,112, | 136 | 122,253,12,239,255,15,135,244,55,139,114,252,252,255,252,242,15,16,66,8,189, |
137 | 201,81,252,242,15,88,193,252,242,15,45,192,252,242,15,17,66,252,248,255,221, | 137 | 0,0,252,240,63,102,15,110,205,102,15,112,201,81,252,242,15,88,193,252,242, |
138 | 66,8,217,232,222,193,219,20,36,221,90,252,248,139,4,36,255,139,42,59,133, | 138 | 15,45,192,252,242,15,17,66,252,248,255,221,66,8,217,232,222,193,219,20,36, |
139 | 233,15,131,244,248,193,224,3,3,133,233,248,1,129,120,253,4,239,15,132,244, | 139 | 221,90,252,248,139,4,36,255,139,42,59,133,233,15,131,244,248,193,224,3,3, |
140 | 72,139,40,139,64,4,137,42,137,66,4,252,233,244,68,248,2,131,189,233,0,15, | 140 | 133,233,248,1,129,120,253,4,239,15,132,244,72,139,40,139,64,4,137,42,137, |
141 | 132,244,72,137,252,233,137,213,137,194,232,251,1,12,137,252,234,133,192,15, | 141 | 66,4,252,233,244,68,248,2,131,189,233,0,15,132,244,72,137,252,233,137,213, |
142 | 133,244,1,248,72,184,237,252,233,244,69,248,73,255,129,252,248,239,15,130, | 142 | 137,194,232,251,1,12,137,252,234,133,192,15,133,244,1,248,72,184,237,252, |
143 | 244,55,139,106,252,248,129,122,253,4,239,15,133,244,55,139,133,233,139,114, | 143 | 233,244,69,248,73,255,129,252,248,239,15,130,244,55,139,42,129,122,253,4, |
144 | 252,252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242,15,17,66, | 144 | 239,15,133,244,55,131,189,233,0,15,133,244,55,139,106,252,248,139,133,233, |
145 | 8,255,217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129,252,248, | 145 | 139,114,252,252,199,66,252,252,237,137,66,252,248,255,15,87,192,252,242,15, |
146 | 239,15,130,244,55,141,74,8,131,232,1,190,237,248,1,15,182,171,233,193,252, | 146 | 17,66,8,255,217,252,238,221,90,8,255,184,237,252,233,244,69,248,74,129,252, |
147 | 237,235,131,229,1,1,252,238,252,233,244,27,248,75,129,252,248,239,15,130, | 147 | 248,239,15,130,244,55,141,74,8,131,232,1,190,237,248,1,15,182,171,233,193, |
148 | 244,55,129,122,253,12,239,15,133,244,55,255,139,106,4,137,106,12,199,66,4, | 148 | 252,237,235,131,229,1,1,252,238,252,233,244,27,248,75,129,252,248,239,15, |
149 | 237,139,42,139,114,8,137,106,8,137,50,141,74,16,131,232,2,190,237,252,233, | 149 | 130,244,55,129,122,253,12,239,15,133,244,55,255,139,106,4,137,106,12,199, |
150 | 244,1,248,76,129,252,248,239,15,130,244,55,139,42,139,114,252,252,137,116, | 150 | 66,4,237,139,42,139,114,8,137,106,8,137,50,141,74,16,131,232,2,190,237,252, |
151 | 36,24,137,44,36,129,122,253,4,239,15,133,244,55,131,189,233,0,15,133,244, | 151 | 233,244,1,248,76,129,252,248,239,15,130,244,55,139,42,139,114,252,252,137, |
152 | 55,128,189,233,235,15,135,244,55,139,141,233,15,132,244,247,255,59,141,233, | 152 | 116,36,24,137,44,36,129,122,253,4,239,15,133,244,55,131,189,233,0,15,133, |
153 | 15,132,244,55,248,1,141,116,193,252,240,59,181,233,15,135,244,55,137,181, | 153 | 244,55,128,189,233,235,15,135,244,55,139,141,233,15,132,244,247,255,59,141, |
154 | 233,139,108,36,48,137,149,233,131,194,8,137,149,233,141,108,194,232,41,252, | 154 | 233,15,132,244,55,248,1,141,116,193,252,240,59,181,233,15,135,244,55,137, |
155 | 245,57,206,15,132,244,249,248,2,139,68,46,4,137,70,252,252,139,4,46,137,70, | 155 | 181,233,139,108,36,48,137,149,233,131,194,8,137,149,233,141,108,194,232,41, |
156 | 252,248,131,252,238,8,57,206,15,133,244,2,248,3,137,76,36,4,49,201,137,76, | 156 | 252,245,57,206,15,132,244,249,248,2,139,68,46,4,137,70,252,252,139,4,46,137, |
157 | 36,12,137,76,36,8,232,244,24,199,131,233,237,255,139,108,36,48,139,52,36, | 157 | 70,252,248,131,252,238,8,57,206,15,133,244,2,248,3,137,76,36,4,49,201,137, |
158 | 139,149,233,129,252,248,239,15,135,244,254,248,4,139,142,233,139,190,233, | 158 | 76,36,12,137,76,36,8,232,244,24,199,131,233,237,255,139,108,36,48,139,52, |
159 | 36,139,149,233,129,252,248,239,15,135,244,254,248,4,139,142,233,139,190,233, | ||
159 | 137,142,233,137,252,254,41,206,15,132,244,252,141,4,50,193,252,238,3,59,133, | 160 | 137,142,233,137,252,254,41,206,15,132,244,252,141,4,50,193,252,238,3,59,133, |
160 | 233,15,135,244,255,137,213,41,205,248,5,139,1,137,4,41,139,65,4,137,68,41, | 161 | 233,15,135,244,255,137,213,41,205,248,5,139,1,137,4,41,139,65,4,137,68,41, |
161 | 4,131,193,8,57,252,249,15,133,244,5,248,6,141,70,2,199,66,252,252,237,248, | 162 | 4,131,193,8,57,252,249,15,133,244,5,248,6,141,70,2,199,66,252,252,237,248, |
@@ -1173,394 +1174,395 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | |||
1173 | dasm_put(Dst, 2164, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1174 | dasm_put(Dst, 2164, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1174 | dasm_put(Dst, 2230, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); | 1175 | dasm_put(Dst, 2230, Dt1(->base), Dt1(->base), 1+1, LJ_TTAB, Dt1(->base)); |
1175 | dasm_put(Dst, 2297, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); | 1176 | dasm_put(Dst, 2297, Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); |
1176 | dasm_put(Dst, 2402, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); | 1177 | dasm_put(Dst, 2402, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM); |
1178 | dasm_put(Dst, 2476); | ||
1177 | if (sse) { | 1179 | if (sse) { |
1178 | dasm_put(Dst, 2474); | 1180 | dasm_put(Dst, 2485); |
1179 | } else { | 1181 | } else { |
1180 | dasm_put(Dst, 2513); | 1182 | dasm_put(Dst, 2524); |
1181 | } | 1183 | } |
1182 | dasm_put(Dst, 2531, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); | 1184 | dasm_put(Dst, 2542, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0); |
1183 | dasm_put(Dst, 2612, 1+1, LJ_TTAB, Dt8(->upvalue[0]), LJ_TFUNC); | 1185 | dasm_put(Dst, 2623, 1+1, LJ_TTAB, Dt6(->metatable), Dt8(->upvalue[0]), LJ_TFUNC); |
1184 | if (sse) { | 1186 | if (sse) { |
1185 | dasm_put(Dst, 2650); | 1187 | dasm_put(Dst, 2671); |
1186 | } else { | 1188 | } else { |
1187 | dasm_put(Dst, 2660); | 1189 | dasm_put(Dst, 2681); |
1188 | } | 1190 | } |
1189 | dasm_put(Dst, 2667, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); | 1191 | dasm_put(Dst, 2688, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); |
1190 | dasm_put(Dst, 2731, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); | 1192 | dasm_put(Dst, 2752, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD, Dt1(->top)); |
1191 | dasm_put(Dst, 2819, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); | 1193 | dasm_put(Dst, 2840, Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); |
1192 | dasm_put(Dst, 2920, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); | 1194 | dasm_put(Dst, 2941, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE, FRAME_TYPE); |
1193 | dasm_put(Dst, 3034, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); | 1195 | dasm_put(Dst, 3055, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); |
1194 | dasm_put(Dst, 3132, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); | 1196 | dasm_put(Dst, 3153, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); |
1195 | dasm_put(Dst, 3198, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); | 1197 | dasm_put(Dst, 3219, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); |
1196 | dasm_put(Dst, 3299, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); | 1198 | dasm_put(Dst, 3320, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); |
1197 | dasm_put(Dst, 3412, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); | 1199 | dasm_put(Dst, 3433, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status)); |
1198 | if (sse) { | 1200 | if (sse) { |
1199 | dasm_put(Dst, 3438, 1+1, LJ_TISNUM); | 1201 | dasm_put(Dst, 3459, 1+1, LJ_TISNUM); |
1200 | } else { | 1202 | } else { |
1201 | dasm_put(Dst, 3507, 1+1, LJ_TISNUM); | 1203 | dasm_put(Dst, 3528, 1+1, LJ_TISNUM); |
1202 | } | 1204 | } |
1203 | dasm_put(Dst, 3543, 1+1, FRAME_TYPE, LJ_TNIL); | 1205 | dasm_put(Dst, 3564, 1+1, FRAME_TYPE, LJ_TNIL); |
1204 | if (sse) { | 1206 | if (sse) { |
1205 | dasm_put(Dst, 3633, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1207 | dasm_put(Dst, 3654, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1206 | dasm_put(Dst, 3695, 1+1, LJ_TISNUM); | 1208 | dasm_put(Dst, 3716, 1+1, LJ_TISNUM); |
1207 | } else { | 1209 | } else { |
1208 | dasm_put(Dst, 3725, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1210 | dasm_put(Dst, 3746, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1209 | dasm_put(Dst, 3784, 1+1, LJ_TISNUM); | 1211 | dasm_put(Dst, 3805, 1+1, LJ_TISNUM); |
1210 | } | 1212 | } |
1211 | dasm_put(Dst, 3811, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1213 | dasm_put(Dst, 3832, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1212 | dasm_put(Dst, 3880, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1214 | dasm_put(Dst, 3901, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1213 | dasm_put(Dst, 3937, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); | 1215 | dasm_put(Dst, 3958, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); |
1214 | dasm_put(Dst, 4000, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); | 1216 | dasm_put(Dst, 4021, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); |
1215 | dasm_put(Dst, 4090); | 1217 | dasm_put(Dst, 4111); |
1216 | if (sse) { | 1218 | if (sse) { |
1217 | dasm_put(Dst, 4102, 1+1, LJ_TISNUM); | 1219 | dasm_put(Dst, 4123, 1+1, LJ_TISNUM); |
1218 | } else { | 1220 | } else { |
1219 | dasm_put(Dst, 4133, 1+1, LJ_TISNUM); | 1221 | dasm_put(Dst, 4154, 1+1, LJ_TISNUM); |
1220 | } | 1222 | } |
1221 | dasm_put(Dst, 4158); | 1223 | dasm_put(Dst, 4179); |
1222 | if (sse) { | 1224 | if (sse) { |
1223 | dasm_put(Dst, 4172, 1+1, LJ_TISNUM); | 1225 | dasm_put(Dst, 4193, 1+1, LJ_TISNUM); |
1224 | } else { | 1226 | } else { |
1225 | dasm_put(Dst, 4203, 1+1, LJ_TISNUM); | 1227 | dasm_put(Dst, 4224, 1+1, LJ_TISNUM); |
1226 | } | 1228 | } |
1227 | dasm_put(Dst, 4228); | 1229 | dasm_put(Dst, 4249); |
1228 | if (sse) { | 1230 | if (sse) { |
1229 | dasm_put(Dst, 4242, 1+1, LJ_TISNUM); | 1231 | dasm_put(Dst, 4263, 1+1, LJ_TISNUM); |
1230 | } else { | 1232 | } else { |
1231 | dasm_put(Dst, 4273, 1+1, LJ_TISNUM); | 1233 | dasm_put(Dst, 4294, 1+1, LJ_TISNUM); |
1232 | } | 1234 | } |
1233 | dasm_put(Dst, 4298); | 1235 | dasm_put(Dst, 4319); |
1234 | if (sse) { | 1236 | if (sse) { |
1235 | dasm_put(Dst, 4314, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1237 | dasm_put(Dst, 4335, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1236 | } else { | 1238 | } else { |
1237 | dasm_put(Dst, 4353, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); | 1239 | dasm_put(Dst, 4374, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); |
1238 | } | 1240 | } |
1239 | dasm_put(Dst, 4386, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); | 1241 | dasm_put(Dst, 4407, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); |
1240 | dasm_put(Dst, 4451, 1+1, LJ_TISNUM); | 1242 | dasm_put(Dst, 4472, 1+1, LJ_TISNUM); |
1241 | if (sse) { | 1243 | if (sse) { |
1242 | dasm_put(Dst, 4550); | 1244 | dasm_put(Dst, 4571); |
1243 | } else { | 1245 | } else { |
1244 | dasm_put(Dst, 4556); | 1246 | dasm_put(Dst, 4577); |
1245 | } | 1247 | } |
1246 | dasm_put(Dst, 4565); | 1248 | dasm_put(Dst, 4586); |
1247 | if (sse) { | 1249 | if (sse) { |
1248 | dasm_put(Dst, 4590); | 1250 | dasm_put(Dst, 4611); |
1249 | } else { | 1251 | } else { |
1250 | dasm_put(Dst, 4596); | 1252 | dasm_put(Dst, 4617); |
1251 | } | 1253 | } |
1252 | dasm_put(Dst, 4599, 1+2); | 1254 | dasm_put(Dst, 4620, 1+2); |
1253 | if (sse) { | 1255 | if (sse) { |
1254 | dasm_put(Dst, 4608); | 1256 | dasm_put(Dst, 4629); |
1255 | } else { | 1257 | } else { |
1256 | dasm_put(Dst, 4616); | 1258 | dasm_put(Dst, 4637); |
1257 | } | 1259 | } |
1258 | dasm_put(Dst, 4624); | 1260 | dasm_put(Dst, 4645); |
1259 | if (sse) { | 1261 | if (sse) { |
1260 | dasm_put(Dst, 4627); | 1262 | dasm_put(Dst, 4648); |
1261 | } else { | 1263 | } else { |
1262 | dasm_put(Dst, 4659); | 1264 | dasm_put(Dst, 4680); |
1263 | } | 1265 | } |
1264 | dasm_put(Dst, 4678); | 1266 | dasm_put(Dst, 4699); |
1265 | if (sse) { | 1267 | if (sse) { |
1266 | dasm_put(Dst, 4694, 1+1, LJ_TISNUM); | 1268 | dasm_put(Dst, 4715, 1+1, LJ_TISNUM); |
1267 | } else { | 1269 | } else { |
1268 | dasm_put(Dst, 4719, 1+1, LJ_TISNUM); | 1270 | dasm_put(Dst, 4740, 1+1, LJ_TISNUM); |
1269 | } | 1271 | } |
1270 | dasm_put(Dst, 4741); | 1272 | dasm_put(Dst, 4762); |
1271 | if (sse) { | 1273 | if (sse) { |
1272 | dasm_put(Dst, 4763); | 1274 | dasm_put(Dst, 4784); |
1273 | } else { | 1275 | } else { |
1274 | dasm_put(Dst, 4789); | 1276 | dasm_put(Dst, 4810); |
1275 | } | 1277 | } |
1276 | dasm_put(Dst, 4806, 1+2); | 1278 | dasm_put(Dst, 4827, 1+2); |
1277 | if (sse) { | 1279 | if (sse) { |
1278 | dasm_put(Dst, 4846); | 1280 | dasm_put(Dst, 4867); |
1279 | } else { | 1281 | } else { |
1280 | dasm_put(Dst, 4854); | 1282 | dasm_put(Dst, 4875); |
1281 | } | 1283 | } |
1282 | dasm_put(Dst, 4864, 2+1, LJ_TISNUM, LJ_TISNUM); | 1284 | dasm_put(Dst, 4885, 2+1, LJ_TISNUM, LJ_TISNUM); |
1283 | if (sse) { | 1285 | if (sse) { |
1284 | dasm_put(Dst, 4916, 2+1, LJ_TISNUM, LJ_TISNUM); | 1286 | dasm_put(Dst, 4937, 2+1, LJ_TISNUM, LJ_TISNUM); |
1285 | } else { | 1287 | } else { |
1286 | dasm_put(Dst, 4963, 2+1, LJ_TISNUM, LJ_TISNUM); | 1288 | dasm_put(Dst, 4984, 2+1, LJ_TISNUM, LJ_TISNUM); |
1287 | } | 1289 | } |
1288 | if (sse) { | 1290 | if (sse) { |
1289 | dasm_put(Dst, 5004, 1+1, LJ_TISNUM, LJ_TISNUM); | 1291 | dasm_put(Dst, 5025, 1+1, LJ_TISNUM, LJ_TISNUM); |
1290 | } else { | 1292 | } else { |
1291 | dasm_put(Dst, 5075, 1+1, LJ_TISNUM, LJ_TISNUM); | 1293 | dasm_put(Dst, 5096, 1+1, LJ_TISNUM, LJ_TISNUM); |
1292 | if (cmov) { | 1294 | if (cmov) { |
1293 | dasm_put(Dst, 5128); | 1295 | dasm_put(Dst, 5149); |
1294 | } else { | 1296 | } else { |
1295 | dasm_put(Dst, 5136); | 1297 | dasm_put(Dst, 5157); |
1296 | } | 1298 | } |
1297 | dasm_put(Dst, 5067); | 1299 | dasm_put(Dst, 5088); |
1298 | } | 1300 | } |
1299 | if (sse) { | 1301 | if (sse) { |
1300 | dasm_put(Dst, 5157, 1+1, LJ_TISNUM, LJ_TISNUM); | 1302 | dasm_put(Dst, 5178, 1+1, LJ_TISNUM, LJ_TISNUM); |
1301 | } else { | 1303 | } else { |
1302 | dasm_put(Dst, 5228, 1+1, LJ_TISNUM, LJ_TISNUM); | 1304 | dasm_put(Dst, 5249, 1+1, LJ_TISNUM, LJ_TISNUM); |
1303 | if (cmov) { | 1305 | if (cmov) { |
1304 | dasm_put(Dst, 5281); | 1306 | dasm_put(Dst, 5302); |
1305 | } else { | 1307 | } else { |
1306 | dasm_put(Dst, 5289); | 1308 | dasm_put(Dst, 5310); |
1307 | } | 1309 | } |
1308 | dasm_put(Dst, 5067); | 1310 | dasm_put(Dst, 5088); |
1309 | } | 1311 | } |
1310 | if (!sse) { | 1312 | if (!sse) { |
1311 | dasm_put(Dst, 5310); | 1313 | dasm_put(Dst, 5331); |
1312 | } | 1314 | } |
1313 | dasm_put(Dst, 5319, 1+1, LJ_TSTR); | 1315 | dasm_put(Dst, 5340, 1+1, LJ_TSTR); |
1314 | if (sse) { | 1316 | if (sse) { |
1315 | dasm_put(Dst, 5341, Dt5(->len)); | 1317 | dasm_put(Dst, 5362, Dt5(->len)); |
1316 | } else { | 1318 | } else { |
1317 | dasm_put(Dst, 5352, Dt5(->len)); | 1319 | dasm_put(Dst, 5373, Dt5(->len)); |
1318 | } | 1320 | } |
1319 | dasm_put(Dst, 5360, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); | 1321 | dasm_put(Dst, 5381, 1+1, LJ_TSTR, Dt5(->len), Dt5([1])); |
1320 | if (sse) { | 1322 | if (sse) { |
1321 | dasm_put(Dst, 5398); | 1323 | dasm_put(Dst, 5419); |
1322 | } else { | 1324 | } else { |
1323 | dasm_put(Dst, 5408); | 1325 | dasm_put(Dst, 5429); |
1324 | } | 1326 | } |
1325 | dasm_put(Dst, 5421, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); | 1327 | dasm_put(Dst, 5442, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1, LJ_TISNUM); |
1326 | if (sse) { | 1328 | if (sse) { |
1327 | dasm_put(Dst, 5456); | 1329 | dasm_put(Dst, 5477); |
1328 | } else { | 1330 | } else { |
1329 | dasm_put(Dst, 5478); | 1331 | dasm_put(Dst, 5499); |
1330 | } | 1332 | } |
1331 | dasm_put(Dst, 5498, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); | 1333 | dasm_put(Dst, 5519, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2, LJ_TISNUM); |
1332 | dasm_put(Dst, 2142); | 1334 | dasm_put(Dst, 2142); |
1333 | if (sse) { | 1335 | if (sse) { |
1334 | dasm_put(Dst, 5601); | 1336 | dasm_put(Dst, 5622); |
1335 | } else { | 1337 | } else { |
1336 | dasm_put(Dst, 5612); | 1338 | dasm_put(Dst, 5633); |
1337 | } | 1339 | } |
1338 | dasm_put(Dst, 5620, LJ_TSTR, LJ_TISNUM, Dt5(->len)); | 1340 | dasm_put(Dst, 5641, LJ_TSTR, LJ_TISNUM, Dt5(->len)); |
1339 | if (sse) { | 1341 | if (sse) { |
1340 | dasm_put(Dst, 5650); | 1342 | dasm_put(Dst, 5671); |
1341 | } else { | 1343 | } else { |
1342 | dasm_put(Dst, 5657); | 1344 | dasm_put(Dst, 5678); |
1343 | } | 1345 | } |
1344 | dasm_put(Dst, 5669, sizeof(GCstr)-1); | 1346 | dasm_put(Dst, 5690, sizeof(GCstr)-1); |
1345 | dasm_put(Dst, 5744, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); | 1347 | dasm_put(Dst, 5765, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); |
1346 | dasm_put(Dst, 5803, LJ_TSTR, LJ_TISNUM); | 1348 | dasm_put(Dst, 5824, LJ_TSTR, LJ_TISNUM); |
1347 | if (sse) { | 1349 | if (sse) { |
1348 | dasm_put(Dst, 5824); | 1350 | dasm_put(Dst, 5845); |
1349 | } else { | 1351 | } else { |
1350 | dasm_put(Dst, 5831); | 1352 | dasm_put(Dst, 5852); |
1351 | } | 1353 | } |
1352 | dasm_put(Dst, 5843, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); | 1354 | dasm_put(Dst, 5864, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1); |
1353 | dasm_put(Dst, 5908, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1355 | dasm_put(Dst, 5929, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1354 | dasm_put(Dst, 5971, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); | 1356 | dasm_put(Dst, 5992, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); |
1355 | dasm_put(Dst, 6042, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); | 1357 | dasm_put(Dst, 6063, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1); |
1356 | dasm_put(Dst, 6127, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); | 1358 | dasm_put(Dst, 6148, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); |
1357 | dasm_put(Dst, 6197, 1+1, LJ_TTAB); | 1359 | dasm_put(Dst, 6218, 1+1, LJ_TTAB); |
1358 | if (sse) { | 1360 | if (sse) { |
1359 | dasm_put(Dst, 6265); | 1361 | dasm_put(Dst, 6286); |
1360 | } else { | 1362 | } else { |
1361 | dasm_put(Dst, 6275); | 1363 | dasm_put(Dst, 6296); |
1362 | } | 1364 | } |
1363 | if (sse) { | 1365 | if (sse) { |
1364 | dasm_put(Dst, 6286, 1+1, LJ_TISNUM); | 1366 | dasm_put(Dst, 6307, 1+1, LJ_TISNUM); |
1365 | } else { | 1367 | } else { |
1366 | dasm_put(Dst, 6343, 1+1, LJ_TISNUM); | 1368 | dasm_put(Dst, 6364, 1+1, LJ_TISNUM); |
1367 | } | 1369 | } |
1368 | if (sse) { | 1370 | if (sse) { |
1369 | dasm_put(Dst, 6387, 1+1, LJ_TISNUM); | 1371 | dasm_put(Dst, 6408, 1+1, LJ_TISNUM); |
1370 | } else { | 1372 | } else { |
1371 | dasm_put(Dst, 6435, 1+1, LJ_TISNUM); | 1373 | dasm_put(Dst, 6456, 1+1, LJ_TISNUM); |
1372 | } | 1374 | } |
1373 | dasm_put(Dst, 6475, LJ_TISNUM); | 1375 | dasm_put(Dst, 6496, LJ_TISNUM); |
1374 | if (sse) { | 1376 | if (sse) { |
1375 | dasm_put(Dst, 6502); | 1377 | dasm_put(Dst, 6523); |
1376 | } else { | 1378 | } else { |
1377 | dasm_put(Dst, 6519); | 1379 | dasm_put(Dst, 6540); |
1378 | } | 1380 | } |
1379 | dasm_put(Dst, 6532); | 1381 | dasm_put(Dst, 6553); |
1380 | if (sse) { | 1382 | if (sse) { |
1381 | dasm_put(Dst, 6540, 1+1, LJ_TISNUM); | 1383 | dasm_put(Dst, 6561, 1+1, LJ_TISNUM); |
1382 | } else { | 1384 | } else { |
1383 | dasm_put(Dst, 6588, 1+1, LJ_TISNUM); | 1385 | dasm_put(Dst, 6609, 1+1, LJ_TISNUM); |
1384 | } | 1386 | } |
1385 | dasm_put(Dst, 6475, LJ_TISNUM); | 1387 | dasm_put(Dst, 6496, LJ_TISNUM); |
1386 | if (sse) { | 1388 | if (sse) { |
1387 | dasm_put(Dst, 6628); | 1389 | dasm_put(Dst, 6649); |
1388 | } else { | 1390 | } else { |
1389 | dasm_put(Dst, 6645); | 1391 | dasm_put(Dst, 6666); |
1390 | } | 1392 | } |
1391 | dasm_put(Dst, 6532); | 1393 | dasm_put(Dst, 6553); |
1392 | if (sse) { | 1394 | if (sse) { |
1393 | dasm_put(Dst, 6658, 1+1, LJ_TISNUM); | 1395 | dasm_put(Dst, 6679, 1+1, LJ_TISNUM); |
1394 | } else { | 1396 | } else { |
1395 | dasm_put(Dst, 6706, 1+1, LJ_TISNUM); | 1397 | dasm_put(Dst, 6727, 1+1, LJ_TISNUM); |
1396 | } | 1398 | } |
1397 | dasm_put(Dst, 6475, LJ_TISNUM); | 1399 | dasm_put(Dst, 6496, LJ_TISNUM); |
1398 | if (sse) { | 1400 | if (sse) { |
1399 | dasm_put(Dst, 6746); | 1401 | dasm_put(Dst, 6767); |
1400 | } else { | 1402 | } else { |
1401 | dasm_put(Dst, 6763); | 1403 | dasm_put(Dst, 6784); |
1402 | } | 1404 | } |
1403 | dasm_put(Dst, 6532); | 1405 | dasm_put(Dst, 6553); |
1404 | if (sse) { | 1406 | if (sse) { |
1405 | dasm_put(Dst, 6776, 1+1, LJ_TISNUM); | 1407 | dasm_put(Dst, 6797, 1+1, LJ_TISNUM); |
1406 | } else { | 1408 | } else { |
1407 | dasm_put(Dst, 6824, 1+1, LJ_TISNUM); | 1409 | dasm_put(Dst, 6845, 1+1, LJ_TISNUM); |
1408 | } | 1410 | } |
1409 | dasm_put(Dst, 6864); | 1411 | dasm_put(Dst, 6885); |
1410 | if (sse) { | 1412 | if (sse) { |
1411 | dasm_put(Dst, 6871, 1+1, LJ_TISNUM); | 1413 | dasm_put(Dst, 6892, 1+1, LJ_TISNUM); |
1412 | } else { | 1414 | } else { |
1413 | dasm_put(Dst, 6919, 1+1, LJ_TISNUM); | 1415 | dasm_put(Dst, 6940, 1+1, LJ_TISNUM); |
1414 | } | 1416 | } |
1415 | dasm_put(Dst, 6959); | 1417 | dasm_put(Dst, 6980); |
1416 | if (sse) { | 1418 | if (sse) { |
1417 | dasm_put(Dst, 6963); | 1419 | dasm_put(Dst, 6984); |
1418 | } else { | 1420 | } else { |
1419 | dasm_put(Dst, 6975); | 1421 | dasm_put(Dst, 6996); |
1420 | } | 1422 | } |
1421 | dasm_put(Dst, 6988); | 1423 | dasm_put(Dst, 7009); |
1422 | if (sse) { | 1424 | if (sse) { |
1423 | dasm_put(Dst, 6999, 2+1, LJ_TISNUM, LJ_TISNUM); | 1425 | dasm_put(Dst, 7020, 2+1, LJ_TISNUM, LJ_TISNUM); |
1424 | } else { | 1426 | } else { |
1425 | dasm_put(Dst, 7073, 2+1, LJ_TISNUM, LJ_TISNUM); | 1427 | dasm_put(Dst, 7094, 2+1, LJ_TISNUM, LJ_TISNUM); |
1426 | } | 1428 | } |
1427 | dasm_put(Dst, 7139); | 1429 | dasm_put(Dst, 7160); |
1428 | if (sse) { | 1430 | if (sse) { |
1429 | dasm_put(Dst, 7148, 2+1, LJ_TISNUM, LJ_TISNUM); | 1431 | dasm_put(Dst, 7169, 2+1, LJ_TISNUM, LJ_TISNUM); |
1430 | } else { | 1432 | } else { |
1431 | dasm_put(Dst, 7222, 2+1, LJ_TISNUM, LJ_TISNUM); | 1433 | dasm_put(Dst, 7243, 2+1, LJ_TISNUM, LJ_TISNUM); |
1432 | } | 1434 | } |
1433 | dasm_put(Dst, 7288); | 1435 | dasm_put(Dst, 7309); |
1434 | if (sse) { | 1436 | if (sse) { |
1435 | dasm_put(Dst, 7298, 2+1, LJ_TISNUM, LJ_TISNUM); | 1437 | dasm_put(Dst, 7319, 2+1, LJ_TISNUM, LJ_TISNUM); |
1436 | } else { | 1438 | } else { |
1437 | dasm_put(Dst, 7372, 2+1, LJ_TISNUM, LJ_TISNUM); | 1439 | dasm_put(Dst, 7393, 2+1, LJ_TISNUM, LJ_TISNUM); |
1438 | } | 1440 | } |
1439 | dasm_put(Dst, 7438); | 1441 | dasm_put(Dst, 7459); |
1440 | if (sse) { | 1442 | if (sse) { |
1441 | dasm_put(Dst, 7448, 2+1, LJ_TISNUM, LJ_TISNUM); | 1443 | dasm_put(Dst, 7469, 2+1, LJ_TISNUM, LJ_TISNUM); |
1442 | } else { | 1444 | } else { |
1443 | dasm_put(Dst, 7522, 2+1, LJ_TISNUM, LJ_TISNUM); | 1445 | dasm_put(Dst, 7543, 2+1, LJ_TISNUM, LJ_TISNUM); |
1444 | } | 1446 | } |
1445 | dasm_put(Dst, 7588); | 1447 | dasm_put(Dst, 7609); |
1446 | if (sse) { | 1448 | if (sse) { |
1447 | dasm_put(Dst, 7597, 2+1, LJ_TISNUM, LJ_TISNUM); | 1449 | dasm_put(Dst, 7618, 2+1, LJ_TISNUM, LJ_TISNUM); |
1448 | } else { | 1450 | } else { |
1449 | dasm_put(Dst, 7671, 2+1, LJ_TISNUM, LJ_TISNUM); | 1451 | dasm_put(Dst, 7692, 2+1, LJ_TISNUM, LJ_TISNUM); |
1450 | } | 1452 | } |
1451 | dasm_put(Dst, 7737, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); | 1453 | dasm_put(Dst, 7758, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); |
1452 | dasm_put(Dst, 7815, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); | 1454 | dasm_put(Dst, 7836, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base)); |
1453 | dasm_put(Dst, 7939, Dt1(->top), Dt1(->base), Dt1(->top)); | 1455 | dasm_put(Dst, 7960, Dt1(->top), Dt1(->base), Dt1(->top)); |
1454 | #if LJ_HASJIT | 1456 | #if LJ_HASJIT |
1455 | dasm_put(Dst, 7977, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); | 1457 | dasm_put(Dst, 7998, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); |
1456 | #endif | 1458 | #endif |
1457 | dasm_put(Dst, 8008, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); | 1459 | dasm_put(Dst, 8029, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); |
1458 | dasm_put(Dst, 8059, Dt1(->base), Dt1(->base), GG_DISP2STATIC); | 1460 | dasm_put(Dst, 8080, Dt1(->base), Dt1(->base), GG_DISP2STATIC); |
1459 | #if LJ_HASJIT | 1461 | #if LJ_HASJIT |
1460 | dasm_put(Dst, 8125, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); | 1462 | dasm_put(Dst, 8146, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); |
1461 | #endif | 1463 | #endif |
1462 | dasm_put(Dst, 8171); | 1464 | dasm_put(Dst, 8192); |
1463 | #if LJ_HASJIT | 1465 | #if LJ_HASJIT |
1464 | dasm_put(Dst, 8003); | 1466 | dasm_put(Dst, 8024); |
1465 | #endif | 1467 | #endif |
1466 | dasm_put(Dst, 8178); | 1468 | dasm_put(Dst, 8199); |
1467 | #if LJ_HASJIT | 1469 | #if LJ_HASJIT |
1468 | dasm_put(Dst, 8181); | 1470 | dasm_put(Dst, 8202); |
1469 | #endif | 1471 | #endif |
1470 | dasm_put(Dst, 8191, Dt1(->base), Dt1(->top)); | 1472 | dasm_put(Dst, 8212, Dt1(->base), Dt1(->top)); |
1471 | #if LJ_HASJIT | 1473 | #if LJ_HASJIT |
1472 | dasm_put(Dst, 8225); | 1474 | dasm_put(Dst, 8246); |
1473 | #endif | 1475 | #endif |
1474 | dasm_put(Dst, 8230, Dt1(->base), Dt1(->top)); | 1476 | dasm_put(Dst, 8251, Dt1(->base), Dt1(->top)); |
1475 | #if LJ_HASJIT | 1477 | #if LJ_HASJIT |
1476 | dasm_put(Dst, 8259, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); | 1478 | dasm_put(Dst, 8280, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); |
1477 | #endif | 1479 | #endif |
1478 | dasm_put(Dst, 8402); | 1480 | dasm_put(Dst, 8423); |
1479 | #if LJ_HASJIT | 1481 | #if LJ_HASJIT |
1480 | dasm_put(Dst, 8405, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); | 1482 | dasm_put(Dst, 8426, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF); |
1481 | #endif | 1483 | #endif |
1482 | dasm_put(Dst, 8483); | 1484 | dasm_put(Dst, 8504); |
1483 | if (!sse) { | 1485 | if (!sse) { |
1484 | dasm_put(Dst, 8486); | 1486 | dasm_put(Dst, 8507); |
1485 | } | 1487 | } |
1486 | dasm_put(Dst, 8531); | 1488 | dasm_put(Dst, 8552); |
1487 | if (!sse) { | 1489 | if (!sse) { |
1488 | dasm_put(Dst, 8633); | 1490 | dasm_put(Dst, 8654); |
1489 | } | 1491 | } |
1490 | dasm_put(Dst, 8678); | 1492 | dasm_put(Dst, 8699); |
1491 | if (!sse) { | 1493 | if (!sse) { |
1492 | dasm_put(Dst, 8780); | 1494 | dasm_put(Dst, 8801); |
1493 | } | 1495 | } |
1494 | dasm_put(Dst, 8819); | 1496 | dasm_put(Dst, 8840); |
1495 | if (sse) { | 1497 | if (sse) { |
1496 | dasm_put(Dst, 8924); | 1498 | dasm_put(Dst, 8945); |
1497 | } else { | 1499 | } else { |
1498 | dasm_put(Dst, 9054); | 1500 | dasm_put(Dst, 9075); |
1499 | } | 1501 | } |
1500 | dasm_put(Dst, 9101); | 1502 | dasm_put(Dst, 9122); |
1501 | if (!sse) { | 1503 | if (!sse) { |
1502 | dasm_put(Dst, 9175); | 1504 | dasm_put(Dst, 9196); |
1503 | if (cmov) { | 1505 | if (cmov) { |
1504 | dasm_put(Dst, 9186); | 1506 | dasm_put(Dst, 9207); |
1505 | } else { | 1507 | } else { |
1506 | dasm_put(Dst, 9190); | 1508 | dasm_put(Dst, 9211); |
1507 | } | 1509 | } |
1508 | dasm_put(Dst, 9197); | 1510 | dasm_put(Dst, 9218); |
1509 | dasm_put(Dst, 9271); | 1511 | dasm_put(Dst, 9292); |
1510 | dasm_put(Dst, 9371); | 1512 | dasm_put(Dst, 9392); |
1511 | if (cmov) { | 1513 | if (cmov) { |
1512 | dasm_put(Dst, 9374); | 1514 | dasm_put(Dst, 9395); |
1513 | } else { | 1515 | } else { |
1514 | dasm_put(Dst, 9378); | 1516 | dasm_put(Dst, 9399); |
1515 | } | 1517 | } |
1516 | dasm_put(Dst, 9385); | 1518 | dasm_put(Dst, 9406); |
1517 | if (cmov) { | 1519 | if (cmov) { |
1518 | dasm_put(Dst, 9186); | 1520 | dasm_put(Dst, 9207); |
1519 | } else { | 1521 | } else { |
1520 | dasm_put(Dst, 9190); | 1522 | dasm_put(Dst, 9211); |
1521 | } | 1523 | } |
1522 | dasm_put(Dst, 9403); | 1524 | dasm_put(Dst, 9424); |
1523 | } else { | 1525 | } else { |
1524 | dasm_put(Dst, 9482); | 1526 | dasm_put(Dst, 9503); |
1525 | } | 1527 | } |
1526 | dasm_put(Dst, 9485); | 1528 | dasm_put(Dst, 9506); |
1527 | dasm_put(Dst, 9570); | 1529 | dasm_put(Dst, 9591); |
1528 | dasm_put(Dst, 9701); | 1530 | dasm_put(Dst, 9722); |
1529 | dasm_put(Dst, 9900); | 1531 | dasm_put(Dst, 9921); |
1530 | #if LJ_HASJIT | 1532 | #if LJ_HASJIT |
1531 | if (sse) { | 1533 | if (sse) { |
1532 | dasm_put(Dst, 9923); | 1534 | dasm_put(Dst, 9944); |
1533 | dasm_put(Dst, 9980); | 1535 | dasm_put(Dst, 10001); |
1534 | dasm_put(Dst, 10071); | 1536 | dasm_put(Dst, 10092); |
1535 | } else { | 1537 | } else { |
1536 | dasm_put(Dst, 10113); | 1538 | dasm_put(Dst, 10134); |
1537 | dasm_put(Dst, 10205); | 1539 | dasm_put(Dst, 10226); |
1538 | } | 1540 | } |
1539 | dasm_put(Dst, 10251); | 1541 | dasm_put(Dst, 10272); |
1540 | #endif | 1542 | #endif |
1541 | dasm_put(Dst, 10255); | 1543 | dasm_put(Dst, 10276); |
1542 | if (sse) { | 1544 | if (sse) { |
1543 | dasm_put(Dst, 10258); | 1545 | dasm_put(Dst, 10279); |
1544 | dasm_put(Dst, 10363); | 1546 | dasm_put(Dst, 10384); |
1545 | dasm_put(Dst, 10446); | 1547 | dasm_put(Dst, 10467); |
1546 | } else { | 1548 | } else { |
1547 | dasm_put(Dst, 10518); | 1549 | dasm_put(Dst, 10539); |
1548 | dasm_put(Dst, 10601); | 1550 | dasm_put(Dst, 10622); |
1549 | if (cmov) { | 1551 | if (cmov) { |
1550 | dasm_put(Dst, 10656); | 1552 | dasm_put(Dst, 10677); |
1551 | } else { | 1553 | } else { |
1552 | dasm_put(Dst, 10675); | 1554 | dasm_put(Dst, 10696); |
1553 | } | 1555 | } |
1554 | dasm_put(Dst, 10251); | 1556 | dasm_put(Dst, 10272); |
1555 | } | 1557 | } |
1556 | dasm_put(Dst, 10716); | 1558 | dasm_put(Dst, 10737); |
1557 | } | 1559 | } |
1558 | 1560 | ||
1559 | /* Generate the code for a single instruction. */ | 1561 | /* Generate the code for a single instruction. */ |
1560 | static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | 1562 | static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) |
1561 | { | 1563 | { |
1562 | int vk = 0; | 1564 | int vk = 0; |
1563 | dasm_put(Dst, 10770, defop); | 1565 | dasm_put(Dst, 10791, defop); |
1564 | 1566 | ||
1565 | switch (op) { | 1567 | switch (op) { |
1566 | 1568 | ||
@@ -1569,634 +1571,634 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
1569 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ | 1571 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ |
1570 | 1572 | ||
1571 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | 1573 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: |
1572 | dasm_put(Dst, 10772, LJ_TISNUM, LJ_TISNUM); | 1574 | dasm_put(Dst, 10793, LJ_TISNUM, LJ_TISNUM); |
1573 | if (sse) { | 1575 | if (sse) { |
1574 | dasm_put(Dst, 10793); | 1576 | dasm_put(Dst, 10814); |
1575 | } else { | 1577 | } else { |
1576 | dasm_put(Dst, 10808); | 1578 | dasm_put(Dst, 10829); |
1577 | if (cmov) { | 1579 | if (cmov) { |
1578 | dasm_put(Dst, 10818); | 1580 | dasm_put(Dst, 10839); |
1579 | } else { | 1581 | } else { |
1580 | dasm_put(Dst, 10824); | 1582 | dasm_put(Dst, 10845); |
1581 | } | 1583 | } |
1582 | } | 1584 | } |
1583 | switch (op) { | 1585 | switch (op) { |
1584 | case BC_ISLT: | 1586 | case BC_ISLT: |
1585 | dasm_put(Dst, 10831); | 1587 | dasm_put(Dst, 10852); |
1586 | break; | 1588 | break; |
1587 | case BC_ISGE: | 1589 | case BC_ISGE: |
1588 | dasm_put(Dst, 10066); | 1590 | dasm_put(Dst, 10087); |
1589 | break; | 1591 | break; |
1590 | case BC_ISLE: | 1592 | case BC_ISLE: |
1591 | dasm_put(Dst, 6192); | 1593 | dasm_put(Dst, 6213); |
1592 | break; | 1594 | break; |
1593 | case BC_ISGT: | 1595 | case BC_ISGT: |
1594 | dasm_put(Dst, 10836); | 1596 | dasm_put(Dst, 10857); |
1595 | break; | 1597 | break; |
1596 | default: break; /* Shut up GCC. */ | 1598 | default: break; /* Shut up GCC. */ |
1597 | } | 1599 | } |
1598 | dasm_put(Dst, 10841, -BCBIAS_J*4); | 1600 | dasm_put(Dst, 10862, -BCBIAS_J*4); |
1599 | break; | 1601 | break; |
1600 | 1602 | ||
1601 | case BC_ISEQV: case BC_ISNEV: | 1603 | case BC_ISEQV: case BC_ISNEV: |
1602 | vk = op == BC_ISEQV; | 1604 | vk = op == BC_ISEQV; |
1603 | dasm_put(Dst, 10874, LJ_TISNUM, LJ_TISNUM); | 1605 | dasm_put(Dst, 10895, LJ_TISNUM, LJ_TISNUM); |
1604 | if (sse) { | 1606 | if (sse) { |
1605 | dasm_put(Dst, 10900); | 1607 | dasm_put(Dst, 10921); |
1606 | } else { | 1608 | } else { |
1607 | dasm_put(Dst, 10912); | 1609 | dasm_put(Dst, 10933); |
1608 | if (cmov) { | 1610 | if (cmov) { |
1609 | dasm_put(Dst, 10818); | 1611 | dasm_put(Dst, 10839); |
1610 | } else { | 1612 | } else { |
1611 | dasm_put(Dst, 10824); | 1613 | dasm_put(Dst, 10845); |
1612 | } | 1614 | } |
1613 | } | 1615 | } |
1614 | iseqne_fp: | 1616 | iseqne_fp: |
1615 | if (vk) { | 1617 | if (vk) { |
1616 | dasm_put(Dst, 10919); | 1618 | dasm_put(Dst, 10940); |
1617 | } else { | 1619 | } else { |
1618 | dasm_put(Dst, 10928); | 1620 | dasm_put(Dst, 10949); |
1619 | } | 1621 | } |
1620 | iseqne_end: | 1622 | iseqne_end: |
1621 | if (vk) { | 1623 | if (vk) { |
1622 | dasm_put(Dst, 10937, -BCBIAS_J*4); | 1624 | dasm_put(Dst, 10958, -BCBIAS_J*4); |
1623 | } else { | 1625 | } else { |
1624 | dasm_put(Dst, 10952, -BCBIAS_J*4); | 1626 | dasm_put(Dst, 10973, -BCBIAS_J*4); |
1625 | } | 1627 | } |
1626 | dasm_put(Dst, 10855); | 1628 | dasm_put(Dst, 10876); |
1627 | if (op == BC_ISEQV || op == BC_ISNEV) { | 1629 | if (op == BC_ISEQV || op == BC_ISNEV) { |
1628 | dasm_put(Dst, 10967, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); | 1630 | dasm_put(Dst, 10988, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); |
1629 | if (vk) { | 1631 | if (vk) { |
1630 | dasm_put(Dst, 11025); | 1632 | dasm_put(Dst, 11046); |
1631 | } else { | 1633 | } else { |
1632 | dasm_put(Dst, 11029); | 1634 | dasm_put(Dst, 11050); |
1633 | } | 1635 | } |
1634 | dasm_put(Dst, 11035); | 1636 | dasm_put(Dst, 11056); |
1635 | } | 1637 | } |
1636 | break; | 1638 | break; |
1637 | case BC_ISEQS: case BC_ISNES: | 1639 | case BC_ISEQS: case BC_ISNES: |
1638 | vk = op == BC_ISEQS; | 1640 | vk = op == BC_ISEQS; |
1639 | dasm_put(Dst, 11040, LJ_TSTR); | 1641 | dasm_put(Dst, 11061, LJ_TSTR); |
1640 | iseqne_test: | 1642 | iseqne_test: |
1641 | if (vk) { | 1643 | if (vk) { |
1642 | dasm_put(Dst, 10923); | 1644 | dasm_put(Dst, 10944); |
1643 | } else { | 1645 | } else { |
1644 | dasm_put(Dst, 2814); | 1646 | dasm_put(Dst, 2835); |
1645 | } | 1647 | } |
1646 | goto iseqne_end; | 1648 | goto iseqne_end; |
1647 | case BC_ISEQN: case BC_ISNEN: | 1649 | case BC_ISEQN: case BC_ISNEN: |
1648 | vk = op == BC_ISEQN; | 1650 | vk = op == BC_ISEQN; |
1649 | dasm_put(Dst, 11063, LJ_TISNUM); | 1651 | dasm_put(Dst, 11084, LJ_TISNUM); |
1650 | if (sse) { | 1652 | if (sse) { |
1651 | dasm_put(Dst, 11077); | 1653 | dasm_put(Dst, 11098); |
1652 | } else { | 1654 | } else { |
1653 | dasm_put(Dst, 11089); | 1655 | dasm_put(Dst, 11110); |
1654 | if (cmov) { | 1656 | if (cmov) { |
1655 | dasm_put(Dst, 10818); | 1657 | dasm_put(Dst, 10839); |
1656 | } else { | 1658 | } else { |
1657 | dasm_put(Dst, 10824); | 1659 | dasm_put(Dst, 10845); |
1658 | } | 1660 | } |
1659 | } | 1661 | } |
1660 | goto iseqne_fp; | 1662 | goto iseqne_fp; |
1661 | case BC_ISEQP: case BC_ISNEP: | 1663 | case BC_ISEQP: case BC_ISNEP: |
1662 | vk = op == BC_ISEQP; | 1664 | vk = op == BC_ISEQP; |
1663 | dasm_put(Dst, 11096); | 1665 | dasm_put(Dst, 11117); |
1664 | goto iseqne_test; | 1666 | goto iseqne_test; |
1665 | 1667 | ||
1666 | /* -- Unary test and copy ops ------------------------------------------- */ | 1668 | /* -- Unary test and copy ops ------------------------------------------- */ |
1667 | 1669 | ||
1668 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | 1670 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: |
1669 | dasm_put(Dst, 11107, LJ_TISTRUECOND); | 1671 | dasm_put(Dst, 11128, LJ_TISTRUECOND); |
1670 | if (op == BC_IST || op == BC_ISTC) { | 1672 | if (op == BC_IST || op == BC_ISTC) { |
1671 | dasm_put(Dst, 11119); | 1673 | dasm_put(Dst, 11140); |
1672 | } else { | 1674 | } else { |
1673 | dasm_put(Dst, 11124); | 1675 | dasm_put(Dst, 11145); |
1674 | } | 1676 | } |
1675 | if (op == BC_ISTC || op == BC_ISFC) { | 1677 | if (op == BC_ISTC || op == BC_ISFC) { |
1676 | dasm_put(Dst, 11129); | 1678 | dasm_put(Dst, 11150); |
1677 | } | 1679 | } |
1678 | dasm_put(Dst, 11140, -BCBIAS_J*4); | 1680 | dasm_put(Dst, 11161, -BCBIAS_J*4); |
1679 | break; | 1681 | break; |
1680 | 1682 | ||
1681 | /* -- Unary ops --------------------------------------------------------- */ | 1683 | /* -- Unary ops --------------------------------------------------------- */ |
1682 | 1684 | ||
1683 | case BC_MOV: | 1685 | case BC_MOV: |
1684 | dasm_put(Dst, 11171); | 1686 | dasm_put(Dst, 11192); |
1685 | break; | 1687 | break; |
1686 | case BC_NOT: | 1688 | case BC_NOT: |
1687 | dasm_put(Dst, 11204, LJ_TISTRUECOND, LJ_TTRUE); | 1689 | dasm_put(Dst, 11225, LJ_TISTRUECOND, LJ_TTRUE); |
1688 | break; | 1690 | break; |
1689 | case BC_UNM: | 1691 | case BC_UNM: |
1690 | dasm_put(Dst, 11239, LJ_TISNUM); | 1692 | dasm_put(Dst, 11260, LJ_TISNUM); |
1691 | if (sse) { | 1693 | if (sse) { |
1692 | dasm_put(Dst, 11250); | 1694 | dasm_put(Dst, 11271); |
1693 | } else { | 1695 | } else { |
1694 | dasm_put(Dst, 11280); | 1696 | dasm_put(Dst, 11301); |
1695 | } | 1697 | } |
1696 | dasm_put(Dst, 10855); | 1698 | dasm_put(Dst, 10876); |
1697 | break; | 1699 | break; |
1698 | case BC_LEN: | 1700 | case BC_LEN: |
1699 | dasm_put(Dst, 11289, LJ_TSTR); | 1701 | dasm_put(Dst, 11310, LJ_TSTR); |
1700 | if (sse) { | 1702 | if (sse) { |
1701 | dasm_put(Dst, 11303, Dt5(->len)); | 1703 | dasm_put(Dst, 11324, Dt5(->len)); |
1702 | } else { | 1704 | } else { |
1703 | dasm_put(Dst, 11321, Dt5(->len)); | 1705 | dasm_put(Dst, 11342, Dt5(->len)); |
1704 | } | 1706 | } |
1705 | dasm_put(Dst, 11330, LJ_TTAB); | 1707 | dasm_put(Dst, 11351, LJ_TTAB); |
1706 | if (sse) { | 1708 | if (sse) { |
1707 | dasm_put(Dst, 11370); | 1709 | dasm_put(Dst, 11391); |
1708 | } else { | 1710 | } else { |
1709 | dasm_put(Dst, 11379); | 1711 | dasm_put(Dst, 11400); |
1710 | } | 1712 | } |
1711 | dasm_put(Dst, 11389); | 1713 | dasm_put(Dst, 11410); |
1712 | break; | 1714 | break; |
1713 | 1715 | ||
1714 | /* -- Binary ops -------------------------------------------------------- */ | 1716 | /* -- Binary ops -------------------------------------------------------- */ |
1715 | 1717 | ||
1716 | 1718 | ||
1717 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | 1719 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: |
1718 | dasm_put(Dst, 11399); | 1720 | dasm_put(Dst, 11420); |
1719 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1721 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1720 | switch (vk) { | 1722 | switch (vk) { |
1721 | case 0: | 1723 | case 0: |
1722 | dasm_put(Dst, 11407, LJ_TISNUM); | 1724 | dasm_put(Dst, 11428, LJ_TISNUM); |
1723 | if (sse) { | 1725 | if (sse) { |
1724 | dasm_put(Dst, 11419); | 1726 | dasm_put(Dst, 11440); |
1725 | } else { | 1727 | } else { |
1726 | dasm_put(Dst, 11433); | 1728 | dasm_put(Dst, 11454); |
1727 | } | 1729 | } |
1728 | break; | 1730 | break; |
1729 | case 1: | 1731 | case 1: |
1730 | dasm_put(Dst, 11441, LJ_TISNUM); | 1732 | dasm_put(Dst, 11462, LJ_TISNUM); |
1731 | if (sse) { | 1733 | if (sse) { |
1732 | dasm_put(Dst, 11453); | 1734 | dasm_put(Dst, 11474); |
1733 | } else { | 1735 | } else { |
1734 | dasm_put(Dst, 11467); | 1736 | dasm_put(Dst, 11488); |
1735 | } | 1737 | } |
1736 | break; | 1738 | break; |
1737 | default: | 1739 | default: |
1738 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1740 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1739 | if (sse) { | 1741 | if (sse) { |
1740 | dasm_put(Dst, 11497); | 1742 | dasm_put(Dst, 11518); |
1741 | } else { | 1743 | } else { |
1742 | dasm_put(Dst, 11511); | 1744 | dasm_put(Dst, 11532); |
1743 | } | 1745 | } |
1744 | break; | 1746 | break; |
1745 | } | 1747 | } |
1746 | if (sse) { | 1748 | if (sse) { |
1747 | dasm_put(Dst, 11273); | 1749 | dasm_put(Dst, 11294); |
1748 | } else { | 1750 | } else { |
1749 | dasm_put(Dst, 11285); | 1751 | dasm_put(Dst, 11306); |
1750 | } | 1752 | } |
1751 | dasm_put(Dst, 10855); | 1753 | dasm_put(Dst, 10876); |
1752 | break; | 1754 | break; |
1753 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | 1755 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |
1754 | dasm_put(Dst, 11399); | 1756 | dasm_put(Dst, 11420); |
1755 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1757 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1756 | switch (vk) { | 1758 | switch (vk) { |
1757 | case 0: | 1759 | case 0: |
1758 | dasm_put(Dst, 11407, LJ_TISNUM); | 1760 | dasm_put(Dst, 11428, LJ_TISNUM); |
1759 | if (sse) { | 1761 | if (sse) { |
1760 | dasm_put(Dst, 11519); | 1762 | dasm_put(Dst, 11540); |
1761 | } else { | 1763 | } else { |
1762 | dasm_put(Dst, 11533); | 1764 | dasm_put(Dst, 11554); |
1763 | } | 1765 | } |
1764 | break; | 1766 | break; |
1765 | case 1: | 1767 | case 1: |
1766 | dasm_put(Dst, 11441, LJ_TISNUM); | 1768 | dasm_put(Dst, 11462, LJ_TISNUM); |
1767 | if (sse) { | 1769 | if (sse) { |
1768 | dasm_put(Dst, 11541); | 1770 | dasm_put(Dst, 11562); |
1769 | } else { | 1771 | } else { |
1770 | dasm_put(Dst, 11555); | 1772 | dasm_put(Dst, 11576); |
1771 | } | 1773 | } |
1772 | break; | 1774 | break; |
1773 | default: | 1775 | default: |
1774 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1776 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1775 | if (sse) { | 1777 | if (sse) { |
1776 | dasm_put(Dst, 11563); | 1778 | dasm_put(Dst, 11584); |
1777 | } else { | 1779 | } else { |
1778 | dasm_put(Dst, 11577); | 1780 | dasm_put(Dst, 11598); |
1779 | } | 1781 | } |
1780 | break; | 1782 | break; |
1781 | } | 1783 | } |
1782 | if (sse) { | 1784 | if (sse) { |
1783 | dasm_put(Dst, 11273); | 1785 | dasm_put(Dst, 11294); |
1784 | } else { | 1786 | } else { |
1785 | dasm_put(Dst, 11285); | 1787 | dasm_put(Dst, 11306); |
1786 | } | 1788 | } |
1787 | dasm_put(Dst, 10855); | 1789 | dasm_put(Dst, 10876); |
1788 | break; | 1790 | break; |
1789 | case BC_MULVN: case BC_MULNV: case BC_MULVV: | 1791 | case BC_MULVN: case BC_MULNV: case BC_MULVV: |
1790 | dasm_put(Dst, 11399); | 1792 | dasm_put(Dst, 11420); |
1791 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1793 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1792 | switch (vk) { | 1794 | switch (vk) { |
1793 | case 0: | 1795 | case 0: |
1794 | dasm_put(Dst, 11407, LJ_TISNUM); | 1796 | dasm_put(Dst, 11428, LJ_TISNUM); |
1795 | if (sse) { | 1797 | if (sse) { |
1796 | dasm_put(Dst, 11585); | 1798 | dasm_put(Dst, 11606); |
1797 | } else { | 1799 | } else { |
1798 | dasm_put(Dst, 11599); | 1800 | dasm_put(Dst, 11620); |
1799 | } | 1801 | } |
1800 | break; | 1802 | break; |
1801 | case 1: | 1803 | case 1: |
1802 | dasm_put(Dst, 11441, LJ_TISNUM); | 1804 | dasm_put(Dst, 11462, LJ_TISNUM); |
1803 | if (sse) { | 1805 | if (sse) { |
1804 | dasm_put(Dst, 11607); | 1806 | dasm_put(Dst, 11628); |
1805 | } else { | 1807 | } else { |
1806 | dasm_put(Dst, 11621); | 1808 | dasm_put(Dst, 11642); |
1807 | } | 1809 | } |
1808 | break; | 1810 | break; |
1809 | default: | 1811 | default: |
1810 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1812 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1811 | if (sse) { | 1813 | if (sse) { |
1812 | dasm_put(Dst, 11629); | 1814 | dasm_put(Dst, 11650); |
1813 | } else { | 1815 | } else { |
1814 | dasm_put(Dst, 11643); | 1816 | dasm_put(Dst, 11664); |
1815 | } | 1817 | } |
1816 | break; | 1818 | break; |
1817 | } | 1819 | } |
1818 | if (sse) { | 1820 | if (sse) { |
1819 | dasm_put(Dst, 11273); | 1821 | dasm_put(Dst, 11294); |
1820 | } else { | 1822 | } else { |
1821 | dasm_put(Dst, 11285); | 1823 | dasm_put(Dst, 11306); |
1822 | } | 1824 | } |
1823 | dasm_put(Dst, 10855); | 1825 | dasm_put(Dst, 10876); |
1824 | break; | 1826 | break; |
1825 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | 1827 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: |
1826 | dasm_put(Dst, 11399); | 1828 | dasm_put(Dst, 11420); |
1827 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1829 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1828 | switch (vk) { | 1830 | switch (vk) { |
1829 | case 0: | 1831 | case 0: |
1830 | dasm_put(Dst, 11407, LJ_TISNUM); | 1832 | dasm_put(Dst, 11428, LJ_TISNUM); |
1831 | if (sse) { | 1833 | if (sse) { |
1832 | dasm_put(Dst, 11651); | 1834 | dasm_put(Dst, 11672); |
1833 | } else { | 1835 | } else { |
1834 | dasm_put(Dst, 11665); | 1836 | dasm_put(Dst, 11686); |
1835 | } | 1837 | } |
1836 | break; | 1838 | break; |
1837 | case 1: | 1839 | case 1: |
1838 | dasm_put(Dst, 11441, LJ_TISNUM); | 1840 | dasm_put(Dst, 11462, LJ_TISNUM); |
1839 | if (sse) { | 1841 | if (sse) { |
1840 | dasm_put(Dst, 11673); | 1842 | dasm_put(Dst, 11694); |
1841 | } else { | 1843 | } else { |
1842 | dasm_put(Dst, 11687); | 1844 | dasm_put(Dst, 11708); |
1843 | } | 1845 | } |
1844 | break; | 1846 | break; |
1845 | default: | 1847 | default: |
1846 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1848 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1847 | if (sse) { | 1849 | if (sse) { |
1848 | dasm_put(Dst, 11695); | 1850 | dasm_put(Dst, 11716); |
1849 | } else { | 1851 | } else { |
1850 | dasm_put(Dst, 11709); | 1852 | dasm_put(Dst, 11730); |
1851 | } | 1853 | } |
1852 | break; | 1854 | break; |
1853 | } | 1855 | } |
1854 | if (sse) { | 1856 | if (sse) { |
1855 | dasm_put(Dst, 11273); | 1857 | dasm_put(Dst, 11294); |
1856 | } else { | 1858 | } else { |
1857 | dasm_put(Dst, 11285); | 1859 | dasm_put(Dst, 11306); |
1858 | } | 1860 | } |
1859 | dasm_put(Dst, 10855); | 1861 | dasm_put(Dst, 10876); |
1860 | break; | 1862 | break; |
1861 | case BC_MODVN: | 1863 | case BC_MODVN: |
1862 | dasm_put(Dst, 11399); | 1864 | dasm_put(Dst, 11420); |
1863 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1865 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1864 | switch (vk) { | 1866 | switch (vk) { |
1865 | case 0: | 1867 | case 0: |
1866 | dasm_put(Dst, 11407, LJ_TISNUM); | 1868 | dasm_put(Dst, 11428, LJ_TISNUM); |
1867 | if (sse) { | 1869 | if (sse) { |
1868 | dasm_put(Dst, 11717); | 1870 | dasm_put(Dst, 11738); |
1869 | } else { | 1871 | } else { |
1870 | dasm_put(Dst, 11731); | 1872 | dasm_put(Dst, 11752); |
1871 | } | 1873 | } |
1872 | break; | 1874 | break; |
1873 | case 1: | 1875 | case 1: |
1874 | dasm_put(Dst, 11441, LJ_TISNUM); | 1876 | dasm_put(Dst, 11462, LJ_TISNUM); |
1875 | if (sse) { | 1877 | if (sse) { |
1876 | dasm_put(Dst, 11739); | 1878 | dasm_put(Dst, 11760); |
1877 | } else { | 1879 | } else { |
1878 | dasm_put(Dst, 11753); | 1880 | dasm_put(Dst, 11774); |
1879 | } | 1881 | } |
1880 | break; | 1882 | break; |
1881 | default: | 1883 | default: |
1882 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1884 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1883 | if (sse) { | 1885 | if (sse) { |
1884 | dasm_put(Dst, 11761); | 1886 | dasm_put(Dst, 11782); |
1885 | } else { | 1887 | } else { |
1886 | dasm_put(Dst, 11775); | 1888 | dasm_put(Dst, 11796); |
1887 | } | 1889 | } |
1888 | break; | 1890 | break; |
1889 | } | 1891 | } |
1890 | dasm_put(Dst, 11783); | 1892 | dasm_put(Dst, 11804); |
1891 | if (sse) { | 1893 | if (sse) { |
1892 | dasm_put(Dst, 11273); | 1894 | dasm_put(Dst, 11294); |
1893 | } else { | 1895 | } else { |
1894 | dasm_put(Dst, 11285); | 1896 | dasm_put(Dst, 11306); |
1895 | } | 1897 | } |
1896 | dasm_put(Dst, 10855); | 1898 | dasm_put(Dst, 10876); |
1897 | break; | 1899 | break; |
1898 | case BC_MODNV: case BC_MODVV: | 1900 | case BC_MODNV: case BC_MODVV: |
1899 | dasm_put(Dst, 11399); | 1901 | dasm_put(Dst, 11420); |
1900 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1902 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1901 | switch (vk) { | 1903 | switch (vk) { |
1902 | case 0: | 1904 | case 0: |
1903 | dasm_put(Dst, 11407, LJ_TISNUM); | 1905 | dasm_put(Dst, 11428, LJ_TISNUM); |
1904 | if (sse) { | 1906 | if (sse) { |
1905 | dasm_put(Dst, 11717); | 1907 | dasm_put(Dst, 11738); |
1906 | } else { | 1908 | } else { |
1907 | dasm_put(Dst, 11731); | 1909 | dasm_put(Dst, 11752); |
1908 | } | 1910 | } |
1909 | break; | 1911 | break; |
1910 | case 1: | 1912 | case 1: |
1911 | dasm_put(Dst, 11441, LJ_TISNUM); | 1913 | dasm_put(Dst, 11462, LJ_TISNUM); |
1912 | if (sse) { | 1914 | if (sse) { |
1913 | dasm_put(Dst, 11739); | 1915 | dasm_put(Dst, 11760); |
1914 | } else { | 1916 | } else { |
1915 | dasm_put(Dst, 11753); | 1917 | dasm_put(Dst, 11774); |
1916 | } | 1918 | } |
1917 | break; | 1919 | break; |
1918 | default: | 1920 | default: |
1919 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1921 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1920 | if (sse) { | 1922 | if (sse) { |
1921 | dasm_put(Dst, 11761); | 1923 | dasm_put(Dst, 11782); |
1922 | } else { | 1924 | } else { |
1923 | dasm_put(Dst, 11775); | 1925 | dasm_put(Dst, 11796); |
1924 | } | 1926 | } |
1925 | break; | 1927 | break; |
1926 | } | 1928 | } |
1927 | dasm_put(Dst, 11789); | 1929 | dasm_put(Dst, 11810); |
1928 | break; | 1930 | break; |
1929 | case BC_POW: | 1931 | case BC_POW: |
1930 | dasm_put(Dst, 11399); | 1932 | dasm_put(Dst, 11420); |
1931 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 1933 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
1932 | switch (vk) { | 1934 | switch (vk) { |
1933 | case 0: | 1935 | case 0: |
1934 | dasm_put(Dst, 11407, LJ_TISNUM); | 1936 | dasm_put(Dst, 11428, LJ_TISNUM); |
1935 | if (sse) { | 1937 | if (sse) { |
1936 | dasm_put(Dst, 11717); | 1938 | dasm_put(Dst, 11738); |
1937 | } else { | 1939 | } else { |
1938 | dasm_put(Dst, 11731); | 1940 | dasm_put(Dst, 11752); |
1939 | } | 1941 | } |
1940 | break; | 1942 | break; |
1941 | case 1: | 1943 | case 1: |
1942 | dasm_put(Dst, 11441, LJ_TISNUM); | 1944 | dasm_put(Dst, 11462, LJ_TISNUM); |
1943 | if (sse) { | 1945 | if (sse) { |
1944 | dasm_put(Dst, 11739); | 1946 | dasm_put(Dst, 11760); |
1945 | } else { | 1947 | } else { |
1946 | dasm_put(Dst, 11753); | 1948 | dasm_put(Dst, 11774); |
1947 | } | 1949 | } |
1948 | break; | 1950 | break; |
1949 | default: | 1951 | default: |
1950 | dasm_put(Dst, 11475, LJ_TISNUM, LJ_TISNUM); | 1952 | dasm_put(Dst, 11496, LJ_TISNUM, LJ_TISNUM); |
1951 | if (sse) { | 1953 | if (sse) { |
1952 | dasm_put(Dst, 11761); | 1954 | dasm_put(Dst, 11782); |
1953 | } else { | 1955 | } else { |
1954 | dasm_put(Dst, 11775); | 1956 | dasm_put(Dst, 11796); |
1955 | } | 1957 | } |
1956 | break; | 1958 | break; |
1957 | } | 1959 | } |
1958 | dasm_put(Dst, 11794); | 1960 | dasm_put(Dst, 11815); |
1959 | if (sse) { | 1961 | if (sse) { |
1960 | dasm_put(Dst, 11273); | 1962 | dasm_put(Dst, 11294); |
1961 | } else { | 1963 | } else { |
1962 | dasm_put(Dst, 11285); | 1964 | dasm_put(Dst, 11306); |
1963 | } | 1965 | } |
1964 | dasm_put(Dst, 10855); | 1966 | dasm_put(Dst, 10876); |
1965 | break; | 1967 | break; |
1966 | 1968 | ||
1967 | case BC_CAT: | 1969 | case BC_CAT: |
1968 | dasm_put(Dst, 11798, Dt1(->base), Dt1(->base)); | 1970 | dasm_put(Dst, 11819, Dt1(->base), Dt1(->base)); |
1969 | break; | 1971 | break; |
1970 | 1972 | ||
1971 | /* -- Constant ops ------------------------------------------------------ */ | 1973 | /* -- Constant ops ------------------------------------------------------ */ |
1972 | 1974 | ||
1973 | case BC_KSTR: | 1975 | case BC_KSTR: |
1974 | dasm_put(Dst, 11892, LJ_TSTR); | 1976 | dasm_put(Dst, 11913, LJ_TSTR); |
1975 | break; | 1977 | break; |
1976 | case BC_KSHORT: | 1978 | case BC_KSHORT: |
1977 | if (sse) { | 1979 | if (sse) { |
1978 | dasm_put(Dst, 11925); | 1980 | dasm_put(Dst, 11946); |
1979 | } else { | 1981 | } else { |
1980 | dasm_put(Dst, 11940); | 1982 | dasm_put(Dst, 11961); |
1981 | } | 1983 | } |
1982 | dasm_put(Dst, 10855); | 1984 | dasm_put(Dst, 10876); |
1983 | break; | 1985 | break; |
1984 | case BC_KNUM: | 1986 | case BC_KNUM: |
1985 | if (sse) { | 1987 | if (sse) { |
1986 | dasm_put(Dst, 11948); | 1988 | dasm_put(Dst, 11969); |
1987 | } else { | 1989 | } else { |
1988 | dasm_put(Dst, 11961); | 1990 | dasm_put(Dst, 11982); |
1989 | } | 1991 | } |
1990 | dasm_put(Dst, 10855); | 1992 | dasm_put(Dst, 10876); |
1991 | break; | 1993 | break; |
1992 | case BC_KPRI: | 1994 | case BC_KPRI: |
1993 | dasm_put(Dst, 11968); | 1995 | dasm_put(Dst, 11989); |
1994 | break; | 1996 | break; |
1995 | case BC_KNIL: | 1997 | case BC_KNIL: |
1996 | dasm_put(Dst, 11994, LJ_TNIL); | 1998 | dasm_put(Dst, 12015, LJ_TNIL); |
1997 | break; | 1999 | break; |
1998 | 2000 | ||
1999 | /* -- Upvalue and function ops ------------------------------------------ */ | 2001 | /* -- Upvalue and function ops ------------------------------------------ */ |
2000 | 2002 | ||
2001 | case BC_UGET: | 2003 | case BC_UGET: |
2002 | dasm_put(Dst, 12040, offsetof(GCfuncL, uvptr), DtA(->v)); | 2004 | dasm_put(Dst, 12061, offsetof(GCfuncL, uvptr), DtA(->v)); |
2003 | break; | 2005 | break; |
2004 | case BC_USETV: | 2006 | case BC_USETV: |
2005 | #define TV2MARKOFS \ | 2007 | #define TV2MARKOFS \ |
2006 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) | 2008 | ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) |
2007 | dasm_put(Dst, 12084, 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); | 2009 | dasm_put(Dst, 12105, 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); |
2008 | dasm_put(Dst, 12174); | 2010 | dasm_put(Dst, 12195); |
2009 | break; | 2011 | break; |
2010 | #undef TV2MARKOFS | 2012 | #undef TV2MARKOFS |
2011 | case BC_USETS: | 2013 | case BC_USETS: |
2012 | dasm_put(Dst, 12186, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); | 2014 | dasm_put(Dst, 12207, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); |
2013 | break; | 2015 | break; |
2014 | case BC_USETN: | 2016 | case BC_USETN: |
2015 | dasm_put(Dst, 12277); | 2017 | dasm_put(Dst, 12298); |
2016 | if (sse) { | 2018 | if (sse) { |
2017 | dasm_put(Dst, 12282); | 2019 | dasm_put(Dst, 12303); |
2018 | } else { | 2020 | } else { |
2019 | dasm_put(Dst, 11092); | 2021 | dasm_put(Dst, 11113); |
2020 | } | 2022 | } |
2021 | dasm_put(Dst, 12289, offsetof(GCfuncL, uvptr), DtA(->v)); | 2023 | dasm_put(Dst, 12310, offsetof(GCfuncL, uvptr), DtA(->v)); |
2022 | if (sse) { | 2024 | if (sse) { |
2023 | dasm_put(Dst, 12298); | 2025 | dasm_put(Dst, 12319); |
2024 | } else { | 2026 | } else { |
2025 | dasm_put(Dst, 12304); | 2027 | dasm_put(Dst, 12325); |
2026 | } | 2028 | } |
2027 | dasm_put(Dst, 10855); | 2029 | dasm_put(Dst, 10876); |
2028 | break; | 2030 | break; |
2029 | case BC_USETP: | 2031 | case BC_USETP: |
2030 | dasm_put(Dst, 12307, offsetof(GCfuncL, uvptr), DtA(->v)); | 2032 | dasm_put(Dst, 12328, offsetof(GCfuncL, uvptr), DtA(->v)); |
2031 | break; | 2033 | break; |
2032 | case BC_UCLO: | 2034 | case BC_UCLO: |
2033 | dasm_put(Dst, 12344, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); | 2035 | dasm_put(Dst, 12365, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); |
2034 | break; | 2036 | break; |
2035 | 2037 | ||
2036 | case BC_FNEW: | 2038 | case BC_FNEW: |
2037 | dasm_put(Dst, 12398, Dt1(->base), Dt1(->base), LJ_TFUNC); | 2039 | dasm_put(Dst, 12419, Dt1(->base), Dt1(->base), LJ_TFUNC); |
2038 | break; | 2040 | break; |
2039 | 2041 | ||
2040 | /* -- Table ops --------------------------------------------------------- */ | 2042 | /* -- Table ops --------------------------------------------------------- */ |
2041 | 2043 | ||
2042 | case BC_TNEW: | 2044 | case BC_TNEW: |
2043 | dasm_put(Dst, 12469, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); | 2045 | dasm_put(Dst, 12490, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); |
2044 | break; | 2046 | break; |
2045 | case BC_TDUP: | 2047 | case BC_TDUP: |
2046 | dasm_put(Dst, 12595, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); | 2048 | dasm_put(Dst, 12616, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); |
2047 | break; | 2049 | break; |
2048 | 2050 | ||
2049 | case BC_GGET: | 2051 | case BC_GGET: |
2050 | dasm_put(Dst, 12687, Dt7(->env)); | 2052 | dasm_put(Dst, 12708, Dt7(->env)); |
2051 | break; | 2053 | break; |
2052 | case BC_GSET: | 2054 | case BC_GSET: |
2053 | dasm_put(Dst, 12705, Dt7(->env)); | 2055 | dasm_put(Dst, 12726, Dt7(->env)); |
2054 | break; | 2056 | break; |
2055 | 2057 | ||
2056 | case BC_TGETV: | 2058 | case BC_TGETV: |
2057 | dasm_put(Dst, 12723, LJ_TTAB, LJ_TISNUM); | 2059 | dasm_put(Dst, 12744, LJ_TTAB, LJ_TISNUM); |
2058 | if (sse) { | 2060 | if (sse) { |
2059 | dasm_put(Dst, 12756); | ||
2060 | } else { | ||
2061 | dasm_put(Dst, 12777); | 2061 | dasm_put(Dst, 12777); |
2062 | } else { | ||
2063 | dasm_put(Dst, 12798); | ||
2062 | if (cmov) { | 2064 | if (cmov) { |
2063 | dasm_put(Dst, 10818); | 2065 | dasm_put(Dst, 10839); |
2064 | } else { | 2066 | } else { |
2065 | dasm_put(Dst, 10824); | 2067 | dasm_put(Dst, 10845); |
2066 | } | 2068 | } |
2067 | dasm_put(Dst, 2527); | 2069 | dasm_put(Dst, 2538); |
2068 | } | 2070 | } |
2069 | dasm_put(Dst, 12787, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 2071 | dasm_put(Dst, 12808, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
2070 | dasm_put(Dst, 12875, LJ_TNIL, LJ_TSTR); | 2072 | dasm_put(Dst, 12896, LJ_TNIL, LJ_TSTR); |
2071 | break; | 2073 | break; |
2072 | case BC_TGETS: | 2074 | case BC_TGETS: |
2073 | dasm_put(Dst, 12904, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 2075 | dasm_put(Dst, 12925, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
2074 | dasm_put(Dst, 12992, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 2076 | dasm_put(Dst, 13013, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
2075 | break; | 2077 | break; |
2076 | case BC_TGETB: | 2078 | case BC_TGETB: |
2077 | dasm_put(Dst, 13062, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 2079 | dasm_put(Dst, 13083, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
2078 | dasm_put(Dst, 13161, LJ_TNIL); | 2080 | dasm_put(Dst, 13182, LJ_TNIL); |
2079 | break; | 2081 | break; |
2080 | 2082 | ||
2081 | case BC_TSETV: | 2083 | case BC_TSETV: |
2082 | dasm_put(Dst, 13178, LJ_TTAB, LJ_TISNUM); | 2084 | dasm_put(Dst, 13199, LJ_TTAB, LJ_TISNUM); |
2083 | if (sse) { | 2085 | if (sse) { |
2084 | dasm_put(Dst, 12756); | ||
2085 | } else { | ||
2086 | dasm_put(Dst, 12777); | 2086 | dasm_put(Dst, 12777); |
2087 | } else { | ||
2088 | dasm_put(Dst, 12798); | ||
2087 | if (cmov) { | 2089 | if (cmov) { |
2088 | dasm_put(Dst, 10818); | 2090 | dasm_put(Dst, 10839); |
2089 | } else { | 2091 | } else { |
2090 | dasm_put(Dst, 10824); | 2092 | dasm_put(Dst, 10845); |
2091 | } | 2093 | } |
2092 | dasm_put(Dst, 2527); | 2094 | dasm_put(Dst, 2538); |
2093 | } | 2095 | } |
2094 | dasm_put(Dst, 13211, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); | 2096 | dasm_put(Dst, 13232, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); |
2095 | dasm_put(Dst, 13294, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 2097 | dasm_put(Dst, 13315, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
2096 | break; | 2098 | break; |
2097 | case BC_TSETS: | 2099 | case BC_TSETS: |
2098 | dasm_put(Dst, 13356, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); | 2100 | dasm_put(Dst, 13377, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); |
2099 | dasm_put(Dst, 13431, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); | 2101 | dasm_put(Dst, 13452, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); |
2100 | dasm_put(Dst, 13523, 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)); | 2102 | dasm_put(Dst, 13544, 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)); |
2101 | break; | 2103 | break; |
2102 | case BC_TSETB: | 2104 | case BC_TSETB: |
2103 | dasm_put(Dst, 13619, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); | 2105 | dasm_put(Dst, 13640, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); |
2104 | dasm_put(Dst, 13717, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 2106 | dasm_put(Dst, 13738, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
2105 | break; | 2107 | break; |
2106 | 2108 | ||
2107 | case BC_TSETM: | 2109 | case BC_TSETM: |
2108 | dasm_put(Dst, 13763, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); | 2110 | dasm_put(Dst, 13784, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); |
2109 | dasm_put(Dst, 13912, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); | 2111 | dasm_put(Dst, 13933, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); |
2110 | break; | 2112 | break; |
2111 | 2113 | ||
2112 | /* -- Calls and vararg handling ----------------------------------------- */ | 2114 | /* -- Calls and vararg handling ----------------------------------------- */ |
2113 | 2115 | ||
2114 | case BC_CALL: case BC_CALLM: | 2116 | case BC_CALL: case BC_CALLM: |
2115 | dasm_put(Dst, 11403); | 2117 | dasm_put(Dst, 11424); |
2116 | if (op == BC_CALLM) { | 2118 | if (op == BC_CALLM) { |
2117 | dasm_put(Dst, 13930); | 2119 | dasm_put(Dst, 13951); |
2118 | } | 2120 | } |
2119 | dasm_put(Dst, 13935, LJ_TFUNC, Dt7(->pc)); | 2121 | dasm_put(Dst, 13956, LJ_TFUNC, Dt7(->pc)); |
2120 | break; | 2122 | break; |
2121 | 2123 | ||
2122 | case BC_CALLMT: | 2124 | case BC_CALLMT: |
2123 | dasm_put(Dst, 13930); | 2125 | dasm_put(Dst, 13951); |
2124 | break; | 2126 | break; |
2125 | case BC_CALLT: | 2127 | case BC_CALLT: |
2126 | dasm_put(Dst, 13976, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); | 2128 | dasm_put(Dst, 13997, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); |
2127 | dasm_put(Dst, 14094, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); | 2129 | dasm_put(Dst, 14115, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); |
2128 | break; | 2130 | break; |
2129 | 2131 | ||
2130 | case BC_ITERC: | 2132 | case BC_ITERC: |
2131 | dasm_put(Dst, 14164, LJ_TFUNC, 2+1, Dt7(->pc)); | 2133 | dasm_put(Dst, 14185, LJ_TFUNC, 2+1, Dt7(->pc)); |
2132 | break; | 2134 | break; |
2133 | 2135 | ||
2134 | case BC_ITERN: | 2136 | case BC_ITERN: |
2135 | #if LJ_HASJIT | 2137 | #if LJ_HASJIT |
2136 | #endif | 2138 | #endif |
2137 | dasm_put(Dst, 14244, Dt6(->asize), Dt6(->array), LJ_TNIL); | 2139 | dasm_put(Dst, 14265, Dt6(->asize), Dt6(->array), LJ_TNIL); |
2138 | if (sse) { | 2140 | if (sse) { |
2139 | dasm_put(Dst, 14290); | 2141 | dasm_put(Dst, 14311); |
2140 | } else { | 2142 | } else { |
2141 | dasm_put(Dst, 14296); | 2143 | dasm_put(Dst, 14317); |
2142 | } | 2144 | } |
2143 | dasm_put(Dst, 14302); | 2145 | dasm_put(Dst, 14323); |
2144 | if (sse) { | 2146 | if (sse) { |
2145 | dasm_put(Dst, 11273); | 2147 | dasm_put(Dst, 11294); |
2146 | } else { | 2148 | } else { |
2147 | dasm_put(Dst, 11285); | 2149 | dasm_put(Dst, 11306); |
2148 | } | 2150 | } |
2149 | dasm_put(Dst, 14321, -BCBIAS_J*4); | 2151 | dasm_put(Dst, 14342, -BCBIAS_J*4); |
2150 | if (!sse) { | 2152 | if (!sse) { |
2151 | dasm_put(Dst, 14372); | 2153 | dasm_put(Dst, 14393); |
2152 | } | 2154 | } |
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)); | 2155 | dasm_put(Dst, 14399, 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); | 2156 | dasm_put(Dst, 14474); |
2155 | break; | 2157 | break; |
2156 | 2158 | ||
2157 | case BC_ISNEXT: | 2159 | 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); | 2160 | dasm_put(Dst, 14482, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); |
2159 | break; | 2161 | break; |
2160 | 2162 | ||
2161 | case BC_VARG: | 2163 | case BC_VARG: |
2162 | dasm_put(Dst, 14560, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); | 2164 | dasm_put(Dst, 14581, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); |
2163 | dasm_put(Dst, 14724, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 2165 | dasm_put(Dst, 14745, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); |
2164 | break; | 2166 | break; |
2165 | 2167 | ||
2166 | /* -- Returns ----------------------------------------------------------- */ | 2168 | /* -- Returns ----------------------------------------------------------- */ |
2167 | 2169 | ||
2168 | case BC_RETM: | 2170 | case BC_RETM: |
2169 | dasm_put(Dst, 13930); | 2171 | dasm_put(Dst, 13951); |
2170 | break; | 2172 | break; |
2171 | 2173 | ||
2172 | case BC_RET: case BC_RET0: case BC_RET1: | 2174 | case BC_RET: case BC_RET0: case BC_RET1: |
2173 | if (op != BC_RET0) { | 2175 | if (op != BC_RET0) { |
2174 | dasm_put(Dst, 14795); | 2176 | dasm_put(Dst, 14816); |
2175 | } | 2177 | } |
2176 | dasm_put(Dst, 14799, FRAME_TYPE); | 2178 | dasm_put(Dst, 14820, FRAME_TYPE); |
2177 | switch (op) { | 2179 | switch (op) { |
2178 | case BC_RET: | 2180 | case BC_RET: |
2179 | dasm_put(Dst, 14818); | 2181 | dasm_put(Dst, 14839); |
2180 | break; | 2182 | break; |
2181 | case BC_RET1: | 2183 | case BC_RET1: |
2182 | dasm_put(Dst, 14876); | 2184 | dasm_put(Dst, 14897); |
2183 | /* fallthrough */ | 2185 | /* fallthrough */ |
2184 | case BC_RET0: | 2186 | case BC_RET0: |
2185 | dasm_put(Dst, 14892); | 2187 | dasm_put(Dst, 14913); |
2186 | default: | 2188 | default: |
2187 | break; | 2189 | break; |
2188 | } | 2190 | } |
2189 | dasm_put(Dst, 14903, Dt7(->pc), PC2PROTO(k)); | 2191 | dasm_put(Dst, 14924, Dt7(->pc), PC2PROTO(k)); |
2190 | if (op == BC_RET) { | 2192 | if (op == BC_RET) { |
2191 | dasm_put(Dst, 14945, LJ_TNIL); | 2193 | dasm_put(Dst, 14966, LJ_TNIL); |
2192 | } else { | 2194 | } else { |
2193 | dasm_put(Dst, 14954, LJ_TNIL); | 2195 | dasm_put(Dst, 14975, LJ_TNIL); |
2194 | } | 2196 | } |
2195 | dasm_put(Dst, 14961, -FRAME_VARG, FRAME_TYPEP); | 2197 | dasm_put(Dst, 14982, -FRAME_VARG, FRAME_TYPEP); |
2196 | if (op != BC_RET0) { | 2198 | if (op != BC_RET0) { |
2197 | dasm_put(Dst, 14985); | 2199 | dasm_put(Dst, 15006); |
2198 | } | 2200 | } |
2199 | dasm_put(Dst, 4689); | 2201 | dasm_put(Dst, 4710); |
2200 | break; | 2202 | break; |
2201 | 2203 | ||
2202 | /* -- Loops and branches ------------------------------------------------ */ | 2204 | /* -- Loops and branches ------------------------------------------------ */ |
@@ -2204,7 +2206,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2204 | 2206 | ||
2205 | case BC_FORL: | 2207 | case BC_FORL: |
2206 | #if LJ_HASJIT | 2208 | #if LJ_HASJIT |
2207 | dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2209 | dasm_put(Dst, 15010, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2208 | #endif | 2210 | #endif |
2209 | break; | 2211 | break; |
2210 | 2212 | ||
@@ -2216,57 +2218,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2216 | case BC_FORI: | 2218 | case BC_FORI: |
2217 | case BC_IFORL: | 2219 | case BC_IFORL: |
2218 | vk = (op == BC_IFORL || op == BC_JFORL); | 2220 | vk = (op == BC_IFORL || op == BC_JFORL); |
2219 | dasm_put(Dst, 15010); | 2221 | dasm_put(Dst, 15031); |
2220 | if (!vk) { | 2222 | if (!vk) { |
2221 | dasm_put(Dst, 15014, LJ_TISNUM, LJ_TISNUM); | 2223 | dasm_put(Dst, 15035, LJ_TISNUM, LJ_TISNUM); |
2222 | } | 2224 | } |
2223 | dasm_put(Dst, 15033); | 2225 | dasm_put(Dst, 15054); |
2224 | if (!vk) { | 2226 | if (!vk) { |
2225 | dasm_put(Dst, 15037, LJ_TISNUM); | 2227 | dasm_put(Dst, 15058, LJ_TISNUM); |
2226 | } | 2228 | } |
2227 | if (sse) { | 2229 | if (sse) { |
2228 | dasm_put(Dst, 15046); | 2230 | dasm_put(Dst, 15067); |
2229 | if (vk) { | 2231 | if (vk) { |
2230 | dasm_put(Dst, 15058); | 2232 | dasm_put(Dst, 15079); |
2231 | } else { | 2233 | } else { |
2232 | dasm_put(Dst, 15077); | 2234 | dasm_put(Dst, 15098); |
2233 | } | 2235 | } |
2234 | dasm_put(Dst, 15082); | 2236 | dasm_put(Dst, 15103); |
2235 | } else { | 2237 | } else { |
2236 | dasm_put(Dst, 15095); | 2238 | dasm_put(Dst, 15116); |
2237 | if (vk) { | 2239 | if (vk) { |
2238 | dasm_put(Dst, 15101); | 2240 | dasm_put(Dst, 15122); |
2239 | } else { | 2241 | } else { |
2240 | dasm_put(Dst, 15117); | 2242 | dasm_put(Dst, 15138); |
2241 | } | 2243 | } |
2242 | dasm_put(Dst, 15125); | 2244 | dasm_put(Dst, 15146); |
2243 | if (cmov) { | 2245 | if (cmov) { |
2244 | dasm_put(Dst, 10818); | 2246 | dasm_put(Dst, 10839); |
2245 | } else { | 2247 | } else { |
2246 | dasm_put(Dst, 10824); | 2248 | dasm_put(Dst, 10845); |
2247 | } | 2249 | } |
2248 | if (!cmov) { | 2250 | if (!cmov) { |
2249 | dasm_put(Dst, 15130); | 2251 | dasm_put(Dst, 15151); |
2250 | } | 2252 | } |
2251 | } | 2253 | } |
2252 | if (op == BC_FORI) { | 2254 | if (op == BC_FORI) { |
2253 | dasm_put(Dst, 15136, -BCBIAS_J*4); | 2255 | dasm_put(Dst, 15157, -BCBIAS_J*4); |
2254 | } else if (op == BC_JFORI) { | 2256 | } else if (op == BC_JFORI) { |
2255 | dasm_put(Dst, 15146, -BCBIAS_J*4, BC_JLOOP); | 2257 | dasm_put(Dst, 15167, -BCBIAS_J*4, BC_JLOOP); |
2256 | } else if (op == BC_IFORL) { | 2258 | } else if (op == BC_IFORL) { |
2257 | dasm_put(Dst, 15160, -BCBIAS_J*4); | 2259 | dasm_put(Dst, 15181, -BCBIAS_J*4); |
2258 | } else { | 2260 | } else { |
2259 | dasm_put(Dst, 15156, BC_JLOOP); | 2261 | dasm_put(Dst, 15177, BC_JLOOP); |
2260 | } | 2262 | } |
2261 | dasm_put(Dst, 10853); | 2263 | dasm_put(Dst, 10874); |
2262 | if (sse) { | 2264 | if (sse) { |
2263 | dasm_put(Dst, 15170); | 2265 | dasm_put(Dst, 15191); |
2264 | } | 2266 | } |
2265 | break; | 2267 | break; |
2266 | 2268 | ||
2267 | case BC_ITERL: | 2269 | case BC_ITERL: |
2268 | #if LJ_HASJIT | 2270 | #if LJ_HASJIT |
2269 | dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2271 | dasm_put(Dst, 15010, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2270 | #endif | 2272 | #endif |
2271 | break; | 2273 | break; |
2272 | 2274 | ||
@@ -2275,33 +2277,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2275 | break; | 2277 | break; |
2276 | #endif | 2278 | #endif |
2277 | case BC_IITERL: | 2279 | case BC_IITERL: |
2278 | dasm_put(Dst, 15181, LJ_TNIL); | 2280 | dasm_put(Dst, 15202, LJ_TNIL); |
2279 | if (op == BC_JITERL) { | 2281 | if (op == BC_JITERL) { |
2280 | dasm_put(Dst, 15196, BC_JLOOP); | 2282 | dasm_put(Dst, 15217, BC_JLOOP); |
2281 | } else { | 2283 | } else { |
2282 | dasm_put(Dst, 15210, -BCBIAS_J*4); | 2284 | dasm_put(Dst, 15231, -BCBIAS_J*4); |
2283 | } | 2285 | } |
2284 | dasm_put(Dst, 11150); | 2286 | dasm_put(Dst, 11171); |
2285 | break; | 2287 | break; |
2286 | 2288 | ||
2287 | case BC_LOOP: | 2289 | case BC_LOOP: |
2288 | #if LJ_HASJIT | 2290 | #if LJ_HASJIT |
2289 | dasm_put(Dst, 14989, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2291 | dasm_put(Dst, 15010, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2290 | #endif | 2292 | #endif |
2291 | break; | 2293 | break; |
2292 | 2294 | ||
2293 | case BC_ILOOP: | 2295 | case BC_ILOOP: |
2294 | dasm_put(Dst, 10855); | 2296 | dasm_put(Dst, 10876); |
2295 | break; | 2297 | break; |
2296 | 2298 | ||
2297 | case BC_JLOOP: | 2299 | case BC_JLOOP: |
2298 | #if LJ_HASJIT | 2300 | #if LJ_HASJIT |
2299 | dasm_put(Dst, 15226, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); | 2301 | dasm_put(Dst, 15247, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); |
2300 | #endif | 2302 | #endif |
2301 | break; | 2303 | break; |
2302 | 2304 | ||
2303 | case BC_JMP: | 2305 | case BC_JMP: |
2304 | dasm_put(Dst, 15249, -BCBIAS_J*4); | 2306 | dasm_put(Dst, 15270, -BCBIAS_J*4); |
2305 | break; | 2307 | break; |
2306 | 2308 | ||
2307 | /* -- Function headers -------------------------------------------------- */ | 2309 | /* -- Function headers -------------------------------------------------- */ |
@@ -2315,7 +2317,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2315 | 2317 | ||
2316 | case BC_FUNCF: | 2318 | case BC_FUNCF: |
2317 | #if LJ_HASJIT | 2319 | #if LJ_HASJIT |
2318 | dasm_put(Dst, 15273, HOTCOUNT_PCMASK, GG_DISP2HOT); | 2320 | dasm_put(Dst, 15294, HOTCOUNT_PCMASK, GG_DISP2HOT); |
2319 | #endif | 2321 | #endif |
2320 | case BC_FUNCV: /* NYI: compiled vararg functions. */ | 2322 | case BC_FUNCV: /* NYI: compiled vararg functions. */ |
2321 | break; | 2323 | break; |
@@ -2325,47 +2327,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
2325 | break; | 2327 | break; |
2326 | #endif | 2328 | #endif |
2327 | case BC_IFUNCF: | 2329 | case BC_IFUNCF: |
2328 | dasm_put(Dst, 15294, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); | 2330 | dasm_put(Dst, 15315, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); |
2329 | if (op == BC_JFUNCF) { | 2331 | if (op == BC_JFUNCF) { |
2330 | dasm_put(Dst, 15324, BC_JLOOP); | 2332 | dasm_put(Dst, 15345, BC_JLOOP); |
2331 | } else { | 2333 | } else { |
2332 | dasm_put(Dst, 10855); | 2334 | dasm_put(Dst, 10876); |
2333 | } | 2335 | } |
2334 | dasm_put(Dst, 15333, LJ_TNIL); | 2336 | dasm_put(Dst, 15354, LJ_TNIL); |
2335 | break; | 2337 | break; |
2336 | 2338 | ||
2337 | case BC_JFUNCV: | 2339 | case BC_JFUNCV: |
2338 | #if !LJ_HASJIT | 2340 | #if !LJ_HASJIT |
2339 | break; | 2341 | break; |
2340 | #endif | 2342 | #endif |
2341 | dasm_put(Dst, 10253); | 2343 | dasm_put(Dst, 10274); |
2342 | break; /* NYI: compiled vararg functions. */ | 2344 | break; /* NYI: compiled vararg functions. */ |
2343 | 2345 | ||
2344 | case BC_IFUNCV: | 2346 | case BC_IFUNCV: |
2345 | dasm_put(Dst, 15355, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); | 2347 | dasm_put(Dst, 15376, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); |
2346 | if (op == BC_JFUNCV) { | 2348 | if (op == BC_JFUNCV) { |
2347 | dasm_put(Dst, 15324, BC_JLOOP); | 2349 | dasm_put(Dst, 15345, BC_JLOOP); |
2348 | } else { | 2350 | } else { |
2349 | dasm_put(Dst, 15446, -4+PC2PROTO(k)); | 2351 | dasm_put(Dst, 15467, -4+PC2PROTO(k)); |
2350 | } | 2352 | } |
2351 | dasm_put(Dst, 15468, LJ_TNIL); | 2353 | dasm_put(Dst, 15489, LJ_TNIL); |
2352 | break; | 2354 | break; |
2353 | 2355 | ||
2354 | case BC_FUNCC: | 2356 | case BC_FUNCC: |
2355 | case BC_FUNCCW: | 2357 | case BC_FUNCCW: |
2356 | dasm_put(Dst, 15490, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); | 2358 | dasm_put(Dst, 15511, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); |
2357 | if (op == BC_FUNCC) { | 2359 | if (op == BC_FUNCC) { |
2358 | dasm_put(Dst, 15519); | 2360 | dasm_put(Dst, 15540); |
2359 | } else { | 2361 | } else { |
2360 | dasm_put(Dst, 15523); | 2362 | dasm_put(Dst, 15544); |
2361 | } | 2363 | } |
2362 | dasm_put(Dst, 15531, DISPATCH_GL(vmstate), ~LJ_VMST_C); | 2364 | dasm_put(Dst, 15552, DISPATCH_GL(vmstate), ~LJ_VMST_C); |
2363 | if (op == BC_FUNCC) { | 2365 | if (op == BC_FUNCC) { |
2364 | dasm_put(Dst, 15540); | 2366 | dasm_put(Dst, 15561); |
2365 | } else { | 2367 | } else { |
2366 | dasm_put(Dst, 15544, DISPATCH_GL(wrapf)); | 2368 | dasm_put(Dst, 15565, DISPATCH_GL(wrapf)); |
2367 | } | 2369 | } |
2368 | dasm_put(Dst, 15549, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); | 2370 | dasm_put(Dst, 15570, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); |
2369 | break; | 2371 | break; |
2370 | 2372 | ||
2371 | /* ---------------------------------------------------------------------- */ | 2373 | /* ---------------------------------------------------------------------- */ |
@@ -2393,7 +2395,7 @@ static int build_backend(BuildCtx *ctx) | |||
2393 | 2395 | ||
2394 | build_subroutines(ctx, cmov, sse); | 2396 | build_subroutines(ctx, cmov, sse); |
2395 | 2397 | ||
2396 | dasm_put(Dst, 15574); | 2398 | dasm_put(Dst, 15595); |
2397 | for (op = 0; op < BC__MAX; op++) | 2399 | for (op = 0; op < BC__MAX; op++) |
2398 | build_ins(ctx, (BCOp)op, op, cmov, sse); | 2400 | build_ins(ctx, (BCOp)op, op, cmov, sse); |
2399 | 2401 | ||