aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildvm_x86.dasc51
-rw-r--r--src/buildvm_x86.h860
2 files changed, 468 insertions, 443 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index 7167ffb1..fa9bf9fb 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -2128,15 +2128,25 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2128 | fistp TMP2 2128 | fistp TMP2
2129 | cmp TMP2, 255; ja ->fff_fallback 2129 | cmp TMP2, 255; ja ->fff_fallback
2130 } 2130 }
2131 | lea RC, TMP2 // Little-endian. 2131 |.if X64
2132 | mov TMP1, RA // Save RA. 2132 | mov TMP3, 1
2133 |.else
2133 | mov ARG3, 1 2134 | mov ARG3, 1
2134 | mov ARG2, RC 2135 |.endif
2136 | lea RDa, TMP2 // Points to stack. Little-endian.
2137 | mov TMP1, RA // Save RA.
2135 |->fff_newstr: 2138 |->fff_newstr:
2136 | mov L:RB, SAVE_L 2139 | mov L:RB, SAVE_L
2140 | mov L:RB->base, BASE
2141 |.if X64
2142 | mov CARG3d, TMP3 // Zero-extended to size_t.
2143 | mov CARG2, RDa // May be 64 bit ptr to stack.
2144 | mov CARG1d, L:RB
2145 |.else
2146 | mov ARG2, RD
2137 | mov ARG1, L:RB 2147 | mov ARG1, L:RB
2148 |.endif
2138 | mov SAVE_PC, PC 2149 | mov SAVE_PC, PC
2139 | mov L:RB->base, BASE
2140 | call extern lj_str_new // (lua_State *L, char *str, size_t l) 2150 | call extern lj_str_new // (lua_State *L, char *str, size_t l)
2141 | // GCstr * returned in eax (RC). 2151 | // GCstr * returned in eax (RC).
2142 | mov RA, TMP1 2152 | mov RA, TMP1
@@ -2163,33 +2173,36 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2163 | cmp dword [RA+4], LJ_TSTR; jne ->fff_fallback 2173 | cmp dword [RA+4], LJ_TSTR; jne ->fff_fallback
2164 | cmp dword [RA+12], LJ_TISNUM; ja ->fff_fallback 2174 | cmp dword [RA+12], LJ_TISNUM; ja ->fff_fallback
2165 | mov STR:RB, [RA] 2175 | mov STR:RB, [RA]
2166 | mov ARG2, STR:RB 2176 | mov TMP3, STR:RB
2167 | mov RB, STR:RB->len 2177 | mov RB, STR:RB->len
2168 if (sse) { 2178 if (sse) {
2169 | cvtsd2si RC, qword [RA+8] 2179 | cvtsd2si RA, qword [RA+8]
2170 | mov ARG3, RC
2171 } else { 2180 } else {
2172 |.if not X64 2181 |.if not X64
2173 | fld qword [RA+8] 2182 | fld qword [RA+8]
2174 | fistp ARG3 2183 | fistp ARG3
2184 | mov RA, ARG3
2175 |.endif 2185 |.endif
2176 } 2186 }
2177 | mov RC, TMP2 2187 | mov RC, TMP2
2178 | cmp RB, RC // len < end? (unsigned compare) 2188 | cmp RB, RC // len < end? (unsigned compare)
2179 | jb >5 2189 | jb >5
2180 |2: 2190 |2:
2181 | mov RA, ARG3
2182 | test RA, RA // start <= 0? 2191 | test RA, RA // start <= 0?
2183 | jle >7 2192 | jle >7
2184 |3: 2193 |3:
2185 | mov STR:RB, ARG2 2194 | mov STR:RB, TMP3
2186 | sub RC, RA // start > end? 2195 | sub RC, RA // start > end?
2187 | jl ->fff_emptystr 2196 | jl ->fff_emptystr
2188 | lea RB, [STR:RB+RA+#STR-1] 2197 | lea RB, [STR:RB+RA+#STR-1]
2189 | add RC, 1 2198 | add RC, 1
2190 |4: 2199 |4:
2191 | mov ARG2, RB 2200 |.if X64
2201 | mov TMP3, RC
2202 |.else
2192 | mov ARG3, RC 2203 | mov ARG3, RC
2204 |.endif
2205 | mov RD, RB
2193 | jmp ->fff_newstr 2206 | jmp ->fff_newstr
2194 | 2207 |
2195 |5: // Negative end or overflow. 2208 |5: // Negative end or overflow.
@@ -2234,13 +2247,17 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2234 | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_2 2247 | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_2
2235 | movzx RA, byte STR:RB[1] 2248 | movzx RA, byte STR:RB[1]
2236 | mov RB, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] 2249 | mov RB, [DISPATCH+DISPATCH_GL(tmpbuf.buf)]
2250 |.if X64
2251 | mov TMP3, RC
2252 |.else
2237 | mov ARG3, RC 2253 | mov ARG3, RC
2238 | mov ARG2, RB 2254 |.endif
2239 |1: // Fill buffer with char. Yes, this is suboptimal code (do you care?). 2255 |1: // Fill buffer with char. Yes, this is suboptimal code (do you care?).
2240 | mov [RB], RAL 2256 | mov [RB], RAL
2241 | add RB, 1 2257 | add RB, 1
2242 | sub RC, 1 2258 | sub RC, 1
2243 | jnz <1 2259 | jnz <1
2260 | mov RD, [DISPATCH+DISPATCH_GL(tmpbuf.buf)]
2244 | jmp ->fff_newstr 2261 | jmp ->fff_newstr
2245 | 2262 |
2246 |.ffunc_1 string_reverse 2263 |.ffunc_1 string_reverse
@@ -2254,15 +2271,19 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2254 | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1 2271 | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1
2255 | add RB, #STR 2272 | add RB, #STR
2256 | mov TMP2, PC // Need another temp register. 2273 | mov TMP2, PC // Need another temp register.
2274 |.if X64
2275 | mov TMP3, RC
2276 |.else
2257 | mov ARG3, RC 2277 | mov ARG3, RC
2278 |.endif
2258 | mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] 2279 | mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)]
2259 | mov ARG2, PC
2260 |1: 2280 |1:
2261 | movzx RA, byte [RB] 2281 | movzx RA, byte [RB]
2262 | add RB, 1 2282 | add RB, 1
2263 | sub RC, 1 2283 | sub RC, 1
2264 | mov [PC+RC], RAL 2284 | mov [PC+RC], RAL
2265 | jnz <1 2285 | jnz <1
2286 | mov RD, PC
2266 | mov PC, TMP2 2287 | mov PC, TMP2
2267 | jmp ->fff_newstr 2288 | jmp ->fff_newstr
2268 | 2289 |
@@ -2276,9 +2297,12 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2276 | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1 2297 | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1
2277 | add RB, #STR 2298 | add RB, #STR
2278 | mov TMP2, PC // Need another temp register. 2299 | mov TMP2, PC // Need another temp register.
2300 |.if X64
2301 | mov TMP3, RC
2302 |.else
2279 | mov ARG3, RC 2303 | mov ARG3, RC
2304 |.endif
2280 | mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] 2305 | mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)]
2281 | mov ARG2, PC
2282 | jmp >3 2306 | jmp >3
2283 |1: // ASCII case conversion. Yes, this is suboptimal code (do you care?). 2307 |1: // ASCII case conversion. Yes, this is suboptimal code (do you care?).
2284 | movzx RA, byte [RB+RC] 2308 | movzx RA, byte [RB+RC]
@@ -2292,6 +2316,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
2292 |3: 2316 |3:
2293 | sub RC, 1 2317 | sub RC, 1
2294 | jns <1 2318 | jns <1
2319 | mov RD, PC
2295 | mov PC, TMP2 2320 | mov PC, TMP2
2296 | jmp ->fff_newstr 2321 | jmp ->fff_newstr
2297 |.endmacro 2322 |.endmacro
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index 2d679b01..c9907583 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[15194] = { 15static const unsigned char build_actionlist[15184] = {
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,
@@ -296,68 +296,68 @@ static const unsigned char build_actionlist[15194] = {
296 233,59,171,233,15,130,244,247,232,244,65,248,1,129,252,248,239,15,133,244, 296 233,59,171,233,15,130,244,247,232,244,65,248,1,129,252,248,239,15,133,244,
297 54,129,121,253,4,239,15,135,244,54,255,252,242,15,45,1,61,252,255,0,0,0,15, 297 54,129,121,253,4,239,15,135,244,54,255,252,242,15,45,1,61,252,255,0,0,0,15,
298 135,244,54,137,68,36,20,255,221,1,219,92,36,20,129,124,36,20,252,255,0,0, 298 135,244,54,137,68,36,20,255,221,1,219,92,36,20,129,124,36,20,252,255,0,0,
299 0,15,135,244,54,255,141,68,36,20,137,76,36,16,199,68,36,8,1,0,0,0,137,68, 299 0,15,135,244,54,255,199,68,36,8,1,0,0,0,141,68,36,20,137,76,36,16,248,112,
300 36,4,248,112,139,108,36,48,137,44,36,137,116,36,24,137,149,233,232,251,1, 300 139,108,36,48,137,149,233,137,68,36,4,137,44,36,137,116,36,24,232,251,1,17,
301 17,139,76,36,16,139,149,233,199,65,252,252,237,137,65,252,248,252,233,244, 301 139,76,36,16,139,149,233,199,65,252,252,237,137,65,252,248,252,233,244,57,
302 57,248,113,139,171,233,59,171,233,15,130,244,247,232,244,65,248,1,137,76, 302 248,113,139,171,233,59,171,233,15,130,244,247,232,244,65,248,1,137,76,36,
303 36,16,199,68,36,20,252,255,252,255,252,255,252,255,129,252,248,239,15,130, 303 16,199,68,36,20,252,255,252,255,252,255,252,255,129,252,248,239,15,130,244,
304 244,54,15,134,244,247,129,121,253,20,239,255,252,242,15,45,105,16,137,108, 304 54,15,134,244,247,129,121,253,20,239,255,252,242,15,45,105,16,137,108,36,
305 36,20,255,221,65,16,219,92,36,20,255,248,1,129,121,253,4,239,15,133,244,54, 305 20,255,221,65,16,219,92,36,20,255,248,1,129,121,253,4,239,15,133,244,54,129,
306 129,121,253,12,239,15,135,244,54,139,41,137,108,36,4,139,173,233,255,252, 306 121,253,12,239,15,135,244,54,139,41,137,108,36,12,139,173,233,255,252,242,
307 242,15,45,65,8,137,68,36,8,255,221,65,8,219,92,36,8,255,139,68,36,20,57,197, 307 15,45,73,8,255,221,65,8,219,92,36,8,139,76,36,8,255,139,68,36,20,57,197,15,
308 15,130,244,251,248,2,139,76,36,8,133,201,15,142,244,253,248,3,139,108,36, 308 130,244,251,248,2,133,201,15,142,244,253,248,3,139,108,36,12,41,200,15,140,
309 4,41,200,15,140,244,114,141,172,253,13,233,131,192,1,248,4,137,108,36,4,137, 309 244,114,141,172,253,13,233,131,192,1,248,4,137,68,36,8,137,232,252,233,244,
310 68,36,8,252,233,244,112,248,5,15,140,244,252,141,68,40,1,252,233,244,2,248, 310 112,248,5,15,140,244,252,141,68,40,1,252,233,244,2,248,6,137,232,252,233,
311 6,137,232,252,233,244,2,248,7,255,15,132,244,254,1,252,233,131,193,1,15,143, 311 244,2,248,7,255,15,132,244,254,1,252,233,131,193,1,15,143,244,3,248,8,185,
312 244,3,248,8,185,1,0,0,0,252,233,244,3,248,114,49,192,252,233,244,4,248,115, 312 1,0,0,0,252,233,244,3,248,114,49,192,252,233,244,4,248,115,129,252,248,239,
313 129,252,248,239,15,130,244,54,139,171,233,59,171,233,15,130,244,247,232,244, 313 15,130,244,54,139,171,233,59,171,233,15,130,244,247,232,244,65,248,1,255,
314 65,248,1,255,137,76,36,16,129,121,253,4,239,15,133,244,54,129,121,253,12, 314 137,76,36,16,129,121,253,4,239,15,133,244,54,129,121,253,12,239,15,135,244,
315 239,15,135,244,54,139,41,255,252,242,15,45,65,8,255,221,65,8,219,92,36,20, 315 54,139,41,255,252,242,15,45,65,8,255,221,65,8,219,92,36,20,139,68,36,20,255,
316 139,68,36,20,255,133,192,15,142,244,114,131,189,233,1,15,130,244,114,15,133, 316 133,192,15,142,244,114,131,189,233,1,15,130,244,114,15,133,244,116,57,131,
317 244,116,57,131,233,15,130,244,116,15,182,141,233,139,171,233,137,68,36,8, 317 233,15,130,244,116,15,182,141,233,139,171,233,137,68,36,8,248,1,136,77,0,
318 137,108,36,4,248,1,136,77,0,131,197,1,131,232,1,15,133,244,1,252,233,244, 318 131,197,1,131,232,1,15,133,244,1,139,131,233,252,233,244,112,248,117,129,
319 112,248,117,129,252,248,239,15,130,244,54,255,139,171,233,59,171,233,15,130, 319 252,248,239,255,15,130,244,54,139,171,233,59,171,233,15,130,244,247,232,244,
320 244,247,232,244,65,248,1,137,76,36,16,129,121,253,4,239,15,133,244,54,139, 320 65,248,1,137,76,36,16,129,121,253,4,239,15,133,244,54,139,41,139,133,233,
321 41,139,133,233,133,192,15,132,244,114,57,131,233,15,130,244,118,129,197,239, 321 133,192,15,132,244,114,57,131,233,15,130,244,118,129,197,239,137,116,36,20,
322 137,116,36,20,137,68,36,8,139,179,233,137,116,36,4,248,1,15,182,77,0,131, 322 137,68,36,8,139,179,233,248,1,255,15,182,77,0,131,197,1,131,232,1,136,12,
323 197,1,131,232,1,136,12,6,15,133,244,1,255,139,116,36,20,252,233,244,112,248, 323 6,15,133,244,1,137,252,240,139,116,36,20,252,233,244,112,248,119,129,252,
324 119,129,252,248,239,15,130,244,54,139,171,233,59,171,233,15,130,244,247,232, 324 248,239,15,130,244,54,139,171,233,59,171,233,15,130,244,247,232,244,65,248,
325 244,65,248,1,137,76,36,16,129,121,253,4,239,15,133,244,54,139,41,139,133,
326 233,57,131,233,15,130,244,118,255,129,197,239,137,116,36,20,137,68,36,8,139,
327 179,233,137,116,36,4,252,233,244,249,248,1,15,182,76,5,0,131,252,249,65,15,
328 130,244,248,131,252,249,90,15,135,244,248,131,252,241,32,248,2,136,12,6,248,
329 3,131,232,1,15,137,244,1,139,116,36,20,252,233,244,112,248,120,129,252,248,
330 239,15,130,244,54,139,171,233,255,59,171,233,15,130,244,247,232,244,65,248,
331 1,137,76,36,16,129,121,253,4,239,15,133,244,54,139,41,139,133,233,57,131, 325 1,137,76,36,16,129,121,253,4,239,15,133,244,54,139,41,139,133,233,57,131,
332 233,15,130,244,118,129,197,239,137,116,36,20,137,68,36,8,139,179,233,137, 326 233,255,15,130,244,118,129,197,239,137,116,36,20,137,68,36,8,139,179,233,
333 116,36,4,252,233,244,249,248,1,15,182,76,5,0,131,252,249,97,15,130,244,248, 327 252,233,244,249,248,1,15,182,76,5,0,131,252,249,65,15,130,244,248,131,252,
334 255,131,252,249,122,15,135,244,248,131,252,241,32,248,2,136,12,6,248,3,131, 328 249,90,15,135,244,248,131,252,241,32,248,2,136,12,6,248,3,131,232,1,15,137,
335 232,1,15,137,244,1,139,116,36,20,252,233,244,112,248,121,129,252,248,239, 329 244,1,137,252,240,139,116,36,20,252,233,244,112,248,120,129,252,248,239,15,
336 15,130,244,54,129,121,253,4,239,15,133,244,54,137,84,36,16,137,205,139,9, 330 130,244,54,255,139,171,233,59,171,233,15,130,244,247,232,244,65,248,1,137,
337 232,251,1,18,137,252,233,139,84,36,16,255,252,242,15,42,192,252,233,244,62, 331 76,36,16,129,121,253,4,239,15,133,244,54,139,41,139,133,233,57,131,233,15,
338 255,137,4,36,219,4,36,252,233,244,63,255,248,122,129,252,248,239,15,130,244, 332 130,244,118,129,197,239,137,116,36,20,137,68,36,8,139,179,233,252,233,244,
339 54,129,121,253,4,239,15,135,244,54,252,242,15,16,1,189,0,0,56,67,102,15,110, 333 249,248,1,15,182,76,5,0,131,252,249,97,15,130,244,248,255,131,252,249,122,
340 205,102,15,112,201,81,252,242,15,88,193,102,15,126,197,252,242,15,42,197, 334 15,135,244,248,131,252,241,32,248,2,136,12,6,248,3,131,232,1,15,137,244,1,
341 252,233,244,62,255,248,122,129,252,248,239,15,130,244,54,129,121,253,4,239, 335 137,252,240,139,116,36,20,252,233,244,112,248,121,129,252,248,239,15,130,
342 15,135,244,54,221,1,199,68,36,16,0,0,192,89,216,68,36,16,221,28,36,219,4, 336 244,54,129,121,253,4,239,15,133,244,54,137,84,36,16,137,205,139,9,232,251,
343 36,252,233,244,63,255,248,123,129,252,248,239,15,130,244,54,129,121,253,4, 337 1,18,137,252,233,139,84,36,16,255,252,242,15,42,192,252,233,244,62,255,137,
344 239,15,135,244,54,252,242,15,16,1,189,0,0,56,67,102,15,110,205,102,15,112, 338 4,36,219,4,36,252,233,244,63,255,248,122,129,252,248,239,15,130,244,54,129,
345 201,81,252,242,15,88,193,102,15,126,197,255,248,123,129,252,248,239,15,130, 339 121,253,4,239,15,135,244,54,252,242,15,16,1,189,0,0,56,67,102,15,110,205,
346 244,54,129,121,253,4,239,15,135,244,54,221,1,199,68,36,16,0,0,192,89,216, 340 102,15,112,201,81,252,242,15,88,193,102,15,126,197,252,242,15,42,197,252,
347 68,36,16,221,28,36,139,44,36,255,137,68,36,20,141,68,193,252,240,255,137, 341 233,244,62,255,248,122,129,252,248,239,15,130,244,54,129,121,253,4,239,15,
348 84,36,16,255,248,1,57,200,15,134,244,124,129,120,253,4,239,15,135,244,125, 342 135,244,54,221,1,199,68,36,16,0,0,192,89,216,68,36,16,221,28,36,219,4,36,
349 255,252,242,15,16,0,252,242,15,88,193,102,15,126,194,33,213,255,221,0,216, 343 252,233,244,63,255,248,123,129,252,248,239,15,130,244,54,129,121,253,4,239,
350 68,36,16,221,28,36,35,44,36,255,131,232,8,252,233,244,1,255,248,126,129,252,
351 248,239,15,130,244,54,129,121,253,4,239,15,135,244,54,252,242,15,16,1,189,
352 0,0,56,67,102,15,110,205,102,15,112,201,81,252,242,15,88,193,102,15,126,197,
353 255,248,126,129,252,248,239,15,130,244,54,129,121,253,4,239,15,135,244,54,
354 221,1,199,68,36,16,0,0,192,89,216,68,36,16,221,28,36,139,44,36,255,252,242,
355 15,16,0,252,242,15,88,193,102,15,126,194,9,213,255,221,0,216,68,36,16,221,
356 28,36,11,44,36,255,248,127,129,252,248,239,15,130,244,54,129,121,253,4,239,
357 15,135,244,54,252,242,15,16,1,189,0,0,56,67,102,15,110,205,102,15,112,201, 344 15,135,244,54,252,242,15,16,1,189,0,0,56,67,102,15,110,205,102,15,112,201,
358 81,252,242,15,88,193,102,15,126,197,255,248,127,129,252,248,239,15,130,244, 345 81,252,242,15,88,193,102,15,126,197,255,248,123,129,252,248,239,15,130,244,
359 54,129,121,253,4,239,15,135,244,54,221,1,199,68,36,16,0,0,192,89,216,68,36, 346 54,129,121,253,4,239,15,135,244,54,221,1,199,68,36,16,0,0,192,89,216,68,36,
360 16,221,28,36,139,44,36,255,252,242,15,16,0,252,242,15,88,193,102,15,126,194, 347 16,221,28,36,139,44,36,255,137,68,36,20,141,68,193,252,240,255,137,84,36,
348 16,255,248,1,57,200,15,134,244,124,129,120,253,4,239,15,135,244,125,255,252,
349 242,15,16,0,252,242,15,88,193,102,15,126,194,33,213,255,221,0,216,68,36,16,
350 221,28,36,35,44,36,255,131,232,8,252,233,244,1,255,248,126,129,252,248,239,
351 15,130,244,54,129,121,253,4,239,15,135,244,54,252,242,15,16,1,189,0,0,56,
352 67,102,15,110,205,102,15,112,201,81,252,242,15,88,193,102,15,126,197,255,
353 248,126,129,252,248,239,15,130,244,54,129,121,253,4,239,15,135,244,54,221,
354 1,199,68,36,16,0,0,192,89,216,68,36,16,221,28,36,139,44,36,255,252,242,15,
355 16,0,252,242,15,88,193,102,15,126,194,9,213,255,221,0,216,68,36,16,221,28,
356 36,11,44,36,255,248,127,129,252,248,239,15,130,244,54,129,121,253,4,239,15,
357 135,244,54,252,242,15,16,1,189,0,0,56,67,102,15,110,205,102,15,112,201,81,
358 252,242,15,88,193,102,15,126,197,255,248,127,129,252,248,239,15,130,244,54,
359 129,121,253,4,239,15,135,244,54,221,1,199,68,36,16,0,0,192,89,216,68,36,16,
360 221,28,36,139,44,36,255,252,242,15,16,0,252,242,15,88,193,102,15,126,194,
361 49,213,255,221,0,216,68,36,16,221,28,36,51,44,36,255,248,128,129,252,248, 361 49,213,255,221,0,216,68,36,16,221,28,36,51,44,36,255,248,128,129,252,248,
362 239,15,130,244,54,129,121,253,4,239,15,135,244,54,252,242,15,16,1,189,0,0, 362 239,15,130,244,54,129,121,253,4,239,15,135,244,54,252,242,15,16,1,189,0,0,
363 56,67,102,15,110,205,102,15,112,201,81,252,242,15,88,193,102,15,126,197,255, 363 56,67,102,15,110,205,102,15,112,201,81,252,242,15,88,193,102,15,126,197,255,
@@ -1316,232 +1316,232 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1316 if (sse) { 1316 if (sse) {
1317 dasm_put(Dst, 6020); 1317 dasm_put(Dst, 6020);
1318 } else { 1318 } else {
1319 dasm_put(Dst, 6031); 1319 dasm_put(Dst, 6027);
1320 } 1320 }
1321 dasm_put(Dst, 6039, sizeof(GCstr)-1); 1321 dasm_put(Dst, 6039, sizeof(GCstr)-1);
1322 dasm_put(Dst, 6120, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); 1322 dasm_put(Dst, 6114, 2+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold));
1323 dasm_put(Dst, 6179, LJ_TSTR, LJ_TISNUM); 1323 dasm_put(Dst, 6173, LJ_TSTR, LJ_TISNUM);
1324 if (sse) { 1324 if (sse) {
1325 dasm_put(Dst, 6204); 1325 dasm_put(Dst, 6198);
1326 } else { 1326 } else {
1327 dasm_put(Dst, 6211); 1327 dasm_put(Dst, 6205);
1328 } 1328 }
1329 dasm_put(Dst, 6223, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), 1+1); 1329 dasm_put(Dst, 6217, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf), 1+1);
1330 dasm_put(Dst, 6293, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); 1330 dasm_put(Dst, 6282, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf));
1331 dasm_put(Dst, 6377, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz)); 1331 dasm_put(Dst, 6349, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz));
1332 dasm_put(Dst, 6436, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1, DISPATCH_GL(gc.total)); 1332 dasm_put(Dst, 6424, sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), 1+1);
1333 dasm_put(Dst, 6521, DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); 1333 dasm_put(Dst, 6509, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf));
1334 dasm_put(Dst, 6596, 1+1, LJ_TTAB); 1334 dasm_put(Dst, 6583, 1+1, LJ_TTAB);
1335 if (sse) { 1335 if (sse) {
1336 dasm_put(Dst, 6669); 1336 dasm_put(Dst, 6659);
1337 } else { 1337 } else {
1338 dasm_put(Dst, 6679); 1338 dasm_put(Dst, 6669);
1339 } 1339 }
1340 if (sse) { 1340 if (sse) {
1341 dasm_put(Dst, 6690, 1+1, LJ_TISNUM); 1341 dasm_put(Dst, 6680, 1+1, LJ_TISNUM);
1342 } else { 1342 } else {
1343 dasm_put(Dst, 6747, 1+1, LJ_TISNUM); 1343 dasm_put(Dst, 6737, 1+1, LJ_TISNUM);
1344 } 1344 }
1345 if (sse) { 1345 if (sse) {
1346 dasm_put(Dst, 6791, 1+1, LJ_TISNUM); 1346 dasm_put(Dst, 6781, 1+1, LJ_TISNUM);
1347 } else { 1347 } else {
1348 dasm_put(Dst, 6839, 1+1, LJ_TISNUM); 1348 dasm_put(Dst, 6829, 1+1, LJ_TISNUM);
1349 } 1349 }
1350 dasm_put(Dst, 6879); 1350 dasm_put(Dst, 6869);
1351 if (sse) { 1351 if (sse) {
1352 dasm_put(Dst, 6889); 1352 dasm_put(Dst, 6879);
1353 } 1353 }
1354 dasm_put(Dst, 6894, LJ_TISNUM); 1354 dasm_put(Dst, 6884, LJ_TISNUM);
1355 if (sse) { 1355 if (sse) {
1356 dasm_put(Dst, 6912); 1356 dasm_put(Dst, 6902);
1357 } else { 1357 } else {
1358 dasm_put(Dst, 6929); 1358 dasm_put(Dst, 6919);
1359 } 1359 }
1360 dasm_put(Dst, 6942); 1360 dasm_put(Dst, 6932);
1361 if (sse) { 1361 if (sse) {
1362 dasm_put(Dst, 6950, 1+1, LJ_TISNUM); 1362 dasm_put(Dst, 6940, 1+1, LJ_TISNUM);
1363 } else { 1363 } else {
1364 dasm_put(Dst, 6998, 1+1, LJ_TISNUM); 1364 dasm_put(Dst, 6988, 1+1, LJ_TISNUM);
1365 } 1365 }
1366 dasm_put(Dst, 6879); 1366 dasm_put(Dst, 6869);
1367 if (sse) { 1367 if (sse) {
1368 dasm_put(Dst, 6889); 1368 dasm_put(Dst, 6879);
1369 } 1369 }
1370 dasm_put(Dst, 6894, LJ_TISNUM); 1370 dasm_put(Dst, 6884, LJ_TISNUM);
1371 if (sse) { 1371 if (sse) {
1372 dasm_put(Dst, 7038); 1372 dasm_put(Dst, 7028);
1373 } else { 1373 } else {
1374 dasm_put(Dst, 7055); 1374 dasm_put(Dst, 7045);
1375 } 1375 }
1376 dasm_put(Dst, 6942); 1376 dasm_put(Dst, 6932);
1377 if (sse) { 1377 if (sse) {
1378 dasm_put(Dst, 7068, 1+1, LJ_TISNUM); 1378 dasm_put(Dst, 7058, 1+1, LJ_TISNUM);
1379 } else { 1379 } else {
1380 dasm_put(Dst, 7116, 1+1, LJ_TISNUM); 1380 dasm_put(Dst, 7106, 1+1, LJ_TISNUM);
1381 } 1381 }
1382 dasm_put(Dst, 6879); 1382 dasm_put(Dst, 6869);
1383 if (sse) { 1383 if (sse) {
1384 dasm_put(Dst, 6889); 1384 dasm_put(Dst, 6879);
1385 } 1385 }
1386 dasm_put(Dst, 6894, LJ_TISNUM); 1386 dasm_put(Dst, 6884, LJ_TISNUM);
1387 if (sse) { 1387 if (sse) {
1388 dasm_put(Dst, 7156); 1388 dasm_put(Dst, 7146);
1389 } else { 1389 } else {
1390 dasm_put(Dst, 7173); 1390 dasm_put(Dst, 7163);
1391 } 1391 }
1392 dasm_put(Dst, 6942); 1392 dasm_put(Dst, 6932);
1393 if (sse) { 1393 if (sse) {
1394 dasm_put(Dst, 7186, 1+1, LJ_TISNUM); 1394 dasm_put(Dst, 7176, 1+1, LJ_TISNUM);
1395 } else { 1395 } else {
1396 dasm_put(Dst, 7234, 1+1, LJ_TISNUM); 1396 dasm_put(Dst, 7224, 1+1, LJ_TISNUM);
1397 } 1397 }
1398 dasm_put(Dst, 7274); 1398 dasm_put(Dst, 7264);
1399 if (sse) { 1399 if (sse) {
1400 dasm_put(Dst, 7281, 1+1, LJ_TISNUM); 1400 dasm_put(Dst, 7271, 1+1, LJ_TISNUM);
1401 } else { 1401 } else {
1402 dasm_put(Dst, 7329, 1+1, LJ_TISNUM); 1402 dasm_put(Dst, 7319, 1+1, LJ_TISNUM);
1403 } 1403 }
1404 dasm_put(Dst, 7369); 1404 dasm_put(Dst, 7359);
1405 if (sse) { 1405 if (sse) {
1406 dasm_put(Dst, 7373); 1406 dasm_put(Dst, 7363);
1407 } else { 1407 } else {
1408 dasm_put(Dst, 7400); 1408 dasm_put(Dst, 7390);
1409 } 1409 }
1410 dasm_put(Dst, 7415); 1410 dasm_put(Dst, 7405);
1411 if (sse) { 1411 if (sse) {
1412 dasm_put(Dst, 6664); 1412 dasm_put(Dst, 6654);
1413 } 1413 }
1414 dasm_put(Dst, 7418); 1414 dasm_put(Dst, 7408);
1415 if (sse) { 1415 if (sse) {
1416 dasm_put(Dst, 7427, 1+1, LJ_TISNUM, LJ_TISNUM); 1416 dasm_put(Dst, 7417, 1+1, LJ_TISNUM, LJ_TISNUM);
1417 } else { 1417 } else {
1418 dasm_put(Dst, 7501, 2+1, LJ_TISNUM, LJ_TISNUM); 1418 dasm_put(Dst, 7491, 2+1, LJ_TISNUM, LJ_TISNUM);
1419 } 1419 }
1420 dasm_put(Dst, 7567); 1420 dasm_put(Dst, 7557);
1421 if (sse) { 1421 if (sse) {
1422 dasm_put(Dst, 7576, 1+1, LJ_TISNUM, LJ_TISNUM); 1422 dasm_put(Dst, 7566, 1+1, LJ_TISNUM, LJ_TISNUM);
1423 } else { 1423 } else {
1424 dasm_put(Dst, 7650, 2+1, LJ_TISNUM, LJ_TISNUM); 1424 dasm_put(Dst, 7640, 2+1, LJ_TISNUM, LJ_TISNUM);
1425 } 1425 }
1426 dasm_put(Dst, 7716); 1426 dasm_put(Dst, 7706);
1427 if (sse) { 1427 if (sse) {
1428 dasm_put(Dst, 7726, 1+1, LJ_TISNUM, LJ_TISNUM); 1428 dasm_put(Dst, 7716, 1+1, LJ_TISNUM, LJ_TISNUM);
1429 } else { 1429 } else {
1430 dasm_put(Dst, 7800, 2+1, LJ_TISNUM, LJ_TISNUM); 1430 dasm_put(Dst, 7790, 2+1, LJ_TISNUM, LJ_TISNUM);
1431 } 1431 }
1432 dasm_put(Dst, 7866); 1432 dasm_put(Dst, 7856);
1433 if (sse) { 1433 if (sse) {
1434 dasm_put(Dst, 7876, 1+1, LJ_TISNUM, LJ_TISNUM); 1434 dasm_put(Dst, 7866, 1+1, LJ_TISNUM, LJ_TISNUM);
1435 } else { 1435 } else {
1436 dasm_put(Dst, 7950, 2+1, LJ_TISNUM, LJ_TISNUM); 1436 dasm_put(Dst, 7940, 2+1, LJ_TISNUM, LJ_TISNUM);
1437 } 1437 }
1438 dasm_put(Dst, 8016); 1438 dasm_put(Dst, 8006);
1439 if (sse) { 1439 if (sse) {
1440 dasm_put(Dst, 8025, 1+1, LJ_TISNUM, LJ_TISNUM); 1440 dasm_put(Dst, 8015, 1+1, LJ_TISNUM, LJ_TISNUM);
1441 } else { 1441 } else {
1442 dasm_put(Dst, 8099, 2+1, LJ_TISNUM, LJ_TISNUM); 1442 dasm_put(Dst, 8089, 2+1, LJ_TISNUM, LJ_TISNUM);
1443 } 1443 }
1444 dasm_put(Dst, 8165, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base)); 1444 dasm_put(Dst, 8155, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base));
1445 dasm_put(Dst, 8249, Dt1(->top), Dt7(->gate), LJ_TFUNC, Dt7(->gate), Dt1(->base), LUA_MINSTACK, Dt1(->base), Dt1(->top)); 1445 dasm_put(Dst, 8239, Dt1(->top), Dt7(->gate), LJ_TFUNC, Dt7(->gate), Dt1(->base), LUA_MINSTACK, Dt1(->base), Dt1(->top));
1446 dasm_put(Dst, 8368, Dt1(->base), Dt1(->top)); 1446 dasm_put(Dst, 8358, Dt1(->base), Dt1(->top));
1447#if LJ_HASJIT 1447#if LJ_HASJIT
1448 dasm_put(Dst, 8409, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); 1448 dasm_put(Dst, 8399, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount));
1449#endif 1449#endif
1450 dasm_put(Dst, 8440, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base), GG_DISP_STATIC*4); 1450 dasm_put(Dst, 8430, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base), GG_DISP_STATIC*4);
1451#if LJ_HASJIT 1451#if LJ_HASJIT
1452 dasm_put(Dst, 8531, Dt1(->base), GG_DISP2J, DISPATCH_J(L)); 1452 dasm_put(Dst, 8521, Dt1(->base), GG_DISP2J, DISPATCH_J(L));
1453#endif 1453#endif
1454 dasm_put(Dst, 8560); 1454 dasm_put(Dst, 8550);
1455#if LJ_HASJIT 1455#if LJ_HASJIT
1456 dasm_put(Dst, 8563, Dt1(->base), GG_DISP2J, DISPATCH_J(L), Dt1(->base)); 1456 dasm_put(Dst, 8553, Dt1(->base), GG_DISP2J, DISPATCH_J(L), Dt1(->base));
1457#endif 1457#endif
1458 dasm_put(Dst, 8609); 1458 dasm_put(Dst, 8599);
1459#if LJ_HASJIT 1459#if LJ_HASJIT
1460 dasm_put(Dst, 8612, 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)); 1460 dasm_put(Dst, 8602, 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));
1461#endif 1461#endif
1462 dasm_put(Dst, 8755); 1462 dasm_put(Dst, 8745);
1463#if LJ_HASJIT 1463#if LJ_HASJIT
1464 dasm_put(Dst, 8758, Dt7(->pt), Dt9(->k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); 1464 dasm_put(Dst, 8748, Dt7(->pt), Dt9(->k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP);
1465#endif 1465#endif
1466 dasm_put(Dst, 8798); 1466 dasm_put(Dst, 8788);
1467 if (!sse) { 1467 if (!sse) {
1468 dasm_put(Dst, 8801); 1468 dasm_put(Dst, 8791);
1469 } 1469 }
1470 dasm_put(Dst, 8846); 1470 dasm_put(Dst, 8836);
1471 if (!sse) { 1471 if (!sse) {
1472 dasm_put(Dst, 8948); 1472 dasm_put(Dst, 8938);
1473 } 1473 }
1474 dasm_put(Dst, 8993); 1474 dasm_put(Dst, 8983);
1475 if (!sse) { 1475 if (!sse) {
1476 dasm_put(Dst, 9095); 1476 dasm_put(Dst, 9085);
1477 } 1477 }
1478 dasm_put(Dst, 9134); 1478 dasm_put(Dst, 9124);
1479 if (sse) { 1479 if (sse) {
1480 dasm_put(Dst, 9239); 1480 dasm_put(Dst, 9229);
1481 } else { 1481 } else {
1482 dasm_put(Dst, 9369); 1482 dasm_put(Dst, 9359);
1483 } 1483 }
1484 dasm_put(Dst, 9416); 1484 dasm_put(Dst, 9406);
1485 if (!sse) { 1485 if (!sse) {
1486 dasm_put(Dst, 9490); 1486 dasm_put(Dst, 9480);
1487 if (cmov) { 1487 if (cmov) {
1488 dasm_put(Dst, 9501); 1488 dasm_put(Dst, 9491);
1489 } else { 1489 } else {
1490 dasm_put(Dst, 9505); 1490 dasm_put(Dst, 9495);
1491 } 1491 }
1492 dasm_put(Dst, 9512); 1492 dasm_put(Dst, 9502);
1493 dasm_put(Dst, 9586); 1493 dasm_put(Dst, 9576);
1494 dasm_put(Dst, 9686); 1494 dasm_put(Dst, 9676);
1495 if (cmov) { 1495 if (cmov) {
1496 dasm_put(Dst, 9689); 1496 dasm_put(Dst, 9679);
1497 } else { 1497 } else {
1498 dasm_put(Dst, 9693); 1498 dasm_put(Dst, 9683);
1499 } 1499 }
1500 dasm_put(Dst, 9700); 1500 dasm_put(Dst, 9690);
1501 if (cmov) { 1501 if (cmov) {
1502 dasm_put(Dst, 9501); 1502 dasm_put(Dst, 9491);
1503 } else { 1503 } else {
1504 dasm_put(Dst, 9505); 1504 dasm_put(Dst, 9495);
1505 } 1505 }
1506 dasm_put(Dst, 9718); 1506 dasm_put(Dst, 9708);
1507 } else { 1507 } else {
1508 dasm_put(Dst, 9797); 1508 dasm_put(Dst, 9787);
1509 } 1509 }
1510 dasm_put(Dst, 9800); 1510 dasm_put(Dst, 9790);
1511 dasm_put(Dst, 9885); 1511 dasm_put(Dst, 9875);
1512 dasm_put(Dst, 10016); 1512 dasm_put(Dst, 10006);
1513 dasm_put(Dst, 10215); 1513 dasm_put(Dst, 10205);
1514 if (sse) { 1514 if (sse) {
1515 dasm_put(Dst, 10238); 1515 dasm_put(Dst, 10228);
1516 dasm_put(Dst, 10295); 1516 dasm_put(Dst, 10285);
1517 dasm_put(Dst, 10386); 1517 dasm_put(Dst, 10376);
1518 } else { 1518 } else {
1519 dasm_put(Dst, 10428); 1519 dasm_put(Dst, 10418);
1520 dasm_put(Dst, 10520); 1520 dasm_put(Dst, 10510);
1521 } 1521 }
1522 dasm_put(Dst, 10566); 1522 dasm_put(Dst, 10556);
1523 if (sse) { 1523 if (sse) {
1524 dasm_put(Dst, 10572); 1524 dasm_put(Dst, 10562);
1525 dasm_put(Dst, 10677); 1525 dasm_put(Dst, 10667);
1526 dasm_put(Dst, 10760); 1526 dasm_put(Dst, 10750);
1527 } else { 1527 } else {
1528 dasm_put(Dst, 10832); 1528 dasm_put(Dst, 10822);
1529 dasm_put(Dst, 10915); 1529 dasm_put(Dst, 10905);
1530 if (cmov) { 1530 if (cmov) {
1531 dasm_put(Dst, 10970); 1531 dasm_put(Dst, 10960);
1532 } else { 1532 } else {
1533 dasm_put(Dst, 10989); 1533 dasm_put(Dst, 10979);
1534 } 1534 }
1535 dasm_put(Dst, 10828); 1535 dasm_put(Dst, 10818);
1536 } 1536 }
1537 dasm_put(Dst, 11030); 1537 dasm_put(Dst, 11020);
1538} 1538}
1539 1539
1540/* Generate the code for a single instruction. */ 1540/* Generate the code for a single instruction. */
1541static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) 1541static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1542{ 1542{
1543 int vk = 0; 1543 int vk = 0;
1544 dasm_put(Dst, 11084, defop); 1544 dasm_put(Dst, 11074, defop);
1545 1545
1546 switch (op) { 1546 switch (op) {
1547 1547
@@ -1550,617 +1550,617 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1550 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1550 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1551 1551
1552 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1552 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1553 dasm_put(Dst, 11086, LJ_TISNUM, LJ_TISNUM); 1553 dasm_put(Dst, 11076, LJ_TISNUM, LJ_TISNUM);
1554 if (sse) { 1554 if (sse) {
1555 dasm_put(Dst, 11107); 1555 dasm_put(Dst, 11097);
1556 } else { 1556 } else {
1557 dasm_put(Dst, 11122); 1557 dasm_put(Dst, 11112);
1558 if (cmov) { 1558 if (cmov) {
1559 dasm_put(Dst, 11132); 1559 dasm_put(Dst, 11122);
1560 } else { 1560 } else {
1561 dasm_put(Dst, 11138); 1561 dasm_put(Dst, 11128);
1562 } 1562 }
1563 } 1563 }
1564 switch (op) { 1564 switch (op) {
1565 case BC_ISLT: 1565 case BC_ISLT:
1566 dasm_put(Dst, 11145); 1566 dasm_put(Dst, 11135);
1567 break; 1567 break;
1568 case BC_ISGE: 1568 case BC_ISGE:
1569 dasm_put(Dst, 10381); 1569 dasm_put(Dst, 10371);
1570 break; 1570 break;
1571 case BC_ISLE: 1571 case BC_ISLE:
1572 dasm_put(Dst, 6591); 1572 dasm_put(Dst, 6578);
1573 break; 1573 break;
1574 case BC_ISGT: 1574 case BC_ISGT:
1575 dasm_put(Dst, 11150); 1575 dasm_put(Dst, 11140);
1576 break; 1576 break;
1577 default: break; /* Shut up GCC. */ 1577 default: break; /* Shut up GCC. */
1578 } 1578 }
1579 dasm_put(Dst, 11155, -BCBIAS_J*4); 1579 dasm_put(Dst, 11145, -BCBIAS_J*4);
1580 break; 1580 break;
1581 1581
1582 case BC_ISEQV: case BC_ISNEV: 1582 case BC_ISEQV: case BC_ISNEV:
1583 vk = op == BC_ISEQV; 1583 vk = op == BC_ISEQV;
1584 dasm_put(Dst, 11188, LJ_TISNUM, LJ_TISNUM); 1584 dasm_put(Dst, 11178, LJ_TISNUM, LJ_TISNUM);
1585 if (sse) { 1585 if (sse) {
1586 dasm_put(Dst, 11214); 1586 dasm_put(Dst, 11204);
1587 } else { 1587 } else {
1588 dasm_put(Dst, 11226); 1588 dasm_put(Dst, 11216);
1589 if (cmov) { 1589 if (cmov) {
1590 dasm_put(Dst, 11132); 1590 dasm_put(Dst, 11122);
1591 } else { 1591 } else {
1592 dasm_put(Dst, 11138); 1592 dasm_put(Dst, 11128);
1593 } 1593 }
1594 } 1594 }
1595 iseqne_fp: 1595 iseqne_fp:
1596 if (vk) { 1596 if (vk) {
1597 dasm_put(Dst, 11233); 1597 dasm_put(Dst, 11223);
1598 } else { 1598 } else {
1599 dasm_put(Dst, 11242); 1599 dasm_put(Dst, 11232);
1600 } 1600 }
1601 iseqne_end: 1601 iseqne_end:
1602 if (vk) { 1602 if (vk) {
1603 dasm_put(Dst, 11251, -BCBIAS_J*4); 1603 dasm_put(Dst, 11241, -BCBIAS_J*4);
1604 } else { 1604 } else {
1605 dasm_put(Dst, 11266, -BCBIAS_J*4); 1605 dasm_put(Dst, 11256, -BCBIAS_J*4);
1606 } 1606 }
1607 dasm_put(Dst, 8590); 1607 dasm_put(Dst, 8580);
1608 if (op == BC_ISEQV || op == BC_ISNEV) { 1608 if (op == BC_ISEQV || op == BC_ISNEV) {
1609 dasm_put(Dst, 11281, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1609 dasm_put(Dst, 11271, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1610 if (vk) { 1610 if (vk) {
1611 dasm_put(Dst, 11339); 1611 dasm_put(Dst, 11329);
1612 } else { 1612 } else {
1613 dasm_put(Dst, 11343); 1613 dasm_put(Dst, 11333);
1614 } 1614 }
1615 dasm_put(Dst, 11349); 1615 dasm_put(Dst, 11339);
1616 } 1616 }
1617 break; 1617 break;
1618 case BC_ISEQS: case BC_ISNES: 1618 case BC_ISEQS: case BC_ISNES:
1619 vk = op == BC_ISEQS; 1619 vk = op == BC_ISEQS;
1620 dasm_put(Dst, 11354, LJ_TSTR); 1620 dasm_put(Dst, 11344, LJ_TSTR);
1621 iseqne_test: 1621 iseqne_test:
1622 if (vk) { 1622 if (vk) {
1623 dasm_put(Dst, 11237); 1623 dasm_put(Dst, 11227);
1624 } else { 1624 } else {
1625 dasm_put(Dst, 10515); 1625 dasm_put(Dst, 10505);
1626 } 1626 }
1627 goto iseqne_end; 1627 goto iseqne_end;
1628 case BC_ISEQN: case BC_ISNEN: 1628 case BC_ISEQN: case BC_ISNEN:
1629 vk = op == BC_ISEQN; 1629 vk = op == BC_ISEQN;
1630 dasm_put(Dst, 11377, LJ_TISNUM); 1630 dasm_put(Dst, 11367, LJ_TISNUM);
1631 if (sse) { 1631 if (sse) {
1632 dasm_put(Dst, 11391); 1632 dasm_put(Dst, 11381);
1633 } else { 1633 } else {
1634 dasm_put(Dst, 11403); 1634 dasm_put(Dst, 11393);
1635 if (cmov) { 1635 if (cmov) {
1636 dasm_put(Dst, 11132); 1636 dasm_put(Dst, 11122);
1637 } else { 1637 } else {
1638 dasm_put(Dst, 11138); 1638 dasm_put(Dst, 11128);
1639 } 1639 }
1640 } 1640 }
1641 goto iseqne_fp; 1641 goto iseqne_fp;
1642 case BC_ISEQP: case BC_ISNEP: 1642 case BC_ISEQP: case BC_ISNEP:
1643 vk = op == BC_ISEQP; 1643 vk = op == BC_ISEQP;
1644 dasm_put(Dst, 11410); 1644 dasm_put(Dst, 11400);
1645 goto iseqne_test; 1645 goto iseqne_test;
1646 1646
1647 /* -- Unary test and copy ops ------------------------------------------- */ 1647 /* -- Unary test and copy ops ------------------------------------------- */
1648 1648
1649 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1649 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1650 dasm_put(Dst, 11421, LJ_TISTRUECOND); 1650 dasm_put(Dst, 11411, LJ_TISTRUECOND);
1651 if (op == BC_IST || op == BC_ISTC) { 1651 if (op == BC_IST || op == BC_ISTC) {
1652 dasm_put(Dst, 11433); 1652 dasm_put(Dst, 11423);
1653 } else { 1653 } else {
1654 dasm_put(Dst, 11438); 1654 dasm_put(Dst, 11428);
1655 } 1655 }
1656 if (op == BC_ISTC || op == BC_ISFC) { 1656 if (op == BC_ISTC || op == BC_ISFC) {
1657 dasm_put(Dst, 11443); 1657 dasm_put(Dst, 11433);
1658 } 1658 }
1659 dasm_put(Dst, 11454, -BCBIAS_J*4); 1659 dasm_put(Dst, 11444, -BCBIAS_J*4);
1660 break; 1660 break;
1661 1661
1662 /* -- Unary ops --------------------------------------------------------- */ 1662 /* -- Unary ops --------------------------------------------------------- */
1663 1663
1664 case BC_MOV: 1664 case BC_MOV:
1665 dasm_put(Dst, 11485); 1665 dasm_put(Dst, 11475);
1666 break; 1666 break;
1667 case BC_NOT: 1667 case BC_NOT:
1668 dasm_put(Dst, 11518, LJ_TISTRUECOND, LJ_TTRUE); 1668 dasm_put(Dst, 11508, LJ_TISTRUECOND, LJ_TTRUE);
1669 break; 1669 break;
1670 case BC_UNM: 1670 case BC_UNM:
1671 dasm_put(Dst, 11553, LJ_TISNUM); 1671 dasm_put(Dst, 11543, LJ_TISNUM);
1672 if (sse) { 1672 if (sse) {
1673 dasm_put(Dst, 11564); 1673 dasm_put(Dst, 11554);
1674 } else { 1674 } else {
1675 dasm_put(Dst, 11594); 1675 dasm_put(Dst, 11584);
1676 } 1676 }
1677 dasm_put(Dst, 8590); 1677 dasm_put(Dst, 8580);
1678 break; 1678 break;
1679 case BC_LEN: 1679 case BC_LEN:
1680 dasm_put(Dst, 11603, LJ_TSTR); 1680 dasm_put(Dst, 11593, LJ_TSTR);
1681 if (sse) { 1681 if (sse) {
1682 dasm_put(Dst, 11617, Dt5(->len)); 1682 dasm_put(Dst, 11607, Dt5(->len));
1683 } else { 1683 } else {
1684 dasm_put(Dst, 11635, Dt5(->len)); 1684 dasm_put(Dst, 11625, Dt5(->len));
1685 } 1685 }
1686 dasm_put(Dst, 11644, LJ_TTAB); 1686 dasm_put(Dst, 11634, LJ_TTAB);
1687 if (sse) { 1687 if (sse) {
1688 dasm_put(Dst, 11684); 1688 dasm_put(Dst, 11674);
1689 } else { 1689 } else {
1690 dasm_put(Dst, 11693); 1690 dasm_put(Dst, 11683);
1691 } 1691 }
1692 dasm_put(Dst, 11703); 1692 dasm_put(Dst, 11693);
1693 break; 1693 break;
1694 1694
1695 /* -- Binary ops -------------------------------------------------------- */ 1695 /* -- Binary ops -------------------------------------------------------- */
1696 1696
1697 1697
1698 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1698 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1699 dasm_put(Dst, 11713); 1699 dasm_put(Dst, 11703);
1700 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1700 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1701 switch (vk) { 1701 switch (vk) {
1702 case 0: 1702 case 0:
1703 dasm_put(Dst, 11721, LJ_TISNUM); 1703 dasm_put(Dst, 11711, LJ_TISNUM);
1704 if (sse) { 1704 if (sse) {
1705 dasm_put(Dst, 11733); 1705 dasm_put(Dst, 11723);
1706 } else { 1706 } else {
1707 dasm_put(Dst, 11747); 1707 dasm_put(Dst, 11737);
1708 } 1708 }
1709 break; 1709 break;
1710 case 1: 1710 case 1:
1711 dasm_put(Dst, 11755, LJ_TISNUM); 1711 dasm_put(Dst, 11745, LJ_TISNUM);
1712 if (sse) { 1712 if (sse) {
1713 dasm_put(Dst, 11767); 1713 dasm_put(Dst, 11757);
1714 } else { 1714 } else {
1715 dasm_put(Dst, 11781); 1715 dasm_put(Dst, 11771);
1716 } 1716 }
1717 break; 1717 break;
1718 default: 1718 default:
1719 dasm_put(Dst, 11789, LJ_TISNUM, LJ_TISNUM); 1719 dasm_put(Dst, 11779, LJ_TISNUM, LJ_TISNUM);
1720 if (sse) { 1720 if (sse) {
1721 dasm_put(Dst, 11811); 1721 dasm_put(Dst, 11801);
1722 } else { 1722 } else {
1723 dasm_put(Dst, 11825); 1723 dasm_put(Dst, 11815);
1724 } 1724 }
1725 break; 1725 break;
1726 } 1726 }
1727 if (sse) { 1727 if (sse) {
1728 dasm_put(Dst, 11587); 1728 dasm_put(Dst, 11577);
1729 } else { 1729 } else {
1730 dasm_put(Dst, 11599); 1730 dasm_put(Dst, 11589);
1731 } 1731 }
1732 dasm_put(Dst, 8590); 1732 dasm_put(Dst, 8580);
1733 break; 1733 break;
1734 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1734 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1735 dasm_put(Dst, 11713); 1735 dasm_put(Dst, 11703);
1736 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1736 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1737 switch (vk) { 1737 switch (vk) {
1738 case 0: 1738 case 0:
1739 dasm_put(Dst, 11721, LJ_TISNUM); 1739 dasm_put(Dst, 11711, LJ_TISNUM);
1740 if (sse) { 1740 if (sse) {
1741 dasm_put(Dst, 11833); 1741 dasm_put(Dst, 11823);
1742 } else { 1742 } else {
1743 dasm_put(Dst, 11847); 1743 dasm_put(Dst, 11837);
1744 } 1744 }
1745 break; 1745 break;
1746 case 1: 1746 case 1:
1747 dasm_put(Dst, 11755, LJ_TISNUM); 1747 dasm_put(Dst, 11745, LJ_TISNUM);
1748 if (sse) { 1748 if (sse) {
1749 dasm_put(Dst, 11855); 1749 dasm_put(Dst, 11845);
1750 } else { 1750 } else {
1751 dasm_put(Dst, 11869); 1751 dasm_put(Dst, 11859);
1752 } 1752 }
1753 break; 1753 break;
1754 default: 1754 default:
1755 dasm_put(Dst, 11789, LJ_TISNUM, LJ_TISNUM); 1755 dasm_put(Dst, 11779, LJ_TISNUM, LJ_TISNUM);
1756 if (sse) { 1756 if (sse) {
1757 dasm_put(Dst, 11877); 1757 dasm_put(Dst, 11867);
1758 } else { 1758 } else {
1759 dasm_put(Dst, 11891); 1759 dasm_put(Dst, 11881);
1760 } 1760 }
1761 break; 1761 break;
1762 } 1762 }
1763 if (sse) { 1763 if (sse) {
1764 dasm_put(Dst, 11587); 1764 dasm_put(Dst, 11577);
1765 } else { 1765 } else {
1766 dasm_put(Dst, 11599); 1766 dasm_put(Dst, 11589);
1767 } 1767 }
1768 dasm_put(Dst, 8590); 1768 dasm_put(Dst, 8580);
1769 break; 1769 break;
1770 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1770 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1771 dasm_put(Dst, 11713); 1771 dasm_put(Dst, 11703);
1772 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1772 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1773 switch (vk) { 1773 switch (vk) {
1774 case 0: 1774 case 0:
1775 dasm_put(Dst, 11721, LJ_TISNUM); 1775 dasm_put(Dst, 11711, LJ_TISNUM);
1776 if (sse) { 1776 if (sse) {
1777 dasm_put(Dst, 11899); 1777 dasm_put(Dst, 11889);
1778 } else { 1778 } else {
1779 dasm_put(Dst, 11913); 1779 dasm_put(Dst, 11903);
1780 } 1780 }
1781 break; 1781 break;
1782 case 1: 1782 case 1:
1783 dasm_put(Dst, 11755, LJ_TISNUM); 1783 dasm_put(Dst, 11745, LJ_TISNUM);
1784 if (sse) { 1784 if (sse) {
1785 dasm_put(Dst, 11921); 1785 dasm_put(Dst, 11911);
1786 } else { 1786 } else {
1787 dasm_put(Dst, 11935); 1787 dasm_put(Dst, 11925);
1788 } 1788 }
1789 break; 1789 break;
1790 default: 1790 default:
1791 dasm_put(Dst, 11789, LJ_TISNUM, LJ_TISNUM); 1791 dasm_put(Dst, 11779, LJ_TISNUM, LJ_TISNUM);
1792 if (sse) { 1792 if (sse) {
1793 dasm_put(Dst, 11943); 1793 dasm_put(Dst, 11933);
1794 } else { 1794 } else {
1795 dasm_put(Dst, 11957); 1795 dasm_put(Dst, 11947);
1796 } 1796 }
1797 break; 1797 break;
1798 } 1798 }
1799 if (sse) { 1799 if (sse) {
1800 dasm_put(Dst, 11587); 1800 dasm_put(Dst, 11577);
1801 } else { 1801 } else {
1802 dasm_put(Dst, 11599); 1802 dasm_put(Dst, 11589);
1803 } 1803 }
1804 dasm_put(Dst, 8590); 1804 dasm_put(Dst, 8580);
1805 break; 1805 break;
1806 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1806 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1807 dasm_put(Dst, 11713); 1807 dasm_put(Dst, 11703);
1808 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1808 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1809 switch (vk) { 1809 switch (vk) {
1810 case 0: 1810 case 0:
1811 dasm_put(Dst, 11721, LJ_TISNUM); 1811 dasm_put(Dst, 11711, LJ_TISNUM);
1812 if (sse) { 1812 if (sse) {
1813 dasm_put(Dst, 11965); 1813 dasm_put(Dst, 11955);
1814 } else { 1814 } else {
1815 dasm_put(Dst, 11979); 1815 dasm_put(Dst, 11969);
1816 } 1816 }
1817 break; 1817 break;
1818 case 1: 1818 case 1:
1819 dasm_put(Dst, 11755, LJ_TISNUM); 1819 dasm_put(Dst, 11745, LJ_TISNUM);
1820 if (sse) { 1820 if (sse) {
1821 dasm_put(Dst, 11987); 1821 dasm_put(Dst, 11977);
1822 } else { 1822 } else {
1823 dasm_put(Dst, 12001); 1823 dasm_put(Dst, 11991);
1824 } 1824 }
1825 break; 1825 break;
1826 default: 1826 default:
1827 dasm_put(Dst, 11789, LJ_TISNUM, LJ_TISNUM); 1827 dasm_put(Dst, 11779, LJ_TISNUM, LJ_TISNUM);
1828 if (sse) { 1828 if (sse) {
1829 dasm_put(Dst, 12009); 1829 dasm_put(Dst, 11999);
1830 } else { 1830 } else {
1831 dasm_put(Dst, 12023); 1831 dasm_put(Dst, 12013);
1832 } 1832 }
1833 break; 1833 break;
1834 } 1834 }
1835 if (sse) { 1835 if (sse) {
1836 dasm_put(Dst, 11587); 1836 dasm_put(Dst, 11577);
1837 } else { 1837 } else {
1838 dasm_put(Dst, 11599); 1838 dasm_put(Dst, 11589);
1839 } 1839 }
1840 dasm_put(Dst, 8590); 1840 dasm_put(Dst, 8580);
1841 break; 1841 break;
1842 case BC_MODVN: 1842 case BC_MODVN:
1843 dasm_put(Dst, 11713); 1843 dasm_put(Dst, 11703);
1844 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1844 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1845 switch (vk) { 1845 switch (vk) {
1846 case 0: 1846 case 0:
1847 dasm_put(Dst, 11721, LJ_TISNUM); 1847 dasm_put(Dst, 11711, LJ_TISNUM);
1848 if (sse) { 1848 if (sse) {
1849 dasm_put(Dst, 12031); 1849 dasm_put(Dst, 12021);
1850 } else { 1850 } else {
1851 dasm_put(Dst, 12045); 1851 dasm_put(Dst, 12035);
1852 } 1852 }
1853 break; 1853 break;
1854 case 1: 1854 case 1:
1855 dasm_put(Dst, 11755, LJ_TISNUM); 1855 dasm_put(Dst, 11745, LJ_TISNUM);
1856 if (sse) { 1856 if (sse) {
1857 dasm_put(Dst, 12053); 1857 dasm_put(Dst, 12043);
1858 } else { 1858 } else {
1859 dasm_put(Dst, 12067); 1859 dasm_put(Dst, 12057);
1860 } 1860 }
1861 break; 1861 break;
1862 default: 1862 default:
1863 dasm_put(Dst, 11789, LJ_TISNUM, LJ_TISNUM); 1863 dasm_put(Dst, 11779, LJ_TISNUM, LJ_TISNUM);
1864 if (sse) { 1864 if (sse) {
1865 dasm_put(Dst, 12075); 1865 dasm_put(Dst, 12065);
1866 } else { 1866 } else {
1867 dasm_put(Dst, 12089); 1867 dasm_put(Dst, 12079);
1868 } 1868 }
1869 break; 1869 break;
1870 } 1870 }
1871 dasm_put(Dst, 12097); 1871 dasm_put(Dst, 12087);
1872 if (sse) { 1872 if (sse) {
1873 dasm_put(Dst, 11587); 1873 dasm_put(Dst, 11577);
1874 } else { 1874 } else {
1875 dasm_put(Dst, 11599); 1875 dasm_put(Dst, 11589);
1876 } 1876 }
1877 dasm_put(Dst, 8590); 1877 dasm_put(Dst, 8580);
1878 break; 1878 break;
1879 case BC_MODNV: case BC_MODVV: 1879 case BC_MODNV: case BC_MODVV:
1880 dasm_put(Dst, 11713); 1880 dasm_put(Dst, 11703);
1881 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1881 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1882 switch (vk) { 1882 switch (vk) {
1883 case 0: 1883 case 0:
1884 dasm_put(Dst, 11721, LJ_TISNUM); 1884 dasm_put(Dst, 11711, LJ_TISNUM);
1885 if (sse) { 1885 if (sse) {
1886 dasm_put(Dst, 12031); 1886 dasm_put(Dst, 12021);
1887 } else { 1887 } else {
1888 dasm_put(Dst, 12045); 1888 dasm_put(Dst, 12035);
1889 } 1889 }
1890 break; 1890 break;
1891 case 1: 1891 case 1:
1892 dasm_put(Dst, 11755, LJ_TISNUM); 1892 dasm_put(Dst, 11745, LJ_TISNUM);
1893 if (sse) { 1893 if (sse) {
1894 dasm_put(Dst, 12053); 1894 dasm_put(Dst, 12043);
1895 } else { 1895 } else {
1896 dasm_put(Dst, 12067); 1896 dasm_put(Dst, 12057);
1897 } 1897 }
1898 break; 1898 break;
1899 default: 1899 default:
1900 dasm_put(Dst, 11789, LJ_TISNUM, LJ_TISNUM); 1900 dasm_put(Dst, 11779, LJ_TISNUM, LJ_TISNUM);
1901 if (sse) { 1901 if (sse) {
1902 dasm_put(Dst, 12075); 1902 dasm_put(Dst, 12065);
1903 } else { 1903 } else {
1904 dasm_put(Dst, 12089); 1904 dasm_put(Dst, 12079);
1905 } 1905 }
1906 break; 1906 break;
1907 } 1907 }
1908 dasm_put(Dst, 12103); 1908 dasm_put(Dst, 12093);
1909 break; 1909 break;
1910 case BC_POW: 1910 case BC_POW:
1911 dasm_put(Dst, 11713); 1911 dasm_put(Dst, 11703);
1912 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1912 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1913 switch (vk) { 1913 switch (vk) {
1914 case 0: 1914 case 0:
1915 dasm_put(Dst, 11721, LJ_TISNUM); 1915 dasm_put(Dst, 11711, LJ_TISNUM);
1916 if (sse) { 1916 if (sse) {
1917 dasm_put(Dst, 12031); 1917 dasm_put(Dst, 12021);
1918 } else { 1918 } else {
1919 dasm_put(Dst, 12045); 1919 dasm_put(Dst, 12035);
1920 } 1920 }
1921 break; 1921 break;
1922 case 1: 1922 case 1:
1923 dasm_put(Dst, 11755, LJ_TISNUM); 1923 dasm_put(Dst, 11745, LJ_TISNUM);
1924 if (sse) { 1924 if (sse) {
1925 dasm_put(Dst, 12053); 1925 dasm_put(Dst, 12043);
1926 } else { 1926 } else {
1927 dasm_put(Dst, 12067); 1927 dasm_put(Dst, 12057);
1928 } 1928 }
1929 break; 1929 break;
1930 default: 1930 default:
1931 dasm_put(Dst, 11789, LJ_TISNUM, LJ_TISNUM); 1931 dasm_put(Dst, 11779, LJ_TISNUM, LJ_TISNUM);
1932 if (sse) { 1932 if (sse) {
1933 dasm_put(Dst, 12075); 1933 dasm_put(Dst, 12065);
1934 } else { 1934 } else {
1935 dasm_put(Dst, 12089); 1935 dasm_put(Dst, 12079);
1936 } 1936 }
1937 break; 1937 break;
1938 } 1938 }
1939 dasm_put(Dst, 12108); 1939 dasm_put(Dst, 12098);
1940 if (sse) { 1940 if (sse) {
1941 dasm_put(Dst, 11587); 1941 dasm_put(Dst, 11577);
1942 } else { 1942 } else {
1943 dasm_put(Dst, 11599); 1943 dasm_put(Dst, 11589);
1944 } 1944 }
1945 dasm_put(Dst, 8590); 1945 dasm_put(Dst, 8580);
1946 break; 1946 break;
1947 1947
1948 case BC_CAT: 1948 case BC_CAT:
1949 dasm_put(Dst, 12112, Dt1(->base), Dt1(->base)); 1949 dasm_put(Dst, 12102, Dt1(->base), Dt1(->base));
1950 break; 1950 break;
1951 1951
1952 /* -- Constant ops ------------------------------------------------------ */ 1952 /* -- Constant ops ------------------------------------------------------ */
1953 1953
1954 case BC_KSTR: 1954 case BC_KSTR:
1955 dasm_put(Dst, 12206, LJ_TSTR); 1955 dasm_put(Dst, 12196, LJ_TSTR);
1956 break; 1956 break;
1957 case BC_KSHORT: 1957 case BC_KSHORT:
1958 if (sse) { 1958 if (sse) {
1959 dasm_put(Dst, 12239); 1959 dasm_put(Dst, 12229);
1960 } else { 1960 } else {
1961 dasm_put(Dst, 12254); 1961 dasm_put(Dst, 12244);
1962 } 1962 }
1963 dasm_put(Dst, 8590); 1963 dasm_put(Dst, 8580);
1964 break; 1964 break;
1965 case BC_KNUM: 1965 case BC_KNUM:
1966 if (sse) { 1966 if (sse) {
1967 dasm_put(Dst, 12262); 1967 dasm_put(Dst, 12252);
1968 } else { 1968 } else {
1969 dasm_put(Dst, 12275); 1969 dasm_put(Dst, 12265);
1970 } 1970 }
1971 dasm_put(Dst, 8590); 1971 dasm_put(Dst, 8580);
1972 break; 1972 break;
1973 case BC_KPRI: 1973 case BC_KPRI:
1974 dasm_put(Dst, 12282); 1974 dasm_put(Dst, 12272);
1975 break; 1975 break;
1976 case BC_KNIL: 1976 case BC_KNIL:
1977 dasm_put(Dst, 12308, LJ_TNIL); 1977 dasm_put(Dst, 12298, LJ_TNIL);
1978 break; 1978 break;
1979 1979
1980 /* -- Upvalue and function ops ------------------------------------------ */ 1980 /* -- Upvalue and function ops ------------------------------------------ */
1981 1981
1982 case BC_UGET: 1982 case BC_UGET:
1983 dasm_put(Dst, 12354, offsetof(GCfuncL, uvptr), DtA(->v)); 1983 dasm_put(Dst, 12344, offsetof(GCfuncL, uvptr), DtA(->v));
1984 break; 1984 break;
1985 case BC_USETV: 1985 case BC_USETV:
1986#define TV2MARKOFS \ 1986#define TV2MARKOFS \
1987 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 1987 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
1988 dasm_put(Dst, 12398, 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); 1988 dasm_put(Dst, 12388, 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);
1989 dasm_put(Dst, 12488); 1989 dasm_put(Dst, 12478);
1990 break; 1990 break;
1991#undef TV2MARKOFS 1991#undef TV2MARKOFS
1992 case BC_USETS: 1992 case BC_USETS:
1993 dasm_put(Dst, 12500, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 1993 dasm_put(Dst, 12490, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
1994 break; 1994 break;
1995 case BC_USETN: 1995 case BC_USETN:
1996 dasm_put(Dst, 12591); 1996 dasm_put(Dst, 12581);
1997 if (sse) { 1997 if (sse) {
1998 dasm_put(Dst, 12596); 1998 dasm_put(Dst, 12586);
1999 } else { 1999 } else {
2000 dasm_put(Dst, 11406); 2000 dasm_put(Dst, 11396);
2001 } 2001 }
2002 dasm_put(Dst, 12603, offsetof(GCfuncL, uvptr), DtA(->v)); 2002 dasm_put(Dst, 12593, offsetof(GCfuncL, uvptr), DtA(->v));
2003 if (sse) { 2003 if (sse) {
2004 dasm_put(Dst, 4965); 2004 dasm_put(Dst, 4965);
2005 } else { 2005 } else {
2006 dasm_put(Dst, 4971); 2006 dasm_put(Dst, 4971);
2007 } 2007 }
2008 dasm_put(Dst, 8590); 2008 dasm_put(Dst, 8580);
2009 break; 2009 break;
2010 case BC_USETP: 2010 case BC_USETP:
2011 dasm_put(Dst, 12612, offsetof(GCfuncL, uvptr), DtA(->v)); 2011 dasm_put(Dst, 12602, offsetof(GCfuncL, uvptr), DtA(->v));
2012 break; 2012 break;
2013 case BC_UCLO: 2013 case BC_UCLO:
2014 dasm_put(Dst, 12649, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 2014 dasm_put(Dst, 12639, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
2015 break; 2015 break;
2016 2016
2017 case BC_FNEW: 2017 case BC_FNEW:
2018 dasm_put(Dst, 12703, Dt1(->base), Dt1(->base), LJ_TFUNC); 2018 dasm_put(Dst, 12693, Dt1(->base), Dt1(->base), LJ_TFUNC);
2019 break; 2019 break;
2020 2020
2021 /* -- Table ops --------------------------------------------------------- */ 2021 /* -- Table ops --------------------------------------------------------- */
2022 2022
2023 case BC_TNEW: 2023 case BC_TNEW:
2024 dasm_put(Dst, 12774, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 2024 dasm_put(Dst, 12764, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
2025 break; 2025 break;
2026 case BC_TDUP: 2026 case BC_TDUP:
2027 dasm_put(Dst, 12895, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 2027 dasm_put(Dst, 12885, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
2028 break; 2028 break;
2029 2029
2030 case BC_GGET: 2030 case BC_GGET:
2031 dasm_put(Dst, 12987, Dt7(->env)); 2031 dasm_put(Dst, 12977, Dt7(->env));
2032 break; 2032 break;
2033 case BC_GSET: 2033 case BC_GSET:
2034 dasm_put(Dst, 13005, Dt7(->env)); 2034 dasm_put(Dst, 12995, Dt7(->env));
2035 break; 2035 break;
2036 2036
2037 case BC_TGETV: 2037 case BC_TGETV:
2038 dasm_put(Dst, 13023, LJ_TTAB, LJ_TISNUM); 2038 dasm_put(Dst, 13013, LJ_TTAB, LJ_TISNUM);
2039 if (sse) { 2039 if (sse) {
2040 dasm_put(Dst, 13056); 2040 dasm_put(Dst, 13046);
2041 } else { 2041 } else {
2042 dasm_put(Dst, 13077); 2042 dasm_put(Dst, 13067);
2043 if (cmov) { 2043 if (cmov) {
2044 dasm_put(Dst, 11132); 2044 dasm_put(Dst, 11122);
2045 } else { 2045 } else {
2046 dasm_put(Dst, 11138); 2046 dasm_put(Dst, 11128);
2047 } 2047 }
2048 dasm_put(Dst, 2856); 2048 dasm_put(Dst, 2856);
2049 } 2049 }
2050 dasm_put(Dst, 13087, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2050 dasm_put(Dst, 13077, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2051 dasm_put(Dst, 13179, LJ_TSTR); 2051 dasm_put(Dst, 13169, LJ_TSTR);
2052 break; 2052 break;
2053 case BC_TGETS: 2053 case BC_TGETS:
2054 dasm_put(Dst, 13197, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2054 dasm_put(Dst, 13187, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2055 dasm_put(Dst, 13281, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2055 dasm_put(Dst, 13271, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2056 break; 2056 break;
2057 case BC_TGETB: 2057 case BC_TGETB:
2058 dasm_put(Dst, 13352, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2058 dasm_put(Dst, 13342, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2059 dasm_put(Dst, 11703); 2059 dasm_put(Dst, 11693);
2060 break; 2060 break;
2061 2061
2062 case BC_TSETV: 2062 case BC_TSETV:
2063 dasm_put(Dst, 13451, LJ_TTAB, LJ_TISNUM); 2063 dasm_put(Dst, 13441, LJ_TTAB, LJ_TISNUM);
2064 if (sse) { 2064 if (sse) {
2065 dasm_put(Dst, 13056); 2065 dasm_put(Dst, 13046);
2066 } else { 2066 } else {
2067 dasm_put(Dst, 13077); 2067 dasm_put(Dst, 13067);
2068 if (cmov) { 2068 if (cmov) {
2069 dasm_put(Dst, 11132); 2069 dasm_put(Dst, 11122);
2070 } else { 2070 } else {
2071 dasm_put(Dst, 11138); 2071 dasm_put(Dst, 11128);
2072 } 2072 }
2073 dasm_put(Dst, 2856); 2073 dasm_put(Dst, 2856);
2074 } 2074 }
2075 dasm_put(Dst, 13484, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 2075 dasm_put(Dst, 13474, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
2076 dasm_put(Dst, 13567, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2076 dasm_put(Dst, 13557, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2077 break; 2077 break;
2078 case BC_TSETS: 2078 case BC_TSETS:
2079 dasm_put(Dst, 13629, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2079 dasm_put(Dst, 13619, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2080 dasm_put(Dst, 13704, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 2080 dasm_put(Dst, 13694, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
2081 dasm_put(Dst, 13796, 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)); 2081 dasm_put(Dst, 13786, 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));
2082 break; 2082 break;
2083 case BC_TSETB: 2083 case BC_TSETB:
2084 dasm_put(Dst, 13892, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 2084 dasm_put(Dst, 13882, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
2085 dasm_put(Dst, 13990, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2085 dasm_put(Dst, 13980, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2086 break; 2086 break;
2087 2087
2088 case BC_TSETM: 2088 case BC_TSETM:
2089 dasm_put(Dst, 14036); 2089 dasm_put(Dst, 14026);
2090 if (sse) { 2090 if (sse) {
2091 dasm_put(Dst, 12596); 2091 dasm_put(Dst, 12586);
2092 } else { 2092 } else {
2093 dasm_put(Dst, 14041); 2093 dasm_put(Dst, 14031);
2094 } 2094 }
2095 dasm_put(Dst, 14049, Dt6(->marked), LJ_GC_BLACK); 2095 dasm_put(Dst, 14039, Dt6(->marked), LJ_GC_BLACK);
2096 if (sse) { 2096 if (sse) {
2097 dasm_put(Dst, 14074); 2097 dasm_put(Dst, 14064);
2098 } else { 2098 } else {
2099 dasm_put(Dst, 14081); 2099 dasm_put(Dst, 14071);
2100 } 2100 }
2101 dasm_put(Dst, 14086, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); 2101 dasm_put(Dst, 14076, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain));
2102 dasm_put(Dst, 14214, Dt6(->gclist)); 2102 dasm_put(Dst, 14204, Dt6(->gclist));
2103 break; 2103 break;
2104 2104
2105 /* -- Calls and vararg handling ----------------------------------------- */ 2105 /* -- Calls and vararg handling ----------------------------------------- */
2106 2106
2107 case BC_CALL: case BC_CALLM: 2107 case BC_CALL: case BC_CALLM:
2108 dasm_put(Dst, 11717); 2108 dasm_put(Dst, 11707);
2109 if (op == BC_CALLM) { 2109 if (op == BC_CALLM) {
2110 dasm_put(Dst, 14222); 2110 dasm_put(Dst, 14212);
2111 } 2111 }
2112 dasm_put(Dst, 14227, LJ_TFUNC, Dt7(->gate)); 2112 dasm_put(Dst, 14217, LJ_TFUNC, Dt7(->gate));
2113 break; 2113 break;
2114 2114
2115 case BC_CALLMT: 2115 case BC_CALLMT:
2116 dasm_put(Dst, 14222); 2116 dasm_put(Dst, 14212);
2117 break; 2117 break;
2118 case BC_CALLT: 2118 case BC_CALLT:
2119 dasm_put(Dst, 14250, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->gate)); 2119 dasm_put(Dst, 14240, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->gate));
2120 dasm_put(Dst, 14355, FRAME_TYPE, Dt7(->pt), Dt9(->k)); 2120 dasm_put(Dst, 14345, FRAME_TYPE, Dt7(->pt), Dt9(->k));
2121 break; 2121 break;
2122 2122
2123 case BC_ITERC: 2123 case BC_ITERC:
2124 dasm_put(Dst, 14412, LJ_TFUNC, Dt7(->gate)); 2124 dasm_put(Dst, 14402, LJ_TFUNC, Dt7(->gate));
2125 break; 2125 break;
2126 2126
2127 case BC_VARG: 2127 case BC_VARG:
2128 dasm_put(Dst, 14474, Dt7(->pt), Dt9(->numparams), (8+FRAME_VARG), LJ_TNIL); 2128 dasm_put(Dst, 14464, Dt7(->pt), Dt9(->numparams), (8+FRAME_VARG), LJ_TNIL);
2129 dasm_put(Dst, 14618, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2129 dasm_put(Dst, 14608, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2130 break; 2130 break;
2131 2131
2132 /* -- Returns ----------------------------------------------------------- */ 2132 /* -- Returns ----------------------------------------------------------- */
2133 2133
2134 case BC_RETM: 2134 case BC_RETM:
2135 dasm_put(Dst, 14222); 2135 dasm_put(Dst, 14212);
2136 break; 2136 break;
2137 2137
2138 case BC_RET: case BC_RET0: case BC_RET1: 2138 case BC_RET: case BC_RET0: case BC_RET1:
2139 if (op != BC_RET0) { 2139 if (op != BC_RET0) {
2140 dasm_put(Dst, 14717); 2140 dasm_put(Dst, 14707);
2141 } 2141 }
2142 dasm_put(Dst, 14721, FRAME_TYPE); 2142 dasm_put(Dst, 14711, FRAME_TYPE);
2143 switch (op) { 2143 switch (op) {
2144 case BC_RET: 2144 case BC_RET:
2145 dasm_put(Dst, 14740); 2145 dasm_put(Dst, 14730);
2146 break; 2146 break;
2147 case BC_RET1: 2147 case BC_RET1:
2148 dasm_put(Dst, 14798); 2148 dasm_put(Dst, 14788);
2149 /* fallthrough */ 2149 /* fallthrough */
2150 case BC_RET0: 2150 case BC_RET0:
2151 dasm_put(Dst, 14814); 2151 dasm_put(Dst, 14804);
2152 default: 2152 default:
2153 break; 2153 break;
2154 } 2154 }
2155 dasm_put(Dst, 14825, Dt7(->pt), Dt9(->k)); 2155 dasm_put(Dst, 14815, Dt7(->pt), Dt9(->k));
2156 if (op == BC_RET) { 2156 if (op == BC_RET) {
2157 dasm_put(Dst, 14867, LJ_TNIL); 2157 dasm_put(Dst, 14857, LJ_TNIL);
2158 } else { 2158 } else {
2159 dasm_put(Dst, 14876, LJ_TNIL); 2159 dasm_put(Dst, 14866, LJ_TNIL);
2160 } 2160 }
2161 dasm_put(Dst, 14883); 2161 dasm_put(Dst, 14873);
2162 if (op != BC_RET0) { 2162 if (op != BC_RET0) {
2163 dasm_put(Dst, 14904); 2163 dasm_put(Dst, 14894);
2164 } 2164 }
2165 dasm_put(Dst, 5061); 2165 dasm_put(Dst, 5061);
2166 break; 2166 break;
@@ -2170,7 +2170,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2170 2170
2171 case BC_FORL: 2171 case BC_FORL:
2172#if LJ_HASJIT 2172#if LJ_HASJIT
2173 dasm_put(Dst, 14908, HOTCOUNT_PCMASK, GG_DISP2HOT); 2173 dasm_put(Dst, 14898, HOTCOUNT_PCMASK, GG_DISP2HOT);
2174#endif 2174#endif
2175 break; 2175 break;
2176 2176
@@ -2182,57 +2182,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2182 case BC_FORI: 2182 case BC_FORI:
2183 case BC_IFORL: 2183 case BC_IFORL:
2184 vk = (op == BC_IFORL || op == BC_JFORL); 2184 vk = (op == BC_IFORL || op == BC_JFORL);
2185 dasm_put(Dst, 14929); 2185 dasm_put(Dst, 14919);
2186 if (!vk) { 2186 if (!vk) {
2187 dasm_put(Dst, 14933, LJ_TISNUM, LJ_TISNUM); 2187 dasm_put(Dst, 14923, LJ_TISNUM, LJ_TISNUM);
2188 } 2188 }
2189 dasm_put(Dst, 14952); 2189 dasm_put(Dst, 14942);
2190 if (!vk) { 2190 if (!vk) {
2191 dasm_put(Dst, 14956, LJ_TISNUM); 2191 dasm_put(Dst, 14946, LJ_TISNUM);
2192 } 2192 }
2193 if (sse) { 2193 if (sse) {
2194 dasm_put(Dst, 14965); 2194 dasm_put(Dst, 14955);
2195 if (vk) { 2195 if (vk) {
2196 dasm_put(Dst, 14977); 2196 dasm_put(Dst, 14967);
2197 } else { 2197 } else {
2198 dasm_put(Dst, 14996); 2198 dasm_put(Dst, 14986);
2199 } 2199 }
2200 dasm_put(Dst, 15001); 2200 dasm_put(Dst, 14991);
2201 } else { 2201 } else {
2202 dasm_put(Dst, 15014); 2202 dasm_put(Dst, 15004);
2203 if (vk) { 2203 if (vk) {
2204 dasm_put(Dst, 15020); 2204 dasm_put(Dst, 15010);
2205 } else { 2205 } else {
2206 dasm_put(Dst, 15036); 2206 dasm_put(Dst, 15026);
2207 } 2207 }
2208 dasm_put(Dst, 15044); 2208 dasm_put(Dst, 15034);
2209 if (cmov) { 2209 if (cmov) {
2210 dasm_put(Dst, 11132); 2210 dasm_put(Dst, 11122);
2211 } else { 2211 } else {
2212 dasm_put(Dst, 11138); 2212 dasm_put(Dst, 11128);
2213 } 2213 }
2214 if (!cmov) { 2214 if (!cmov) {
2215 dasm_put(Dst, 15049); 2215 dasm_put(Dst, 15039);
2216 } 2216 }
2217 } 2217 }
2218 if (op == BC_FORI) { 2218 if (op == BC_FORI) {
2219 dasm_put(Dst, 15055, -BCBIAS_J*4); 2219 dasm_put(Dst, 15045, -BCBIAS_J*4);
2220 } else if (op == BC_JFORI) { 2220 } else if (op == BC_JFORI) {
2221 dasm_put(Dst, 15065, -BCBIAS_J*4, BC_JLOOP); 2221 dasm_put(Dst, 15055, -BCBIAS_J*4, BC_JLOOP);
2222 } else if (op == BC_IFORL) { 2222 } else if (op == BC_IFORL) {
2223 dasm_put(Dst, 15079, -BCBIAS_J*4); 2223 dasm_put(Dst, 15069, -BCBIAS_J*4);
2224 } else { 2224 } else {
2225 dasm_put(Dst, 15075, BC_JLOOP); 2225 dasm_put(Dst, 15065, BC_JLOOP);
2226 } 2226 }
2227 dasm_put(Dst, 11167); 2227 dasm_put(Dst, 11157);
2228 if (sse) { 2228 if (sse) {
2229 dasm_put(Dst, 15089); 2229 dasm_put(Dst, 15079);
2230 } 2230 }
2231 break; 2231 break;
2232 2232
2233 case BC_ITERL: 2233 case BC_ITERL:
2234#if LJ_HASJIT 2234#if LJ_HASJIT
2235 dasm_put(Dst, 14908, HOTCOUNT_PCMASK, GG_DISP2HOT); 2235 dasm_put(Dst, 14898, HOTCOUNT_PCMASK, GG_DISP2HOT);
2236#endif 2236#endif
2237 break; 2237 break;
2238 2238
@@ -2241,33 +2241,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2241 break; 2241 break;
2242#endif 2242#endif
2243 case BC_IITERL: 2243 case BC_IITERL:
2244 dasm_put(Dst, 15100, LJ_TNIL); 2244 dasm_put(Dst, 15090, LJ_TNIL);
2245 if (op == BC_JITERL) { 2245 if (op == BC_JITERL) {
2246 dasm_put(Dst, 15115, BC_JLOOP); 2246 dasm_put(Dst, 15105, BC_JLOOP);
2247 } else { 2247 } else {
2248 dasm_put(Dst, 15129, -BCBIAS_J*4); 2248 dasm_put(Dst, 15119, -BCBIAS_J*4);
2249 } 2249 }
2250 dasm_put(Dst, 11464); 2250 dasm_put(Dst, 11454);
2251 break; 2251 break;
2252 2252
2253 case BC_LOOP: 2253 case BC_LOOP:
2254#if LJ_HASJIT 2254#if LJ_HASJIT
2255 dasm_put(Dst, 14908, HOTCOUNT_PCMASK, GG_DISP2HOT); 2255 dasm_put(Dst, 14898, HOTCOUNT_PCMASK, GG_DISP2HOT);
2256#endif 2256#endif
2257 break; 2257 break;
2258 2258
2259 case BC_ILOOP: 2259 case BC_ILOOP:
2260 dasm_put(Dst, 8590); 2260 dasm_put(Dst, 8580);
2261 break; 2261 break;
2262 2262
2263 case BC_JLOOP: 2263 case BC_JLOOP:
2264#if LJ_HASJIT 2264#if LJ_HASJIT
2265 dasm_put(Dst, 15145, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2265 dasm_put(Dst, 15135, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2266#endif 2266#endif
2267 break; 2267 break;
2268 2268
2269 case BC_JMP: 2269 case BC_JMP:
2270 dasm_put(Dst, 15168, -BCBIAS_J*4); 2270 dasm_put(Dst, 15158, -BCBIAS_J*4);
2271 break; 2271 break;
2272 2272
2273 /* ---------------------------------------------------------------------- */ 2273 /* ---------------------------------------------------------------------- */
@@ -2295,7 +2295,7 @@ static int build_backend(BuildCtx *ctx)
2295 2295
2296 build_subroutines(ctx, cmov, sse); 2296 build_subroutines(ctx, cmov, sse);
2297 2297
2298 dasm_put(Dst, 15192); 2298 dasm_put(Dst, 15182);
2299 for (op = 0; op < BC__MAX; op++) 2299 for (op = 0; op < BC__MAX; op++)
2300 build_ins(ctx, (BCOp)op, op, cmov, sse); 2300 build_ins(ctx, (BCOp)op, op, cmov, sse);
2301 2301