summaryrefslogtreecommitdiff
path: root/src/buildvm_x64.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/buildvm_x64.h686
1 files changed, 345 insertions, 341 deletions
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h
index c738eaa4..7632f70b 100644
--- a/src/buildvm_x64.h
+++ b/src/buildvm_x64.h
@@ -12,7 +12,7 @@
12#define DASM_SECTION_CODE_OP 0 12#define DASM_SECTION_CODE_OP 0
13#define DASM_SECTION_CODE_SUB 1 13#define DASM_SECTION_CODE_SUB 1
14#define DASM_MAXSECTION 2 14#define DASM_MAXSECTION 2
15static const unsigned char build_actionlist[13682] = { 15static const unsigned char build_actionlist[13678] = {
16 254,1,248,10,252,247,195,237,15,132,244,11,131,227,252,248,41,218,72,141, 16 254,1,248,10,252,247,195,237,15,132,244,11,131,227,252,248,41,218,72,141,
17 76,25,252,248,139,90,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,4, 17 76,25,252,248,139,90,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,4,
18 252,247,195,237,15,132,244,13,248,14,252,247,195,237,15,132,244,10,65,199, 18 252,247,195,237,15,132,244,13,248,14,252,247,195,237,15,132,244,10,65,199,
@@ -360,53 +360,53 @@ static const unsigned char build_actionlist[13682] = {
360 233,137,222,137,252,239,232,251,1,20,248,3,139,149,233,248,4,15,182,75,252, 360 233,137,222,137,252,239,232,251,1,20,248,3,139,149,233,248,4,15,182,75,252,
361 253,248,5,15,182,107,252,252,15,183,67,252,254,65,252,255,164,253,252,238, 361 253,248,5,15,182,107,252,252,15,183,67,252,254,65,252,255,164,253,252,238,
362 233,248,139,131,195,4,139,77,232,137,76,36,4,252,233,244,4,248,140,255,204, 362 233,248,139,131,195,4,139,77,232,137,76,36,4,252,233,244,4,248,140,255,204,
363 255,248,141,255,73,199,134,233,0,0,0,0,252,233,244,247,255,248,142,255,73, 363 255,248,141,137,92,36,20,255,248,142,255,137,92,36,20,131,203,1,248,1,255,
364 137,174,233,248,1,255,141,68,194,252,248,139,108,36,16,137,149,233,137,133, 364 141,68,194,252,248,139,108,36,16,137,149,233,137,133,233,137,222,137,252,
365 233,137,222,137,252,239,137,92,36,20,232,251,1,21,199,68,36,20,0,0,0,0,139, 365 239,232,251,1,21,199,68,36,20,0,0,0,0,255,131,227,252,254,255,139,149,233,
366 149,233,72,137,193,139,133,233,41,208,72,137,205,15,182,75,252,253,193,232, 366 72,137,193,139,133,233,41,208,72,137,205,15,182,75,252,253,193,232,3,131,
367 3,131,192,1,252,255,229,248,143,255,248,144,255,68,139,122,252,248,69,139, 367 192,1,252,255,229,248,143,255,248,144,255,68,139,122,252,248,69,139,191,233,
368 191,233,69,139,191,233,65,199,134,233,0,0,0,0,65,199,134,233,237,139,3,15, 368 69,139,191,233,65,199,134,233,0,0,0,0,65,199,134,233,237,139,3,15,182,204,
369 182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,248,82, 369 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,248,82,255,217,
370 255,217,124,36,4,137,68,36,8,102,184,0,4,102,11,68,36,4,102,37,252,255,252, 370 124,36,4,137,68,36,8,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,
371 247,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195, 371 137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,
372 255,248,145,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110, 372 145,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,
373 216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252, 373 40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,
374 242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110, 374 88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110,208,252,
375 208,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193,248,1, 375 242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193,248,1,195,248,
376 195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4,102,37, 376 84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4,102,37,252,255,
377 252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139, 377 252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,
378 68,36,8,195,255,248,146,72,184,237,237,102,72,15,110,208,72,184,237,237,102, 378 195,255,248,146,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,
379 72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15, 379 110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,
380 85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102, 380 252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,
381 72,15,110,208,252,242,15,194,193,6,102,15,84,194,252,242,15,92,200,15,40, 381 110,208,252,242,15,194,193,6,102,15,84,194,252,242,15,92,200,15,40,193,248,
382 193,248,1,195,248,104,255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68, 382 1,195,248,104,255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68,36,4,102,
383 36,4,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195, 383 137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,
384 255,248,147,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110, 384 147,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,
385 216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,15, 385 40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,15,40,193,
386 40,193,252,242,15,88,203,252,242,15,92,203,72,184,237,237,102,72,15,110,216, 386 252,242,15,88,203,252,242,15,92,203,72,184,237,237,102,72,15,110,216,252,
387 252,242,15,194,193,1,102,15,84,195,252,242,15,92,200,102,15,86,202,15,40, 387 242,15,194,193,1,102,15,84,195,252,242,15,92,200,102,15,86,202,15,40,193,
388 193,248,1,195,248,148,255,15,40,232,252,242,15,94,193,72,184,237,237,102, 388 248,1,195,248,148,255,15,40,232,252,242,15,94,193,72,184,237,237,102,72,15,
389 72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,224,102,15,84,226,102, 389 110,208,72,184,237,237,102,72,15,110,216,15,40,224,102,15,84,226,102,15,46,
390 15,46,220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242,15,92,227, 390 220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242,15,92,227,102,
391 102,15,86,226,72,184,237,237,102,72,15,110,208,252,242,15,194,196,1,102,15, 391 15,86,226,72,184,237,237,102,72,15,110,208,252,242,15,194,196,1,102,15,84,
392 84,194,252,242,15,92,224,15,40,197,252,242,15,89,204,252,242,15,92,193,195, 392 194,252,242,15,92,224,15,40,197,252,242,15,89,204,252,242,15,92,193,195,248,
393 248,1,252,242,15,89,200,15,40,197,252,242,15,92,193,195,255,217,193,216,252, 393 1,252,242,15,89,200,15,40,197,252,242,15,92,193,195,255,217,193,216,252,241,
394 241,217,124,36,4,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137, 394 217,124,36,4,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,
395 68,36,6,217,108,36,6,217,252,252,217,108,36,4,222,201,222,252,233,195,255, 395 36,6,217,108,36,6,217,252,252,217,108,36,4,222,201,222,252,233,195,255,248,
396 248,88,217,252,234,222,201,248,149,217,84,36,252,248,129,124,36,252,248,0, 396 88,217,252,234,222,201,248,149,217,84,36,252,248,129,124,36,252,248,0,0,128,
397 0,128,127,15,132,244,247,129,124,36,252,248,0,0,128,252,255,15,132,244,248, 397 127,15,132,244,247,129,124,36,252,248,0,0,128,252,255,15,132,244,248,248,
398 248,150,217,192,217,252,252,220,252,233,217,201,217,252,240,217,232,222,193, 398 150,217,192,217,252,252,220,252,233,217,201,217,252,240,217,232,222,193,217,
399 217,252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,255,248,107,255, 399 252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,255,248,107,255,248,
400 248,151,252,242,15,45,193,252,242,15,42,208,102,15,46,202,15,133,244,254, 400 151,252,242,15,45,193,252,242,15,42,208,102,15,46,202,15,133,244,254,15,138,
401 15,138,244,255,248,152,131,252,248,1,15,142,244,252,248,1,169,1,0,0,0,15, 401 244,255,248,152,131,252,248,1,15,142,244,252,248,1,169,1,0,0,0,15,133,244,
402 133,244,248,252,242,15,89,192,209,232,252,233,244,1,248,2,209,232,15,132, 402 248,252,242,15,89,192,209,232,252,233,244,1,248,2,209,232,15,132,244,251,
403 244,251,15,40,200,248,3,252,242,15,89,192,209,232,15,132,244,250,15,131,244, 403 15,40,200,248,3,252,242,15,89,192,209,232,15,132,244,250,15,131,244,3,255,
404 3,255,252,242,15,89,200,252,233,244,3,248,4,252,242,15,89,193,248,5,195,248, 404 252,242,15,89,200,252,233,244,3,248,4,252,242,15,89,193,248,5,195,248,6,15,
405 6,15,132,244,5,15,130,244,253,80,72,184,237,237,102,72,15,110,200,252,242, 405 132,244,5,15,130,244,253,80,72,184,237,237,102,72,15,110,200,252,242,15,94,
406 15,94,200,88,15,40,193,252,247,216,131,252,248,1,15,132,244,5,252,233,244, 406 200,88,15,40,193,252,247,216,131,252,248,1,15,132,244,5,252,233,244,1,248,
407 1,248,7,72,184,237,237,102,72,15,110,192,195,248,8,102,72,15,126,200,72,209, 407 7,72,184,237,237,102,72,15,110,192,195,248,8,102,72,15,126,200,72,209,224,
408 224,72,193,192,12,72,61,252,254,15,0,0,15,132,244,248,255,102,72,15,126,192, 408 72,193,192,12,72,61,252,254,15,0,0,15,132,244,248,255,102,72,15,126,192,72,
409 72,209,224,15,132,244,250,72,193,192,12,72,61,252,254,15,0,0,15,132,244,251, 409 209,224,15,132,244,250,72,193,192,12,72,61,252,254,15,0,0,15,132,244,251,
410 252,242,15,17,76,36,252,240,252,242,15,17,68,36,252,248,221,68,36,252,240, 410 252,242,15,17,76,36,252,240,252,242,15,17,68,36,252,248,221,68,36,252,240,
411 221,68,36,252,248,217,252,241,217,192,217,252,252,220,252,233,217,201,217, 411 221,68,36,252,248,217,252,241,217,192,217,252,252,220,252,233,217,201,217,
412 252,240,217,232,222,193,217,252,253,221,217,221,92,36,252,248,252,242,15, 412 252,240,217,232,222,193,217,252,253,221,217,221,92,36,252,248,252,242,15,
@@ -1332,77 +1332,81 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1332#endif 1332#endif
1333 dasm_put(Dst, 7165); 1333 dasm_put(Dst, 7165);
1334#if LJ_HASJIT 1334#if LJ_HASJIT
1335 dasm_put(Dst, 7168, DISPATCH_J(L)); 1335 dasm_put(Dst, 7037);
1336#endif 1336#endif
1337 dasm_put(Dst, 7181); 1337 dasm_put(Dst, 7172);
1338#if LJ_HASJIT 1338#if LJ_HASJIT
1339 dasm_put(Dst, 7184, DISPATCH_J(L)); 1339 dasm_put(Dst, 7175);
1340#endif 1340#endif
1341 dasm_put(Dst, 7191, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 1341 dasm_put(Dst, 7185, Dt1(->base), Dt1(->top));
1342#if LJ_HASJIT
1343 dasm_put(Dst, 7218);
1344#endif
1345 dasm_put(Dst, 7223, Dt1(->base), Dt1(->top));
1342#if LJ_HASJIT 1346#if LJ_HASJIT
1343 dasm_put(Dst, 7163); 1347 dasm_put(Dst, 7163);
1344#endif 1348#endif
1345 dasm_put(Dst, 7258); 1349 dasm_put(Dst, 7254);
1346#if LJ_HASJIT 1350#if LJ_HASJIT
1347 dasm_put(Dst, 7261, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); 1351 dasm_put(Dst, 7257, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP);
1348#endif 1352#endif
1349 dasm_put(Dst, 7308); 1353 dasm_put(Dst, 7304);
1350 if (!sse) { 1354 if (!sse) {
1351 dasm_put(Dst, 7311); 1355 dasm_put(Dst, 7307);
1352 } 1356 }
1353 dasm_put(Dst, 7356, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); 1357 dasm_put(Dst, 7352, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32));
1354 if (!sse) { 1358 if (!sse) {
1355 dasm_put(Dst, 7442); 1359 dasm_put(Dst, 7438);
1356 } 1360 }
1357 dasm_put(Dst, 7487, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); 1361 dasm_put(Dst, 7483, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32));
1358 if (!sse) { 1362 if (!sse) {
1359 dasm_put(Dst, 7573); 1363 dasm_put(Dst, 7569);
1360 } 1364 }
1361 dasm_put(Dst, 7612, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); 1365 dasm_put(Dst, 7608, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32));
1362 if (sse) { 1366 if (sse) {
1363 dasm_put(Dst, 7701, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); 1367 dasm_put(Dst, 7697, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32));
1364 } else { 1368 } else {
1365 dasm_put(Dst, 7815); 1369 dasm_put(Dst, 7811);
1366 } 1370 }
1367 dasm_put(Dst, 7862); 1371 dasm_put(Dst, 7858);
1368 if (!sse) { 1372 if (!sse) {
1369 } else { 1373 } else {
1370 dasm_put(Dst, 7939); 1374 dasm_put(Dst, 7935);
1371 } 1375 }
1372 dasm_put(Dst, 7942); 1376 dasm_put(Dst, 7938);
1373 dasm_put(Dst, 8027, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); 1377 dasm_put(Dst, 8023, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32));
1374 dasm_put(Dst, 8128, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); 1378 dasm_put(Dst, 8124, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32));
1375 dasm_put(Dst, 8302); 1379 dasm_put(Dst, 8298);
1376 if (sse) { 1380 if (sse) {
1377 dasm_put(Dst, 8343); 1381 dasm_put(Dst, 8339);
1378 dasm_put(Dst, 8413); 1382 dasm_put(Dst, 8409);
1379 dasm_put(Dst, 8485); 1383 dasm_put(Dst, 8481);
1380 } else { 1384 } else {
1381 dasm_put(Dst, 8537); 1385 dasm_put(Dst, 8533);
1382 dasm_put(Dst, 8629); 1386 dasm_put(Dst, 8625);
1383 } 1387 }
1384 dasm_put(Dst, 8675); 1388 dasm_put(Dst, 8671);
1385 if (sse) { 1389 if (sse) {
1386 dasm_put(Dst, 8681, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 1390 dasm_put(Dst, 8677, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
1387 dasm_put(Dst, 8766, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); 1391 dasm_put(Dst, 8762, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32));
1388 } else { 1392 } else {
1389 dasm_put(Dst, 8894); 1393 dasm_put(Dst, 8890);
1390 dasm_put(Dst, 8977); 1394 dasm_put(Dst, 8973);
1391 if (cmov) { 1395 if (cmov) {
1392 dasm_put(Dst, 9032); 1396 dasm_put(Dst, 9028);
1393 } else { 1397 } else {
1394 dasm_put(Dst, 9051); 1398 dasm_put(Dst, 9047);
1395 } 1399 }
1396 dasm_put(Dst, 8890); 1400 dasm_put(Dst, 8886);
1397 } 1401 }
1398 dasm_put(Dst, 9092); 1402 dasm_put(Dst, 9088);
1399} 1403}
1400 1404
1401/* Generate the code for a single instruction. */ 1405/* Generate the code for a single instruction. */
1402static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) 1406static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1403{ 1407{
1404 int vk = 0; 1408 int vk = 0;
1405 dasm_put(Dst, 9114, defop); 1409 dasm_put(Dst, 9110, defop);
1406 1410
1407 switch (op) { 1411 switch (op) {
1408 1412
@@ -1411,600 +1415,600 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1411 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1415 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1412 1416
1413 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1417 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1414 dasm_put(Dst, 9116, LJ_TISNUM, LJ_TISNUM); 1418 dasm_put(Dst, 9112, LJ_TISNUM, LJ_TISNUM);
1415 if (sse) { 1419 if (sse) {
1416 dasm_put(Dst, 9137); 1420 dasm_put(Dst, 9133);
1417 } else { 1421 } else {
1418 dasm_put(Dst, 9152); 1422 dasm_put(Dst, 9148);
1419 if (cmov) { 1423 if (cmov) {
1420 dasm_put(Dst, 9162); 1424 dasm_put(Dst, 9158);
1421 } else { 1425 } else {
1422 dasm_put(Dst, 9168); 1426 dasm_put(Dst, 9164);
1423 } 1427 }
1424 } 1428 }
1425 switch (op) { 1429 switch (op) {
1426 case BC_ISLT: 1430 case BC_ISLT:
1427 dasm_put(Dst, 9175); 1431 dasm_put(Dst, 9171);
1428 break; 1432 break;
1429 case BC_ISGE: 1433 case BC_ISGE:
1430 dasm_put(Dst, 8972); 1434 dasm_put(Dst, 8968);
1431 break; 1435 break;
1432 case BC_ISLE: 1436 case BC_ISLE:
1433 dasm_put(Dst, 5914); 1437 dasm_put(Dst, 5914);
1434 break; 1438 break;
1435 case BC_ISGT: 1439 case BC_ISGT:
1436 dasm_put(Dst, 9180); 1440 dasm_put(Dst, 9176);
1437 break; 1441 break;
1438 default: break; /* Shut up GCC. */ 1442 default: break; /* Shut up GCC. */
1439 } 1443 }
1440 dasm_put(Dst, 9185, -BCBIAS_J*4); 1444 dasm_put(Dst, 9181, -BCBIAS_J*4);
1441 break; 1445 break;
1442 1446
1443 case BC_ISEQV: case BC_ISNEV: 1447 case BC_ISEQV: case BC_ISNEV:
1444 vk = op == BC_ISEQV; 1448 vk = op == BC_ISEQV;
1445 dasm_put(Dst, 9220, LJ_TISNUM, LJ_TISNUM); 1449 dasm_put(Dst, 9216, LJ_TISNUM, LJ_TISNUM);
1446 if (sse) { 1450 if (sse) {
1447 dasm_put(Dst, 9246); 1451 dasm_put(Dst, 9242);
1448 } else { 1452 } else {
1449 dasm_put(Dst, 9258); 1453 dasm_put(Dst, 9254);
1450 if (cmov) { 1454 if (cmov) {
1451 dasm_put(Dst, 9162); 1455 dasm_put(Dst, 9158);
1452 } else { 1456 } else {
1453 dasm_put(Dst, 9168); 1457 dasm_put(Dst, 9164);
1454 } 1458 }
1455 } 1459 }
1456 iseqne_fp: 1460 iseqne_fp:
1457 if (vk) { 1461 if (vk) {
1458 dasm_put(Dst, 9265); 1462 dasm_put(Dst, 9261);
1459 } else { 1463 } else {
1460 dasm_put(Dst, 9274); 1464 dasm_put(Dst, 9270);
1461 } 1465 }
1462 iseqne_end: 1466 iseqne_end:
1463 if (vk) { 1467 if (vk) {
1464 dasm_put(Dst, 9283, -BCBIAS_J*4); 1468 dasm_put(Dst, 9279, -BCBIAS_J*4);
1465 } else { 1469 } else {
1466 dasm_put(Dst, 9298, -BCBIAS_J*4); 1470 dasm_put(Dst, 9294, -BCBIAS_J*4);
1467 } 1471 }
1468 dasm_put(Dst, 7287); 1472 dasm_put(Dst, 7283);
1469 if (op == BC_ISEQV || op == BC_ISNEV) { 1473 if (op == BC_ISEQV || op == BC_ISNEV) {
1470 dasm_put(Dst, 9313, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1474 dasm_put(Dst, 9309, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1471 if (vk) { 1475 if (vk) {
1472 dasm_put(Dst, 9371); 1476 dasm_put(Dst, 9367);
1473 } else { 1477 } else {
1474 dasm_put(Dst, 9375); 1478 dasm_put(Dst, 9371);
1475 } 1479 }
1476 dasm_put(Dst, 9381); 1480 dasm_put(Dst, 9377);
1477 } 1481 }
1478 break; 1482 break;
1479 case BC_ISEQS: case BC_ISNES: 1483 case BC_ISEQS: case BC_ISNES:
1480 vk = op == BC_ISEQS; 1484 vk = op == BC_ISEQS;
1481 dasm_put(Dst, 9386, LJ_TSTR); 1485 dasm_put(Dst, 9382, LJ_TSTR);
1482 iseqne_test: 1486 iseqne_test:
1483 if (vk) { 1487 if (vk) {
1484 dasm_put(Dst, 9269); 1488 dasm_put(Dst, 9265);
1485 } else { 1489 } else {
1486 dasm_put(Dst, 2805); 1490 dasm_put(Dst, 2805);
1487 } 1491 }
1488 goto iseqne_end; 1492 goto iseqne_end;
1489 case BC_ISEQN: case BC_ISNEN: 1493 case BC_ISEQN: case BC_ISNEN:
1490 vk = op == BC_ISEQN; 1494 vk = op == BC_ISEQN;
1491 dasm_put(Dst, 9411, LJ_TISNUM); 1495 dasm_put(Dst, 9407, LJ_TISNUM);
1492 if (sse) { 1496 if (sse) {
1493 dasm_put(Dst, 9425); 1497 dasm_put(Dst, 9421);
1494 } else { 1498 } else {
1495 dasm_put(Dst, 9438); 1499 dasm_put(Dst, 9434);
1496 if (cmov) { 1500 if (cmov) {
1497 dasm_put(Dst, 9162); 1501 dasm_put(Dst, 9158);
1498 } else { 1502 } else {
1499 dasm_put(Dst, 9168); 1503 dasm_put(Dst, 9164);
1500 } 1504 }
1501 } 1505 }
1502 goto iseqne_fp; 1506 goto iseqne_fp;
1503 case BC_ISEQP: case BC_ISNEP: 1507 case BC_ISEQP: case BC_ISNEP:
1504 vk = op == BC_ISEQP; 1508 vk = op == BC_ISEQP;
1505 dasm_put(Dst, 9446); 1509 dasm_put(Dst, 9442);
1506 goto iseqne_test; 1510 goto iseqne_test;
1507 1511
1508 /* -- Unary test and copy ops ------------------------------------------- */ 1512 /* -- Unary test and copy ops ------------------------------------------- */
1509 1513
1510 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1514 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1511 dasm_put(Dst, 9458, LJ_TISTRUECOND); 1515 dasm_put(Dst, 9454, LJ_TISTRUECOND);
1512 if (op == BC_IST || op == BC_ISTC) { 1516 if (op == BC_IST || op == BC_ISTC) {
1513 dasm_put(Dst, 9470); 1517 dasm_put(Dst, 9466);
1514 } else { 1518 } else {
1515 dasm_put(Dst, 9475); 1519 dasm_put(Dst, 9471);
1516 } 1520 }
1517 if (op == BC_ISTC || op == BC_ISFC) { 1521 if (op == BC_ISTC || op == BC_ISFC) {
1518 dasm_put(Dst, 9480); 1522 dasm_put(Dst, 9476);
1519 } 1523 }
1520 dasm_put(Dst, 9491, -BCBIAS_J*4); 1524 dasm_put(Dst, 9487, -BCBIAS_J*4);
1521 break; 1525 break;
1522 1526
1523 /* -- Unary ops --------------------------------------------------------- */ 1527 /* -- Unary ops --------------------------------------------------------- */
1524 1528
1525 case BC_MOV: 1529 case BC_MOV:
1526 dasm_put(Dst, 9524); 1530 dasm_put(Dst, 9520);
1527 break; 1531 break;
1528 case BC_NOT: 1532 case BC_NOT:
1529 dasm_put(Dst, 9559, LJ_TISTRUECOND, LJ_TTRUE); 1533 dasm_put(Dst, 9555, LJ_TISTRUECOND, LJ_TTRUE);
1530 break; 1534 break;
1531 case BC_UNM: 1535 case BC_UNM:
1532 dasm_put(Dst, 9596, LJ_TISNUM); 1536 dasm_put(Dst, 9592, LJ_TISNUM);
1533 if (sse) { 1537 if (sse) {
1534 dasm_put(Dst, 9607, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 1538 dasm_put(Dst, 9603, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
1535 } else { 1539 } else {
1536 dasm_put(Dst, 9632); 1540 dasm_put(Dst, 9628);
1537 } 1541 }
1538 dasm_put(Dst, 7287); 1542 dasm_put(Dst, 7283);
1539 break; 1543 break;
1540 case BC_LEN: 1544 case BC_LEN:
1541 dasm_put(Dst, 9641, LJ_TSTR); 1545 dasm_put(Dst, 9637, LJ_TSTR);
1542 if (sse) { 1546 if (sse) {
1543 dasm_put(Dst, 9655, Dt5(->len)); 1547 dasm_put(Dst, 9651, Dt5(->len));
1544 } else { 1548 } else {
1545 dasm_put(Dst, 9673, Dt5(->len)); 1549 dasm_put(Dst, 9669, Dt5(->len));
1546 } 1550 }
1547 dasm_put(Dst, 9682, LJ_TTAB); 1551 dasm_put(Dst, 9678, LJ_TTAB);
1548 if (sse) { 1552 if (sse) {
1549 dasm_put(Dst, 9724); 1553 dasm_put(Dst, 9720);
1550 } else { 1554 } else {
1551 } 1555 }
1552 dasm_put(Dst, 9733); 1556 dasm_put(Dst, 9729);
1553 break; 1557 break;
1554 1558
1555 /* -- Binary ops -------------------------------------------------------- */ 1559 /* -- Binary ops -------------------------------------------------------- */
1556 1560
1557 1561
1558 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1562 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1559 dasm_put(Dst, 9743); 1563 dasm_put(Dst, 9739);
1560 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1564 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1561 switch (vk) { 1565 switch (vk) {
1562 case 0: 1566 case 0:
1563 dasm_put(Dst, 9751, LJ_TISNUM); 1567 dasm_put(Dst, 9747, LJ_TISNUM);
1564 if (sse) { 1568 if (sse) {
1565 dasm_put(Dst, 9763); 1569 dasm_put(Dst, 9759);
1566 } else { 1570 } else {
1567 dasm_put(Dst, 9778); 1571 dasm_put(Dst, 9774);
1568 } 1572 }
1569 break; 1573 break;
1570 case 1: 1574 case 1:
1571 dasm_put(Dst, 9787, LJ_TISNUM); 1575 dasm_put(Dst, 9783, LJ_TISNUM);
1572 if (sse) { 1576 if (sse) {
1573 dasm_put(Dst, 9799); 1577 dasm_put(Dst, 9795);
1574 } else { 1578 } else {
1575 dasm_put(Dst, 9814); 1579 dasm_put(Dst, 9810);
1576 } 1580 }
1577 break; 1581 break;
1578 default: 1582 default:
1579 dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); 1583 dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM);
1580 if (sse) { 1584 if (sse) {
1581 dasm_put(Dst, 9845); 1585 dasm_put(Dst, 9841);
1582 } else { 1586 } else {
1583 dasm_put(Dst, 9859); 1587 dasm_put(Dst, 9855);
1584 } 1588 }
1585 break; 1589 break;
1586 } 1590 }
1587 if (sse) { 1591 if (sse) {
1588 dasm_put(Dst, 9625); 1592 dasm_put(Dst, 9621);
1589 } else { 1593 } else {
1590 dasm_put(Dst, 9637); 1594 dasm_put(Dst, 9633);
1591 } 1595 }
1592 dasm_put(Dst, 7287); 1596 dasm_put(Dst, 7283);
1593 break; 1597 break;
1594 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1598 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1595 dasm_put(Dst, 9743); 1599 dasm_put(Dst, 9739);
1596 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1600 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1597 switch (vk) { 1601 switch (vk) {
1598 case 0: 1602 case 0:
1599 dasm_put(Dst, 9751, LJ_TISNUM); 1603 dasm_put(Dst, 9747, LJ_TISNUM);
1600 if (sse) { 1604 if (sse) {
1601 dasm_put(Dst, 9867); 1605 dasm_put(Dst, 9863);
1602 } else { 1606 } else {
1603 dasm_put(Dst, 9882); 1607 dasm_put(Dst, 9878);
1604 } 1608 }
1605 break; 1609 break;
1606 case 1: 1610 case 1:
1607 dasm_put(Dst, 9787, LJ_TISNUM); 1611 dasm_put(Dst, 9783, LJ_TISNUM);
1608 if (sse) { 1612 if (sse) {
1609 dasm_put(Dst, 9891); 1613 dasm_put(Dst, 9887);
1610 } else { 1614 } else {
1611 dasm_put(Dst, 9906); 1615 dasm_put(Dst, 9902);
1612 } 1616 }
1613 break; 1617 break;
1614 default: 1618 default:
1615 dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); 1619 dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM);
1616 if (sse) { 1620 if (sse) {
1617 dasm_put(Dst, 9915); 1621 dasm_put(Dst, 9911);
1618 } else { 1622 } else {
1619 dasm_put(Dst, 9929); 1623 dasm_put(Dst, 9925);
1620 } 1624 }
1621 break; 1625 break;
1622 } 1626 }
1623 if (sse) { 1627 if (sse) {
1624 dasm_put(Dst, 9625); 1628 dasm_put(Dst, 9621);
1625 } else { 1629 } else {
1626 dasm_put(Dst, 9637); 1630 dasm_put(Dst, 9633);
1627 } 1631 }
1628 dasm_put(Dst, 7287); 1632 dasm_put(Dst, 7283);
1629 break; 1633 break;
1630 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1634 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1631 dasm_put(Dst, 9743); 1635 dasm_put(Dst, 9739);
1632 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1636 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1633 switch (vk) { 1637 switch (vk) {
1634 case 0: 1638 case 0:
1635 dasm_put(Dst, 9751, LJ_TISNUM); 1639 dasm_put(Dst, 9747, LJ_TISNUM);
1636 if (sse) { 1640 if (sse) {
1637 dasm_put(Dst, 9937); 1641 dasm_put(Dst, 9933);
1638 } else { 1642 } else {
1639 dasm_put(Dst, 9952); 1643 dasm_put(Dst, 9948);
1640 } 1644 }
1641 break; 1645 break;
1642 case 1: 1646 case 1:
1643 dasm_put(Dst, 9787, LJ_TISNUM); 1647 dasm_put(Dst, 9783, LJ_TISNUM);
1644 if (sse) { 1648 if (sse) {
1645 dasm_put(Dst, 9961); 1649 dasm_put(Dst, 9957);
1646 } else { 1650 } else {
1647 dasm_put(Dst, 9976); 1651 dasm_put(Dst, 9972);
1648 } 1652 }
1649 break; 1653 break;
1650 default: 1654 default:
1651 dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); 1655 dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM);
1652 if (sse) { 1656 if (sse) {
1653 dasm_put(Dst, 9985); 1657 dasm_put(Dst, 9981);
1654 } else { 1658 } else {
1655 dasm_put(Dst, 9999); 1659 dasm_put(Dst, 9995);
1656 } 1660 }
1657 break; 1661 break;
1658 } 1662 }
1659 if (sse) { 1663 if (sse) {
1660 dasm_put(Dst, 9625); 1664 dasm_put(Dst, 9621);
1661 } else { 1665 } else {
1662 dasm_put(Dst, 9637); 1666 dasm_put(Dst, 9633);
1663 } 1667 }
1664 dasm_put(Dst, 7287); 1668 dasm_put(Dst, 7283);
1665 break; 1669 break;
1666 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1670 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1667 dasm_put(Dst, 9743); 1671 dasm_put(Dst, 9739);
1668 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1672 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1669 switch (vk) { 1673 switch (vk) {
1670 case 0: 1674 case 0:
1671 dasm_put(Dst, 9751, LJ_TISNUM); 1675 dasm_put(Dst, 9747, LJ_TISNUM);
1672 if (sse) { 1676 if (sse) {
1673 dasm_put(Dst, 10007); 1677 dasm_put(Dst, 10003);
1674 } else { 1678 } else {
1675 dasm_put(Dst, 10022); 1679 dasm_put(Dst, 10018);
1676 } 1680 }
1677 break; 1681 break;
1678 case 1: 1682 case 1:
1679 dasm_put(Dst, 9787, LJ_TISNUM); 1683 dasm_put(Dst, 9783, LJ_TISNUM);
1680 if (sse) { 1684 if (sse) {
1681 dasm_put(Dst, 10031); 1685 dasm_put(Dst, 10027);
1682 } else { 1686 } else {
1683 dasm_put(Dst, 10046); 1687 dasm_put(Dst, 10042);
1684 } 1688 }
1685 break; 1689 break;
1686 default: 1690 default:
1687 dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); 1691 dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM);
1688 if (sse) { 1692 if (sse) {
1689 dasm_put(Dst, 10055); 1693 dasm_put(Dst, 10051);
1690 } else { 1694 } else {
1691 dasm_put(Dst, 10069); 1695 dasm_put(Dst, 10065);
1692 } 1696 }
1693 break; 1697 break;
1694 } 1698 }
1695 if (sse) { 1699 if (sse) {
1696 dasm_put(Dst, 9625); 1700 dasm_put(Dst, 9621);
1697 } else { 1701 } else {
1698 dasm_put(Dst, 9637); 1702 dasm_put(Dst, 9633);
1699 } 1703 }
1700 dasm_put(Dst, 7287); 1704 dasm_put(Dst, 7283);
1701 break; 1705 break;
1702 case BC_MODVN: 1706 case BC_MODVN:
1703 dasm_put(Dst, 9743); 1707 dasm_put(Dst, 9739);
1704 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1708 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1705 switch (vk) { 1709 switch (vk) {
1706 case 0: 1710 case 0:
1707 dasm_put(Dst, 9751, LJ_TISNUM); 1711 dasm_put(Dst, 9747, LJ_TISNUM);
1708 if (sse) { 1712 if (sse) {
1709 dasm_put(Dst, 10077); 1713 dasm_put(Dst, 10073);
1710 } else { 1714 } else {
1711 dasm_put(Dst, 10092); 1715 dasm_put(Dst, 10088);
1712 } 1716 }
1713 break; 1717 break;
1714 case 1: 1718 case 1:
1715 dasm_put(Dst, 9787, LJ_TISNUM); 1719 dasm_put(Dst, 9783, LJ_TISNUM);
1716 if (sse) { 1720 if (sse) {
1717 dasm_put(Dst, 10101); 1721 dasm_put(Dst, 10097);
1718 } else { 1722 } else {
1719 dasm_put(Dst, 10116); 1723 dasm_put(Dst, 10112);
1720 } 1724 }
1721 break; 1725 break;
1722 default: 1726 default:
1723 dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); 1727 dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM);
1724 if (sse) { 1728 if (sse) {
1725 dasm_put(Dst, 10125); 1729 dasm_put(Dst, 10121);
1726 } else { 1730 } else {
1727 dasm_put(Dst, 10139); 1731 dasm_put(Dst, 10135);
1728 } 1732 }
1729 break; 1733 break;
1730 } 1734 }
1731 dasm_put(Dst, 10147); 1735 dasm_put(Dst, 10143);
1732 if (sse) { 1736 if (sse) {
1733 dasm_put(Dst, 9625); 1737 dasm_put(Dst, 9621);
1734 } else { 1738 } else {
1735 dasm_put(Dst, 9637); 1739 dasm_put(Dst, 9633);
1736 } 1740 }
1737 dasm_put(Dst, 7287); 1741 dasm_put(Dst, 7283);
1738 break; 1742 break;
1739 case BC_MODNV: case BC_MODVV: 1743 case BC_MODNV: case BC_MODVV:
1740 dasm_put(Dst, 9743); 1744 dasm_put(Dst, 9739);
1741 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1745 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1742 switch (vk) { 1746 switch (vk) {
1743 case 0: 1747 case 0:
1744 dasm_put(Dst, 9751, LJ_TISNUM); 1748 dasm_put(Dst, 9747, LJ_TISNUM);
1745 if (sse) { 1749 if (sse) {
1746 dasm_put(Dst, 10077); 1750 dasm_put(Dst, 10073);
1747 } else { 1751 } else {
1748 dasm_put(Dst, 10092); 1752 dasm_put(Dst, 10088);
1749 } 1753 }
1750 break; 1754 break;
1751 case 1: 1755 case 1:
1752 dasm_put(Dst, 9787, LJ_TISNUM); 1756 dasm_put(Dst, 9783, LJ_TISNUM);
1753 if (sse) { 1757 if (sse) {
1754 dasm_put(Dst, 10101); 1758 dasm_put(Dst, 10097);
1755 } else { 1759 } else {
1756 dasm_put(Dst, 10116); 1760 dasm_put(Dst, 10112);
1757 } 1761 }
1758 break; 1762 break;
1759 default: 1763 default:
1760 dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); 1764 dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM);
1761 if (sse) { 1765 if (sse) {
1762 dasm_put(Dst, 10125); 1766 dasm_put(Dst, 10121);
1763 } else { 1767 } else {
1764 dasm_put(Dst, 10139); 1768 dasm_put(Dst, 10135);
1765 } 1769 }
1766 break; 1770 break;
1767 } 1771 }
1768 dasm_put(Dst, 10153); 1772 dasm_put(Dst, 10149);
1769 break; 1773 break;
1770 case BC_POW: 1774 case BC_POW:
1771 dasm_put(Dst, 9743); 1775 dasm_put(Dst, 9739);
1772 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1776 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1773 switch (vk) { 1777 switch (vk) {
1774 case 0: 1778 case 0:
1775 dasm_put(Dst, 9751, LJ_TISNUM); 1779 dasm_put(Dst, 9747, LJ_TISNUM);
1776 if (sse) { 1780 if (sse) {
1777 dasm_put(Dst, 10077); 1781 dasm_put(Dst, 10073);
1778 } else { 1782 } else {
1779 dasm_put(Dst, 10092); 1783 dasm_put(Dst, 10088);
1780 } 1784 }
1781 break; 1785 break;
1782 case 1: 1786 case 1:
1783 dasm_put(Dst, 9787, LJ_TISNUM); 1787 dasm_put(Dst, 9783, LJ_TISNUM);
1784 if (sse) { 1788 if (sse) {
1785 dasm_put(Dst, 10101); 1789 dasm_put(Dst, 10097);
1786 } else { 1790 } else {
1787 dasm_put(Dst, 10116); 1791 dasm_put(Dst, 10112);
1788 } 1792 }
1789 break; 1793 break;
1790 default: 1794 default:
1791 dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); 1795 dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM);
1792 if (sse) { 1796 if (sse) {
1793 dasm_put(Dst, 10125); 1797 dasm_put(Dst, 10121);
1794 } else { 1798 } else {
1795 dasm_put(Dst, 10139); 1799 dasm_put(Dst, 10135);
1796 } 1800 }
1797 break; 1801 break;
1798 } 1802 }
1799 dasm_put(Dst, 10158); 1803 dasm_put(Dst, 10154);
1800 if (sse) { 1804 if (sse) {
1801 dasm_put(Dst, 9625); 1805 dasm_put(Dst, 9621);
1802 } else { 1806 } else {
1803 dasm_put(Dst, 9637); 1807 dasm_put(Dst, 9633);
1804 } 1808 }
1805 dasm_put(Dst, 7287); 1809 dasm_put(Dst, 7283);
1806 break; 1810 break;
1807 1811
1808 case BC_CAT: 1812 case BC_CAT:
1809 dasm_put(Dst, 10162, Dt1(->base), Dt1(->base)); 1813 dasm_put(Dst, 10158, Dt1(->base), Dt1(->base));
1810 break; 1814 break;
1811 1815
1812 /* -- Constant ops ------------------------------------------------------ */ 1816 /* -- Constant ops ------------------------------------------------------ */
1813 1817
1814 case BC_KSTR: 1818 case BC_KSTR:
1815 dasm_put(Dst, 10253, LJ_TSTR); 1819 dasm_put(Dst, 10249, LJ_TSTR);
1816 break; 1820 break;
1817 case BC_KSHORT: 1821 case BC_KSHORT:
1818 if (sse) { 1822 if (sse) {
1819 dasm_put(Dst, 10290); 1823 dasm_put(Dst, 10286);
1820 } else { 1824 } else {
1821 dasm_put(Dst, 10305); 1825 dasm_put(Dst, 10301);
1822 } 1826 }
1823 dasm_put(Dst, 7287); 1827 dasm_put(Dst, 7283);
1824 break; 1828 break;
1825 case BC_KNUM: 1829 case BC_KNUM:
1826 if (sse) { 1830 if (sse) {
1827 dasm_put(Dst, 10313); 1831 dasm_put(Dst, 10309);
1828 } else { 1832 } else {
1829 dasm_put(Dst, 10327); 1833 dasm_put(Dst, 10323);
1830 } 1834 }
1831 dasm_put(Dst, 7287); 1835 dasm_put(Dst, 7283);
1832 break; 1836 break;
1833 case BC_KPRI: 1837 case BC_KPRI:
1834 dasm_put(Dst, 10335); 1838 dasm_put(Dst, 10331);
1835 break; 1839 break;
1836 case BC_KNIL: 1840 case BC_KNIL:
1837 dasm_put(Dst, 10364, LJ_TNIL); 1841 dasm_put(Dst, 10360, LJ_TNIL);
1838 break; 1842 break;
1839 1843
1840 /* -- Upvalue and function ops ------------------------------------------ */ 1844 /* -- Upvalue and function ops ------------------------------------------ */
1841 1845
1842 case BC_UGET: 1846 case BC_UGET:
1843 dasm_put(Dst, 10412, offsetof(GCfuncL, uvptr), DtA(->v)); 1847 dasm_put(Dst, 10408, offsetof(GCfuncL, uvptr), DtA(->v));
1844 break; 1848 break;
1845 case BC_USETV: 1849 case BC_USETV:
1846#define TV2MARKOFS \ 1850#define TV2MARKOFS \
1847 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 1851 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
1848 dasm_put(Dst, 10458, 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); 1852 dasm_put(Dst, 10454, 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);
1849 dasm_put(Dst, 10554); 1853 dasm_put(Dst, 10550);
1850 break; 1854 break;
1851#undef TV2MARKOFS 1855#undef TV2MARKOFS
1852 case BC_USETS: 1856 case BC_USETS:
1853 dasm_put(Dst, 10566, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 1857 dasm_put(Dst, 10562, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
1854 break; 1858 break;
1855 case BC_USETN: 1859 case BC_USETN:
1856 dasm_put(Dst, 10662); 1860 dasm_put(Dst, 10658);
1857 if (sse) { 1861 if (sse) {
1858 dasm_put(Dst, 10667); 1862 dasm_put(Dst, 10663);
1859 } else { 1863 } else {
1860 dasm_put(Dst, 9441); 1864 dasm_put(Dst, 9437);
1861 } 1865 }
1862 dasm_put(Dst, 10675, offsetof(GCfuncL, uvptr), DtA(->v)); 1866 dasm_put(Dst, 10671, offsetof(GCfuncL, uvptr), DtA(->v));
1863 if (sse) { 1867 if (sse) {
1864 dasm_put(Dst, 10684); 1868 dasm_put(Dst, 10680);
1865 } else { 1869 } else {
1866 dasm_put(Dst, 10690); 1870 dasm_put(Dst, 10686);
1867 } 1871 }
1868 dasm_put(Dst, 7287); 1872 dasm_put(Dst, 7283);
1869 break; 1873 break;
1870 case BC_USETP: 1874 case BC_USETP:
1871 dasm_put(Dst, 10693, offsetof(GCfuncL, uvptr), DtA(->v)); 1875 dasm_put(Dst, 10689, offsetof(GCfuncL, uvptr), DtA(->v));
1872 break; 1876 break;
1873 case BC_UCLO: 1877 case BC_UCLO:
1874 dasm_put(Dst, 10733, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 1878 dasm_put(Dst, 10729, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
1875 break; 1879 break;
1876 1880
1877 case BC_FNEW: 1881 case BC_FNEW:
1878 dasm_put(Dst, 10789, Dt1(->base), Dt1(->base), LJ_TFUNC); 1882 dasm_put(Dst, 10785, Dt1(->base), Dt1(->base), LJ_TFUNC);
1879 break; 1883 break;
1880 1884
1881 /* -- Table ops --------------------------------------------------------- */ 1885 /* -- Table ops --------------------------------------------------------- */
1882 1886
1883 case BC_TNEW: 1887 case BC_TNEW:
1884 dasm_put(Dst, 10856, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); 1888 dasm_put(Dst, 10852, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB);
1885 break; 1889 break;
1886 case BC_TDUP: 1890 case BC_TDUP:
1887 dasm_put(Dst, 10980, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 1891 dasm_put(Dst, 10976, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
1888 break; 1892 break;
1889 1893
1890 case BC_GGET: 1894 case BC_GGET:
1891 dasm_put(Dst, 11079, Dt7(->env)); 1895 dasm_put(Dst, 11075, Dt7(->env));
1892 break; 1896 break;
1893 case BC_GSET: 1897 case BC_GSET:
1894 dasm_put(Dst, 11099, Dt7(->env)); 1898 dasm_put(Dst, 11095, Dt7(->env));
1895 break; 1899 break;
1896 1900
1897 case BC_TGETV: 1901 case BC_TGETV:
1898 dasm_put(Dst, 11119, LJ_TTAB, LJ_TISNUM); 1902 dasm_put(Dst, 11115, LJ_TTAB, LJ_TISNUM);
1899 if (sse) { 1903 if (sse) {
1900 dasm_put(Dst, 11152); 1904 dasm_put(Dst, 11148);
1901 } else { 1905 } else {
1902 } 1906 }
1903 dasm_put(Dst, 11173, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1907 dasm_put(Dst, 11169, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1904 dasm_put(Dst, 11267, LJ_TSTR); 1908 dasm_put(Dst, 11263, LJ_TSTR);
1905 break; 1909 break;
1906 case BC_TGETS: 1910 case BC_TGETS:
1907 dasm_put(Dst, 11285, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1911 dasm_put(Dst, 11281, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1908 dasm_put(Dst, 11371, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1912 dasm_put(Dst, 11367, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1909 break; 1913 break;
1910 case BC_TGETB: 1914 case BC_TGETB:
1911 dasm_put(Dst, 11444, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1915 dasm_put(Dst, 11440, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1912 dasm_put(Dst, 9733); 1916 dasm_put(Dst, 9729);
1913 break; 1917 break;
1914 1918
1915 case BC_TSETV: 1919 case BC_TSETV:
1916 dasm_put(Dst, 11545, LJ_TTAB, LJ_TISNUM); 1920 dasm_put(Dst, 11541, LJ_TTAB, LJ_TISNUM);
1917 if (sse) { 1921 if (sse) {
1918 dasm_put(Dst, 11152); 1922 dasm_put(Dst, 11148);
1919 } else { 1923 } else {
1920 } 1924 }
1921 dasm_put(Dst, 11578, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 1925 dasm_put(Dst, 11574, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
1922 dasm_put(Dst, 11663, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1926 dasm_put(Dst, 11659, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1923 break; 1927 break;
1924 case BC_TSETS: 1928 case BC_TSETS:
1925 dasm_put(Dst, 11727, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1929 dasm_put(Dst, 11723, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1926 dasm_put(Dst, 11804, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 1930 dasm_put(Dst, 11800, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
1927 dasm_put(Dst, 11896, 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)); 1931 dasm_put(Dst, 11892, 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));
1928 break; 1932 break;
1929 case BC_TSETB: 1933 case BC_TSETB:
1930 dasm_put(Dst, 11988, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 1934 dasm_put(Dst, 11984, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
1931 dasm_put(Dst, 12088, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1935 dasm_put(Dst, 12084, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1932 break; 1936 break;
1933 1937
1934 case BC_TSETM: 1938 case BC_TSETM:
1935 dasm_put(Dst, 12136); 1939 dasm_put(Dst, 12132);
1936 if (sse) { 1940 if (sse) {
1937 dasm_put(Dst, 10667); 1941 dasm_put(Dst, 10663);
1938 } else { 1942 } else {
1939 } 1943 }
1940 dasm_put(Dst, 12141, Dt6(->marked), LJ_GC_BLACK); 1944 dasm_put(Dst, 12137, Dt6(->marked), LJ_GC_BLACK);
1941 if (sse) { 1945 if (sse) {
1942 dasm_put(Dst, 12166); 1946 dasm_put(Dst, 12162);
1943 } else { 1947 } else {
1944 } 1948 }
1945 dasm_put(Dst, 12174, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); 1949 dasm_put(Dst, 12170, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain));
1946 dasm_put(Dst, 12310, Dt6(->gclist)); 1950 dasm_put(Dst, 12306, Dt6(->gclist));
1947 break; 1951 break;
1948 1952
1949 /* -- Calls and vararg handling ----------------------------------------- */ 1953 /* -- Calls and vararg handling ----------------------------------------- */
1950 1954
1951 case BC_CALL: case BC_CALLM: 1955 case BC_CALL: case BC_CALLM:
1952 dasm_put(Dst, 9747); 1956 dasm_put(Dst, 9743);
1953 if (op == BC_CALLM) { 1957 if (op == BC_CALLM) {
1954 dasm_put(Dst, 12318); 1958 dasm_put(Dst, 12314);
1955 } 1959 }
1956 dasm_put(Dst, 12323, LJ_TFUNC, Dt7(->pc)); 1960 dasm_put(Dst, 12319, LJ_TFUNC, Dt7(->pc));
1957 break; 1961 break;
1958 1962
1959 case BC_CALLMT: 1963 case BC_CALLMT:
1960 dasm_put(Dst, 12318); 1964 dasm_put(Dst, 12314);
1961 break; 1965 break;
1962 case BC_CALLT: 1966 case BC_CALLT:
1963 dasm_put(Dst, 12366, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 1967 dasm_put(Dst, 12362, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
1964 dasm_put(Dst, 12490, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); 1968 dasm_put(Dst, 12486, FRAME_TYPE, Dt7(->pc), PC2PROTO(k));
1965 break; 1969 break;
1966 1970
1967 case BC_ITERC: 1971 case BC_ITERC:
1968 dasm_put(Dst, 12551, LJ_TFUNC, 2+1, Dt7(->pc)); 1972 dasm_put(Dst, 12547, LJ_TFUNC, 2+1, Dt7(->pc));
1969 break; 1973 break;
1970 1974
1971 case BC_VARG: 1975 case BC_VARG:
1972 dasm_put(Dst, 12633, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); 1976 dasm_put(Dst, 12629, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
1973 dasm_put(Dst, 12787, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 1977 dasm_put(Dst, 12783, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
1974 break; 1978 break;
1975 1979
1976 /* -- Returns ----------------------------------------------------------- */ 1980 /* -- Returns ----------------------------------------------------------- */
1977 1981
1978 case BC_RETM: 1982 case BC_RETM:
1979 dasm_put(Dst, 12318); 1983 dasm_put(Dst, 12314);
1980 break; 1984 break;
1981 1985
1982 case BC_RET: case BC_RET0: case BC_RET1: 1986 case BC_RET: case BC_RET0: case BC_RET1:
1983 if (op != BC_RET0) { 1987 if (op != BC_RET0) {
1984 dasm_put(Dst, 12892); 1988 dasm_put(Dst, 12888);
1985 } 1989 }
1986 dasm_put(Dst, 12896, FRAME_TYPE); 1990 dasm_put(Dst, 12892, FRAME_TYPE);
1987 switch (op) { 1991 switch (op) {
1988 case BC_RET: 1992 case BC_RET:
1989 dasm_put(Dst, 12915); 1993 dasm_put(Dst, 12911);
1990 break; 1994 break;
1991 case BC_RET1: 1995 case BC_RET1:
1992 dasm_put(Dst, 12979); 1996 dasm_put(Dst, 12975);
1993 /* fallthrough */ 1997 /* fallthrough */
1994 case BC_RET0: 1998 case BC_RET0:
1995 dasm_put(Dst, 12995); 1999 dasm_put(Dst, 12991);
1996 default: 2000 default:
1997 break; 2001 break;
1998 } 2002 }
1999 dasm_put(Dst, 13006, Dt7(->pc), PC2PROTO(k)); 2003 dasm_put(Dst, 13002, Dt7(->pc), PC2PROTO(k));
2000 if (op == BC_RET) { 2004 if (op == BC_RET) {
2001 dasm_put(Dst, 13054, LJ_TNIL); 2005 dasm_put(Dst, 13050, LJ_TNIL);
2002 } else { 2006 } else {
2003 dasm_put(Dst, 13065, LJ_TNIL); 2007 dasm_put(Dst, 13061, LJ_TNIL);
2004 } 2008 }
2005 dasm_put(Dst, 13072); 2009 dasm_put(Dst, 13068);
2006 if (op != BC_RET0) { 2010 if (op != BC_RET0) {
2007 dasm_put(Dst, 13092); 2011 dasm_put(Dst, 13088);
2008 } 2012 }
2009 dasm_put(Dst, 4568); 2013 dasm_put(Dst, 4568);
2010 break; 2014 break;
@@ -2014,7 +2018,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2014 2018
2015 case BC_FORL: 2019 case BC_FORL:
2016#if LJ_HASJIT 2020#if LJ_HASJIT
2017 dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); 2021 dasm_put(Dst, 13091, HOTCOUNT_PCMASK, GG_DISP2HOT);
2018#endif 2022#endif
2019 break; 2023 break;
2020 2024
@@ -2026,57 +2030,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2026 case BC_FORI: 2030 case BC_FORI:
2027 case BC_IFORL: 2031 case BC_IFORL:
2028 vk = (op == BC_IFORL || op == BC_JFORL); 2032 vk = (op == BC_IFORL || op == BC_JFORL);
2029 dasm_put(Dst, 13116); 2033 dasm_put(Dst, 13112);
2030 if (!vk) { 2034 if (!vk) {
2031 dasm_put(Dst, 13120, LJ_TISNUM, LJ_TISNUM); 2035 dasm_put(Dst, 13116, LJ_TISNUM, LJ_TISNUM);
2032 } 2036 }
2033 dasm_put(Dst, 13139); 2037 dasm_put(Dst, 13135);
2034 if (!vk) { 2038 if (!vk) {
2035 dasm_put(Dst, 13143, LJ_TISNUM); 2039 dasm_put(Dst, 13139, LJ_TISNUM);
2036 } 2040 }
2037 if (sse) { 2041 if (sse) {
2038 dasm_put(Dst, 13152); 2042 dasm_put(Dst, 13148);
2039 if (vk) { 2043 if (vk) {
2040 dasm_put(Dst, 13164); 2044 dasm_put(Dst, 13160);
2041 } else { 2045 } else {
2042 dasm_put(Dst, 13183); 2046 dasm_put(Dst, 13179);
2043 } 2047 }
2044 dasm_put(Dst, 13188); 2048 dasm_put(Dst, 13184);
2045 } else { 2049 } else {
2046 dasm_put(Dst, 13201); 2050 dasm_put(Dst, 13197);
2047 if (vk) { 2051 if (vk) {
2048 dasm_put(Dst, 13207); 2052 dasm_put(Dst, 13203);
2049 } else { 2053 } else {
2050 dasm_put(Dst, 13223); 2054 dasm_put(Dst, 13219);
2051 } 2055 }
2052 dasm_put(Dst, 13231); 2056 dasm_put(Dst, 13227);
2053 if (cmov) { 2057 if (cmov) {
2054 dasm_put(Dst, 9162); 2058 dasm_put(Dst, 9158);
2055 } else { 2059 } else {
2056 dasm_put(Dst, 9168); 2060 dasm_put(Dst, 9164);
2057 } 2061 }
2058 if (!cmov) { 2062 if (!cmov) {
2059 dasm_put(Dst, 13236); 2063 dasm_put(Dst, 13232);
2060 } 2064 }
2061 } 2065 }
2062 if (op == BC_FORI) { 2066 if (op == BC_FORI) {
2063 dasm_put(Dst, 13242, -BCBIAS_J*4); 2067 dasm_put(Dst, 13238, -BCBIAS_J*4);
2064 } else if (op == BC_JFORI) { 2068 } else if (op == BC_JFORI) {
2065 dasm_put(Dst, 13252, -BCBIAS_J*4, BC_JLOOP); 2069 dasm_put(Dst, 13248, -BCBIAS_J*4, BC_JLOOP);
2066 } else if (op == BC_IFORL) { 2070 } else if (op == BC_IFORL) {
2067 dasm_put(Dst, 13266, -BCBIAS_J*4); 2071 dasm_put(Dst, 13262, -BCBIAS_J*4);
2068 } else { 2072 } else {
2069 dasm_put(Dst, 13262, BC_JLOOP); 2073 dasm_put(Dst, 13258, BC_JLOOP);
2070 } 2074 }
2071 dasm_put(Dst, 9197); 2075 dasm_put(Dst, 9193);
2072 if (sse) { 2076 if (sse) {
2073 dasm_put(Dst, 13276); 2077 dasm_put(Dst, 13272);
2074 } 2078 }
2075 break; 2079 break;
2076 2080
2077 case BC_ITERL: 2081 case BC_ITERL:
2078#if LJ_HASJIT 2082#if LJ_HASJIT
2079 dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); 2083 dasm_put(Dst, 13091, HOTCOUNT_PCMASK, GG_DISP2HOT);
2080#endif 2084#endif
2081 break; 2085 break;
2082 2086
@@ -2085,33 +2089,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2085 break; 2089 break;
2086#endif 2090#endif
2087 case BC_IITERL: 2091 case BC_IITERL:
2088 dasm_put(Dst, 13287, LJ_TNIL); 2092 dasm_put(Dst, 13283, LJ_TNIL);
2089 if (op == BC_JITERL) { 2093 if (op == BC_JITERL) {
2090 dasm_put(Dst, 13302, BC_JLOOP); 2094 dasm_put(Dst, 13298, BC_JLOOP);
2091 } else { 2095 } else {
2092 dasm_put(Dst, 13316, -BCBIAS_J*4); 2096 dasm_put(Dst, 13312, -BCBIAS_J*4);
2093 } 2097 }
2094 dasm_put(Dst, 9501); 2098 dasm_put(Dst, 9497);
2095 break; 2099 break;
2096 2100
2097 case BC_LOOP: 2101 case BC_LOOP:
2098#if LJ_HASJIT 2102#if LJ_HASJIT
2099 dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); 2103 dasm_put(Dst, 13091, HOTCOUNT_PCMASK, GG_DISP2HOT);
2100#endif 2104#endif
2101 break; 2105 break;
2102 2106
2103 case BC_ILOOP: 2107 case BC_ILOOP:
2104 dasm_put(Dst, 7287); 2108 dasm_put(Dst, 7283);
2105 break; 2109 break;
2106 2110
2107 case BC_JLOOP: 2111 case BC_JLOOP:
2108#if LJ_HASJIT 2112#if LJ_HASJIT
2109 dasm_put(Dst, 13332, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2113 dasm_put(Dst, 13328, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2110#endif 2114#endif
2111 break; 2115 break;
2112 2116
2113 case BC_JMP: 2117 case BC_JMP:
2114 dasm_put(Dst, 13359, -BCBIAS_J*4); 2118 dasm_put(Dst, 13355, -BCBIAS_J*4);
2115 break; 2119 break;
2116 2120
2117 /* -- Function headers -------------------------------------------------- */ 2121 /* -- Function headers -------------------------------------------------- */
@@ -2134,13 +2138,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2134 break; 2138 break;
2135#endif 2139#endif
2136 case BC_IFUNCF: 2140 case BC_IFUNCF:
2137 dasm_put(Dst, 13385, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2141 dasm_put(Dst, 13381, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2138 if (op == BC_JFUNCF) { 2142 if (op == BC_JFUNCF) {
2139 dasm_put(Dst, 13416, BC_JLOOP); 2143 dasm_put(Dst, 13412, BC_JLOOP);
2140 } else { 2144 } else {
2141 dasm_put(Dst, 7287); 2145 dasm_put(Dst, 7283);
2142 } 2146 }
2143 dasm_put(Dst, 13425, LJ_TNIL); 2147 dasm_put(Dst, 13421, LJ_TNIL);
2144 break; 2148 break;
2145 2149
2146 case BC_JFUNCV: 2150 case BC_JFUNCV:
@@ -2151,30 +2155,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2151 break; /* NYI: compiled vararg functions. */ 2155 break; /* NYI: compiled vararg functions. */
2152 2156
2153 case BC_IFUNCV: 2157 case BC_IFUNCV:
2154 dasm_put(Dst, 13447, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2158 dasm_put(Dst, 13443, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2155 if (op == BC_JFUNCV) { 2159 if (op == BC_JFUNCV) {
2156 dasm_put(Dst, 13416, BC_JLOOP); 2160 dasm_put(Dst, 13412, BC_JLOOP);
2157 } else { 2161 } else {
2158 dasm_put(Dst, 13544, -4+PC2PROTO(k)); 2162 dasm_put(Dst, 13540, -4+PC2PROTO(k));
2159 } 2163 }
2160 dasm_put(Dst, 13569, LJ_TNIL); 2164 dasm_put(Dst, 13565, LJ_TNIL);
2161 break; 2165 break;
2162 2166
2163 case BC_FUNCC: 2167 case BC_FUNCC:
2164 case BC_FUNCCW: 2168 case BC_FUNCCW:
2165 dasm_put(Dst, 13591, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2169 dasm_put(Dst, 13587, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2166 if (op == BC_FUNCC) { 2170 if (op == BC_FUNCC) {
2167 dasm_put(Dst, 13621); 2171 dasm_put(Dst, 13617);
2168 } else { 2172 } else {
2169 dasm_put(Dst, 13625); 2173 dasm_put(Dst, 13621);
2170 } 2174 }
2171 dasm_put(Dst, 13633, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2175 dasm_put(Dst, 13629, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2172 if (op == BC_FUNCC) { 2176 if (op == BC_FUNCC) {
2173 dasm_put(Dst, 13643); 2177 dasm_put(Dst, 13639);
2174 } else { 2178 } else {
2175 dasm_put(Dst, 13648, DISPATCH_GL(wrapf)); 2179 dasm_put(Dst, 13644, DISPATCH_GL(wrapf));
2176 } 2180 }
2177 dasm_put(Dst, 13654, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2181 dasm_put(Dst, 13650, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2178 break; 2182 break;
2179 2183
2180 /* ---------------------------------------------------------------------- */ 2184 /* ---------------------------------------------------------------------- */
@@ -2202,7 +2206,7 @@ static int build_backend(BuildCtx *ctx)
2202 2206
2203 build_subroutines(ctx, cmov, sse); 2207 build_subroutines(ctx, cmov, sse);
2204 2208
2205 dasm_put(Dst, 13680); 2209 dasm_put(Dst, 13676);
2206 for (op = 0; op < BC__MAX; op++) 2210 for (op = 0; op < BC__MAX; op++)
2207 build_ins(ctx, (BCOp)op, op, cmov, sse); 2211 build_ins(ctx, (BCOp)op, op, cmov, sse);
2208 2212