aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2011-01-10 20:50:34 +0100
committerMike Pall <mike>2011-01-10 20:50:34 +0100
commit87a6c8a980edf4bd8ba6b2126269400a925b4d05 (patch)
tree36bc3857e2d0f278686e01e3339d4e523581e5df /src
parentddf65963332f048838b759bb3d926c58b1b11ce3 (diff)
downloadluajit-87a6c8a980edf4bd8ba6b2126269400a925b4d05.tar.gz
luajit-87a6c8a980edf4bd8ba6b2126269400a925b4d05.tar.bz2
luajit-87a6c8a980edf4bd8ba6b2126269400a925b4d05.zip
FFI: Auto-detect __stdcall and fix up C function declarations.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.dep3
-rw-r--r--src/buildvm_x64.h644
-rw-r--r--src/buildvm_x64win.h1014
-rw-r--r--src/buildvm_x86.dasc6
-rw-r--r--src/buildvm_x86.h847
-rw-r--r--src/lj_ccall.c10
-rw-r--r--src/lj_ctype.h1
7 files changed, 1281 insertions, 1244 deletions
diff --git a/src/Makefile.dep b/src/Makefile.dep
index ba31804c..8cebc39d 100644
--- a/src/Makefile.dep
+++ b/src/Makefile.dep
@@ -58,7 +58,8 @@ lj_bc.o: lj_bc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_bc.h \
58 lj_bcdef.h 58 lj_bcdef.h
59lj_ccall.o: lj_ccall.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ 59lj_ccall.o: lj_ccall.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \
60 lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_ctype.h lj_cconv.h lj_cdata.h \ 60 lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_ctype.h lj_cconv.h lj_cdata.h \
61 lj_ccall.h 61 lj_ccall.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_bc.h \
62 lj_traceerr.h
62lj_cconv.o: lj_cconv.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ 63lj_cconv.o: lj_cconv.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \
63 lj_err.h lj_errmsg.h lj_tab.h lj_ctype.h lj_gc.h lj_cdata.h lj_cconv.h 64 lj_err.h lj_errmsg.h lj_tab.h lj_ctype.h lj_gc.h lj_cdata.h lj_cconv.h
64lj_cdata.o: lj_cdata.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ 65lj_cdata.o: lj_cdata.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \
diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h
index a80a39b8..16bcc65b 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[14436] = { 15static const unsigned char build_actionlist[14438] = {
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,129,252,243,239,252,247,195,237,15,133, 18 252,247,195,237,15,132,244,13,248,14,129,252,243,239,252,247,195,237,15,133,
@@ -470,58 +470,58 @@ static const unsigned char build_actionlist[14436] = {
470 248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133, 470 248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133,
471 244,248,217,201,248,2,221,216,195,255,248,155,137,252,248,83,15,162,137,6, 471 244,248,217,201,248,2,221,216,195,255,248,155,137,252,248,83,15,162,137,6,
472 137,94,4,137,78,8,137,86,12,91,195,248,156,255,85,72,137,229,83,72,137,252, 472 137,94,4,137,78,8,137,86,12,91,195,248,156,255,85,72,137,229,83,72,137,252,
473 251,139,131,233,72,41,196,15,182,139,233,131,252,233,1,15,136,244,248,248, 473 251,139,131,233,72,41,196,255,15,182,139,233,131,252,233,1,15,136,244,248,
474 1,72,139,132,253,203,233,72,137,132,253,204,233,131,252,233,1,15,137,244, 474 248,1,72,139,132,253,203,233,72,137,132,253,204,233,131,252,233,1,15,137,
475 1,248,2,15,182,131,233,72,139,187,233,72,139,179,233,72,139,147,233,72,139, 475 244,1,248,2,15,182,131,233,72,139,187,233,72,139,179,233,72,139,147,233,72,
476 139,233,76,139,131,233,76,139,139,233,133,192,15,132,244,251,15,40,131,233, 476 139,139,233,76,139,131,233,76,139,139,233,133,192,15,132,244,251,15,40,131,
477 255,15,40,139,233,15,40,147,233,15,40,155,233,131,252,248,4,15,134,244,251, 477 233,15,40,139,233,255,15,40,147,233,15,40,155,233,131,252,248,4,15,134,244,
478 15,40,163,233,15,40,171,233,15,40,179,233,15,40,187,233,248,5,252,255,147, 478 251,15,40,163,233,15,40,171,233,15,40,179,233,15,40,187,233,248,5,252,255,
479 233,72,137,131,233,15,41,131,233,72,137,147,233,15,41,139,233,72,139,93,252, 479 147,233,72,137,131,233,15,41,131,233,72,137,147,233,15,41,139,233,255,72,
480 248,201,195,255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,4,239, 480 139,93,252,248,201,195,255,129,124,253,202,4,239,15,135,244,41,129,124,253,
481 15,135,244,41,255,252,242,15,16,4,194,131,195,4,102,15,46,4,202,255,221,4, 481 194,4,239,15,135,244,41,255,252,242,15,16,4,194,131,195,4,102,15,46,4,202,
482 202,221,4,194,131,195,4,255,223,252,233,221,216,255,218,252,233,223,224,158, 482 255,221,4,202,221,4,194,131,195,4,255,223,252,233,221,216,255,218,252,233,
483 255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,67,252,254,141,156, 483 223,224,158,255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,67,252,
484 253,131,233,248,2,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 484 254,141,156,253,131,233,248,2,139,3,15,182,204,15,182,232,131,195,4,193,232,
485 255,36,252,238,255,139,108,194,4,131,195,4,129,252,253,239,15,135,244,251, 485 16,65,252,255,36,252,238,255,139,108,194,4,131,195,4,129,252,253,239,15,135,
486 129,124,253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,4, 486 244,251,129,124,253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,
487 202,255,221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,15,138, 487 15,46,4,202,255,221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,
488 244,248,15,132,244,247,255,248,1,15,183,67,252,254,141,156,253,131,233,248, 488 15,138,244,248,15,132,244,247,255,248,1,15,183,67,252,254,141,156,253,131,
489 2,255,248,2,15,183,67,252,254,141,156,253,131,233,248,1,255,248,5,57,108, 489 233,248,2,255,248,2,15,183,67,252,254,141,156,253,131,233,248,1,255,248,5,
490 202,4,15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193, 490 57,108,202,4,15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,
491 15,132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,15,132, 491 57,193,15,132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,
492 244,2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255, 492 15,132,244,2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,
493 252,233,244,45,255,72,252,247,208,131,195,4,129,124,253,202,4,239,15,133, 493 0,0,255,252,233,244,45,255,72,252,247,208,131,195,4,129,124,253,202,4,239,
494 244,248,139,12,202,65,59,12,135,255,131,195,4,129,124,253,202,4,239,15,135, 494 15,133,244,248,139,12,202,65,59,12,135,255,131,195,4,129,124,253,202,4,239,
495 244,248,255,252,242,65,15,16,4,199,102,15,46,4,202,255,221,4,202,65,221,4, 495 15,135,244,248,255,252,242,65,15,16,4,199,102,15,46,4,202,255,221,4,202,65,
496 199,255,72,252,247,208,131,195,4,57,68,202,4,255,139,108,194,4,131,195,4, 496 221,4,199,255,72,252,247,208,131,195,4,57,68,202,4,255,139,108,194,4,131,
497 129,252,253,239,255,15,131,244,247,255,15,130,244,247,255,137,108,202,4,139, 497 195,4,129,252,253,239,255,15,131,244,247,255,15,130,244,247,255,137,108,202,
498 44,194,137,44,202,255,15,183,67,252,254,141,156,253,131,233,248,1,139,3,15, 498 4,139,44,194,137,44,202,255,15,183,67,252,254,141,156,253,131,233,248,1,139,
499 182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,139, 499 3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,
500 44,194,72,137,44,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, 500 139,44,194,72,137,44,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,
501 252,255,36,252,238,255,49,252,237,129,124,253,194,4,239,129,213,239,137,108, 501 65,252,255,36,252,238,255,49,252,237,129,124,253,194,4,239,129,213,239,137,
502 202,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 502 108,202,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,
503 238,255,129,124,253,194,4,239,15,135,244,48,255,252,242,15,16,4,194,72,184, 503 252,238,255,129,124,253,194,4,239,15,135,244,48,255,252,242,15,16,4,194,72,
504 237,237,102,72,15,110,200,15,87,193,252,242,15,17,4,202,255,221,4,194,217, 504 184,237,237,102,72,15,110,200,15,87,193,252,242,15,17,4,202,255,221,4,194,
505 224,221,28,202,255,129,124,253,194,4,239,15,133,244,248,139,4,194,255,15, 505 217,224,221,28,202,255,129,124,253,194,4,239,15,133,244,248,139,4,194,255,
506 87,192,252,242,15,42,128,233,248,1,252,242,15,17,4,202,255,219,128,233,248, 506 15,87,192,252,242,15,42,128,233,248,1,252,242,15,17,4,202,255,219,128,233,
507 1,221,28,202,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 507 248,1,221,28,202,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,
508 255,36,252,238,248,2,129,124,253,194,4,239,15,133,244,50,139,60,194,137,213, 508 252,255,36,252,238,248,2,129,124,253,194,4,239,15,133,244,50,139,60,194,137,
509 232,251,1,18,255,252,242,15,42,192,137,252,234,255,15,182,75,252,253,252, 509 213,232,251,1,18,255,252,242,15,42,192,137,252,234,255,15,182,75,252,253,
510 233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252,234,4,239,15, 510 252,233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252,234,4,239,
511 135,244,46,255,252,242,15,16,4,252,234,252,242,65,15,88,4,199,255,221,4,252, 511 15,135,244,46,255,252,242,15,16,4,252,234,252,242,65,15,88,4,199,255,221,
512 234,65,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255,252,242, 512 4,252,234,65,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255,252,
513 65,15,16,4,199,252,242,15,88,4,252,234,255,65,221,4,199,220,4,252,234,255, 513 242,65,15,16,4,199,252,242,15,88,4,252,234,255,65,221,4,199,220,4,252,234,
514 129,124,253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15,135,244, 514 255,129,124,253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15,135,
515 49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252,234,220, 515 244,49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252,234,
516 4,194,255,252,242,15,16,4,252,234,252,242,65,15,92,4,199,255,221,4,252,234, 516 220,4,194,255,252,242,15,16,4,252,234,252,242,65,15,92,4,199,255,221,4,252,
517 65,220,36,199,255,252,242,65,15,16,4,199,252,242,15,92,4,252,234,255,65,221, 517 234,65,220,36,199,255,252,242,65,15,16,4,199,252,242,15,92,4,252,234,255,
518 4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,242,15,92,4,194,255, 518 65,221,4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,242,15,92,4,194,
519 221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,252,242,65,15,89,4,199, 519 255,221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,252,242,65,15,89,
520 255,221,4,252,234,65,220,12,199,255,252,242,65,15,16,4,199,252,242,15,89, 520 4,199,255,221,4,252,234,65,220,12,199,255,252,242,65,15,16,4,199,252,242,
521 4,252,234,255,65,221,4,199,220,12,252,234,255,252,242,15,16,4,252,234,252, 521 15,89,4,252,234,255,65,221,4,199,220,12,252,234,255,252,242,15,16,4,252,234,
522 242,15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,4,252,234, 522 252,242,15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,4,252,
523 252,242,65,15,94,4,199,255,221,4,252,234,65,220,52,199,255,252,242,65,15, 523 234,252,242,65,15,94,4,199,255,221,4,252,234,65,220,52,199,255,252,242,65,
524 16,4,199,252,242,15,94,4,252,234,255,65,221,4,199,220,52,252,234,255,252, 524 15,16,4,199,252,242,15,94,4,252,234,255,65,221,4,199,220,52,252,234,255,252,
525 242,15,16,4,252,234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255, 525 242,15,16,4,252,234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255,
526 252,242,15,16,4,252,234,252,242,65,15,16,12,199,255,221,4,252,234,65,221, 526 252,242,15,16,4,252,234,252,242,65,15,16,12,199,255,221,4,252,234,65,221,
527 4,199,255,252,242,65,15,16,4,199,252,242,15,16,12,252,234,255,65,221,4,199, 527 4,199,255,252,242,65,15,16,4,199,252,242,15,16,12,252,234,255,65,221,4,199,
@@ -1455,8 +1455,14 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1455 dasm_put(Dst, 9407); 1455 dasm_put(Dst, 9407);
1456#if LJ_HASFFI 1456#if LJ_HASFFI
1457#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) 1457#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V)
1458 dasm_put(Dst, 9431, DtE(->spadj), DtE(->nsp), offsetof(CCallState, stack), CCALL_SPS_EXTRA*8, DtE(->nfpr), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->gpr[4]), DtE(->gpr[5]), DtE(->fpr[0])); 1458 dasm_put(Dst, 9431, DtE(->spadj));
1459 dasm_put(Dst, 9521, DtE(->fpr[1]), DtE(->fpr[2]), DtE(->fpr[3]), DtE(->fpr[4]), DtE(->fpr[5]), DtE(->fpr[6]), DtE(->fpr[7]), DtE(->func), DtE(->gpr[0]), DtE(->fpr[0]), DtE(->gpr[1]), DtE(->fpr[1])); 1459#if LJ_TARGET_WINDOWS
1460#endif
1461 dasm_put(Dst, 9447, DtE(->nsp), offsetof(CCallState, stack), CCALL_SPS_EXTRA*8, DtE(->nfpr), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->gpr[4]), DtE(->gpr[5]), DtE(->fpr[0]), DtE(->fpr[1]));
1462 dasm_put(Dst, 9526, DtE(->fpr[2]), DtE(->fpr[3]), DtE(->fpr[4]), DtE(->fpr[5]), DtE(->fpr[6]), DtE(->fpr[7]), DtE(->func), DtE(->gpr[0]), DtE(->fpr[0]), DtE(->gpr[1]), DtE(->fpr[1]));
1463#if LJ_TARGET_WINDOWS
1464#endif
1465 dasm_put(Dst, 9581);
1460#endif 1466#endif
1461} 1467}
1462 1468
@@ -1473,20 +1479,20 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1473 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1479 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1474 1480
1475 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1481 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1476 dasm_put(Dst, 9587, LJ_TISNUM, LJ_TISNUM); 1482 dasm_put(Dst, 9589, LJ_TISNUM, LJ_TISNUM);
1477 if (sse) { 1483 if (sse) {
1478 dasm_put(Dst, 9608); 1484 dasm_put(Dst, 9610);
1479 } else { 1485 } else {
1480 dasm_put(Dst, 9623); 1486 dasm_put(Dst, 9625);
1481 if (cmov) { 1487 if (cmov) {
1482 dasm_put(Dst, 9633); 1488 dasm_put(Dst, 9635);
1483 } else { 1489 } else {
1484 dasm_put(Dst, 9639); 1490 dasm_put(Dst, 9641);
1485 } 1491 }
1486 } 1492 }
1487 switch (op) { 1493 switch (op) {
1488 case BC_ISLT: 1494 case BC_ISLT:
1489 dasm_put(Dst, 9646); 1495 dasm_put(Dst, 9648);
1490 break; 1496 break;
1491 case BC_ISGE: 1497 case BC_ISGE:
1492 dasm_put(Dst, 9287); 1498 dasm_put(Dst, 9287);
@@ -1495,599 +1501,599 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1495 dasm_put(Dst, 5894); 1501 dasm_put(Dst, 5894);
1496 break; 1502 break;
1497 case BC_ISGT: 1503 case BC_ISGT:
1498 dasm_put(Dst, 9651); 1504 dasm_put(Dst, 9653);
1499 break; 1505 break;
1500 default: break; /* Shut up GCC. */ 1506 default: break; /* Shut up GCC. */
1501 } 1507 }
1502 dasm_put(Dst, 9656, -BCBIAS_J*4); 1508 dasm_put(Dst, 9658, -BCBIAS_J*4);
1503 break; 1509 break;
1504 1510
1505 case BC_ISEQV: case BC_ISNEV: 1511 case BC_ISEQV: case BC_ISNEV:
1506 vk = op == BC_ISEQV; 1512 vk = op == BC_ISEQV;
1507 dasm_put(Dst, 9691, LJ_TISNUM, LJ_TISNUM); 1513 dasm_put(Dst, 9693, LJ_TISNUM, LJ_TISNUM);
1508 if (sse) { 1514 if (sse) {
1509 dasm_put(Dst, 9717); 1515 dasm_put(Dst, 9719);
1510 } else { 1516 } else {
1511 dasm_put(Dst, 9729); 1517 dasm_put(Dst, 9731);
1512 if (cmov) { 1518 if (cmov) {
1513 dasm_put(Dst, 9633); 1519 dasm_put(Dst, 9635);
1514 } else { 1520 } else {
1515 dasm_put(Dst, 9639); 1521 dasm_put(Dst, 9641);
1516 } 1522 }
1517 } 1523 }
1518 iseqne_fp: 1524 iseqne_fp:
1519 if (vk) { 1525 if (vk) {
1520 dasm_put(Dst, 9736); 1526 dasm_put(Dst, 9738);
1521 } else { 1527 } else {
1522 dasm_put(Dst, 9745); 1528 dasm_put(Dst, 9747);
1523 } 1529 }
1524 iseqne_end: 1530 iseqne_end:
1525 if (vk) { 1531 if (vk) {
1526 dasm_put(Dst, 9754, -BCBIAS_J*4); 1532 dasm_put(Dst, 9756, -BCBIAS_J*4);
1527 } else { 1533 } else {
1528 dasm_put(Dst, 9769, -BCBIAS_J*4); 1534 dasm_put(Dst, 9771, -BCBIAS_J*4);
1529 } 1535 }
1530 dasm_put(Dst, 9670); 1536 dasm_put(Dst, 9672);
1531 if (op == BC_ISEQV || op == BC_ISNEV) { 1537 if (op == BC_ISEQV || op == BC_ISNEV) {
1532 dasm_put(Dst, 9784, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1538 dasm_put(Dst, 9786, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1533 if (vk) { 1539 if (vk) {
1534 dasm_put(Dst, 9842); 1540 dasm_put(Dst, 9844);
1535 } else { 1541 } else {
1536 dasm_put(Dst, 9846); 1542 dasm_put(Dst, 9848);
1537 } 1543 }
1538 dasm_put(Dst, 9852); 1544 dasm_put(Dst, 9854);
1539 } 1545 }
1540 break; 1546 break;
1541 case BC_ISEQS: case BC_ISNES: 1547 case BC_ISEQS: case BC_ISNES:
1542 vk = op == BC_ISEQS; 1548 vk = op == BC_ISEQS;
1543 dasm_put(Dst, 9857, LJ_TSTR); 1549 dasm_put(Dst, 9859, LJ_TSTR);
1544 iseqne_test: 1550 iseqne_test:
1545 if (vk) { 1551 if (vk) {
1546 dasm_put(Dst, 9740); 1552 dasm_put(Dst, 9742);
1547 } else { 1553 } else {
1548 dasm_put(Dst, 2803); 1554 dasm_put(Dst, 2803);
1549 } 1555 }
1550 goto iseqne_end; 1556 goto iseqne_end;
1551 case BC_ISEQN: case BC_ISNEN: 1557 case BC_ISEQN: case BC_ISNEN:
1552 vk = op == BC_ISEQN; 1558 vk = op == BC_ISEQN;
1553 dasm_put(Dst, 9882, LJ_TISNUM); 1559 dasm_put(Dst, 9884, LJ_TISNUM);
1554 if (sse) { 1560 if (sse) {
1555 dasm_put(Dst, 9896); 1561 dasm_put(Dst, 9898);
1556 } else { 1562 } else {
1557 dasm_put(Dst, 9909); 1563 dasm_put(Dst, 9911);
1558 if (cmov) { 1564 if (cmov) {
1559 dasm_put(Dst, 9633); 1565 dasm_put(Dst, 9635);
1560 } else { 1566 } else {
1561 dasm_put(Dst, 9639); 1567 dasm_put(Dst, 9641);
1562 } 1568 }
1563 } 1569 }
1564 goto iseqne_fp; 1570 goto iseqne_fp;
1565 case BC_ISEQP: case BC_ISNEP: 1571 case BC_ISEQP: case BC_ISNEP:
1566 vk = op == BC_ISEQP; 1572 vk = op == BC_ISEQP;
1567 dasm_put(Dst, 9917); 1573 dasm_put(Dst, 9919);
1568 goto iseqne_test; 1574 goto iseqne_test;
1569 1575
1570 /* -- Unary test and copy ops ------------------------------------------- */ 1576 /* -- Unary test and copy ops ------------------------------------------- */
1571 1577
1572 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1578 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1573 dasm_put(Dst, 9929, LJ_TISTRUECOND); 1579 dasm_put(Dst, 9931, LJ_TISTRUECOND);
1574 if (op == BC_IST || op == BC_ISTC) { 1580 if (op == BC_IST || op == BC_ISTC) {
1575 dasm_put(Dst, 9941); 1581 dasm_put(Dst, 9943);
1576 } else { 1582 } else {
1577 dasm_put(Dst, 9946); 1583 dasm_put(Dst, 9948);
1578 } 1584 }
1579 if (op == BC_ISTC || op == BC_ISFC) { 1585 if (op == BC_ISTC || op == BC_ISFC) {
1580 dasm_put(Dst, 9951); 1586 dasm_put(Dst, 9953);
1581 } 1587 }
1582 dasm_put(Dst, 9962, -BCBIAS_J*4); 1588 dasm_put(Dst, 9964, -BCBIAS_J*4);
1583 break; 1589 break;
1584 1590
1585 /* -- Unary ops --------------------------------------------------------- */ 1591 /* -- Unary ops --------------------------------------------------------- */
1586 1592
1587 case BC_MOV: 1593 case BC_MOV:
1588 dasm_put(Dst, 9995); 1594 dasm_put(Dst, 9997);
1589 break; 1595 break;
1590 case BC_NOT: 1596 case BC_NOT:
1591 dasm_put(Dst, 10024, LJ_TISTRUECOND, LJ_TTRUE); 1597 dasm_put(Dst, 10026, LJ_TISTRUECOND, LJ_TTRUE);
1592 break; 1598 break;
1593 case BC_UNM: 1599 case BC_UNM:
1594 dasm_put(Dst, 10061, LJ_TISNUM); 1600 dasm_put(Dst, 10063, LJ_TISNUM);
1595 if (sse) { 1601 if (sse) {
1596 dasm_put(Dst, 10072, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 1602 dasm_put(Dst, 10074, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
1597 } else { 1603 } else {
1598 dasm_put(Dst, 10097); 1604 dasm_put(Dst, 10099);
1599 } 1605 }
1600 dasm_put(Dst, 9670); 1606 dasm_put(Dst, 9672);
1601 break; 1607 break;
1602 case BC_LEN: 1608 case BC_LEN:
1603 dasm_put(Dst, 10106, LJ_TSTR); 1609 dasm_put(Dst, 10108, LJ_TSTR);
1604 if (sse) { 1610 if (sse) {
1605 dasm_put(Dst, 10120, Dt5(->len)); 1611 dasm_put(Dst, 10122, Dt5(->len));
1606 } else { 1612 } else {
1607 dasm_put(Dst, 10138, Dt5(->len)); 1613 dasm_put(Dst, 10140, Dt5(->len));
1608 } 1614 }
1609 dasm_put(Dst, 10147, LJ_TTAB); 1615 dasm_put(Dst, 10149, LJ_TTAB);
1610 if (sse) { 1616 if (sse) {
1611 dasm_put(Dst, 10189); 1617 dasm_put(Dst, 10191);
1612 } else { 1618 } else {
1613 } 1619 }
1614 dasm_put(Dst, 10198); 1620 dasm_put(Dst, 10200);
1615 break; 1621 break;
1616 1622
1617 /* -- Binary ops -------------------------------------------------------- */ 1623 /* -- Binary ops -------------------------------------------------------- */
1618 1624
1619 1625
1620 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1626 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1621 dasm_put(Dst, 10208); 1627 dasm_put(Dst, 10210);
1622 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1628 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1623 switch (vk) { 1629 switch (vk) {
1624 case 0: 1630 case 0:
1625 dasm_put(Dst, 10216, LJ_TISNUM); 1631 dasm_put(Dst, 10218, LJ_TISNUM);
1626 if (sse) { 1632 if (sse) {
1627 dasm_put(Dst, 10228); 1633 dasm_put(Dst, 10230);
1628 } else { 1634 } else {
1629 dasm_put(Dst, 10243); 1635 dasm_put(Dst, 10245);
1630 } 1636 }
1631 break; 1637 break;
1632 case 1: 1638 case 1:
1633 dasm_put(Dst, 10252, LJ_TISNUM); 1639 dasm_put(Dst, 10254, LJ_TISNUM);
1634 if (sse) { 1640 if (sse) {
1635 dasm_put(Dst, 10264); 1641 dasm_put(Dst, 10266);
1636 } else { 1642 } else {
1637 dasm_put(Dst, 10279); 1643 dasm_put(Dst, 10281);
1638 } 1644 }
1639 break; 1645 break;
1640 default: 1646 default:
1641 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1647 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1642 if (sse) { 1648 if (sse) {
1643 dasm_put(Dst, 10310); 1649 dasm_put(Dst, 10312);
1644 } else { 1650 } else {
1645 dasm_put(Dst, 10324); 1651 dasm_put(Dst, 10326);
1646 } 1652 }
1647 break; 1653 break;
1648 } 1654 }
1649 if (sse) { 1655 if (sse) {
1650 dasm_put(Dst, 10090); 1656 dasm_put(Dst, 10092);
1651 } else { 1657 } else {
1652 dasm_put(Dst, 10102); 1658 dasm_put(Dst, 10104);
1653 } 1659 }
1654 dasm_put(Dst, 9670); 1660 dasm_put(Dst, 9672);
1655 break; 1661 break;
1656 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1662 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1657 dasm_put(Dst, 10208); 1663 dasm_put(Dst, 10210);
1658 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1664 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1659 switch (vk) { 1665 switch (vk) {
1660 case 0: 1666 case 0:
1661 dasm_put(Dst, 10216, LJ_TISNUM); 1667 dasm_put(Dst, 10218, LJ_TISNUM);
1662 if (sse) { 1668 if (sse) {
1663 dasm_put(Dst, 10332); 1669 dasm_put(Dst, 10334);
1664 } else { 1670 } else {
1665 dasm_put(Dst, 10347); 1671 dasm_put(Dst, 10349);
1666 } 1672 }
1667 break; 1673 break;
1668 case 1: 1674 case 1:
1669 dasm_put(Dst, 10252, LJ_TISNUM); 1675 dasm_put(Dst, 10254, LJ_TISNUM);
1670 if (sse) { 1676 if (sse) {
1671 dasm_put(Dst, 10356); 1677 dasm_put(Dst, 10358);
1672 } else { 1678 } else {
1673 dasm_put(Dst, 10371); 1679 dasm_put(Dst, 10373);
1674 } 1680 }
1675 break; 1681 break;
1676 default: 1682 default:
1677 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1683 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1678 if (sse) { 1684 if (sse) {
1679 dasm_put(Dst, 10380); 1685 dasm_put(Dst, 10382);
1680 } else { 1686 } else {
1681 dasm_put(Dst, 10394); 1687 dasm_put(Dst, 10396);
1682 } 1688 }
1683 break; 1689 break;
1684 } 1690 }
1685 if (sse) { 1691 if (sse) {
1686 dasm_put(Dst, 10090); 1692 dasm_put(Dst, 10092);
1687 } else { 1693 } else {
1688 dasm_put(Dst, 10102); 1694 dasm_put(Dst, 10104);
1689 } 1695 }
1690 dasm_put(Dst, 9670); 1696 dasm_put(Dst, 9672);
1691 break; 1697 break;
1692 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1698 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1693 dasm_put(Dst, 10208); 1699 dasm_put(Dst, 10210);
1694 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1700 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1695 switch (vk) { 1701 switch (vk) {
1696 case 0: 1702 case 0:
1697 dasm_put(Dst, 10216, LJ_TISNUM); 1703 dasm_put(Dst, 10218, LJ_TISNUM);
1698 if (sse) { 1704 if (sse) {
1699 dasm_put(Dst, 10402); 1705 dasm_put(Dst, 10404);
1700 } else { 1706 } else {
1701 dasm_put(Dst, 10417); 1707 dasm_put(Dst, 10419);
1702 } 1708 }
1703 break; 1709 break;
1704 case 1: 1710 case 1:
1705 dasm_put(Dst, 10252, LJ_TISNUM); 1711 dasm_put(Dst, 10254, LJ_TISNUM);
1706 if (sse) { 1712 if (sse) {
1707 dasm_put(Dst, 10426); 1713 dasm_put(Dst, 10428);
1708 } else { 1714 } else {
1709 dasm_put(Dst, 10441); 1715 dasm_put(Dst, 10443);
1710 } 1716 }
1711 break; 1717 break;
1712 default: 1718 default:
1713 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1719 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1714 if (sse) { 1720 if (sse) {
1715 dasm_put(Dst, 10450); 1721 dasm_put(Dst, 10452);
1716 } else { 1722 } else {
1717 dasm_put(Dst, 10464); 1723 dasm_put(Dst, 10466);
1718 } 1724 }
1719 break; 1725 break;
1720 } 1726 }
1721 if (sse) { 1727 if (sse) {
1722 dasm_put(Dst, 10090); 1728 dasm_put(Dst, 10092);
1723 } else { 1729 } else {
1724 dasm_put(Dst, 10102); 1730 dasm_put(Dst, 10104);
1725 } 1731 }
1726 dasm_put(Dst, 9670); 1732 dasm_put(Dst, 9672);
1727 break; 1733 break;
1728 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1734 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1729 dasm_put(Dst, 10208); 1735 dasm_put(Dst, 10210);
1730 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1736 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1731 switch (vk) { 1737 switch (vk) {
1732 case 0: 1738 case 0:
1733 dasm_put(Dst, 10216, LJ_TISNUM); 1739 dasm_put(Dst, 10218, LJ_TISNUM);
1734 if (sse) { 1740 if (sse) {
1735 dasm_put(Dst, 10472); 1741 dasm_put(Dst, 10474);
1736 } else { 1742 } else {
1737 dasm_put(Dst, 10487); 1743 dasm_put(Dst, 10489);
1738 } 1744 }
1739 break; 1745 break;
1740 case 1: 1746 case 1:
1741 dasm_put(Dst, 10252, LJ_TISNUM); 1747 dasm_put(Dst, 10254, LJ_TISNUM);
1742 if (sse) { 1748 if (sse) {
1743 dasm_put(Dst, 10496); 1749 dasm_put(Dst, 10498);
1744 } else { 1750 } else {
1745 dasm_put(Dst, 10511); 1751 dasm_put(Dst, 10513);
1746 } 1752 }
1747 break; 1753 break;
1748 default: 1754 default:
1749 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1755 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1750 if (sse) { 1756 if (sse) {
1751 dasm_put(Dst, 10520); 1757 dasm_put(Dst, 10522);
1752 } else { 1758 } else {
1753 dasm_put(Dst, 10534); 1759 dasm_put(Dst, 10536);
1754 } 1760 }
1755 break; 1761 break;
1756 } 1762 }
1757 if (sse) { 1763 if (sse) {
1758 dasm_put(Dst, 10090); 1764 dasm_put(Dst, 10092);
1759 } else { 1765 } else {
1760 dasm_put(Dst, 10102); 1766 dasm_put(Dst, 10104);
1761 } 1767 }
1762 dasm_put(Dst, 9670); 1768 dasm_put(Dst, 9672);
1763 break; 1769 break;
1764 case BC_MODVN: 1770 case BC_MODVN:
1765 dasm_put(Dst, 10208); 1771 dasm_put(Dst, 10210);
1766 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1772 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1767 switch (vk) { 1773 switch (vk) {
1768 case 0: 1774 case 0:
1769 dasm_put(Dst, 10216, LJ_TISNUM); 1775 dasm_put(Dst, 10218, LJ_TISNUM);
1770 if (sse) { 1776 if (sse) {
1771 dasm_put(Dst, 10542); 1777 dasm_put(Dst, 10544);
1772 } else { 1778 } else {
1773 dasm_put(Dst, 10557); 1779 dasm_put(Dst, 10559);
1774 } 1780 }
1775 break; 1781 break;
1776 case 1: 1782 case 1:
1777 dasm_put(Dst, 10252, LJ_TISNUM); 1783 dasm_put(Dst, 10254, LJ_TISNUM);
1778 if (sse) { 1784 if (sse) {
1779 dasm_put(Dst, 10566); 1785 dasm_put(Dst, 10568);
1780 } else { 1786 } else {
1781 dasm_put(Dst, 10581); 1787 dasm_put(Dst, 10583);
1782 } 1788 }
1783 break; 1789 break;
1784 default: 1790 default:
1785 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1791 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1786 if (sse) { 1792 if (sse) {
1787 dasm_put(Dst, 10590); 1793 dasm_put(Dst, 10592);
1788 } else { 1794 } else {
1789 dasm_put(Dst, 10604); 1795 dasm_put(Dst, 10606);
1790 } 1796 }
1791 break; 1797 break;
1792 } 1798 }
1793 dasm_put(Dst, 10612); 1799 dasm_put(Dst, 10614);
1794 if (sse) { 1800 if (sse) {
1795 dasm_put(Dst, 10090); 1801 dasm_put(Dst, 10092);
1796 } else { 1802 } else {
1797 dasm_put(Dst, 10102); 1803 dasm_put(Dst, 10104);
1798 } 1804 }
1799 dasm_put(Dst, 9670); 1805 dasm_put(Dst, 9672);
1800 break; 1806 break;
1801 case BC_MODNV: case BC_MODVV: 1807 case BC_MODNV: case BC_MODVV:
1802 dasm_put(Dst, 10208); 1808 dasm_put(Dst, 10210);
1803 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1809 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1804 switch (vk) { 1810 switch (vk) {
1805 case 0: 1811 case 0:
1806 dasm_put(Dst, 10216, LJ_TISNUM); 1812 dasm_put(Dst, 10218, LJ_TISNUM);
1807 if (sse) { 1813 if (sse) {
1808 dasm_put(Dst, 10542); 1814 dasm_put(Dst, 10544);
1809 } else { 1815 } else {
1810 dasm_put(Dst, 10557); 1816 dasm_put(Dst, 10559);
1811 } 1817 }
1812 break; 1818 break;
1813 case 1: 1819 case 1:
1814 dasm_put(Dst, 10252, LJ_TISNUM); 1820 dasm_put(Dst, 10254, LJ_TISNUM);
1815 if (sse) { 1821 if (sse) {
1816 dasm_put(Dst, 10566); 1822 dasm_put(Dst, 10568);
1817 } else { 1823 } else {
1818 dasm_put(Dst, 10581); 1824 dasm_put(Dst, 10583);
1819 } 1825 }
1820 break; 1826 break;
1821 default: 1827 default:
1822 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1828 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1823 if (sse) { 1829 if (sse) {
1824 dasm_put(Dst, 10590); 1830 dasm_put(Dst, 10592);
1825 } else { 1831 } else {
1826 dasm_put(Dst, 10604); 1832 dasm_put(Dst, 10606);
1827 } 1833 }
1828 break; 1834 break;
1829 } 1835 }
1830 dasm_put(Dst, 10618); 1836 dasm_put(Dst, 10620);
1831 break; 1837 break;
1832 case BC_POW: 1838 case BC_POW:
1833 dasm_put(Dst, 10208); 1839 dasm_put(Dst, 10210);
1834 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1840 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1835 switch (vk) { 1841 switch (vk) {
1836 case 0: 1842 case 0:
1837 dasm_put(Dst, 10216, LJ_TISNUM); 1843 dasm_put(Dst, 10218, LJ_TISNUM);
1838 if (sse) { 1844 if (sse) {
1839 dasm_put(Dst, 10542); 1845 dasm_put(Dst, 10544);
1840 } else { 1846 } else {
1841 dasm_put(Dst, 10557); 1847 dasm_put(Dst, 10559);
1842 } 1848 }
1843 break; 1849 break;
1844 case 1: 1850 case 1:
1845 dasm_put(Dst, 10252, LJ_TISNUM); 1851 dasm_put(Dst, 10254, LJ_TISNUM);
1846 if (sse) { 1852 if (sse) {
1847 dasm_put(Dst, 10566); 1853 dasm_put(Dst, 10568);
1848 } else { 1854 } else {
1849 dasm_put(Dst, 10581); 1855 dasm_put(Dst, 10583);
1850 } 1856 }
1851 break; 1857 break;
1852 default: 1858 default:
1853 dasm_put(Dst, 10288, LJ_TISNUM, LJ_TISNUM); 1859 dasm_put(Dst, 10290, LJ_TISNUM, LJ_TISNUM);
1854 if (sse) { 1860 if (sse) {
1855 dasm_put(Dst, 10590); 1861 dasm_put(Dst, 10592);
1856 } else { 1862 } else {
1857 dasm_put(Dst, 10604); 1863 dasm_put(Dst, 10606);
1858 } 1864 }
1859 break; 1865 break;
1860 } 1866 }
1861 dasm_put(Dst, 10623); 1867 dasm_put(Dst, 10625);
1862 if (sse) { 1868 if (sse) {
1863 dasm_put(Dst, 10090); 1869 dasm_put(Dst, 10092);
1864 } else { 1870 } else {
1865 dasm_put(Dst, 10102); 1871 dasm_put(Dst, 10104);
1866 } 1872 }
1867 dasm_put(Dst, 9670); 1873 dasm_put(Dst, 9672);
1868 break; 1874 break;
1869 1875
1870 case BC_CAT: 1876 case BC_CAT:
1871 dasm_put(Dst, 10627, Dt1(->base), Dt1(->base)); 1877 dasm_put(Dst, 10629, Dt1(->base), Dt1(->base));
1872 break; 1878 break;
1873 1879
1874 /* -- Constant ops ------------------------------------------------------ */ 1880 /* -- Constant ops ------------------------------------------------------ */
1875 1881
1876 case BC_KSTR: 1882 case BC_KSTR:
1877 dasm_put(Dst, 10711, LJ_TSTR); 1883 dasm_put(Dst, 10713, LJ_TSTR);
1878 break; 1884 break;
1879 case BC_KCDATA: 1885 case BC_KCDATA:
1880#if LJ_HASFFI 1886#if LJ_HASFFI
1881 dasm_put(Dst, 10711, LJ_TCDATA); 1887 dasm_put(Dst, 10713, LJ_TCDATA);
1882#endif 1888#endif
1883 break; 1889 break;
1884 case BC_KSHORT: 1890 case BC_KSHORT:
1885 if (sse) { 1891 if (sse) {
1886 dasm_put(Dst, 10748); 1892 dasm_put(Dst, 10750);
1887 } else { 1893 } else {
1888 dasm_put(Dst, 10763); 1894 dasm_put(Dst, 10765);
1889 } 1895 }
1890 dasm_put(Dst, 9670); 1896 dasm_put(Dst, 9672);
1891 break; 1897 break;
1892 case BC_KNUM: 1898 case BC_KNUM:
1893 if (sse) { 1899 if (sse) {
1894 dasm_put(Dst, 10771); 1900 dasm_put(Dst, 10773);
1895 } else { 1901 } else {
1896 dasm_put(Dst, 10785); 1902 dasm_put(Dst, 10787);
1897 } 1903 }
1898 dasm_put(Dst, 9670); 1904 dasm_put(Dst, 9672);
1899 break; 1905 break;
1900 case BC_KPRI: 1906 case BC_KPRI:
1901 dasm_put(Dst, 10793); 1907 dasm_put(Dst, 10795);
1902 break; 1908 break;
1903 case BC_KNIL: 1909 case BC_KNIL:
1904 dasm_put(Dst, 10822, LJ_TNIL); 1910 dasm_put(Dst, 10824, LJ_TNIL);
1905 break; 1911 break;
1906 1912
1907 /* -- Upvalue and function ops ------------------------------------------ */ 1913 /* -- Upvalue and function ops ------------------------------------------ */
1908 1914
1909 case BC_UGET: 1915 case BC_UGET:
1910 dasm_put(Dst, 10870, offsetof(GCfuncL, uvptr), DtA(->v)); 1916 dasm_put(Dst, 10872, offsetof(GCfuncL, uvptr), DtA(->v));
1911 break; 1917 break;
1912 case BC_USETV: 1918 case BC_USETV:
1913#define TV2MARKOFS \ 1919#define TV2MARKOFS \
1914 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 1920 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
1915 dasm_put(Dst, 10911, 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); 1921 dasm_put(Dst, 10913, 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);
1916 dasm_put(Dst, 11007); 1922 dasm_put(Dst, 11009);
1917 break; 1923 break;
1918#undef TV2MARKOFS 1924#undef TV2MARKOFS
1919 case BC_USETS: 1925 case BC_USETS:
1920 dasm_put(Dst, 11019, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 1926 dasm_put(Dst, 11021, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
1921 break; 1927 break;
1922 case BC_USETN: 1928 case BC_USETN:
1923 dasm_put(Dst, 11115); 1929 dasm_put(Dst, 11117);
1924 if (sse) { 1930 if (sse) {
1925 dasm_put(Dst, 11120); 1931 dasm_put(Dst, 11122);
1926 } else { 1932 } else {
1927 dasm_put(Dst, 9912); 1933 dasm_put(Dst, 9914);
1928 } 1934 }
1929 dasm_put(Dst, 11128, offsetof(GCfuncL, uvptr), DtA(->v)); 1935 dasm_put(Dst, 11130, offsetof(GCfuncL, uvptr), DtA(->v));
1930 if (sse) { 1936 if (sse) {
1931 dasm_put(Dst, 11137); 1937 dasm_put(Dst, 11139);
1932 } else { 1938 } else {
1933 dasm_put(Dst, 11143); 1939 dasm_put(Dst, 11145);
1934 } 1940 }
1935 dasm_put(Dst, 9670); 1941 dasm_put(Dst, 9672);
1936 break; 1942 break;
1937 case BC_USETP: 1943 case BC_USETP:
1938 dasm_put(Dst, 11146, offsetof(GCfuncL, uvptr), DtA(->v)); 1944 dasm_put(Dst, 11148, offsetof(GCfuncL, uvptr), DtA(->v));
1939 break; 1945 break;
1940 case BC_UCLO: 1946 case BC_UCLO:
1941 dasm_put(Dst, 11186, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 1947 dasm_put(Dst, 11188, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
1942 break; 1948 break;
1943 1949
1944 case BC_FNEW: 1950 case BC_FNEW:
1945 dasm_put(Dst, 11242, Dt1(->base), Dt1(->base), LJ_TFUNC); 1951 dasm_put(Dst, 11244, Dt1(->base), Dt1(->base), LJ_TFUNC);
1946 break; 1952 break;
1947 1953
1948 /* -- Table ops --------------------------------------------------------- */ 1954 /* -- Table ops --------------------------------------------------------- */
1949 1955
1950 case BC_TNEW: 1956 case BC_TNEW:
1951 dasm_put(Dst, 11309, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); 1957 dasm_put(Dst, 11311, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB);
1952 break; 1958 break;
1953 case BC_TDUP: 1959 case BC_TDUP:
1954 dasm_put(Dst, 11433, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 1960 dasm_put(Dst, 11435, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
1955 break; 1961 break;
1956 1962
1957 case BC_GGET: 1963 case BC_GGET:
1958 dasm_put(Dst, 11532, Dt7(->env)); 1964 dasm_put(Dst, 11534, Dt7(->env));
1959 break; 1965 break;
1960 case BC_GSET: 1966 case BC_GSET:
1961 dasm_put(Dst, 11552, Dt7(->env)); 1967 dasm_put(Dst, 11554, Dt7(->env));
1962 break; 1968 break;
1963 1969
1964 case BC_TGETV: 1970 case BC_TGETV:
1965 dasm_put(Dst, 11572, LJ_TTAB, LJ_TISNUM); 1971 dasm_put(Dst, 11574, LJ_TTAB, LJ_TISNUM);
1966 if (sse) { 1972 if (sse) {
1967 dasm_put(Dst, 11605); 1973 dasm_put(Dst, 11607);
1968 } else { 1974 } else {
1969 } 1975 }
1970 dasm_put(Dst, 11626, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1976 dasm_put(Dst, 11628, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1971 dasm_put(Dst, 11711, LJ_TNIL, LJ_TSTR); 1977 dasm_put(Dst, 11713, LJ_TNIL, LJ_TSTR);
1972 break; 1978 break;
1973 case BC_TGETS: 1979 case BC_TGETS:
1974 dasm_put(Dst, 11740, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1980 dasm_put(Dst, 11742, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1975 dasm_put(Dst, 11825, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1981 dasm_put(Dst, 11827, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1976 break; 1982 break;
1977 case BC_TGETB: 1983 case BC_TGETB:
1978 dasm_put(Dst, 11897, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1984 dasm_put(Dst, 11899, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1979 dasm_put(Dst, 11993, LJ_TNIL); 1985 dasm_put(Dst, 11995, LJ_TNIL);
1980 break; 1986 break;
1981 1987
1982 case BC_TSETV: 1988 case BC_TSETV:
1983 dasm_put(Dst, 12010, LJ_TTAB, LJ_TISNUM); 1989 dasm_put(Dst, 12012, LJ_TTAB, LJ_TISNUM);
1984 if (sse) { 1990 if (sse) {
1985 dasm_put(Dst, 11605); 1991 dasm_put(Dst, 11607);
1986 } else { 1992 } else {
1987 } 1993 }
1988 dasm_put(Dst, 12043, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 1994 dasm_put(Dst, 12045, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
1989 dasm_put(Dst, 12123, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1995 dasm_put(Dst, 12125, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1990 break; 1996 break;
1991 case BC_TSETS: 1997 case BC_TSETS:
1992 dasm_put(Dst, 12187, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1998 dasm_put(Dst, 12189, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1993 dasm_put(Dst, 12264, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 1999 dasm_put(Dst, 12266, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
1994 dasm_put(Dst, 12351, 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)); 2000 dasm_put(Dst, 12353, 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));
1995 break; 2001 break;
1996 case BC_TSETB: 2002 case BC_TSETB:
1997 dasm_put(Dst, 12443, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 2003 dasm_put(Dst, 12445, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
1998 dasm_put(Dst, 12538, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2004 dasm_put(Dst, 12540, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1999 break; 2005 break;
2000 2006
2001 case BC_TSETM: 2007 case BC_TSETM:
2002 dasm_put(Dst, 12586, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); 2008 dasm_put(Dst, 12588, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
2003 dasm_put(Dst, 12736, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2009 dasm_put(Dst, 12738, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2004 break; 2010 break;
2005 2011
2006 /* -- Calls and vararg handling ----------------------------------------- */ 2012 /* -- Calls and vararg handling ----------------------------------------- */
2007 2013
2008 case BC_CALL: case BC_CALLM: 2014 case BC_CALL: case BC_CALLM:
2009 dasm_put(Dst, 10212); 2015 dasm_put(Dst, 10214);
2010 if (op == BC_CALLM) { 2016 if (op == BC_CALLM) {
2011 dasm_put(Dst, 12756); 2017 dasm_put(Dst, 12758);
2012 } 2018 }
2013 dasm_put(Dst, 12761, LJ_TFUNC, Dt7(->pc)); 2019 dasm_put(Dst, 12763, LJ_TFUNC, Dt7(->pc));
2014 break; 2020 break;
2015 2021
2016 case BC_CALLMT: 2022 case BC_CALLMT:
2017 dasm_put(Dst, 12756); 2023 dasm_put(Dst, 12758);
2018 break; 2024 break;
2019 case BC_CALLT: 2025 case BC_CALLT:
2020 dasm_put(Dst, 12804, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 2026 dasm_put(Dst, 12806, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
2021 dasm_put(Dst, 12922, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 2027 dasm_put(Dst, 12924, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
2022 break; 2028 break;
2023 2029
2024 case BC_ITERC: 2030 case BC_ITERC:
2025 dasm_put(Dst, 12996, LJ_TFUNC, 2+1, Dt7(->pc)); 2031 dasm_put(Dst, 12998, LJ_TFUNC, 2+1, Dt7(->pc));
2026 break; 2032 break;
2027 2033
2028 case BC_ITERN: 2034 case BC_ITERN:
2029#if LJ_HASJIT 2035#if LJ_HASJIT
2030#endif 2036#endif
2031 dasm_put(Dst, 13068, Dt6(->asize), Dt6(->array), LJ_TNIL); 2037 dasm_put(Dst, 13070, Dt6(->asize), Dt6(->array), LJ_TNIL);
2032 if (sse) { 2038 if (sse) {
2033 dasm_put(Dst, 13120); 2039 dasm_put(Dst, 13122);
2034 } else { 2040 } else {
2035 dasm_put(Dst, 13126); 2041 dasm_put(Dst, 13128);
2036 } 2042 }
2037 dasm_put(Dst, 13132); 2043 dasm_put(Dst, 13134);
2038 if (sse) { 2044 if (sse) {
2039 dasm_put(Dst, 10090); 2045 dasm_put(Dst, 10092);
2040 } else { 2046 } else {
2041 dasm_put(Dst, 10102); 2047 dasm_put(Dst, 10104);
2042 } 2048 }
2043 dasm_put(Dst, 13145, -BCBIAS_J*4); 2049 dasm_put(Dst, 13147, -BCBIAS_J*4);
2044 if (!sse) { 2050 if (!sse) {
2045 dasm_put(Dst, 13199); 2051 dasm_put(Dst, 13201);
2046 } 2052 }
2047 dasm_put(Dst, 13205, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); 2053 dasm_put(Dst, 13207, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val));
2048 break; 2054 break;
2049 2055
2050 case BC_ISNEXT: 2056 case BC_ISNEXT:
2051 dasm_put(Dst, 13284, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); 2057 dasm_put(Dst, 13286, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC);
2052 break; 2058 break;
2053 2059
2054 case BC_VARG: 2060 case BC_VARG:
2055 dasm_put(Dst, 13385, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); 2061 dasm_put(Dst, 13387, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack));
2056 dasm_put(Dst, 13552, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2062 dasm_put(Dst, 13554, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2057 break; 2063 break;
2058 2064
2059 /* -- Returns ----------------------------------------------------------- */ 2065 /* -- Returns ----------------------------------------------------------- */
2060 2066
2061 case BC_RETM: 2067 case BC_RETM:
2062 dasm_put(Dst, 12756); 2068 dasm_put(Dst, 12758);
2063 break; 2069 break;
2064 2070
2065 case BC_RET: case BC_RET0: case BC_RET1: 2071 case BC_RET: case BC_RET0: case BC_RET1:
2066 if (op != BC_RET0) { 2072 if (op != BC_RET0) {
2067 dasm_put(Dst, 13622); 2073 dasm_put(Dst, 13624);
2068 } 2074 }
2069 dasm_put(Dst, 13626, FRAME_TYPE); 2075 dasm_put(Dst, 13628, FRAME_TYPE);
2070 switch (op) { 2076 switch (op) {
2071 case BC_RET: 2077 case BC_RET:
2072 dasm_put(Dst, 13645); 2078 dasm_put(Dst, 13647);
2073 break; 2079 break;
2074 case BC_RET1: 2080 case BC_RET1:
2075 dasm_put(Dst, 13699); 2081 dasm_put(Dst, 13701);
2076 /* fallthrough */ 2082 /* fallthrough */
2077 case BC_RET0: 2083 case BC_RET0:
2078 dasm_put(Dst, 13709); 2084 dasm_put(Dst, 13711);
2079 default: 2085 default:
2080 break; 2086 break;
2081 } 2087 }
2082 dasm_put(Dst, 13720, Dt7(->pc), PC2PROTO(k)); 2088 dasm_put(Dst, 13722, Dt7(->pc), PC2PROTO(k));
2083 if (op == BC_RET) { 2089 if (op == BC_RET) {
2084 dasm_put(Dst, 13768, LJ_TNIL); 2090 dasm_put(Dst, 13770, LJ_TNIL);
2085 } else { 2091 } else {
2086 dasm_put(Dst, 13779, LJ_TNIL); 2092 dasm_put(Dst, 13781, LJ_TNIL);
2087 } 2093 }
2088 dasm_put(Dst, 13786, -FRAME_VARG, FRAME_TYPEP); 2094 dasm_put(Dst, 13788, -FRAME_VARG, FRAME_TYPEP);
2089 if (op != BC_RET0) { 2095 if (op != BC_RET0) {
2090 dasm_put(Dst, 13810); 2096 dasm_put(Dst, 13812);
2091 } 2097 }
2092 dasm_put(Dst, 4546); 2098 dasm_put(Dst, 4546);
2093 break; 2099 break;
@@ -2097,7 +2103,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2097 2103
2098 case BC_FORL: 2104 case BC_FORL:
2099#if LJ_HASJIT 2105#if LJ_HASJIT
2100 dasm_put(Dst, 13814, HOTCOUNT_PCMASK, GG_DISP2HOT); 2106 dasm_put(Dst, 13816, HOTCOUNT_PCMASK, GG_DISP2HOT);
2101#endif 2107#endif
2102 break; 2108 break;
2103 2109
@@ -2109,57 +2115,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2109 case BC_FORI: 2115 case BC_FORI:
2110 case BC_IFORL: 2116 case BC_IFORL:
2111 vk = (op == BC_IFORL || op == BC_JFORL); 2117 vk = (op == BC_IFORL || op == BC_JFORL);
2112 dasm_put(Dst, 13835); 2118 dasm_put(Dst, 13837);
2113 if (!vk) { 2119 if (!vk) {
2114 dasm_put(Dst, 13839, LJ_TISNUM, LJ_TISNUM); 2120 dasm_put(Dst, 13841, LJ_TISNUM, LJ_TISNUM);
2115 } 2121 }
2116 dasm_put(Dst, 13858); 2122 dasm_put(Dst, 13860);
2117 if (!vk) { 2123 if (!vk) {
2118 dasm_put(Dst, 13862, LJ_TISNUM); 2124 dasm_put(Dst, 13864, LJ_TISNUM);
2119 } 2125 }
2120 if (sse) { 2126 if (sse) {
2121 dasm_put(Dst, 13871); 2127 dasm_put(Dst, 13873);
2122 if (vk) { 2128 if (vk) {
2123 dasm_put(Dst, 13883); 2129 dasm_put(Dst, 13885);
2124 } else { 2130 } else {
2125 dasm_put(Dst, 13902); 2131 dasm_put(Dst, 13904);
2126 } 2132 }
2127 dasm_put(Dst, 13907); 2133 dasm_put(Dst, 13909);
2128 } else { 2134 } else {
2129 dasm_put(Dst, 13920); 2135 dasm_put(Dst, 13922);
2130 if (vk) { 2136 if (vk) {
2131 dasm_put(Dst, 13926); 2137 dasm_put(Dst, 13928);
2132 } else { 2138 } else {
2133 dasm_put(Dst, 13942); 2139 dasm_put(Dst, 13944);
2134 } 2140 }
2135 dasm_put(Dst, 13950); 2141 dasm_put(Dst, 13952);
2136 if (cmov) { 2142 if (cmov) {
2137 dasm_put(Dst, 9633); 2143 dasm_put(Dst, 9635);
2138 } else { 2144 } else {
2139 dasm_put(Dst, 9639); 2145 dasm_put(Dst, 9641);
2140 } 2146 }
2141 if (!cmov) { 2147 if (!cmov) {
2142 dasm_put(Dst, 13955); 2148 dasm_put(Dst, 13957);
2143 } 2149 }
2144 } 2150 }
2145 if (op == BC_FORI) { 2151 if (op == BC_FORI) {
2146 dasm_put(Dst, 13961, -BCBIAS_J*4); 2152 dasm_put(Dst, 13963, -BCBIAS_J*4);
2147 } else if (op == BC_JFORI) { 2153 } else if (op == BC_JFORI) {
2148 dasm_put(Dst, 13971, -BCBIAS_J*4, BC_JLOOP); 2154 dasm_put(Dst, 13973, -BCBIAS_J*4, BC_JLOOP);
2149 } else if (op == BC_IFORL) { 2155 } else if (op == BC_IFORL) {
2150 dasm_put(Dst, 13985, -BCBIAS_J*4); 2156 dasm_put(Dst, 13987, -BCBIAS_J*4);
2151 } else { 2157 } else {
2152 dasm_put(Dst, 13981, BC_JLOOP); 2158 dasm_put(Dst, 13983, BC_JLOOP);
2153 } 2159 }
2154 dasm_put(Dst, 9668); 2160 dasm_put(Dst, 9670);
2155 if (sse) { 2161 if (sse) {
2156 dasm_put(Dst, 13995); 2162 dasm_put(Dst, 13997);
2157 } 2163 }
2158 break; 2164 break;
2159 2165
2160 case BC_ITERL: 2166 case BC_ITERL:
2161#if LJ_HASJIT 2167#if LJ_HASJIT
2162 dasm_put(Dst, 13814, HOTCOUNT_PCMASK, GG_DISP2HOT); 2168 dasm_put(Dst, 13816, HOTCOUNT_PCMASK, GG_DISP2HOT);
2163#endif 2169#endif
2164 break; 2170 break;
2165 2171
@@ -2168,33 +2174,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2168 break; 2174 break;
2169#endif 2175#endif
2170 case BC_IITERL: 2176 case BC_IITERL:
2171 dasm_put(Dst, 14006, LJ_TNIL); 2177 dasm_put(Dst, 14008, LJ_TNIL);
2172 if (op == BC_JITERL) { 2178 if (op == BC_JITERL) {
2173 dasm_put(Dst, 14021, BC_JLOOP); 2179 dasm_put(Dst, 14023, BC_JLOOP);
2174 } else { 2180 } else {
2175 dasm_put(Dst, 14035, -BCBIAS_J*4); 2181 dasm_put(Dst, 14037, -BCBIAS_J*4);
2176 } 2182 }
2177 dasm_put(Dst, 9972); 2183 dasm_put(Dst, 9974);
2178 break; 2184 break;
2179 2185
2180 case BC_LOOP: 2186 case BC_LOOP:
2181#if LJ_HASJIT 2187#if LJ_HASJIT
2182 dasm_put(Dst, 13814, HOTCOUNT_PCMASK, GG_DISP2HOT); 2188 dasm_put(Dst, 13816, HOTCOUNT_PCMASK, GG_DISP2HOT);
2183#endif 2189#endif
2184 break; 2190 break;
2185 2191
2186 case BC_ILOOP: 2192 case BC_ILOOP:
2187 dasm_put(Dst, 9670); 2193 dasm_put(Dst, 9672);
2188 break; 2194 break;
2189 2195
2190 case BC_JLOOP: 2196 case BC_JLOOP:
2191#if LJ_HASJIT 2197#if LJ_HASJIT
2192 dasm_put(Dst, 14051, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2198 dasm_put(Dst, 14053, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2193#endif 2199#endif
2194 break; 2200 break;
2195 2201
2196 case BC_JMP: 2202 case BC_JMP:
2197 dasm_put(Dst, 14092, -BCBIAS_J*4); 2203 dasm_put(Dst, 14094, -BCBIAS_J*4);
2198 break; 2204 break;
2199 2205
2200 /* -- Function headers -------------------------------------------------- */ 2206 /* -- Function headers -------------------------------------------------- */
@@ -2208,7 +2214,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2208 2214
2209 case BC_FUNCF: 2215 case BC_FUNCF:
2210#if LJ_HASJIT 2216#if LJ_HASJIT
2211 dasm_put(Dst, 14118, HOTCOUNT_PCMASK, GG_DISP2HOT); 2217 dasm_put(Dst, 14120, HOTCOUNT_PCMASK, GG_DISP2HOT);
2212#endif 2218#endif
2213 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2219 case BC_FUNCV: /* NYI: compiled vararg functions. */
2214 break; 2220 break;
@@ -2218,13 +2224,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2218 break; 2224 break;
2219#endif 2225#endif
2220 case BC_IFUNCF: 2226 case BC_IFUNCF:
2221 dasm_put(Dst, 14139, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2227 dasm_put(Dst, 14141, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2222 if (op == BC_JFUNCF) { 2228 if (op == BC_JFUNCF) {
2223 dasm_put(Dst, 14170, BC_JLOOP); 2229 dasm_put(Dst, 14172, BC_JLOOP);
2224 } else { 2230 } else {
2225 dasm_put(Dst, 9670); 2231 dasm_put(Dst, 9672);
2226 } 2232 }
2227 dasm_put(Dst, 14179, LJ_TNIL); 2233 dasm_put(Dst, 14181, LJ_TNIL);
2228 break; 2234 break;
2229 2235
2230 case BC_JFUNCV: 2236 case BC_JFUNCV:
@@ -2235,30 +2241,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2235 break; /* NYI: compiled vararg functions. */ 2241 break; /* NYI: compiled vararg functions. */
2236 2242
2237 case BC_IFUNCV: 2243 case BC_IFUNCV:
2238 dasm_put(Dst, 14201, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2244 dasm_put(Dst, 14203, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2239 if (op == BC_JFUNCV) { 2245 if (op == BC_JFUNCV) {
2240 dasm_put(Dst, 14170, BC_JLOOP); 2246 dasm_put(Dst, 14172, BC_JLOOP);
2241 } else { 2247 } else {
2242 dasm_put(Dst, 14298, -4+PC2PROTO(k)); 2248 dasm_put(Dst, 14300, -4+PC2PROTO(k));
2243 } 2249 }
2244 dasm_put(Dst, 14323, LJ_TNIL); 2250 dasm_put(Dst, 14325, LJ_TNIL);
2245 break; 2251 break;
2246 2252
2247 case BC_FUNCC: 2253 case BC_FUNCC:
2248 case BC_FUNCCW: 2254 case BC_FUNCCW:
2249 dasm_put(Dst, 14345, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2255 dasm_put(Dst, 14347, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2250 if (op == BC_FUNCC) { 2256 if (op == BC_FUNCC) {
2251 dasm_put(Dst, 14375); 2257 dasm_put(Dst, 14377);
2252 } else { 2258 } else {
2253 dasm_put(Dst, 14379); 2259 dasm_put(Dst, 14381);
2254 } 2260 }
2255 dasm_put(Dst, 14387, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2261 dasm_put(Dst, 14389, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2256 if (op == BC_FUNCC) { 2262 if (op == BC_FUNCC) {
2257 dasm_put(Dst, 14397); 2263 dasm_put(Dst, 14399);
2258 } else { 2264 } else {
2259 dasm_put(Dst, 14402, DISPATCH_GL(wrapf)); 2265 dasm_put(Dst, 14404, DISPATCH_GL(wrapf));
2260 } 2266 }
2261 dasm_put(Dst, 14408, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2267 dasm_put(Dst, 14410, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2262 break; 2268 break;
2263 2269
2264 /* ---------------------------------------------------------------------- */ 2270 /* ---------------------------------------------------------------------- */
@@ -2286,7 +2292,7 @@ static int build_backend(BuildCtx *ctx)
2286 2292
2287 build_subroutines(ctx, cmov, sse); 2293 build_subroutines(ctx, cmov, sse);
2288 2294
2289 dasm_put(Dst, 14434); 2295 dasm_put(Dst, 14436);
2290 for (op = 0; op < BC__MAX; op++) 2296 for (op = 0; op < BC__MAX; op++)
2291 build_ins(ctx, (BCOp)op, op, cmov, sse); 2297 build_ins(ctx, (BCOp)op, op, cmov, sse);
2292 2298
diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h
index 19a703c8..a0cad3b6 100644
--- a/src/buildvm_x64win.h
+++ b/src/buildvm_x64win.h
@@ -12,7 +12,7 @@
12#define DASM_SECTION_CODE_OP 0 12#define DASM_SECTION_CODE_OP 0
13#define DASM_SECTION_CODE_SUB 1 13#define DASM_SECTION_CODE_SUB 1
14#define DASM_MAXSECTION 2 14#define DASM_MAXSECTION 2
15static const unsigned char build_actionlist[14340] = { 15static const unsigned char build_actionlist[14342] = {
16 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,72, 16 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,72,
17 141,76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68, 17 141,76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,
18 36,84,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237, 18 36,84,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237,
@@ -472,244 +472,244 @@ static const unsigned char build_actionlist[14340] = {
472 2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133,244,248,217,201, 472 2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133,244,248,217,201,
473 248,2,221,216,195,255,248,155,137,200,86,72,137,214,83,15,162,137,6,137,94, 473 248,2,221,216,195,255,248,155,137,200,86,72,137,214,83,15,162,137,6,137,94,
474 4,137,78,8,137,86,12,91,94,195,248,156,255,85,72,137,229,83,72,137,203,139, 474 4,137,78,8,137,86,12,91,94,195,248,156,255,85,72,137,229,83,72,137,203,139,
475 131,233,72,41,196,15,182,139,233,131,252,233,1,15,136,244,248,248,1,72,139, 475 131,233,72,41,196,255,15,182,139,233,131,252,233,1,15,136,244,248,248,1,72,
476 132,253,203,233,72,137,132,253,204,233,131,252,233,1,15,137,244,1,248,2,15, 476 139,132,253,203,233,72,137,132,253,204,233,131,252,233,1,15,137,244,1,248,
477 182,131,233,72,139,139,233,72,139,147,233,76,139,131,233,76,139,139,233,133, 477 2,15,182,131,233,72,139,139,233,72,139,147,233,76,139,131,233,76,139,139,
478 192,15,132,244,251,15,40,131,233,15,40,139,233,15,40,147,233,255,15,40,155, 478 233,133,192,15,132,244,251,15,40,131,233,15,40,139,233,15,40,147,233,15,40,
479 233,248,5,252,255,147,233,72,137,131,233,15,41,131,233,72,139,93,252,248, 479 155,233,248,5,255,252,255,147,233,72,137,131,233,15,41,131,233,255,72,139,
480 201,195,255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,4,239,15, 480 93,252,248,201,195,255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,
481 135,244,41,255,252,242,15,16,4,194,131,198,4,102,15,46,4,202,255,221,4,202, 481 4,239,15,135,244,41,255,252,242,15,16,4,194,131,198,4,102,15,46,4,202,255,
482 221,4,194,131,198,4,255,223,252,233,221,216,255,218,252,233,223,224,158,255, 482 221,4,202,221,4,194,131,198,4,255,223,252,233,221,216,255,218,252,233,223,
483 15,134,244,248,255,15,131,244,248,255,248,1,15,183,70,252,254,141,180,253, 483 224,158,255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,70,252,254,
484 134,233,248,2,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36, 484 141,180,253,134,233,248,2,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
485 252,235,255,139,108,194,4,131,198,4,129,252,253,239,15,135,244,251,129,124, 485 252,255,36,252,235,255,139,108,194,4,131,198,4,129,252,253,239,15,135,244,
486 253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,4,202,255, 486 251,129,124,253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,
487 221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,15,138,244,248, 487 4,202,255,221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,15,138,
488 15,132,244,247,255,248,1,15,183,70,252,254,141,180,253,134,233,248,2,255, 488 244,248,15,132,244,247,255,248,1,15,183,70,252,254,141,180,253,134,233,248,
489 248,2,15,183,70,252,254,141,180,253,134,233,248,1,255,248,5,57,108,202,4, 489 2,255,248,2,15,183,70,252,254,141,180,253,134,233,248,1,255,248,5,57,108,
490 15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193,15, 490 202,4,15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193,
491 132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,15,132,244, 491 15,132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,15,132,
492 2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255,252, 492 244,2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255,
493 233,244,45,255,72,252,247,208,131,198,4,129,124,253,202,4,239,15,133,244, 493 252,233,244,45,255,72,252,247,208,131,198,4,129,124,253,202,4,239,15,133,
494 248,139,12,202,59,12,135,255,131,198,4,129,124,253,202,4,239,15,135,244,248, 494 244,248,139,12,202,59,12,135,255,131,198,4,129,124,253,202,4,239,15,135,244,
495 255,252,242,15,16,4,199,102,15,46,4,202,255,221,4,202,221,4,199,255,72,252, 495 248,255,252,242,15,16,4,199,102,15,46,4,202,255,221,4,202,221,4,199,255,72,
496 247,208,131,198,4,57,68,202,4,255,139,108,194,4,131,198,4,129,252,253,239, 496 252,247,208,131,198,4,57,68,202,4,255,139,108,194,4,131,198,4,129,252,253,
497 255,15,131,244,247,255,15,130,244,247,255,137,108,202,4,139,44,194,137,44, 497 239,255,15,131,244,247,255,15,130,244,247,255,137,108,202,4,139,44,194,137,
498 202,255,15,183,70,252,254,141,180,253,134,233,248,1,139,6,15,182,204,15,182, 498 44,202,255,15,183,70,252,254,141,180,253,134,233,248,1,139,6,15,182,204,15,
499 232,131,198,4,193,232,16,252,255,36,252,235,255,72,139,44,194,72,137,44,202, 499 182,232,131,198,4,193,232,16,252,255,36,252,235,255,72,139,44,194,72,137,
500 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,49, 500 44,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,
501 252,237,129,124,253,194,4,239,129,213,239,137,108,202,4,139,6,15,182,204, 501 255,49,252,237,129,124,253,194,4,239,129,213,239,137,108,202,4,139,6,15,182,
502 15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,129,124,253,194,4, 502 204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,129,124,253,194,
503 239,15,135,244,48,255,252,242,15,16,4,194,72,184,237,237,102,72,15,110,200, 503 4,239,15,135,244,48,255,252,242,15,16,4,194,72,184,237,237,102,72,15,110,
504 15,87,193,252,242,15,17,4,202,255,221,4,194,217,224,221,28,202,255,129,124, 504 200,15,87,193,252,242,15,17,4,202,255,221,4,194,217,224,221,28,202,255,129,
505 253,194,4,239,15,133,244,248,139,4,194,255,15,87,192,252,242,15,42,128,233, 505 124,253,194,4,239,15,133,244,248,139,4,194,255,15,87,192,252,242,15,42,128,
506 248,1,252,242,15,17,4,202,255,219,128,233,248,1,221,28,202,255,139,6,15,182, 506 233,248,1,252,242,15,17,4,202,255,219,128,233,248,1,221,28,202,255,139,6,
507 204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,2,129,124,253, 507 15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,2,129,124,
508 194,4,239,15,133,244,50,139,12,194,137,213,232,251,1,18,255,252,242,15,42, 508 253,194,4,239,15,133,244,50,139,12,194,137,213,232,251,1,18,255,252,242,15,
509 192,137,252,234,255,15,182,78,252,253,252,233,244,1,255,15,182,252,236,15, 509 42,192,137,252,234,255,15,182,78,252,253,252,233,244,1,255,15,182,252,236,
510 182,192,255,129,124,253,252,234,4,239,15,135,244,46,255,252,242,15,16,4,252, 510 15,182,192,255,129,124,253,252,234,4,239,15,135,244,46,255,252,242,15,16,
511 234,252,242,15,88,4,199,255,221,4,252,234,220,4,199,255,129,124,253,252,234, 511 4,252,234,252,242,15,88,4,199,255,221,4,252,234,220,4,199,255,129,124,253,
512 4,239,15,135,244,47,255,252,242,15,16,4,199,252,242,15,88,4,252,234,255,221, 512 252,234,4,239,15,135,244,47,255,252,242,15,16,4,199,252,242,15,88,4,252,234,
513 4,199,220,4,252,234,255,129,124,253,252,234,4,239,15,135,244,49,129,124,253, 513 255,221,4,199,220,4,252,234,255,129,124,253,252,234,4,239,15,135,244,49,129,
514 194,4,239,15,135,244,49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255, 514 124,253,194,4,239,15,135,244,49,255,252,242,15,16,4,252,234,252,242,15,88,
515 221,4,252,234,220,4,194,255,252,242,15,16,4,252,234,252,242,15,92,4,199,255, 515 4,194,255,221,4,252,234,220,4,194,255,252,242,15,16,4,252,234,252,242,15,
516 221,4,252,234,220,36,199,255,252,242,15,16,4,199,252,242,15,92,4,252,234, 516 92,4,199,255,221,4,252,234,220,36,199,255,252,242,15,16,4,199,252,242,15,
517 255,221,4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,242,15,92,4, 517 92,4,252,234,255,221,4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,
518 194,255,221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,252,242,15,89, 518 242,15,92,4,194,255,221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,
519 4,199,255,221,4,252,234,220,12,199,255,252,242,15,16,4,199,252,242,15,89, 519 252,242,15,89,4,199,255,221,4,252,234,220,12,199,255,252,242,15,16,4,199,
520 4,252,234,255,221,4,199,220,12,252,234,255,252,242,15,16,4,252,234,252,242, 520 252,242,15,89,4,252,234,255,221,4,199,220,12,252,234,255,252,242,15,16,4,
521 15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,4,252,234,252, 521 252,234,252,242,15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,
522 242,15,94,4,199,255,221,4,252,234,220,52,199,255,252,242,15,16,4,199,252, 522 4,252,234,252,242,15,94,4,199,255,221,4,252,234,220,52,199,255,252,242,15,
523 242,15,94,4,252,234,255,221,4,199,220,52,252,234,255,252,242,15,16,4,252, 523 16,4,199,252,242,15,94,4,252,234,255,221,4,199,220,52,252,234,255,252,242,
524 234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255,252,242,15,16,4, 524 15,16,4,252,234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255,252,
525 252,234,252,242,15,16,12,199,255,221,4,252,234,221,4,199,255,252,242,15,16, 525 242,15,16,4,252,234,252,242,15,16,12,199,255,221,4,252,234,221,4,199,255,
526 4,199,252,242,15,16,12,252,234,255,221,4,199,221,4,252,234,255,252,242,15, 526 252,242,15,16,4,199,252,242,15,16,12,252,234,255,221,4,199,221,4,252,234,
527 16,4,252,234,252,242,15,16,12,194,255,221,4,252,234,221,4,194,255,248,157, 527 255,252,242,15,16,4,252,234,252,242,15,16,12,194,255,221,4,252,234,221,4,
528 232,244,148,255,252,233,244,157,255,232,244,107,255,15,182,252,236,15,182, 528 194,255,248,157,232,244,148,255,252,233,244,157,255,232,244,107,255,15,182,
529 192,139,76,36,96,137,145,233,141,20,194,65,137,192,65,41,232,248,33,137,205, 529 252,236,15,182,192,139,76,36,96,137,145,233,141,20,194,65,137,192,65,41,232,
530 137,116,36,100,232,251,1,25,139,149,233,133,192,15,133,244,42,15,182,110, 530 248,33,137,205,137,116,36,100,232,251,1,25,139,149,233,133,192,15,133,244,
531 252,255,15,182,78,252,253,72,139,4,252,234,72,137,4,202,139,6,15,182,204, 531 42,15,182,110,252,255,15,182,78,252,253,72,139,4,252,234,72,137,4,202,139,
532 15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,72,252,247,208,139, 532 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,72,252,
533 4,135,199,68,202,4,237,137,4,202,139,6,15,182,204,15,182,232,131,198,4,193, 533 247,208,139,4,135,199,68,202,4,237,137,4,202,139,6,15,182,204,15,182,232,
534 232,16,252,255,36,252,235,255,15,191,192,252,242,15,42,192,252,242,15,17, 534 131,198,4,193,232,16,252,255,36,252,235,255,15,191,192,252,242,15,42,192,
535 4,202,255,223,70,252,254,221,28,202,255,252,242,15,16,4,199,252,242,15,17, 535 252,242,15,17,4,202,255,223,70,252,254,221,28,202,255,252,242,15,16,4,199,
536 4,202,255,221,4,199,221,28,202,255,72,252,247,208,137,68,202,4,139,6,15,182, 536 252,242,15,17,4,202,255,221,4,199,221,28,202,255,72,252,247,208,137,68,202,
537 204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,141,76,202,12, 537 4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,
538 141,68,194,4,189,237,137,105,252,248,248,1,137,41,131,193,8,57,193,15,134, 538 141,76,202,12,141,68,194,4,189,237,137,105,252,248,248,1,137,41,131,193,8,
539 244,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235, 539 57,193,15,134,244,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,
540 255,139,106,252,248,139,172,253,133,233,139,173,233,72,139,69,0,72,137,4, 540 255,36,252,235,255,139,106,252,248,139,172,253,133,233,139,173,233,72,139,
541 202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255, 541 69,0,72,137,4,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,
542 139,106,252,248,139,172,253,141,233,128,189,233,0,139,173,233,139,12,194, 542 36,252,235,255,139,106,252,248,139,172,253,141,233,128,189,233,0,139,173,
543 139,68,194,4,137,77,0,137,69,4,15,132,244,247,252,246,133,233,235,15,133, 543 233,139,12,194,139,68,194,4,137,77,0,137,69,4,15,132,244,247,252,246,133,
544 244,248,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36, 544 233,235,15,133,244,248,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,
545 252,235,248,2,129,232,239,129,252,248,239,15,134,244,1,252,246,129,233,235, 545 16,252,255,36,252,235,248,2,129,232,239,129,252,248,239,15,134,244,1,252,
546 15,132,244,1,135,213,141,139,233,255,232,251,1,26,137,252,234,252,233,244, 546 246,129,233,235,15,132,244,1,135,213,141,139,233,255,232,251,1,26,137,252,
547 1,255,72,252,247,208,139,106,252,248,139,172,253,141,233,139,12,135,139,133, 547 234,252,233,244,1,255,72,252,247,208,139,106,252,248,139,172,253,141,233,
548 233,137,8,199,64,4,237,252,246,133,233,235,15,133,244,248,248,1,139,6,15, 548 139,12,135,139,133,233,137,8,199,64,4,237,252,246,133,233,235,15,133,244,
549 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,2,252,246, 549 248,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,
550 129,233,235,15,132,244,1,128,189,233,0,15,132,244,1,137,213,137,194,141,139, 550 235,248,2,252,246,129,233,235,15,132,244,1,128,189,233,0,15,132,244,1,137,
551 233,232,251,1,26,137,252,234,252,233,244,1,255,139,106,252,248,255,252,242, 551 213,137,194,141,139,233,232,251,1,26,137,252,234,252,233,244,1,255,139,106,
552 15,16,4,199,255,139,172,253,141,233,139,141,233,255,252,242,15,17,1,255,221, 552 252,248,255,252,242,15,16,4,199,255,139,172,253,141,233,139,141,233,255,252,
553 25,255,72,252,247,208,139,106,252,248,139,172,253,141,233,139,141,233,137, 553 242,15,17,1,255,221,25,255,72,252,247,208,139,106,252,248,139,172,253,141,
554 65,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235, 554 233,139,141,233,137,65,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
555 255,141,180,253,134,233,139,108,36,96,131,189,233,0,15,132,244,247,137,149, 555 252,255,36,252,235,255,141,180,253,134,233,139,108,36,96,131,189,233,0,15,
556 233,141,20,202,137,252,233,232,251,1,27,139,149,233,248,1,139,6,15,182,204, 556 132,244,247,137,149,233,141,20,202,137,252,233,232,251,1,27,139,149,233,248,
557 15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,72,252,247,208,139, 557 1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,
558 108,36,96,137,149,233,68,139,66,252,248,139,20,135,137,252,233,137,116,36, 558 72,252,247,208,139,108,36,96,137,149,233,68,139,66,252,248,139,20,135,137,
559 100,232,251,1,28,139,149,233,15,182,78,252,253,137,4,202,199,68,202,4,237, 559 252,233,137,116,36,100,232,251,1,28,139,149,233,15,182,78,252,253,137,4,202,
560 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,139, 560 199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,
561 108,36,96,137,149,233,139,139,233,59,139,233,137,116,36,100,15,131,244,251, 561 36,252,235,255,139,108,36,96,137,149,233,139,139,233,59,139,233,137,116,36,
562 248,1,65,137,192,37,252,255,7,0,0,65,193,232,11,61,252,255,7,0,0,15,132,244, 562 100,15,131,244,251,248,1,65,137,192,37,252,255,7,0,0,65,193,232,11,61,252,
563 249,248,2,137,252,233,137,194,232,251,1,29,139,149,233,15,182,78,252,253, 563 255,7,0,0,15,132,244,249,248,2,137,252,233,137,194,232,251,1,29,139,149,233,
564 137,4,202,199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232, 564 15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182,232,
565 16,252,255,36,252,235,248,3,184,1,8,0,0,252,233,244,2,248,5,137,252,233,232, 565 131,198,4,193,232,16,252,255,36,252,235,248,3,184,1,8,0,0,252,233,244,2,248,
566 251,1,30,15,183,70,252,254,252,233,244,1,255,72,252,247,208,139,108,36,96, 566 5,137,252,233,232,251,1,30,15,183,70,252,254,252,233,244,1,255,72,252,247,
567 139,139,233,137,116,36,100,59,139,233,137,149,233,15,131,244,249,248,2,139, 567 208,139,108,36,96,139,139,233,137,116,36,100,59,139,233,137,149,233,15,131,
568 20,135,137,252,233,232,251,1,31,139,149,233,15,182,78,252,253,137,4,202,199, 568 244,249,248,2,139,20,135,137,252,233,232,251,1,31,139,149,233,15,182,78,252,
569 68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36, 569 253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,
570 252,235,248,3,137,252,233,232,251,1,30,15,183,70,252,254,72,252,247,208,252, 570 232,16,252,255,36,252,235,248,3,137,252,233,232,251,1,30,15,183,70,252,254,
571 233,244,2,255,72,252,247,208,139,106,252,248,139,173,233,139,4,135,252,233, 571 72,252,247,208,252,233,244,2,255,72,252,247,208,139,106,252,248,139,173,233,
572 244,158,255,72,252,247,208,139,106,252,248,139,173,233,139,4,135,252,233, 572 139,4,135,252,233,244,158,255,72,252,247,208,139,106,252,248,139,173,233,
573 244,159,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244, 573 139,4,135,252,233,244,159,255,15,182,252,236,15,182,192,129,124,253,252,234,
574 36,139,44,252,234,129,124,253,194,4,239,15,135,244,251,255,252,242,15,16, 574 4,239,15,133,244,36,139,44,252,234,129,124,253,194,4,239,15,135,244,251,255,
575 4,194,252,242,15,45,192,252,242,15,42,200,102,15,46,193,255,15,133,244,36, 575 252,242,15,16,4,194,252,242,15,45,192,252,242,15,42,200,102,15,46,193,255,
576 59,133,233,15,131,244,36,193,224,3,3,133,233,129,120,253,4,239,15,132,244, 576 15,133,244,36,59,133,233,15,131,244,36,193,224,3,3,133,233,129,120,253,4,
577 248,72,139,40,72,137,44,202,248,1,139,6,15,182,204,15,182,232,131,198,4,193, 577 239,15,132,244,248,72,139,40,72,137,44,202,248,1,139,6,15,182,204,15,182,
578 232,16,252,255,36,252,235,248,2,131,189,233,0,15,132,244,249,139,141,233, 578 232,131,198,4,193,232,16,252,255,36,252,235,248,2,131,189,233,0,15,132,244,
579 252,246,129,233,235,15,132,244,36,15,182,78,252,253,248,3,255,199,68,202, 579 249,139,141,233,252,246,129,233,235,15,132,244,36,15,182,78,252,253,248,3,
580 4,237,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244,36,139,4,194,252, 580 255,199,68,202,4,237,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244,
581 233,244,158,255,15,182,252,236,15,182,192,72,252,247,208,139,4,135,129,124, 581 36,139,4,194,252,233,244,158,255,15,182,252,236,15,182,192,72,252,247,208,
582 253,252,234,4,239,15,133,244,34,139,44,252,234,248,158,139,141,233,35,136, 582 139,4,135,129,124,253,252,234,4,239,15,133,244,34,139,44,252,234,248,158,
583 233,105,201,239,3,141,233,248,1,129,185,233,239,15,133,244,250,57,129,233, 583 139,141,233,35,136,233,105,201,239,3,141,233,248,1,129,185,233,239,15,133,
584 15,133,244,250,129,121,253,4,239,15,132,244,251,15,182,70,252,253,72,139, 584 244,250,57,129,233,15,133,244,250,129,121,253,4,239,15,132,244,251,15,182,
585 41,72,137,44,194,248,2,255,139,6,15,182,204,15,182,232,131,198,4,193,232, 585 70,252,253,72,139,41,72,137,44,194,248,2,255,139,6,15,182,204,15,182,232,
586 16,252,255,36,252,235,248,3,15,182,70,252,253,199,68,194,4,237,252,233,244, 586 131,198,4,193,232,16,252,255,36,252,235,248,3,15,182,70,252,253,199,68,194,
587 2,248,4,139,137,233,133,201,15,133,244,1,248,5,139,141,233,133,201,15,132, 587 4,237,252,233,244,2,248,4,139,137,233,133,201,15,133,244,1,248,5,139,141,
588 244,3,252,246,129,233,235,15,133,244,3,252,233,244,34,255,15,182,252,236, 588 233,133,201,15,132,244,3,252,246,129,233,235,15,133,244,3,252,233,244,34,
589 15,182,192,129,124,253,252,234,4,239,15,133,244,35,139,44,252,234,59,133, 589 255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,35,139,
590 233,15,131,244,35,193,224,3,3,133,233,129,120,253,4,239,15,132,244,248,72, 590 44,252,234,59,133,233,15,131,244,35,193,224,3,3,133,233,129,120,253,4,239,
591 139,40,72,137,44,202,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232, 591 15,132,244,248,72,139,40,72,137,44,202,248,1,139,6,15,182,204,15,182,232,
592 16,252,255,36,252,235,248,2,131,189,233,0,15,132,244,249,139,141,233,252, 592 131,198,4,193,232,16,252,255,36,252,235,248,2,131,189,233,0,15,132,244,249,
593 246,129,233,235,15,132,244,35,255,15,182,78,252,253,248,3,199,68,202,4,237, 593 139,141,233,252,246,129,233,235,15,132,244,35,255,15,182,78,252,253,248,3,
594 252,233,244,1,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15, 594 199,68,202,4,237,252,233,244,1,255,15,182,252,236,15,182,192,129,124,253,
595 133,244,39,139,44,252,234,129,124,253,194,4,239,15,135,244,251,255,15,133, 595 252,234,4,239,15,133,244,39,139,44,252,234,129,124,253,194,4,239,15,135,244,
596 244,39,59,133,233,15,131,244,39,193,224,3,3,133,233,129,120,253,4,239,15, 596 251,255,15,133,244,39,59,133,233,15,131,244,39,193,224,3,3,133,233,129,120,
597 132,244,249,248,1,252,246,133,233,235,15,133,244,253,248,2,72,139,44,202,
598 72,137,40,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,
599 235,248,3,131,189,233,0,15,132,244,1,139,141,233,255,252,246,129,233,235,
600 15,132,244,39,15,182,78,252,253,252,233,244,1,248,5,129,124,253,194,4,239,
601 15,133,244,39,139,4,194,252,233,244,159,248,7,128,165,233,235,139,139,233,
602 137,171,233,137,141,233,15,182,78,252,253,252,233,244,2,255,15,182,252,236,
603 15,182,192,72,252,247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,
604 37,139,44,252,234,248,159,139,141,233,35,136,233,105,201,239,198,133,233,
605 0,3,141,233,248,1,129,185,233,239,15,133,244,251,57,129,233,15,133,244,251,
606 129,121,253,4,239,15,132,244,250,248,2,255,252,246,133,233,235,15,133,244,
607 253,248,3,15,182,70,252,253,72,139,44,194,72,137,41,139,6,15,182,204,15,182,
608 232,131,198,4,193,232,16,252,255,36,252,235,248,4,131,189,233,0,15,132,244,
609 2,137,76,36,80,139,141,233,252,246,129,233,235,15,132,244,37,139,76,36,80,
610 252,233,244,2,248,5,139,137,233,133,201,15,133,244,1,255,139,141,233,133,
611 201,15,132,244,252,252,246,129,233,235,15,132,244,37,248,6,137,68,36,80,199,
612 68,36,84,237,137,108,36,32,139,76,36,96,137,145,233,76,141,68,36,80,137,252,
613 234,137,205,137,116,36,100,232,251,1,32,139,149,233,139,108,36,32,137,193,
614 252,233,244,2,248,7,128,165,233,235,139,131,233,137,171,233,137,133,233,252,
615 233,244,3,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,
616 244,38,139,44,252,234,59,133,233,15,131,244,38,193,224,3,3,133,233,129,120,
617 253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244,253,248,2,72, 597 253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244,253,248,2,72,
618 139,12,202,72,137,8,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 598 139,44,202,72,137,40,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,
619 255,36,252,235,248,3,131,189,233,0,15,132,244,1,255,139,141,233,252,246,129, 599 255,36,252,235,248,3,131,189,233,0,15,132,244,1,139,141,233,255,252,246,129,
620 233,235,15,132,244,38,15,182,78,252,253,252,233,244,1,248,7,128,165,233,235, 600 233,235,15,132,244,39,15,182,78,252,253,252,233,244,1,248,5,129,124,253,194,
621 139,139,233,137,171,233,137,141,233,15,182,78,252,253,252,233,244,2,255,137, 601 4,239,15,133,244,39,139,4,194,252,233,244,159,248,7,128,165,233,235,139,139,
622 124,36,80,139,60,199,248,1,141,12,202,139,105,252,248,252,246,133,233,235, 602 233,137,171,233,137,141,233,15,182,78,252,253,252,233,244,2,255,15,182,252,
623 15,133,244,253,248,2,139,68,36,84,131,232,1,15,132,244,250,1,252,248,59,133, 603 236,15,182,192,72,252,247,208,139,4,135,129,124,253,252,234,4,239,15,133,
624 233,15,135,244,251,41,252,248,193,231,3,3,189,233,248,3,72,139,41,131,193, 604 244,37,139,44,252,234,248,159,139,141,233,35,136,233,105,201,239,198,133,
625 8,72,137,47,131,199,8,131,232,1,15,133,244,3,248,4,139,124,36,80,139,6,15, 605 233,0,3,141,233,248,1,129,185,233,239,15,133,244,251,57,129,233,15,133,244,
626 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,5,139,76,36, 606 251,129,121,253,4,239,15,132,244,250,248,2,255,252,246,133,233,235,15,133,
627 96,137,145,233,137,252,234,65,137,192,137,205,137,116,36,100,232,251,1,33, 607 244,253,248,3,15,182,70,252,253,72,139,44,194,72,137,41,139,6,15,182,204,
628 139,149,233,15,182,78,252,253,252,233,244,1,248,7,255,128,165,233,235,139, 608 15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,4,131,189,233,0,15,
629 131,233,137,171,233,137,133,233,252,233,244,2,255,3,68,36,84,255,129,124, 609 132,244,2,137,76,36,80,139,141,233,252,246,129,233,235,15,132,244,37,139,
630 253,202,4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,252,252,139,181, 610 76,36,80,252,233,244,2,248,5,139,137,233,133,201,15,133,244,1,255,139,141,
631 233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,252,235,255,141, 611 233,133,201,15,132,244,252,252,246,129,233,235,15,132,244,37,248,6,137,68,
632 76,202,8,137,215,139,105,252,248,129,121,253,252,252,239,15,133,244,28,248, 612 36,80,199,68,36,84,237,137,108,36,32,139,76,36,96,137,145,233,76,141,68,36,
633 52,139,114,252,252,252,247,198,237,15,133,244,253,248,1,137,106,252,248,137, 613 80,137,252,234,137,205,137,116,36,100,232,251,1,32,139,149,233,139,108,36,
634 68,36,84,131,232,1,15,132,244,249,248,2,72,139,41,131,193,8,72,137,47,131, 614 32,137,193,252,233,244,2,248,7,128,165,233,235,139,131,233,137,171,233,137,
635 199,8,131,232,1,15,133,244,2,139,106,252,248,248,3,139,68,36,84,128,189,233, 615 133,233,252,233,244,3,255,15,182,252,236,15,182,192,129,124,253,252,234,4,
636 1,15,135,244,251,248,4,139,181,233,139,14,15,182,252,233,15,182,205,131,198, 616 239,15,133,244,38,139,44,252,234,59,133,233,15,131,244,38,193,224,3,3,133,
637 4,252,255,36,252,235,248,5,255,252,247,198,237,15,133,244,4,15,182,78,252, 617 233,129,120,253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244,
638 253,72,252,247,209,141,12,202,139,121,252,248,139,191,233,139,191,233,252, 618 253,248,2,72,139,12,202,72,137,8,139,6,15,182,204,15,182,232,131,198,4,193,
639 233,244,4,248,7,129,252,238,239,252,247,198,237,15,133,244,254,41,252,242, 619 232,16,252,255,36,252,235,248,3,131,189,233,0,15,132,244,1,255,139,141,233,
640 137,215,139,114,252,252,252,233,244,1,248,8,129,198,239,252,233,244,1,255, 620 252,246,129,233,235,15,132,244,38,15,182,78,252,253,252,233,244,1,248,7,128,
641 141,76,202,8,72,139,105,232,72,139,65,252,240,72,137,41,72,137,65,8,139,105, 621 165,233,235,139,139,233,137,171,233,137,141,233,15,182,78,252,253,252,233,
642 224,139,65,228,137,105,252,248,137,65,252,252,129,252,248,239,184,237,15, 622 244,2,255,137,124,36,80,139,60,199,248,1,141,12,202,139,105,252,248,252,246,
643 133,244,28,137,202,137,114,252,252,139,181,233,139,14,15,182,252,233,15,182, 623 133,233,235,15,133,244,253,248,2,139,68,36,84,131,232,1,15,132,244,250,1,
644 205,131,198,4,252,255,36,252,235,255,137,124,36,80,137,92,36,84,139,108,202, 624 252,248,59,133,233,15,135,244,251,41,252,248,193,231,3,3,189,233,248,3,72,
645 252,240,139,68,202,252,248,139,157,233,131,198,4,139,189,233,248,1,57,216, 625 139,41,131,193,8,72,137,47,131,199,8,131,232,1,15,133,244,3,248,4,139,124,
646 15,131,244,251,129,124,253,199,4,239,15,132,244,250,255,252,242,15,42,192, 626 36,80,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,
647 255,219,68,202,252,248,255,72,139,44,199,72,137,108,202,8,131,192,1,255,137, 627 248,5,139,76,36,96,137,145,233,137,252,234,65,137,192,137,205,137,116,36,
648 68,202,252,248,248,2,15,183,70,252,254,141,180,253,134,233,248,3,139,92,36, 628 100,232,251,1,33,139,149,233,15,182,78,252,253,252,233,244,1,248,7,255,128,
649 84,139,124,36,80,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 629 165,233,235,139,131,233,137,171,233,137,133,233,252,233,244,2,255,3,68,36,
650 36,252,235,248,4,131,192,1,255,137,68,202,252,248,255,252,233,244,1,248,5, 630 84,255,129,124,253,202,4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,
651 41,216,248,6,59,133,233,15,135,244,3,105,252,248,239,3,189,233,129,191,233, 631 252,252,139,181,233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,
652 239,15,132,244,253,141,92,24,1,72,139,175,233,72,139,135,233,72,137,44,202, 632 252,235,255,141,76,202,8,137,215,139,105,252,248,129,121,253,252,252,239,
653 72,137,68,202,8,137,92,202,252,248,252,233,244,2,248,7,131,192,1,252,233, 633 15,133,244,28,248,52,139,114,252,252,252,247,198,237,15,133,244,253,248,1,
654 244,6,255,129,124,253,202,252,236,239,15,133,244,251,139,108,202,232,129, 634 137,106,252,248,137,68,36,84,131,232,1,15,132,244,249,248,2,72,139,41,131,
655 124,253,202,252,244,239,15,133,244,251,129,124,253,202,252,252,239,15,133, 635 193,8,72,137,47,131,199,8,131,232,1,15,133,244,2,139,106,252,248,248,3,139,
656 244,251,128,189,233,235,15,133,244,251,141,180,253,134,233,199,68,202,252, 636 68,36,84,128,189,233,1,15,135,244,251,248,4,139,181,233,139,14,15,182,252,
657 248,0,0,0,0,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 637 233,15,182,205,131,198,4,252,255,36,252,235,248,5,255,252,247,198,237,15,
658 36,252,235,248,5,198,70,252,252,235,141,180,253,134,233,198,6,235,252,233, 638 133,244,4,15,182,78,252,253,72,252,247,209,141,12,202,139,121,252,248,139,
659 244,1,255,15,182,252,236,15,182,192,137,124,36,80,141,188,253,194,233,141, 639 191,233,139,191,233,252,233,244,4,248,7,129,252,238,239,252,247,198,237,15,
660 12,202,43,122,252,252,133,252,237,15,132,244,251,141,108,252,233,252,248, 640 133,244,254,41,252,242,137,215,139,114,252,252,252,233,244,1,248,8,129,198,
661 57,215,15,131,244,248,248,1,72,139,71,252,248,131,199,8,72,137,1,131,193, 641 239,252,233,244,1,255,141,76,202,8,72,139,105,232,72,139,65,252,240,72,137,
662 8,57,252,233,15,131,244,249,57,215,15,130,244,1,248,2,199,65,4,237,131,193, 642 41,72,137,65,8,139,105,224,139,65,228,137,105,252,248,137,65,252,252,129,
663 8,57,252,233,15,130,244,2,248,3,139,124,36,80,139,6,15,182,204,15,182,232, 643 252,248,239,184,237,15,133,244,28,137,202,137,114,252,252,139,181,233,139,
664 131,198,4,193,232,16,252,255,36,252,235,248,5,199,68,36,84,1,0,0,0,137,208, 644 14,15,182,252,233,15,182,205,131,198,4,252,255,36,252,235,255,137,124,36,
665 41,252,248,15,134,244,3,137,197,193,252,237,3,131,197,1,137,108,36,84,139, 645 80,137,92,36,84,139,108,202,252,240,139,68,202,252,248,139,157,233,131,198,
666 108,36,96,1,200,59,133,233,15,135,244,253,248,6,255,72,139,71,252,248,131, 646 4,139,189,233,248,1,57,216,15,131,244,251,129,124,253,199,4,239,15,132,244,
667 199,8,72,137,1,131,193,8,57,215,15,130,244,6,252,233,244,3,248,7,137,149, 647 250,255,252,242,15,42,192,255,219,68,202,252,248,255,72,139,44,199,72,137,
668 233,137,141,233,137,116,36,100,41,215,139,84,36,84,131,252,234,1,137,252, 648 108,202,8,131,192,1,255,137,68,202,252,248,248,2,15,183,70,252,254,141,180,
669 233,232,251,1,0,139,149,233,139,141,233,1,215,252,233,244,6,255,193,225,3, 649 253,134,233,248,3,139,92,36,84,139,124,36,80,139,6,15,182,204,15,182,232,
670 255,248,1,139,114,252,252,137,68,36,84,252,247,198,237,15,133,244,253,255, 650 131,198,4,193,232,16,252,255,36,252,235,248,4,131,192,1,255,137,68,202,252,
671 248,13,137,215,131,232,1,15,132,244,249,248,2,72,139,44,15,72,137,111,252, 651 248,255,252,233,244,1,248,5,41,216,248,6,59,133,233,15,135,244,3,105,252,
672 248,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,84,15,182,110,252,255, 652 248,239,3,189,233,129,191,233,239,15,132,244,253,141,92,24,1,72,139,175,233,
673 248,5,57,197,15,135,244,252,255,72,139,44,10,72,137,106,252,248,255,248,5, 653 72,139,135,233,72,137,44,202,72,137,68,202,8,137,92,202,252,248,252,233,244,
674 56,70,252,255,15,135,244,252,255,15,182,78,252,253,72,252,247,209,141,20, 654 2,248,7,131,192,1,252,233,244,6,255,129,124,253,202,252,236,239,15,133,244,
675 202,139,122,252,248,139,191,233,139,191,233,139,6,15,182,204,15,182,232,131, 655 251,139,108,202,232,129,124,253,202,252,244,239,15,133,244,251,129,124,253,
676 198,4,193,232,16,252,255,36,252,235,248,6,255,199,71,252,252,237,131,199, 656 202,252,252,239,15,133,244,251,128,189,233,235,15,133,244,251,141,180,253,
677 8,255,199,68,194,252,244,237,255,131,192,1,252,233,244,5,248,7,141,174,233, 657 134,233,199,68,202,252,248,0,0,0,0,248,1,139,6,15,182,204,15,182,232,131,
678 252,247,197,237,15,133,244,14,41,252,234,255,1,252,233,255,137,252,245,209, 658 198,4,193,232,16,252,255,36,252,235,248,5,198,70,252,252,235,141,180,253,
679 252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,140,255,141,12,202, 659 134,233,198,6,235,252,233,244,1,255,15,182,252,236,15,182,192,137,124,36,
680 255,129,121,253,4,239,15,135,244,53,129,121,253,12,239,15,135,244,53,255, 660 80,141,188,253,194,233,141,12,202,43,122,252,252,133,252,237,15,132,244,251,
681 139,105,20,255,129,252,253,239,15,135,244,53,255,252,242,15,16,1,252,242, 661 141,108,252,233,252,248,57,215,15,131,244,248,248,1,72,139,71,252,248,131,
682 15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133,252,237,15,136,244, 662 199,8,72,137,1,131,193,8,57,252,233,15,131,244,249,57,215,15,130,244,1,248,
683 249,255,15,140,244,249,255,102,15,46,200,248,1,252,242,15,17,65,24,255,221, 663 2,199,65,4,237,131,193,8,57,252,233,15,130,244,2,248,3,139,124,36,80,139,
684 65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237,15,136,244,247,255, 664 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,5,199,
685 221,81,24,15,140,244,247,255,217,201,248,1,255,15,183,70,252,254,255,15,131, 665 68,36,84,1,0,0,0,137,208,41,252,248,15,134,244,3,137,197,193,252,237,3,131,
686 244,248,141,180,253,134,233,255,141,180,253,134,233,15,183,70,252,254,15, 666 197,1,137,108,36,84,139,108,36,96,1,200,59,133,233,15,135,244,253,248,6,255,
687 131,245,255,15,130,244,248,141,180,253,134,233,255,248,3,102,15,46,193,252, 667 72,139,71,252,248,131,199,8,72,137,1,131,193,8,57,215,15,130,244,6,252,233,
688 233,244,1,255,141,12,202,139,105,4,129,252,253,239,15,132,244,247,255,137, 668 244,3,248,7,137,149,233,137,141,233,137,116,36,100,41,215,139,84,36,84,131,
689 105,252,252,139,41,137,105,252,248,252,233,245,255,141,180,253,134,233,139, 669 252,234,1,137,252,233,232,251,1,0,139,149,233,139,141,233,1,215,252,233,244,
690 1,137,105,252,252,137,65,252,248,255,139,139,233,139,4,129,72,139,128,233, 670 6,255,193,225,3,255,248,1,139,114,252,252,137,68,36,84,252,247,198,237,15,
691 139,108,36,96,137,147,233,137,171,233,76,137,100,36,80,76,137,108,36,32,76, 671 133,244,253,255,248,13,137,215,131,232,1,15,132,244,249,248,2,72,139,44,15,
692 137,116,36,24,76,137,124,36,16,72,137,225,72,129,252,236,239,102,15,127,49, 672 72,137,111,252,248,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,84,15,
693 102,15,127,185,233,102,68,15,127,129,233,102,68,15,127,137,233,102,68,15, 673 182,110,252,255,248,5,57,197,15,135,244,252,255,72,139,44,10,72,137,106,252,
694 127,145,233,102,68,15,127,153,233,102,68,15,127,161,233,102,68,15,127,169, 674 248,255,248,5,56,70,252,255,15,135,244,252,255,15,182,78,252,253,72,252,247,
695 233,102,68,15,127,177,233,102,68,15,127,185,233,252,255,224,255,141,180,253, 675 209,141,20,202,139,122,252,248,139,191,233,139,191,233,139,6,15,182,204,15,
696 134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235, 676 182,232,131,198,4,193,232,16,252,255,36,252,235,248,6,255,199,71,252,252,
697 255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244, 677 237,131,199,8,255,199,68,194,252,244,237,255,131,192,1,252,233,244,5,248,
698 142,255,139,190,233,139,108,36,96,141,12,202,59,141,233,15,135,244,23,15, 678 7,141,174,233,252,247,197,237,15,133,244,14,41,252,234,255,1,252,233,255,
699 182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,254,252,233,245, 679 137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,140,
700 255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,244, 680 255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121,253,12,239,15,
701 2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,252,252,137,120,252, 681 135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,53,255,252,242,15,
702 248,139,108,36,96,141,12,200,59,141,233,15,135,244,22,137,209,137,194,15, 682 16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133,252,237,
703 182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244, 683 15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,242,15,17,65,
704 249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,192,8,199,65,252, 684 24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237,15,136,244,
705 252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,139,6,15,182,204, 685 247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,183,70,252,254,
706 15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,248,3,199,64,4,237, 686 255,15,131,244,248,141,180,253,134,233,255,141,180,253,134,233,15,183,70,
707 131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,252,248,72, 687 252,254,15,131,245,255,15,130,244,248,141,180,253,134,233,255,248,3,102,15,
708 139,189,233,139,108,36,96,141,68,194,252,248,137,149,233,141,136,233,59,141, 688 46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,239,15,132,244,
709 233,137,133,233,255,137,252,233,255,72,137,252,250,137,252,233,255,15,135, 689 247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,255,141,180,253,
710 244,21,199,131,233,237,255,252,255,215,255,252,255,147,233,255,199,131,233, 690 134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,233,139,4,129,72,
711 237,139,149,233,141,12,194,252,247,217,3,141,233,139,114,252,252,252,233, 691 139,128,233,139,108,36,96,137,147,233,137,171,233,76,137,100,36,80,76,137,
712 244,12,255,254,0 692 108,36,32,76,137,116,36,24,76,137,124,36,16,72,137,225,72,129,252,236,239,
693 102,15,127,49,102,15,127,185,233,102,68,15,127,129,233,102,68,15,127,137,
694 233,102,68,15,127,145,233,102,68,15,127,153,233,102,68,15,127,161,233,102,
695 68,15,127,169,233,102,68,15,127,177,233,102,68,15,127,185,233,252,255,224,
696 255,141,180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
697 252,255,36,252,235,255,137,252,245,209,252,237,129,229,239,102,131,172,253,
698 43,233,1,15,132,244,142,255,139,190,233,139,108,36,96,141,12,202,59,141,233,
699 15,135,244,23,15,182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,
700 254,252,233,245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,
701 244,3,252,233,244,2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,
702 252,252,137,120,252,248,139,108,36,96,141,12,200,59,141,233,15,135,244,22,
703 137,209,137,194,15,182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,
704 57,209,15,131,244,249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,
705 192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,
706 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,248,
707 3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,
708 106,252,248,72,139,189,233,139,108,36,96,141,68,194,252,248,137,149,233,141,
709 136,233,59,141,233,137,133,233,255,137,252,233,255,72,137,252,250,137,252,
710 233,255,15,135,244,21,199,131,233,237,255,252,255,215,255,252,255,147,233,
711 255,199,131,233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,114,
712 252,252,252,233,244,12,255,254,0
713}; 713};
714 714
715enum { 715enum {
@@ -1455,8 +1455,14 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1455 dasm_put(Dst, 9413); 1455 dasm_put(Dst, 9413);
1456#if LJ_HASFFI 1456#if LJ_HASFFI
1457#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) 1457#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V)
1458 dasm_put(Dst, 9441, DtE(->spadj), DtE(->nsp), offsetof(CCallState, stack), CCALL_SPS_EXTRA*8, DtE(->nfpr), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->fpr[0]), DtE(->fpr[1]), DtE(->fpr[2])); 1458 dasm_put(Dst, 9441, DtE(->spadj));
1459 dasm_put(Dst, 9530, DtE(->fpr[3]), DtE(->func), DtE(->gpr[0]), DtE(->fpr[0])); 1459#if LJ_TARGET_WINDOWS
1460#endif
1461 dasm_put(Dst, 9456, DtE(->nsp), offsetof(CCallState, stack), CCALL_SPS_EXTRA*8, DtE(->nfpr), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->fpr[0]), DtE(->fpr[1]), DtE(->fpr[2]), DtE(->fpr[3]));
1462 dasm_put(Dst, 9537, DtE(->func), DtE(->gpr[0]), DtE(->fpr[0]));
1463#if LJ_TARGET_WINDOWS
1464#endif
1465 dasm_put(Dst, 9550);
1460#endif 1466#endif
1461} 1467}
1462 1468
@@ -1473,20 +1479,20 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1473 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1479 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1474 1480
1475 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1481 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1476 dasm_put(Dst, 9556, LJ_TISNUM, LJ_TISNUM); 1482 dasm_put(Dst, 9558, LJ_TISNUM, LJ_TISNUM);
1477 if (sse) { 1483 if (sse) {
1478 dasm_put(Dst, 9577); 1484 dasm_put(Dst, 9579);
1479 } else { 1485 } else {
1480 dasm_put(Dst, 9592); 1486 dasm_put(Dst, 9594);
1481 if (cmov) { 1487 if (cmov) {
1482 dasm_put(Dst, 9602); 1488 dasm_put(Dst, 9604);
1483 } else { 1489 } else {
1484 dasm_put(Dst, 9608); 1490 dasm_put(Dst, 9610);
1485 } 1491 }
1486 } 1492 }
1487 switch (op) { 1493 switch (op) {
1488 case BC_ISLT: 1494 case BC_ISLT:
1489 dasm_put(Dst, 9615); 1495 dasm_put(Dst, 9617);
1490 break; 1496 break;
1491 case BC_ISGE: 1497 case BC_ISGE:
1492 dasm_put(Dst, 9293); 1498 dasm_put(Dst, 9293);
@@ -1495,599 +1501,599 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1495 dasm_put(Dst, 5854); 1501 dasm_put(Dst, 5854);
1496 break; 1502 break;
1497 case BC_ISGT: 1503 case BC_ISGT:
1498 dasm_put(Dst, 9620); 1504 dasm_put(Dst, 9622);
1499 break; 1505 break;
1500 default: break; /* Shut up GCC. */ 1506 default: break; /* Shut up GCC. */
1501 } 1507 }
1502 dasm_put(Dst, 9625, -BCBIAS_J*4); 1508 dasm_put(Dst, 9627, -BCBIAS_J*4);
1503 break; 1509 break;
1504 1510
1505 case BC_ISEQV: case BC_ISNEV: 1511 case BC_ISEQV: case BC_ISNEV:
1506 vk = op == BC_ISEQV; 1512 vk = op == BC_ISEQV;
1507 dasm_put(Dst, 9659, LJ_TISNUM, LJ_TISNUM); 1513 dasm_put(Dst, 9661, LJ_TISNUM, LJ_TISNUM);
1508 if (sse) { 1514 if (sse) {
1509 dasm_put(Dst, 9685); 1515 dasm_put(Dst, 9687);
1510 } else { 1516 } else {
1511 dasm_put(Dst, 9697); 1517 dasm_put(Dst, 9699);
1512 if (cmov) { 1518 if (cmov) {
1513 dasm_put(Dst, 9602); 1519 dasm_put(Dst, 9604);
1514 } else { 1520 } else {
1515 dasm_put(Dst, 9608); 1521 dasm_put(Dst, 9610);
1516 } 1522 }
1517 } 1523 }
1518 iseqne_fp: 1524 iseqne_fp:
1519 if (vk) { 1525 if (vk) {
1520 dasm_put(Dst, 9704); 1526 dasm_put(Dst, 9706);
1521 } else { 1527 } else {
1522 dasm_put(Dst, 9713); 1528 dasm_put(Dst, 9715);
1523 } 1529 }
1524 iseqne_end: 1530 iseqne_end:
1525 if (vk) { 1531 if (vk) {
1526 dasm_put(Dst, 9722, -BCBIAS_J*4); 1532 dasm_put(Dst, 9724, -BCBIAS_J*4);
1527 } else { 1533 } else {
1528 dasm_put(Dst, 9737, -BCBIAS_J*4); 1534 dasm_put(Dst, 9739, -BCBIAS_J*4);
1529 } 1535 }
1530 dasm_put(Dst, 9639); 1536 dasm_put(Dst, 9641);
1531 if (op == BC_ISEQV || op == BC_ISNEV) { 1537 if (op == BC_ISEQV || op == BC_ISNEV) {
1532 dasm_put(Dst, 9752, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1538 dasm_put(Dst, 9754, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1533 if (vk) { 1539 if (vk) {
1534 dasm_put(Dst, 9810); 1540 dasm_put(Dst, 9812);
1535 } else { 1541 } else {
1536 dasm_put(Dst, 9814); 1542 dasm_put(Dst, 9816);
1537 } 1543 }
1538 dasm_put(Dst, 9820); 1544 dasm_put(Dst, 9822);
1539 } 1545 }
1540 break; 1546 break;
1541 case BC_ISEQS: case BC_ISNES: 1547 case BC_ISEQS: case BC_ISNES:
1542 vk = op == BC_ISEQS; 1548 vk = op == BC_ISEQS;
1543 dasm_put(Dst, 9825, LJ_TSTR); 1549 dasm_put(Dst, 9827, LJ_TSTR);
1544 iseqne_test: 1550 iseqne_test:
1545 if (vk) { 1551 if (vk) {
1546 dasm_put(Dst, 9708); 1552 dasm_put(Dst, 9710);
1547 } else { 1553 } else {
1548 dasm_put(Dst, 2772); 1554 dasm_put(Dst, 2772);
1549 } 1555 }
1550 goto iseqne_end; 1556 goto iseqne_end;
1551 case BC_ISEQN: case BC_ISNEN: 1557 case BC_ISEQN: case BC_ISNEN:
1552 vk = op == BC_ISEQN; 1558 vk = op == BC_ISEQN;
1553 dasm_put(Dst, 9849, LJ_TISNUM); 1559 dasm_put(Dst, 9851, LJ_TISNUM);
1554 if (sse) { 1560 if (sse) {
1555 dasm_put(Dst, 9863); 1561 dasm_put(Dst, 9865);
1556 } else { 1562 } else {
1557 dasm_put(Dst, 9875); 1563 dasm_put(Dst, 9877);
1558 if (cmov) { 1564 if (cmov) {
1559 dasm_put(Dst, 9602); 1565 dasm_put(Dst, 9604);
1560 } else { 1566 } else {
1561 dasm_put(Dst, 9608); 1567 dasm_put(Dst, 9610);
1562 } 1568 }
1563 } 1569 }
1564 goto iseqne_fp; 1570 goto iseqne_fp;
1565 case BC_ISEQP: case BC_ISNEP: 1571 case BC_ISEQP: case BC_ISNEP:
1566 vk = op == BC_ISEQP; 1572 vk = op == BC_ISEQP;
1567 dasm_put(Dst, 9882); 1573 dasm_put(Dst, 9884);
1568 goto iseqne_test; 1574 goto iseqne_test;
1569 1575
1570 /* -- Unary test and copy ops ------------------------------------------- */ 1576 /* -- Unary test and copy ops ------------------------------------------- */
1571 1577
1572 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1578 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1573 dasm_put(Dst, 9894, LJ_TISTRUECOND); 1579 dasm_put(Dst, 9896, LJ_TISTRUECOND);
1574 if (op == BC_IST || op == BC_ISTC) { 1580 if (op == BC_IST || op == BC_ISTC) {
1575 dasm_put(Dst, 9906); 1581 dasm_put(Dst, 9908);
1576 } else { 1582 } else {
1577 dasm_put(Dst, 9911); 1583 dasm_put(Dst, 9913);
1578 } 1584 }
1579 if (op == BC_ISTC || op == BC_ISFC) { 1585 if (op == BC_ISTC || op == BC_ISFC) {
1580 dasm_put(Dst, 9916); 1586 dasm_put(Dst, 9918);
1581 } 1587 }
1582 dasm_put(Dst, 9927, -BCBIAS_J*4); 1588 dasm_put(Dst, 9929, -BCBIAS_J*4);
1583 break; 1589 break;
1584 1590
1585 /* -- Unary ops --------------------------------------------------------- */ 1591 /* -- Unary ops --------------------------------------------------------- */
1586 1592
1587 case BC_MOV: 1593 case BC_MOV:
1588 dasm_put(Dst, 9959); 1594 dasm_put(Dst, 9961);
1589 break; 1595 break;
1590 case BC_NOT: 1596 case BC_NOT:
1591 dasm_put(Dst, 9987, LJ_TISTRUECOND, LJ_TTRUE); 1597 dasm_put(Dst, 9989, LJ_TISTRUECOND, LJ_TTRUE);
1592 break; 1598 break;
1593 case BC_UNM: 1599 case BC_UNM:
1594 dasm_put(Dst, 10023, LJ_TISNUM); 1600 dasm_put(Dst, 10025, LJ_TISNUM);
1595 if (sse) { 1601 if (sse) {
1596 dasm_put(Dst, 10034, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); 1602 dasm_put(Dst, 10036, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32));
1597 } else { 1603 } else {
1598 dasm_put(Dst, 10059); 1604 dasm_put(Dst, 10061);
1599 } 1605 }
1600 dasm_put(Dst, 9639); 1606 dasm_put(Dst, 9641);
1601 break; 1607 break;
1602 case BC_LEN: 1608 case BC_LEN:
1603 dasm_put(Dst, 10068, LJ_TSTR); 1609 dasm_put(Dst, 10070, LJ_TSTR);
1604 if (sse) { 1610 if (sse) {
1605 dasm_put(Dst, 10082, Dt5(->len)); 1611 dasm_put(Dst, 10084, Dt5(->len));
1606 } else { 1612 } else {
1607 dasm_put(Dst, 10100, Dt5(->len)); 1613 dasm_put(Dst, 10102, Dt5(->len));
1608 } 1614 }
1609 dasm_put(Dst, 10109, LJ_TTAB); 1615 dasm_put(Dst, 10111, LJ_TTAB);
1610 if (sse) { 1616 if (sse) {
1611 dasm_put(Dst, 10150); 1617 dasm_put(Dst, 10152);
1612 } else { 1618 } else {
1613 } 1619 }
1614 dasm_put(Dst, 10159); 1620 dasm_put(Dst, 10161);
1615 break; 1621 break;
1616 1622
1617 /* -- Binary ops -------------------------------------------------------- */ 1623 /* -- Binary ops -------------------------------------------------------- */
1618 1624
1619 1625
1620 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1626 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1621 dasm_put(Dst, 10169); 1627 dasm_put(Dst, 10171);
1622 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1628 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1623 switch (vk) { 1629 switch (vk) {
1624 case 0: 1630 case 0:
1625 dasm_put(Dst, 10177, LJ_TISNUM); 1631 dasm_put(Dst, 10179, LJ_TISNUM);
1626 if (sse) { 1632 if (sse) {
1627 dasm_put(Dst, 10189); 1633 dasm_put(Dst, 10191);
1628 } else { 1634 } else {
1629 dasm_put(Dst, 10203); 1635 dasm_put(Dst, 10205);
1630 } 1636 }
1631 break; 1637 break;
1632 case 1: 1638 case 1:
1633 dasm_put(Dst, 10211, LJ_TISNUM); 1639 dasm_put(Dst, 10213, LJ_TISNUM);
1634 if (sse) { 1640 if (sse) {
1635 dasm_put(Dst, 10223); 1641 dasm_put(Dst, 10225);
1636 } else { 1642 } else {
1637 dasm_put(Dst, 10237); 1643 dasm_put(Dst, 10239);
1638 } 1644 }
1639 break; 1645 break;
1640 default: 1646 default:
1641 dasm_put(Dst, 10245, LJ_TISNUM, LJ_TISNUM); 1647 dasm_put(Dst, 10247, LJ_TISNUM, LJ_TISNUM);
1642 if (sse) { 1648 if (sse) {
1643 dasm_put(Dst, 10267); 1649 dasm_put(Dst, 10269);
1644 } else { 1650 } else {
1645 dasm_put(Dst, 10281); 1651 dasm_put(Dst, 10283);
1646 } 1652 }
1647 break; 1653 break;
1648 } 1654 }
1649 if (sse) { 1655 if (sse) {
1650 dasm_put(Dst, 10052); 1656 dasm_put(Dst, 10054);
1651 } else { 1657 } else {
1652 dasm_put(Dst, 10064); 1658 dasm_put(Dst, 10066);
1653 } 1659 }
1654 dasm_put(Dst, 9639); 1660 dasm_put(Dst, 9641);
1655 break; 1661 break;
1656 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1662 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1657 dasm_put(Dst, 10169); 1663 dasm_put(Dst, 10171);
1658 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1664 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1659 switch (vk) { 1665 switch (vk) {
1660 case 0: 1666 case 0:
1661 dasm_put(Dst, 10177, LJ_TISNUM); 1667 dasm_put(Dst, 10179, LJ_TISNUM);
1662 if (sse) { 1668 if (sse) {
1663 dasm_put(Dst, 10289); 1669 dasm_put(Dst, 10291);
1664 } else { 1670 } else {
1665 dasm_put(Dst, 10303); 1671 dasm_put(Dst, 10305);
1666 } 1672 }
1667 break; 1673 break;
1668 case 1: 1674 case 1:
1669 dasm_put(Dst, 10211, LJ_TISNUM); 1675 dasm_put(Dst, 10213, LJ_TISNUM);
1670 if (sse) { 1676 if (sse) {
1671 dasm_put(Dst, 10311); 1677 dasm_put(Dst, 10313);
1672 } else { 1678 } else {
1673 dasm_put(Dst, 10325); 1679 dasm_put(Dst, 10327);
1674 } 1680 }
1675 break; 1681 break;
1676 default: 1682 default:
1677 dasm_put(Dst, 10245, LJ_TISNUM, LJ_TISNUM); 1683 dasm_put(Dst, 10247, LJ_TISNUM, LJ_TISNUM);
1678 if (sse) { 1684 if (sse) {
1679 dasm_put(Dst, 10333); 1685 dasm_put(Dst, 10335);
1680 } else { 1686 } else {
1681 dasm_put(Dst, 10347); 1687 dasm_put(Dst, 10349);
1682 } 1688 }
1683 break; 1689 break;
1684 } 1690 }
1685 if (sse) { 1691 if (sse) {
1686 dasm_put(Dst, 10052); 1692 dasm_put(Dst, 10054);
1687 } else { 1693 } else {
1688 dasm_put(Dst, 10064); 1694 dasm_put(Dst, 10066);
1689 } 1695 }
1690 dasm_put(Dst, 9639); 1696 dasm_put(Dst, 9641);
1691 break; 1697 break;
1692 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1698 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1693 dasm_put(Dst, 10169); 1699 dasm_put(Dst, 10171);
1694 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1700 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1695 switch (vk) { 1701 switch (vk) {
1696 case 0: 1702 case 0:
1697 dasm_put(Dst, 10177, LJ_TISNUM); 1703 dasm_put(Dst, 10179, LJ_TISNUM);
1698 if (sse) { 1704 if (sse) {
1699 dasm_put(Dst, 10355); 1705 dasm_put(Dst, 10357);
1700 } else { 1706 } else {
1701 dasm_put(Dst, 10369); 1707 dasm_put(Dst, 10371);
1702 } 1708 }
1703 break; 1709 break;
1704 case 1: 1710 case 1:
1705 dasm_put(Dst, 10211, LJ_TISNUM); 1711 dasm_put(Dst, 10213, LJ_TISNUM);
1706 if (sse) { 1712 if (sse) {
1707 dasm_put(Dst, 10377); 1713 dasm_put(Dst, 10379);
1708 } else { 1714 } else {
1709 dasm_put(Dst, 10391); 1715 dasm_put(Dst, 10393);
1710 } 1716 }
1711 break; 1717 break;
1712 default: 1718 default:
1713 dasm_put(Dst, 10245, LJ_TISNUM, LJ_TISNUM); 1719 dasm_put(Dst, 10247, LJ_TISNUM, LJ_TISNUM);
1714 if (sse) { 1720 if (sse) {
1715 dasm_put(Dst, 10399); 1721 dasm_put(Dst, 10401);
1716 } else { 1722 } else {
1717 dasm_put(Dst, 10413); 1723 dasm_put(Dst, 10415);
1718 } 1724 }
1719 break; 1725 break;
1720 } 1726 }
1721 if (sse) { 1727 if (sse) {
1722 dasm_put(Dst, 10052); 1728 dasm_put(Dst, 10054);
1723 } else { 1729 } else {
1724 dasm_put(Dst, 10064); 1730 dasm_put(Dst, 10066);
1725 } 1731 }
1726 dasm_put(Dst, 9639); 1732 dasm_put(Dst, 9641);
1727 break; 1733 break;
1728 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1734 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1729 dasm_put(Dst, 10169); 1735 dasm_put(Dst, 10171);
1730 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1736 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1731 switch (vk) { 1737 switch (vk) {
1732 case 0: 1738 case 0:
1733 dasm_put(Dst, 10177, LJ_TISNUM); 1739 dasm_put(Dst, 10179, LJ_TISNUM);
1734 if (sse) { 1740 if (sse) {
1735 dasm_put(Dst, 10421); 1741 dasm_put(Dst, 10423);
1736 } else { 1742 } else {
1737 dasm_put(Dst, 10435); 1743 dasm_put(Dst, 10437);
1738 } 1744 }
1739 break; 1745 break;
1740 case 1: 1746 case 1:
1741 dasm_put(Dst, 10211, LJ_TISNUM); 1747 dasm_put(Dst, 10213, LJ_TISNUM);
1742 if (sse) { 1748 if (sse) {
1743 dasm_put(Dst, 10443); 1749 dasm_put(Dst, 10445);
1744 } else { 1750 } else {
1745 dasm_put(Dst, 10457); 1751 dasm_put(Dst, 10459);
1746 } 1752 }
1747 break; 1753 break;
1748 default: 1754 default:
1749 dasm_put(Dst, 10245, LJ_TISNUM, LJ_TISNUM); 1755 dasm_put(Dst, 10247, LJ_TISNUM, LJ_TISNUM);
1750 if (sse) { 1756 if (sse) {
1751 dasm_put(Dst, 10465); 1757 dasm_put(Dst, 10467);
1752 } else { 1758 } else {
1753 dasm_put(Dst, 10479); 1759 dasm_put(Dst, 10481);
1754 } 1760 }
1755 break; 1761 break;
1756 } 1762 }
1757 if (sse) { 1763 if (sse) {
1758 dasm_put(Dst, 10052); 1764 dasm_put(Dst, 10054);
1759 } else { 1765 } else {
1760 dasm_put(Dst, 10064); 1766 dasm_put(Dst, 10066);
1761 } 1767 }
1762 dasm_put(Dst, 9639); 1768 dasm_put(Dst, 9641);
1763 break; 1769 break;
1764 case BC_MODVN: 1770 case BC_MODVN:
1765 dasm_put(Dst, 10169); 1771 dasm_put(Dst, 10171);
1766 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1772 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1767 switch (vk) { 1773 switch (vk) {
1768 case 0: 1774 case 0:
1769 dasm_put(Dst, 10177, LJ_TISNUM); 1775 dasm_put(Dst, 10179, LJ_TISNUM);
1770 if (sse) { 1776 if (sse) {
1771 dasm_put(Dst, 10487); 1777 dasm_put(Dst, 10489);
1772 } else { 1778 } else {
1773 dasm_put(Dst, 10501); 1779 dasm_put(Dst, 10503);
1774 } 1780 }
1775 break; 1781 break;
1776 case 1: 1782 case 1:
1777 dasm_put(Dst, 10211, LJ_TISNUM); 1783 dasm_put(Dst, 10213, LJ_TISNUM);
1778 if (sse) { 1784 if (sse) {
1779 dasm_put(Dst, 10509); 1785 dasm_put(Dst, 10511);
1780 } else { 1786 } else {
1781 dasm_put(Dst, 10523); 1787 dasm_put(Dst, 10525);
1782 } 1788 }
1783 break; 1789 break;
1784 default: 1790 default:
1785 dasm_put(Dst, 10245, LJ_TISNUM, LJ_TISNUM); 1791 dasm_put(Dst, 10247, LJ_TISNUM, LJ_TISNUM);
1786 if (sse) { 1792 if (sse) {
1787 dasm_put(Dst, 10531); 1793 dasm_put(Dst, 10533);
1788 } else { 1794 } else {
1789 dasm_put(Dst, 10545); 1795 dasm_put(Dst, 10547);
1790 } 1796 }
1791 break; 1797 break;
1792 } 1798 }
1793 dasm_put(Dst, 10553); 1799 dasm_put(Dst, 10555);
1794 if (sse) { 1800 if (sse) {
1795 dasm_put(Dst, 10052); 1801 dasm_put(Dst, 10054);
1796 } else { 1802 } else {
1797 dasm_put(Dst, 10064); 1803 dasm_put(Dst, 10066);
1798 } 1804 }
1799 dasm_put(Dst, 9639); 1805 dasm_put(Dst, 9641);
1800 break; 1806 break;
1801 case BC_MODNV: case BC_MODVV: 1807 case BC_MODNV: case BC_MODVV:
1802 dasm_put(Dst, 10169); 1808 dasm_put(Dst, 10171);
1803 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1809 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1804 switch (vk) { 1810 switch (vk) {
1805 case 0: 1811 case 0:
1806 dasm_put(Dst, 10177, LJ_TISNUM); 1812 dasm_put(Dst, 10179, LJ_TISNUM);
1807 if (sse) { 1813 if (sse) {
1808 dasm_put(Dst, 10487); 1814 dasm_put(Dst, 10489);
1809 } else { 1815 } else {
1810 dasm_put(Dst, 10501); 1816 dasm_put(Dst, 10503);
1811 } 1817 }
1812 break; 1818 break;
1813 case 1: 1819 case 1:
1814 dasm_put(Dst, 10211, LJ_TISNUM); 1820 dasm_put(Dst, 10213, LJ_TISNUM);
1815 if (sse) { 1821 if (sse) {
1816 dasm_put(Dst, 10509); 1822 dasm_put(Dst, 10511);
1817 } else { 1823 } else {
1818 dasm_put(Dst, 10523); 1824 dasm_put(Dst, 10525);
1819 } 1825 }
1820 break; 1826 break;
1821 default: 1827 default:
1822 dasm_put(Dst, 10245, LJ_TISNUM, LJ_TISNUM); 1828 dasm_put(Dst, 10247, LJ_TISNUM, LJ_TISNUM);
1823 if (sse) { 1829 if (sse) {
1824 dasm_put(Dst, 10531); 1830 dasm_put(Dst, 10533);
1825 } else { 1831 } else {
1826 dasm_put(Dst, 10545); 1832 dasm_put(Dst, 10547);
1827 } 1833 }
1828 break; 1834 break;
1829 } 1835 }
1830 dasm_put(Dst, 10559); 1836 dasm_put(Dst, 10561);
1831 break; 1837 break;
1832 case BC_POW: 1838 case BC_POW:
1833 dasm_put(Dst, 10169); 1839 dasm_put(Dst, 10171);
1834 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1840 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1835 switch (vk) { 1841 switch (vk) {
1836 case 0: 1842 case 0:
1837 dasm_put(Dst, 10177, LJ_TISNUM); 1843 dasm_put(Dst, 10179, LJ_TISNUM);
1838 if (sse) { 1844 if (sse) {
1839 dasm_put(Dst, 10487); 1845 dasm_put(Dst, 10489);
1840 } else { 1846 } else {
1841 dasm_put(Dst, 10501); 1847 dasm_put(Dst, 10503);
1842 } 1848 }
1843 break; 1849 break;
1844 case 1: 1850 case 1:
1845 dasm_put(Dst, 10211, LJ_TISNUM); 1851 dasm_put(Dst, 10213, LJ_TISNUM);
1846 if (sse) { 1852 if (sse) {
1847 dasm_put(Dst, 10509); 1853 dasm_put(Dst, 10511);
1848 } else { 1854 } else {
1849 dasm_put(Dst, 10523); 1855 dasm_put(Dst, 10525);
1850 } 1856 }
1851 break; 1857 break;
1852 default: 1858 default:
1853 dasm_put(Dst, 10245, LJ_TISNUM, LJ_TISNUM); 1859 dasm_put(Dst, 10247, LJ_TISNUM, LJ_TISNUM);
1854 if (sse) { 1860 if (sse) {
1855 dasm_put(Dst, 10531); 1861 dasm_put(Dst, 10533);
1856 } else { 1862 } else {
1857 dasm_put(Dst, 10545); 1863 dasm_put(Dst, 10547);
1858 } 1864 }
1859 break; 1865 break;
1860 } 1866 }
1861 dasm_put(Dst, 10564); 1867 dasm_put(Dst, 10566);
1862 if (sse) { 1868 if (sse) {
1863 dasm_put(Dst, 10052); 1869 dasm_put(Dst, 10054);
1864 } else { 1870 } else {
1865 dasm_put(Dst, 10064); 1871 dasm_put(Dst, 10066);
1866 } 1872 }
1867 dasm_put(Dst, 9639); 1873 dasm_put(Dst, 9641);
1868 break; 1874 break;
1869 1875
1870 case BC_CAT: 1876 case BC_CAT:
1871 dasm_put(Dst, 10568, Dt1(->base), Dt1(->base)); 1877 dasm_put(Dst, 10570, Dt1(->base), Dt1(->base));
1872 break; 1878 break;
1873 1879
1874 /* -- Constant ops ------------------------------------------------------ */ 1880 /* -- Constant ops ------------------------------------------------------ */
1875 1881
1876 case BC_KSTR: 1882 case BC_KSTR:
1877 dasm_put(Dst, 10651, LJ_TSTR); 1883 dasm_put(Dst, 10653, LJ_TSTR);
1878 break; 1884 break;
1879 case BC_KCDATA: 1885 case BC_KCDATA:
1880#if LJ_HASFFI 1886#if LJ_HASFFI
1881 dasm_put(Dst, 10651, LJ_TCDATA); 1887 dasm_put(Dst, 10653, LJ_TCDATA);
1882#endif 1888#endif
1883 break; 1889 break;
1884 case BC_KSHORT: 1890 case BC_KSHORT:
1885 if (sse) { 1891 if (sse) {
1886 dasm_put(Dst, 10686); 1892 dasm_put(Dst, 10688);
1887 } else { 1893 } else {
1888 dasm_put(Dst, 10701); 1894 dasm_put(Dst, 10703);
1889 } 1895 }
1890 dasm_put(Dst, 9639); 1896 dasm_put(Dst, 9641);
1891 break; 1897 break;
1892 case BC_KNUM: 1898 case BC_KNUM:
1893 if (sse) { 1899 if (sse) {
1894 dasm_put(Dst, 10709); 1900 dasm_put(Dst, 10711);
1895 } else { 1901 } else {
1896 dasm_put(Dst, 10722); 1902 dasm_put(Dst, 10724);
1897 } 1903 }
1898 dasm_put(Dst, 9639); 1904 dasm_put(Dst, 9641);
1899 break; 1905 break;
1900 case BC_KPRI: 1906 case BC_KPRI:
1901 dasm_put(Dst, 10729); 1907 dasm_put(Dst, 10731);
1902 break; 1908 break;
1903 case BC_KNIL: 1909 case BC_KNIL:
1904 dasm_put(Dst, 10757, LJ_TNIL); 1910 dasm_put(Dst, 10759, LJ_TNIL);
1905 break; 1911 break;
1906 1912
1907 /* -- Upvalue and function ops ------------------------------------------ */ 1913 /* -- Upvalue and function ops ------------------------------------------ */
1908 1914
1909 case BC_UGET: 1915 case BC_UGET:
1910 dasm_put(Dst, 10804, offsetof(GCfuncL, uvptr), DtA(->v)); 1916 dasm_put(Dst, 10806, offsetof(GCfuncL, uvptr), DtA(->v));
1911 break; 1917 break;
1912 case BC_USETV: 1918 case BC_USETV:
1913#define TV2MARKOFS \ 1919#define TV2MARKOFS \
1914 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 1920 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
1915 dasm_put(Dst, 10844, 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); 1921 dasm_put(Dst, 10846, 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);
1916 dasm_put(Dst, 10935); 1922 dasm_put(Dst, 10937);
1917 break; 1923 break;
1918#undef TV2MARKOFS 1924#undef TV2MARKOFS
1919 case BC_USETS: 1925 case BC_USETS:
1920 dasm_put(Dst, 10947, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 1926 dasm_put(Dst, 10949, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
1921 break; 1927 break;
1922 case BC_USETN: 1928 case BC_USETN:
1923 dasm_put(Dst, 11040); 1929 dasm_put(Dst, 11042);
1924 if (sse) { 1930 if (sse) {
1925 dasm_put(Dst, 11045); 1931 dasm_put(Dst, 11047);
1926 } else { 1932 } else {
1927 dasm_put(Dst, 9878); 1933 dasm_put(Dst, 9880);
1928 } 1934 }
1929 dasm_put(Dst, 11052, offsetof(GCfuncL, uvptr), DtA(->v)); 1935 dasm_put(Dst, 11054, offsetof(GCfuncL, uvptr), DtA(->v));
1930 if (sse) { 1936 if (sse) {
1931 dasm_put(Dst, 11061); 1937 dasm_put(Dst, 11063);
1932 } else { 1938 } else {
1933 dasm_put(Dst, 11067); 1939 dasm_put(Dst, 11069);
1934 } 1940 }
1935 dasm_put(Dst, 9639); 1941 dasm_put(Dst, 9641);
1936 break; 1942 break;
1937 case BC_USETP: 1943 case BC_USETP:
1938 dasm_put(Dst, 11070, offsetof(GCfuncL, uvptr), DtA(->v)); 1944 dasm_put(Dst, 11072, offsetof(GCfuncL, uvptr), DtA(->v));
1939 break; 1945 break;
1940 case BC_UCLO: 1946 case BC_UCLO:
1941 dasm_put(Dst, 11109, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 1947 dasm_put(Dst, 11111, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
1942 break; 1948 break;
1943 1949
1944 case BC_FNEW: 1950 case BC_FNEW:
1945 dasm_put(Dst, 11164, Dt1(->base), Dt1(->base), LJ_TFUNC); 1951 dasm_put(Dst, 11166, Dt1(->base), Dt1(->base), LJ_TFUNC);
1946 break; 1952 break;
1947 1953
1948 /* -- Table ops --------------------------------------------------------- */ 1954 /* -- Table ops --------------------------------------------------------- */
1949 1955
1950 case BC_TNEW: 1956 case BC_TNEW:
1951 dasm_put(Dst, 11230, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); 1957 dasm_put(Dst, 11232, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB);
1952 break; 1958 break;
1953 case BC_TDUP: 1959 case BC_TDUP:
1954 dasm_put(Dst, 11352, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 1960 dasm_put(Dst, 11354, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
1955 break; 1961 break;
1956 1962
1957 case BC_GGET: 1963 case BC_GGET:
1958 dasm_put(Dst, 11447, Dt7(->env)); 1964 dasm_put(Dst, 11449, Dt7(->env));
1959 break; 1965 break;
1960 case BC_GSET: 1966 case BC_GSET:
1961 dasm_put(Dst, 11466, Dt7(->env)); 1967 dasm_put(Dst, 11468, Dt7(->env));
1962 break; 1968 break;
1963 1969
1964 case BC_TGETV: 1970 case BC_TGETV:
1965 dasm_put(Dst, 11485, LJ_TTAB, LJ_TISNUM); 1971 dasm_put(Dst, 11487, LJ_TTAB, LJ_TISNUM);
1966 if (sse) { 1972 if (sse) {
1967 dasm_put(Dst, 11518); 1973 dasm_put(Dst, 11520);
1968 } else { 1974 } else {
1969 } 1975 }
1970 dasm_put(Dst, 11539, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1976 dasm_put(Dst, 11541, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1971 dasm_put(Dst, 11623, LJ_TNIL, LJ_TSTR); 1977 dasm_put(Dst, 11625, LJ_TNIL, LJ_TSTR);
1972 break; 1978 break;
1973 case BC_TGETS: 1979 case BC_TGETS:
1974 dasm_put(Dst, 11652, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1980 dasm_put(Dst, 11654, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1975 dasm_put(Dst, 11736, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1981 dasm_put(Dst, 11738, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1976 break; 1982 break;
1977 case BC_TGETB: 1983 case BC_TGETB:
1978 dasm_put(Dst, 11807, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 1984 dasm_put(Dst, 11809, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
1979 dasm_put(Dst, 11902, LJ_TNIL); 1985 dasm_put(Dst, 11904, LJ_TNIL);
1980 break; 1986 break;
1981 1987
1982 case BC_TSETV: 1988 case BC_TSETV:
1983 dasm_put(Dst, 11919, LJ_TTAB, LJ_TISNUM); 1989 dasm_put(Dst, 11921, LJ_TTAB, LJ_TISNUM);
1984 if (sse) { 1990 if (sse) {
1985 dasm_put(Dst, 11518); 1991 dasm_put(Dst, 11520);
1986 } else { 1992 } else {
1987 } 1993 }
1988 dasm_put(Dst, 11952, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 1994 dasm_put(Dst, 11954, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
1989 dasm_put(Dst, 12031, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 1995 dasm_put(Dst, 12033, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1990 break; 1996 break;
1991 case BC_TSETS: 1997 case BC_TSETS:
1992 dasm_put(Dst, 12093, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 1998 dasm_put(Dst, 12095, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
1993 dasm_put(Dst, 12169, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 1999 dasm_put(Dst, 12171, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
1994 dasm_put(Dst, 12257, 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)); 2000 dasm_put(Dst, 12259, 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));
1995 break; 2001 break;
1996 case BC_TSETB: 2002 case BC_TSETB:
1997 dasm_put(Dst, 12348, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 2003 dasm_put(Dst, 12350, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
1998 dasm_put(Dst, 12442, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2004 dasm_put(Dst, 12444, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
1999 break; 2005 break;
2000 2006
2001 case BC_TSETM: 2007 case BC_TSETM:
2002 dasm_put(Dst, 12488, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); 2008 dasm_put(Dst, 12490, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
2003 dasm_put(Dst, 12631, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2009 dasm_put(Dst, 12633, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2004 break; 2010 break;
2005 2011
2006 /* -- Calls and vararg handling ----------------------------------------- */ 2012 /* -- Calls and vararg handling ----------------------------------------- */
2007 2013
2008 case BC_CALL: case BC_CALLM: 2014 case BC_CALL: case BC_CALLM:
2009 dasm_put(Dst, 10173); 2015 dasm_put(Dst, 10175);
2010 if (op == BC_CALLM) { 2016 if (op == BC_CALLM) {
2011 dasm_put(Dst, 12649); 2017 dasm_put(Dst, 12651);
2012 } 2018 }
2013 dasm_put(Dst, 12654, LJ_TFUNC, Dt7(->pc)); 2019 dasm_put(Dst, 12656, LJ_TFUNC, Dt7(->pc));
2014 break; 2020 break;
2015 2021
2016 case BC_CALLMT: 2022 case BC_CALLMT:
2017 dasm_put(Dst, 12649); 2023 dasm_put(Dst, 12651);
2018 break; 2024 break;
2019 case BC_CALLT: 2025 case BC_CALLT:
2020 dasm_put(Dst, 12696, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 2026 dasm_put(Dst, 12698, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
2021 dasm_put(Dst, 12811, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 2027 dasm_put(Dst, 12813, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
2022 break; 2028 break;
2023 2029
2024 case BC_ITERC: 2030 case BC_ITERC:
2025 dasm_put(Dst, 12882, LJ_TFUNC, 2+1, Dt7(->pc)); 2031 dasm_put(Dst, 12884, LJ_TFUNC, 2+1, Dt7(->pc));
2026 break; 2032 break;
2027 2033
2028 case BC_ITERN: 2034 case BC_ITERN:
2029#if LJ_HASJIT 2035#if LJ_HASJIT
2030#endif 2036#endif
2031 dasm_put(Dst, 12953, Dt6(->asize), Dt6(->array), LJ_TNIL); 2037 dasm_put(Dst, 12955, Dt6(->asize), Dt6(->array), LJ_TNIL);
2032 if (sse) { 2038 if (sse) {
2033 dasm_put(Dst, 12999); 2039 dasm_put(Dst, 13001);
2034 } else { 2040 } else {
2035 dasm_put(Dst, 13005); 2041 dasm_put(Dst, 13007);
2036 } 2042 }
2037 dasm_put(Dst, 13011); 2043 dasm_put(Dst, 13013);
2038 if (sse) { 2044 if (sse) {
2039 dasm_put(Dst, 10052); 2045 dasm_put(Dst, 10054);
2040 } else { 2046 } else {
2041 dasm_put(Dst, 10064); 2047 dasm_put(Dst, 10066);
2042 } 2048 }
2043 dasm_put(Dst, 13024, -BCBIAS_J*4); 2049 dasm_put(Dst, 13026, -BCBIAS_J*4);
2044 if (!sse) { 2050 if (!sse) {
2045 dasm_put(Dst, 13076); 2051 dasm_put(Dst, 13078);
2046 } 2052 }
2047 dasm_put(Dst, 13082, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); 2053 dasm_put(Dst, 13084, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val));
2048 break; 2054 break;
2049 2055
2050 case BC_ISNEXT: 2056 case BC_ISNEXT:
2051 dasm_put(Dst, 13154, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); 2057 dasm_put(Dst, 13156, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC);
2052 break; 2058 break;
2053 2059
2054 case BC_VARG: 2060 case BC_VARG:
2055 dasm_put(Dst, 13254, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); 2061 dasm_put(Dst, 13256, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack));
2056 dasm_put(Dst, 13414, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2062 dasm_put(Dst, 13416, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2057 break; 2063 break;
2058 2064
2059 /* -- Returns ----------------------------------------------------------- */ 2065 /* -- Returns ----------------------------------------------------------- */
2060 2066
2061 case BC_RETM: 2067 case BC_RETM:
2062 dasm_put(Dst, 12649); 2068 dasm_put(Dst, 12651);
2063 break; 2069 break;
2064 2070
2065 case BC_RET: case BC_RET0: case BC_RET1: 2071 case BC_RET: case BC_RET0: case BC_RET1:
2066 if (op != BC_RET0) { 2072 if (op != BC_RET0) {
2067 dasm_put(Dst, 13480); 2073 dasm_put(Dst, 13482);
2068 } 2074 }
2069 dasm_put(Dst, 13484, FRAME_TYPE); 2075 dasm_put(Dst, 13486, FRAME_TYPE);
2070 switch (op) { 2076 switch (op) {
2071 case BC_RET: 2077 case BC_RET:
2072 dasm_put(Dst, 13503); 2078 dasm_put(Dst, 13505);
2073 break; 2079 break;
2074 case BC_RET1: 2080 case BC_RET1:
2075 dasm_put(Dst, 13555); 2081 dasm_put(Dst, 13557);
2076 /* fallthrough */ 2082 /* fallthrough */
2077 case BC_RET0: 2083 case BC_RET0:
2078 dasm_put(Dst, 13565); 2084 dasm_put(Dst, 13567);
2079 default: 2085 default:
2080 break; 2086 break;
2081 } 2087 }
2082 dasm_put(Dst, 13576, Dt7(->pc), PC2PROTO(k)); 2088 dasm_put(Dst, 13578, Dt7(->pc), PC2PROTO(k));
2083 if (op == BC_RET) { 2089 if (op == BC_RET) {
2084 dasm_put(Dst, 13620, LJ_TNIL); 2090 dasm_put(Dst, 13622, LJ_TNIL);
2085 } else { 2091 } else {
2086 dasm_put(Dst, 13629, LJ_TNIL); 2092 dasm_put(Dst, 13631, LJ_TNIL);
2087 } 2093 }
2088 dasm_put(Dst, 13636, -FRAME_VARG, FRAME_TYPEP); 2094 dasm_put(Dst, 13638, -FRAME_VARG, FRAME_TYPEP);
2089 if (op != BC_RET0) { 2095 if (op != BC_RET0) {
2090 dasm_put(Dst, 13660); 2096 dasm_put(Dst, 13662);
2091 } 2097 }
2092 dasm_put(Dst, 4522); 2098 dasm_put(Dst, 4522);
2093 break; 2099 break;
@@ -2097,7 +2103,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2097 2103
2098 case BC_FORL: 2104 case BC_FORL:
2099#if LJ_HASJIT 2105#if LJ_HASJIT
2100 dasm_put(Dst, 13664, HOTCOUNT_PCMASK, GG_DISP2HOT); 2106 dasm_put(Dst, 13666, HOTCOUNT_PCMASK, GG_DISP2HOT);
2101#endif 2107#endif
2102 break; 2108 break;
2103 2109
@@ -2109,57 +2115,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2109 case BC_FORI: 2115 case BC_FORI:
2110 case BC_IFORL: 2116 case BC_IFORL:
2111 vk = (op == BC_IFORL || op == BC_JFORL); 2117 vk = (op == BC_IFORL || op == BC_JFORL);
2112 dasm_put(Dst, 13685); 2118 dasm_put(Dst, 13687);
2113 if (!vk) { 2119 if (!vk) {
2114 dasm_put(Dst, 13689, LJ_TISNUM, LJ_TISNUM); 2120 dasm_put(Dst, 13691, LJ_TISNUM, LJ_TISNUM);
2115 } 2121 }
2116 dasm_put(Dst, 13708); 2122 dasm_put(Dst, 13710);
2117 if (!vk) { 2123 if (!vk) {
2118 dasm_put(Dst, 13712, LJ_TISNUM); 2124 dasm_put(Dst, 13714, LJ_TISNUM);
2119 } 2125 }
2120 if (sse) { 2126 if (sse) {
2121 dasm_put(Dst, 13721); 2127 dasm_put(Dst, 13723);
2122 if (vk) { 2128 if (vk) {
2123 dasm_put(Dst, 13733); 2129 dasm_put(Dst, 13735);
2124 } else { 2130 } else {
2125 dasm_put(Dst, 13752); 2131 dasm_put(Dst, 13754);
2126 } 2132 }
2127 dasm_put(Dst, 13757); 2133 dasm_put(Dst, 13759);
2128 } else { 2134 } else {
2129 dasm_put(Dst, 13770); 2135 dasm_put(Dst, 13772);
2130 if (vk) { 2136 if (vk) {
2131 dasm_put(Dst, 13776); 2137 dasm_put(Dst, 13778);
2132 } else { 2138 } else {
2133 dasm_put(Dst, 13792); 2139 dasm_put(Dst, 13794);
2134 } 2140 }
2135 dasm_put(Dst, 13800); 2141 dasm_put(Dst, 13802);
2136 if (cmov) { 2142 if (cmov) {
2137 dasm_put(Dst, 9602); 2143 dasm_put(Dst, 9604);
2138 } else { 2144 } else {
2139 dasm_put(Dst, 9608); 2145 dasm_put(Dst, 9610);
2140 } 2146 }
2141 if (!cmov) { 2147 if (!cmov) {
2142 dasm_put(Dst, 13805); 2148 dasm_put(Dst, 13807);
2143 } 2149 }
2144 } 2150 }
2145 if (op == BC_FORI) { 2151 if (op == BC_FORI) {
2146 dasm_put(Dst, 13811, -BCBIAS_J*4); 2152 dasm_put(Dst, 13813, -BCBIAS_J*4);
2147 } else if (op == BC_JFORI) { 2153 } else if (op == BC_JFORI) {
2148 dasm_put(Dst, 13821, -BCBIAS_J*4, BC_JLOOP); 2154 dasm_put(Dst, 13823, -BCBIAS_J*4, BC_JLOOP);
2149 } else if (op == BC_IFORL) { 2155 } else if (op == BC_IFORL) {
2150 dasm_put(Dst, 13835, -BCBIAS_J*4); 2156 dasm_put(Dst, 13837, -BCBIAS_J*4);
2151 } else { 2157 } else {
2152 dasm_put(Dst, 13831, BC_JLOOP); 2158 dasm_put(Dst, 13833, BC_JLOOP);
2153 } 2159 }
2154 dasm_put(Dst, 9637); 2160 dasm_put(Dst, 9639);
2155 if (sse) { 2161 if (sse) {
2156 dasm_put(Dst, 13845); 2162 dasm_put(Dst, 13847);
2157 } 2163 }
2158 break; 2164 break;
2159 2165
2160 case BC_ITERL: 2166 case BC_ITERL:
2161#if LJ_HASJIT 2167#if LJ_HASJIT
2162 dasm_put(Dst, 13664, HOTCOUNT_PCMASK, GG_DISP2HOT); 2168 dasm_put(Dst, 13666, HOTCOUNT_PCMASK, GG_DISP2HOT);
2163#endif 2169#endif
2164 break; 2170 break;
2165 2171
@@ -2168,33 +2174,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2168 break; 2174 break;
2169#endif 2175#endif
2170 case BC_IITERL: 2176 case BC_IITERL:
2171 dasm_put(Dst, 13856, LJ_TNIL); 2177 dasm_put(Dst, 13858, LJ_TNIL);
2172 if (op == BC_JITERL) { 2178 if (op == BC_JITERL) {
2173 dasm_put(Dst, 13871, BC_JLOOP); 2179 dasm_put(Dst, 13873, BC_JLOOP);
2174 } else { 2180 } else {
2175 dasm_put(Dst, 13885, -BCBIAS_J*4); 2181 dasm_put(Dst, 13887, -BCBIAS_J*4);
2176 } 2182 }
2177 dasm_put(Dst, 9937); 2183 dasm_put(Dst, 9939);
2178 break; 2184 break;
2179 2185
2180 case BC_LOOP: 2186 case BC_LOOP:
2181#if LJ_HASJIT 2187#if LJ_HASJIT
2182 dasm_put(Dst, 13664, HOTCOUNT_PCMASK, GG_DISP2HOT); 2188 dasm_put(Dst, 13666, HOTCOUNT_PCMASK, GG_DISP2HOT);
2183#endif 2189#endif
2184 break; 2190 break;
2185 2191
2186 case BC_ILOOP: 2192 case BC_ILOOP:
2187 dasm_put(Dst, 9639); 2193 dasm_put(Dst, 9641);
2188 break; 2194 break;
2189 2195
2190 case BC_JLOOP: 2196 case BC_JLOOP:
2191#if LJ_HASJIT 2197#if LJ_HASJIT
2192 dasm_put(Dst, 13901, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), 9*16+4*8, -1*16, -2*16, -3*16, -4*16, -5*16, -6*16, -7*16, -8*16, -9*16); 2198 dasm_put(Dst, 13903, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), 9*16+4*8, -1*16, -2*16, -3*16, -4*16, -5*16, -6*16, -7*16, -8*16, -9*16);
2193#endif 2199#endif
2194 break; 2200 break;
2195 2201
2196 case BC_JMP: 2202 case BC_JMP:
2197 dasm_put(Dst, 14010, -BCBIAS_J*4); 2203 dasm_put(Dst, 14012, -BCBIAS_J*4);
2198 break; 2204 break;
2199 2205
2200 /* -- Function headers -------------------------------------------------- */ 2206 /* -- Function headers -------------------------------------------------- */
@@ -2208,7 +2214,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2208 2214
2209 case BC_FUNCF: 2215 case BC_FUNCF:
2210#if LJ_HASJIT 2216#if LJ_HASJIT
2211 dasm_put(Dst, 14035, HOTCOUNT_PCMASK, GG_DISP2HOT); 2217 dasm_put(Dst, 14037, HOTCOUNT_PCMASK, GG_DISP2HOT);
2212#endif 2218#endif
2213 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2219 case BC_FUNCV: /* NYI: compiled vararg functions. */
2214 break; 2220 break;
@@ -2218,13 +2224,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2218 break; 2224 break;
2219#endif 2225#endif
2220 case BC_IFUNCF: 2226 case BC_IFUNCF:
2221 dasm_put(Dst, 14056, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2227 dasm_put(Dst, 14058, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2222 if (op == BC_JFUNCF) { 2228 if (op == BC_JFUNCF) {
2223 dasm_put(Dst, 14086, BC_JLOOP); 2229 dasm_put(Dst, 14088, BC_JLOOP);
2224 } else { 2230 } else {
2225 dasm_put(Dst, 9639); 2231 dasm_put(Dst, 9641);
2226 } 2232 }
2227 dasm_put(Dst, 14095, LJ_TNIL); 2233 dasm_put(Dst, 14097, LJ_TNIL);
2228 break; 2234 break;
2229 2235
2230 case BC_JFUNCV: 2236 case BC_JFUNCV:
@@ -2235,30 +2241,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2235 break; /* NYI: compiled vararg functions. */ 2241 break; /* NYI: compiled vararg functions. */
2236 2242
2237 case BC_IFUNCV: 2243 case BC_IFUNCV:
2238 dasm_put(Dst, 14117, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2244 dasm_put(Dst, 14119, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2239 if (op == BC_JFUNCV) { 2245 if (op == BC_JFUNCV) {
2240 dasm_put(Dst, 14086, BC_JLOOP); 2246 dasm_put(Dst, 14088, BC_JLOOP);
2241 } else { 2247 } else {
2242 dasm_put(Dst, 14208, -4+PC2PROTO(k)); 2248 dasm_put(Dst, 14210, -4+PC2PROTO(k));
2243 } 2249 }
2244 dasm_put(Dst, 14231, LJ_TNIL); 2250 dasm_put(Dst, 14233, LJ_TNIL);
2245 break; 2251 break;
2246 2252
2247 case BC_FUNCC: 2253 case BC_FUNCC:
2248 case BC_FUNCCW: 2254 case BC_FUNCCW:
2249 dasm_put(Dst, 14253, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2255 dasm_put(Dst, 14255, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2250 if (op == BC_FUNCC) { 2256 if (op == BC_FUNCC) {
2251 dasm_put(Dst, 14283); 2257 dasm_put(Dst, 14285);
2252 } else { 2258 } else {
2253 dasm_put(Dst, 14287); 2259 dasm_put(Dst, 14289);
2254 } 2260 }
2255 dasm_put(Dst, 14295, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2261 dasm_put(Dst, 14297, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2256 if (op == BC_FUNCC) { 2262 if (op == BC_FUNCC) {
2257 dasm_put(Dst, 14304); 2263 dasm_put(Dst, 14306);
2258 } else { 2264 } else {
2259 dasm_put(Dst, 14308, DISPATCH_GL(wrapf)); 2265 dasm_put(Dst, 14310, DISPATCH_GL(wrapf));
2260 } 2266 }
2261 dasm_put(Dst, 14313, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2267 dasm_put(Dst, 14315, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2262 break; 2268 break;
2263 2269
2264 /* ---------------------------------------------------------------------- */ 2270 /* ---------------------------------------------------------------------- */
@@ -2286,7 +2292,7 @@ static int build_backend(BuildCtx *ctx)
2286 2292
2287 build_subroutines(ctx, cmov, sse); 2293 build_subroutines(ctx, cmov, sse);
2288 2294
2289 dasm_put(Dst, 14338); 2295 dasm_put(Dst, 14340);
2290 for (op = 0; op < BC__MAX; op++) 2296 for (op = 0; op < BC__MAX; op++)
2291 build_ins(ctx, (BCOp)op, op, cmov, sse); 2297 build_ins(ctx, (BCOp)op, op, cmov, sse);
2292 2298
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index e88039b9..9666dfca 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -3428,6 +3428,9 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
3428 | sub rsp, rax 3428 | sub rsp, rax
3429 |.else 3429 |.else
3430 | sub esp, CCSTATE->spadj 3430 | sub esp, CCSTATE->spadj
3431#if LJ_TARGET_WINDOWS
3432 | mov CCSTATE->spadj, esp
3433#endif
3431 |.endif 3434 |.endif
3432 | 3435 |
3433 | // Copy stack slots. 3436 | // Copy stack slots.
@@ -3494,6 +3497,9 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
3494 |6: 3497 |6:
3495 | fstp dword CCSTATE->fpr[0].f[0] 3498 | fstp dword CCSTATE->fpr[0].f[0]
3496 |7: 3499 |7:
3500#if LJ_TARGET_WINDOWS
3501 | sub CCSTATE->spadj, esp
3502#endif
3497 |.endif 3503 |.endif
3498 | 3504 |
3499 |.if X64 3505 |.if X64
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index 4d1aa660..ef8ba886 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[15684] = { 15static const unsigned char build_actionlist[15694] = {
16 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141, 16 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141,
17 76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36, 17 76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,
18 20,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237,15, 18 20,252,247,198,237,15,132,244,13,248,14,129,252,246,239,252,247,198,237,15,
@@ -533,149 +533,150 @@ static const unsigned char build_actionlist[15684] = {
533 244,248,217,201,248,2,221,216,195,255,248,155,156,90,137,209,129,252,242, 533 244,248,217,201,248,2,221,216,195,255,248,155,156,90,137,209,129,252,242,
534 0,0,32,0,82,157,156,90,49,192,57,209,15,132,244,247,139,68,36,4,87,83,15, 534 0,0,32,0,82,157,156,90,49,192,57,209,15,132,244,247,139,68,36,4,87,83,15,
535 162,139,124,36,16,137,7,137,95,4,137,79,8,137,87,12,91,95,248,1,195,248,156, 535 162,139,124,36,16,137,7,137,95,4,137,79,8,137,87,12,91,95,248,1,195,248,156,
536 255,85,137,229,83,137,203,43,163,233,15,182,139,233,131,252,233,1,15,136, 536 255,85,137,229,83,137,203,43,163,233,255,137,163,233,255,15,182,139,233,131,
537 244,248,248,1,139,132,253,139,233,137,4,140,131,252,233,1,15,137,244,1,248, 537 252,233,1,15,136,244,248,248,1,139,132,253,139,233,137,4,140,131,252,233,
538 2,139,139,233,139,147,233,252,255,147,233,137,131,233,137,147,233,128,187, 538 1,15,137,244,1,248,2,139,139,233,139,147,233,252,255,147,233,137,131,233,
539 233,1,15,130,244,253,15,132,244,252,221,155,233,255,252,233,244,253,248,6, 539 137,147,233,128,187,233,1,15,130,244,253,15,132,244,252,221,155,233,252,233,
540 217,155,233,248,7,139,93,252,252,201,195,255,249,255,129,124,253,202,4,239, 540 244,253,248,6,255,217,155,233,248,7,255,41,163,233,255,139,93,252,252,201,
541 15,135,244,41,129,124,253,194,4,239,15,135,244,41,255,252,242,15,16,4,194, 541 195,255,249,255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,4,239,
542 131,198,4,102,15,46,4,202,255,221,4,202,221,4,194,131,198,4,255,223,252,233, 542 15,135,244,41,255,252,242,15,16,4,194,131,198,4,102,15,46,4,202,255,221,4,
543 221,216,255,218,252,233,223,224,158,255,15,134,244,248,255,15,131,244,248, 543 202,221,4,194,131,198,4,255,223,252,233,221,216,255,218,252,233,223,224,158,
544 255,248,1,15,183,70,252,254,141,180,253,134,233,248,2,139,6,15,182,204,15, 544 255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,70,252,254,141,180,
545 182,232,131,198,4,193,232,16,252,255,36,171,255,139,108,194,4,131,198,4,129, 545 253,134,233,248,2,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,
546 252,253,239,15,135,244,251,129,124,253,202,4,239,15,135,244,251,255,252,242, 546 36,171,255,139,108,194,4,131,198,4,129,252,253,239,15,135,244,251,129,124,
547 15,16,4,194,102,15,46,4,202,255,221,4,202,221,4,194,255,15,138,244,248,15, 547 253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,4,202,255,
548 133,244,248,255,15,138,244,248,15,132,244,247,255,248,1,15,183,70,252,254, 548 221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,15,138,244,248,
549 141,180,253,134,233,248,2,255,248,2,15,183,70,252,254,141,180,253,134,233, 549 15,132,244,247,255,248,1,15,183,70,252,254,141,180,253,134,233,248,2,255,
550 248,1,255,248,5,57,108,202,4,15,133,244,2,129,252,253,239,15,131,244,1,139, 550 248,2,15,183,70,252,254,141,180,253,134,233,248,1,255,248,5,57,108,202,4,
551 12,202,139,4,194,57,193,15,132,244,1,129,252,253,239,15,135,244,2,139,169, 551 15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193,15,
552 233,133,252,237,15,132,244,2,252,246,133,233,235,15,133,244,2,255,49,252, 552 132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,15,132,244,
553 237,255,189,1,0,0,0,255,252,233,244,45,255,252,247,208,131,198,4,129,124, 553 2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255,252,
554 253,202,4,239,15,133,244,248,139,12,202,59,12,135,255,131,198,4,129,124,253, 554 233,244,45,255,252,247,208,131,198,4,129,124,253,202,4,239,15,133,244,248,
555 202,4,239,15,135,244,248,255,252,242,15,16,4,199,102,15,46,4,202,255,221, 555 139,12,202,59,12,135,255,131,198,4,129,124,253,202,4,239,15,135,244,248,255,
556 4,202,221,4,199,255,252,247,208,131,198,4,57,68,202,4,255,139,108,194,4,131, 556 252,242,15,16,4,199,102,15,46,4,202,255,221,4,202,221,4,199,255,252,247,208,
557 198,4,129,252,253,239,255,15,131,244,247,255,15,130,244,247,255,137,108,202, 557 131,198,4,57,68,202,4,255,139,108,194,4,131,198,4,129,252,253,239,255,15,
558 4,139,44,194,137,44,202,255,15,183,70,252,254,141,180,253,134,233,248,1,139, 558 131,244,247,255,15,130,244,247,255,137,108,202,4,139,44,194,137,44,202,255,
559 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,139,108,194, 559 15,183,70,252,254,141,180,253,134,233,248,1,139,6,15,182,204,15,182,232,131,
560 4,139,4,194,137,108,202,4,137,4,202,139,6,15,182,204,15,182,232,131,198,4, 560 198,4,193,232,16,252,255,36,171,255,139,108,194,4,139,4,194,137,108,202,4,
561 193,232,16,252,255,36,171,255,49,252,237,129,124,253,194,4,239,129,213,239, 561 137,4,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,
562 137,108,202,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36, 562 255,49,252,237,129,124,253,194,4,239,129,213,239,137,108,202,4,139,6,15,182,
563 171,255,129,124,253,194,4,239,15,135,244,48,255,252,242,15,16,4,194,184,0, 563 204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,129,124,253,194,4,
564 0,0,128,102,15,110,200,102,15,112,201,81,15,87,193,252,242,15,17,4,202,255, 564 239,15,135,244,48,255,252,242,15,16,4,194,184,0,0,0,128,102,15,110,200,102,
565 221,4,194,217,224,221,28,202,255,129,124,253,194,4,239,15,133,244,248,139, 565 15,112,201,81,15,87,193,252,242,15,17,4,202,255,221,4,194,217,224,221,28,
566 4,194,255,15,87,192,252,242,15,42,128,233,248,1,252,242,15,17,4,202,255,219, 566 202,255,129,124,253,194,4,239,15,133,244,248,139,4,194,255,15,87,192,252,
567 128,233,248,1,221,28,202,255,139,6,15,182,204,15,182,232,131,198,4,193,232, 567 242,15,42,128,233,248,1,252,242,15,17,4,202,255,219,128,233,248,1,221,28,
568 16,252,255,36,171,248,2,129,124,253,194,4,239,15,133,244,50,139,12,194,137, 568 202,255,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,
569 213,232,251,1,18,255,252,242,15,42,192,137,252,234,255,137,4,36,137,252,234, 569 2,129,124,253,194,4,239,15,133,244,50,139,12,194,137,213,232,251,1,18,255,
570 219,4,36,255,15,182,78,252,253,252,233,244,1,255,15,182,252,236,15,182,192, 570 252,242,15,42,192,137,252,234,255,137,4,36,137,252,234,219,4,36,255,15,182,
571 255,129,124,253,252,234,4,239,15,135,244,46,255,252,242,15,16,4,252,234,252, 571 78,252,253,252,233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252,
572 242,15,88,4,199,255,221,4,252,234,220,4,199,255,129,124,253,252,234,4,239, 572 234,4,239,15,135,244,46,255,252,242,15,16,4,252,234,252,242,15,88,4,199,255,
573 15,135,244,47,255,252,242,15,16,4,199,252,242,15,88,4,252,234,255,221,4,199, 573 221,4,252,234,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255,252,
574 220,4,252,234,255,129,124,253,252,234,4,239,15,135,244,49,129,124,253,194, 574 242,15,16,4,199,252,242,15,88,4,252,234,255,221,4,199,220,4,252,234,255,129,
575 4,239,15,135,244,49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255,221, 575 124,253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15,135,244,49,255,
576 4,252,234,220,4,194,255,252,242,15,16,4,252,234,252,242,15,92,4,199,255,221, 576 252,242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252,234,220,4,194,255,
577 4,252,234,220,36,199,255,252,242,15,16,4,199,252,242,15,92,4,252,234,255, 577 252,242,15,16,4,252,234,252,242,15,92,4,199,255,221,4,252,234,220,36,199,
578 221,4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,242,15,92,4,194, 578 255,252,242,15,16,4,199,252,242,15,92,4,252,234,255,221,4,199,220,36,252,
579 255,221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,252,242,15,89,4, 579 234,255,252,242,15,16,4,252,234,252,242,15,92,4,194,255,221,4,252,234,220,
580 199,255,221,4,252,234,220,12,199,255,252,242,15,16,4,199,252,242,15,89,4, 580 36,194,255,252,242,15,16,4,252,234,252,242,15,89,4,199,255,221,4,252,234,
581 252,234,255,221,4,199,220,12,252,234,255,252,242,15,16,4,252,234,252,242, 581 220,12,199,255,252,242,15,16,4,199,252,242,15,89,4,252,234,255,221,4,199,
582 15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,4,252,234,252, 582 220,12,252,234,255,252,242,15,16,4,252,234,252,242,15,89,4,194,255,221,4,
583 242,15,94,4,199,255,221,4,252,234,220,52,199,255,252,242,15,16,4,199,252, 583 252,234,220,12,194,255,252,242,15,16,4,252,234,252,242,15,94,4,199,255,221,
584 242,15,94,4,252,234,255,221,4,199,220,52,252,234,255,252,242,15,16,4,252, 584 4,252,234,220,52,199,255,252,242,15,16,4,199,252,242,15,94,4,252,234,255,
585 234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255,252,242,15,16,4, 585 221,4,199,220,52,252,234,255,252,242,15,16,4,252,234,252,242,15,94,4,194,
586 252,234,252,242,15,16,12,199,255,221,4,252,234,221,4,199,255,252,242,15,16, 586 255,221,4,252,234,220,52,194,255,252,242,15,16,4,252,234,252,242,15,16,12,
587 4,199,252,242,15,16,12,252,234,255,221,4,199,221,4,252,234,255,252,242,15, 587 199,255,221,4,252,234,221,4,199,255,252,242,15,16,4,199,252,242,15,16,12,
588 16,4,252,234,252,242,15,16,12,194,255,221,4,252,234,221,4,194,255,248,157, 588 252,234,255,221,4,199,221,4,252,234,255,252,242,15,16,4,252,234,252,242,15,
589 232,244,148,255,252,233,244,157,255,232,244,107,255,15,182,252,236,15,182, 589 16,12,194,255,221,4,252,234,221,4,194,255,248,157,232,244,148,255,252,233,
590 192,141,12,194,41,232,137,76,36,4,137,68,36,8,248,33,139,108,36,48,137,44, 590 244,157,255,232,244,107,255,15,182,252,236,15,182,192,141,12,194,41,232,137,
591 36,137,149,233,137,116,36,24,232,251,1,25,139,149,233,133,192,15,133,244, 591 76,36,4,137,68,36,8,248,33,139,108,36,48,137,44,36,137,149,233,137,116,36,
592 42,15,182,110,252,255,15,182,78,252,253,139,68,252,234,4,139,44,252,234,137, 592 24,232,251,1,25,139,149,233,133,192,15,133,244,42,15,182,110,252,255,15,182,
593 68,202,4,137,44,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 593 78,252,253,139,68,252,234,4,139,44,252,234,137,68,202,4,137,44,202,139,6,
594 255,36,171,255,252,247,208,139,4,135,199,68,202,4,237,137,4,202,139,6,15, 594 15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,252,247,208,
595 182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,15,191,192,252, 595 139,4,135,199,68,202,4,237,137,4,202,139,6,15,182,204,15,182,232,131,198,
596 242,15,42,192,252,242,15,17,4,202,255,223,70,252,254,221,28,202,255,252,242, 596 4,193,232,16,252,255,36,171,255,15,191,192,252,242,15,42,192,252,242,15,17,
597 15,16,4,199,252,242,15,17,4,202,255,221,4,199,221,28,202,255,252,247,208, 597 4,202,255,223,70,252,254,221,28,202,255,252,242,15,16,4,199,252,242,15,17,
598 137,68,202,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36, 598 4,202,255,221,4,199,221,28,202,255,252,247,208,137,68,202,4,139,6,15,182,
599 171,255,141,76,202,12,141,68,194,4,189,237,137,105,252,248,248,1,137,41,131, 599 204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,141,76,202,12,141,
600 193,8,57,193,15,134,244,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16, 600 68,194,4,189,237,137,105,252,248,248,1,137,41,131,193,8,57,193,15,134,244,
601 252,255,36,171,255,139,106,252,248,139,172,253,133,233,139,173,233,139,69, 601 1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,139,
602 4,139,109,0,137,68,202,4,137,44,202,139,6,15,182,204,15,182,232,131,198,4, 602 106,252,248,139,172,253,133,233,139,173,233,139,69,4,139,109,0,137,68,202,
603 193,232,16,252,255,36,171,255,139,106,252,248,139,172,253,141,233,128,189, 603 4,137,44,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,
604 233,0,139,173,233,139,12,194,139,68,194,4,137,77,0,137,69,4,15,132,244,247, 604 171,255,139,106,252,248,139,172,253,141,233,128,189,233,0,139,173,233,139,
605 252,246,133,233,235,15,133,244,248,248,1,139,6,15,182,204,15,182,232,131, 605 12,194,139,68,194,4,137,77,0,137,69,4,15,132,244,247,252,246,133,233,235,
606 198,4,193,232,16,252,255,36,171,248,2,129,232,239,129,252,248,239,15,134, 606 15,133,244,248,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,
607 244,1,252,246,129,233,235,15,132,244,1,135,213,141,139,233,255,232,251,1, 607 255,36,171,248,2,129,232,239,129,252,248,239,15,134,244,1,252,246,129,233,
608 26,137,252,234,252,233,244,1,255,252,247,208,139,106,252,248,139,172,253, 608 235,15,132,244,1,135,213,141,139,233,255,232,251,1,26,137,252,234,252,233,
609 141,233,139,12,135,139,133,233,137,8,199,64,4,237,252,246,133,233,235,15, 609 244,1,255,252,247,208,139,106,252,248,139,172,253,141,233,139,12,135,139,
610 133,244,248,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 610 133,233,137,8,199,64,4,237,252,246,133,233,235,15,133,244,248,248,1,139,6,
611 36,171,248,2,252,246,129,233,235,15,132,244,1,128,189,233,0,15,132,244,1, 611 15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,2,252,246,129,
612 137,213,137,194,141,139,233,232,251,1,26,137,252,234,252,233,244,1,255,139, 612 233,235,15,132,244,1,128,189,233,0,15,132,244,1,137,213,137,194,141,139,233,
613 106,252,248,255,252,242,15,16,4,199,255,139,172,253,141,233,139,141,233,255, 613 232,251,1,26,137,252,234,252,233,244,1,255,139,106,252,248,255,252,242,15,
614 252,242,15,17,1,255,221,25,255,252,247,208,139,106,252,248,139,172,253,141, 614 16,4,199,255,139,172,253,141,233,139,141,233,255,252,242,15,17,1,255,221,
615 233,139,141,233,137,65,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16, 615 25,255,252,247,208,139,106,252,248,139,172,253,141,233,139,141,233,137,65,
616 252,255,36,171,255,141,180,253,134,233,139,108,36,48,131,189,233,0,15,132, 616 4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,141,
617 244,247,137,149,233,141,20,202,137,252,233,232,251,1,27,139,149,233,248,1, 617 180,253,134,233,139,108,36,48,131,189,233,0,15,132,244,247,137,149,233,141,
618 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,252,247, 618 20,202,137,252,233,232,251,1,27,139,149,233,248,1,139,6,15,182,204,15,182,
619 208,139,74,252,248,139,4,135,139,108,36,48,137,76,36,8,137,68,36,4,137,44, 619 232,131,198,4,193,232,16,252,255,36,171,255,252,247,208,139,74,252,248,139,
620 36,137,149,233,137,116,36,24,232,251,1,28,139,149,233,15,182,78,252,253,137, 620 4,135,139,108,36,48,137,76,36,8,137,68,36,4,137,44,36,137,149,233,137,116,
621 4,202,199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 621 36,24,232,251,1,28,139,149,233,15,182,78,252,253,137,4,202,199,68,202,4,237,
622 255,36,171,255,139,108,36,48,137,149,233,139,139,233,59,139,233,137,116,36, 622 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,139,108,
623 24,15,131,244,251,248,1,137,193,37,252,255,7,0,0,193,252,233,11,137,76,36, 623 36,48,137,149,233,139,139,233,59,139,233,137,116,36,24,15,131,244,251,248,
624 8,61,252,255,7,0,0,15,132,244,249,248,2,137,44,36,137,68,36,4,232,251,1,29, 624 1,137,193,37,252,255,7,0,0,193,252,233,11,137,76,36,8,61,252,255,7,0,0,15,
625 139,149,233,15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204, 625 132,244,249,248,2,137,44,36,137,68,36,4,232,251,1,29,139,149,233,15,182,78,
626 15,182,232,131,198,4,193,232,16,252,255,36,171,248,3,184,1,8,0,0,252,233, 626 252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,
627 244,2,248,5,137,252,233,232,251,1,30,15,183,70,252,254,252,233,244,1,255, 627 193,232,16,252,255,36,171,248,3,184,1,8,0,0,252,233,244,2,248,5,137,252,233,
628 252,247,208,139,108,36,48,139,139,233,137,116,36,24,59,139,233,137,149,233, 628 232,251,1,30,15,183,70,252,254,252,233,244,1,255,252,247,208,139,108,36,48,
629 15,131,244,249,248,2,139,20,135,137,252,233,232,251,1,31,139,149,233,15,182, 629 139,139,233,137,116,36,24,59,139,233,137,149,233,15,131,244,249,248,2,139,
630 78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182,232,131,198, 630 20,135,137,252,233,232,251,1,31,139,149,233,15,182,78,252,253,137,4,202,199,
631 4,193,232,16,252,255,36,171,248,3,137,252,233,232,251,1,30,15,183,70,252, 631 68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,
632 254,252,247,208,252,233,244,2,255,252,247,208,139,106,252,248,139,173,233, 632 171,248,3,137,252,233,232,251,1,30,15,183,70,252,254,252,247,208,252,233,
633 139,4,135,252,233,244,158,255,252,247,208,139,106,252,248,139,173,233,139, 633 244,2,255,252,247,208,139,106,252,248,139,173,233,139,4,135,252,233,244,158,
634 4,135,252,233,244,159,255,15,182,252,236,15,182,192,129,124,253,252,234,4, 634 255,252,247,208,139,106,252,248,139,173,233,139,4,135,252,233,244,159,255,
635 239,15,133,244,36,139,44,252,234,129,124,253,194,4,239,15,135,244,251,255, 635 15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,36,139,44,
636 252,242,15,16,4,194,252,242,15,45,192,252,242,15,42,200,102,15,46,193,255, 636 252,234,129,124,253,194,4,239,15,135,244,251,255,252,242,15,16,4,194,252,
637 221,4,194,219,20,36,219,4,36,255,15,133,244,36,59,133,233,15,131,244,36,193, 637 242,15,45,192,252,242,15,42,200,102,15,46,193,255,221,4,194,219,20,36,219,
638 224,3,3,133,233,129,120,253,4,239,15,132,244,248,139,40,139,64,4,137,44,202, 638 4,36,255,15,133,244,36,59,133,233,15,131,244,36,193,224,3,3,133,233,129,120,
639 137,68,202,4,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 639 253,4,239,15,132,244,248,139,40,139,64,4,137,44,202,137,68,202,4,248,1,139,
640 36,171,248,2,131,189,233,0,15,132,244,249,139,141,233,252,246,129,233,235, 640 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,2,131,189,
641 15,132,244,36,15,182,78,252,253,248,3,255,199,68,202,4,237,252,233,244,1, 641 233,0,15,132,244,249,139,141,233,252,246,129,233,235,15,132,244,36,15,182,
642 248,5,129,124,253,194,4,239,15,133,244,36,139,4,194,252,233,244,158,255,15, 642 78,252,253,248,3,255,199,68,202,4,237,252,233,244,1,248,5,129,124,253,194,
643 182,252,236,15,182,192,252,247,208,139,4,135,129,124,253,252,234,4,239,15, 643 4,239,15,133,244,36,139,4,194,252,233,244,158,255,15,182,252,236,15,182,192,
644 133,244,34,139,44,252,234,248,158,139,141,233,35,136,233,105,201,239,3,141, 644 252,247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,34,139,44,252,
645 233,248,1,129,185,233,239,15,133,244,250,57,129,233,15,133,244,250,129,121, 645 234,248,158,139,141,233,35,136,233,105,201,239,3,141,233,248,1,129,185,233,
646 253,4,239,15,132,244,251,15,182,70,252,253,139,41,139,73,4,137,44,194,137, 646 239,15,133,244,250,57,129,233,15,133,244,250,129,121,253,4,239,15,132,244,
647 76,194,4,248,2,255,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 647 251,15,182,70,252,253,139,41,139,73,4,137,44,194,137,76,194,4,248,2,255,139,
648 36,171,248,3,15,182,70,252,253,199,68,194,4,237,252,233,244,2,248,4,139,137, 648 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,3,15,182,
649 233,133,201,15,133,244,1,248,5,139,141,233,133,201,15,132,244,3,252,246,129, 649 70,252,253,199,68,194,4,237,252,233,244,2,248,4,139,137,233,133,201,15,133,
650 233,235,15,133,244,3,252,233,244,34,255,15,182,252,236,15,182,192,129,124, 650 244,1,248,5,139,141,233,133,201,15,132,244,3,252,246,129,233,235,15,133,244,
651 253,252,234,4,239,15,133,244,35,139,44,252,234,59,133,233,15,131,244,35,193, 651 3,252,233,244,34,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,
652 224,3,3,133,233,129,120,253,4,239,15,132,244,248,139,40,139,64,4,137,44,202, 652 15,133,244,35,139,44,252,234,59,133,233,15,131,244,35,193,224,3,3,133,233,
653 137,68,202,4,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 653 129,120,253,4,239,15,132,244,248,139,40,139,64,4,137,44,202,137,68,202,4,
654 36,171,248,2,131,189,233,0,15,132,244,249,139,141,233,252,246,129,233,235, 654 248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,
655 15,132,244,35,255,15,182,78,252,253,248,3,199,68,202,4,237,252,233,244,1, 655 2,131,189,233,0,15,132,244,249,139,141,233,252,246,129,233,235,15,132,244,
656 255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,39,139, 656 35,255,15,182,78,252,253,248,3,199,68,202,4,237,252,233,244,1,255,15,182,
657 44,252,234,129,124,253,194,4,239,15,135,244,251,255,15,133,244,39,59,133, 657 252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,39,139,44,252,234,
658 233,15,131,244,39,193,224,3,3,133,233,129,120,253,4,239,15,132,244,249,248, 658 129,124,253,194,4,239,15,135,244,251,255,15,133,244,39,59,133,233,15,131,
659 1,252,246,133,233,235,15,133,244,253,248,2,139,108,202,4,139,12,202,137,104, 659 244,39,193,224,3,3,133,233,129,120,253,4,239,15,132,244,249,248,1,252,246,
660 4,137,8,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248, 660 133,233,235,15,133,244,253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,
661 3,131,189,233,0,15,132,244,1,139,141,233,255,252,246,129,233,235,15,132,244, 661 139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,3,131,
662 39,15,182,78,252,253,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244, 662 189,233,0,15,132,244,1,139,141,233,255,252,246,129,233,235,15,132,244,39,
663 39,139,4,194,252,233,244,159,248,7,128,165,233,235,139,139,233,137,171,233, 663 15,182,78,252,253,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244,39,
664 137,141,233,15,182,78,252,253,252,233,244,2,255,15,182,252,236,15,182,192, 664 139,4,194,252,233,244,159,248,7,128,165,233,235,139,139,233,137,171,233,137,
665 252,247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,37,139,44,252, 665 141,233,15,182,78,252,253,252,233,244,2,255,15,182,252,236,15,182,192,252,
666 234,248,159,139,141,233,35,136,233,105,201,239,198,133,233,0,3,141,233,248, 666 247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,37,139,44,252,234,
667 1,129,185,233,239,15,133,244,251,57,129,233,15,133,244,251,129,121,253,4, 667 248,159,139,141,233,35,136,233,105,201,239,198,133,233,0,3,141,233,248,1,
668 239,15,132,244,250,248,2,255,252,246,133,233,235,15,133,244,253,248,3,15, 668 129,185,233,239,15,133,244,251,57,129,233,15,133,244,251,129,121,253,4,239,
669 182,70,252,253,139,108,194,4,139,4,194,137,105,4,137,1,139,6,15,182,204,15, 669 15,132,244,250,248,2,255,252,246,133,233,235,15,133,244,253,248,3,15,182,
670 182,232,131,198,4,193,232,16,252,255,36,171,248,4,131,189,233,0,15,132,244, 670 70,252,253,139,108,194,4,139,4,194,137,105,4,137,1,139,6,15,182,204,15,182,
671 2,137,76,36,16,139,141,233,252,246,129,233,235,15,132,244,37,139,76,36,16, 671 232,131,198,4,193,232,16,252,255,36,171,248,4,131,189,233,0,15,132,244,2,
672 252,233,244,2,248,5,139,137,233,133,201,15,133,244,1,255,139,141,233,133, 672 137,76,36,16,139,141,233,252,246,129,233,235,15,132,244,37,139,76,36,16,252,
673 201,15,132,244,252,252,246,129,233,235,15,132,244,37,248,6,137,68,36,16,199, 673 233,244,2,248,5,139,137,233,133,201,15,133,244,1,255,139,141,233,133,201,
674 68,36,20,237,137,108,36,12,141,68,36,16,137,108,36,4,139,108,36,48,137,68, 674 15,132,244,252,252,246,129,233,235,15,132,244,37,248,6,137,68,36,16,199,68,
675 36,8,137,44,36,137,149,233,137,116,36,24,232,251,1,32,139,149,233,139,108, 675 36,20,237,137,108,36,12,141,68,36,16,137,108,36,4,139,108,36,48,137,68,36,
676 36,12,137,193,252,233,244,2,248,7,128,165,233,235,139,131,233,137,171,233, 676 8,137,44,36,137,149,233,137,116,36,24,232,251,1,32,139,149,233,139,108,36,
677 137,133,233,252,233,244,3,255,15,182,252,236,15,182,192,129,124,253,252,234, 677 12,137,193,252,233,244,2,248,7,128,165,233,235,139,131,233,137,171,233,137,
678 4,239,15,133,244,38,139,44,252,234,59,133,233,15,131,244,38,193,224,3,3,133, 678 133,233,252,233,244,3,255,15,182,252,236,15,182,192,129,124,253,252,234,4,
679 239,15,133,244,38,139,44,252,234,59,133,233,15,131,244,38,193,224,3,3,133,
679 233,129,120,253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244, 680 233,129,120,253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244,
680 253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,139,6,15,182,204,15,182, 681 253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,139,6,15,182,204,15,182,
681 232,131,198,4,193,232,16,252,255,36,171,248,3,131,189,233,0,15,132,244,1, 682 232,131,198,4,193,232,16,252,255,36,171,248,3,131,189,233,0,15,132,244,1,
@@ -1571,8 +1572,16 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1571 dasm_put(Dst, 10731); 1572 dasm_put(Dst, 10731);
1572#if LJ_HASFFI 1573#if LJ_HASFFI
1573#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) 1574#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V)
1574 dasm_put(Dst, 10787, DtE(->spadj), DtE(->nsp), offsetof(CCallState, stack), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->func), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->resx87), DtE(->fpr[0].d[0])); 1575 dasm_put(Dst, 10787, DtE(->spadj));
1575 dasm_put(Dst, 10860, DtE(->fpr[0].f[0])); 1576#if LJ_TARGET_WINDOWS
1577 dasm_put(Dst, 10797, DtE(->spadj));
1578#endif
1579 dasm_put(Dst, 10801, DtE(->nsp), offsetof(CCallState, stack), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->func), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->resx87), DtE(->fpr[0].d[0]));
1580 dasm_put(Dst, 10871, DtE(->fpr[0].f[0]));
1581#if LJ_TARGET_WINDOWS
1582 dasm_put(Dst, 10877, DtE(->spadj));
1583#endif
1584 dasm_put(Dst, 10881);
1576#endif 1585#endif
1577} 1586}
1578 1587
@@ -1580,7 +1589,7 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
1580static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) 1589static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1581{ 1590{
1582 int vk = 0; 1591 int vk = 0;
1583 dasm_put(Dst, 10878, defop); 1592 dasm_put(Dst, 10888, defop);
1584 1593
1585 switch (op) { 1594 switch (op) {
1586 1595
@@ -1589,20 +1598,20 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1589 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 1598 /* Remember: all ops branch for a true comparison, fall through otherwise. */
1590 1599
1591 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 1600 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
1592 dasm_put(Dst, 10880, LJ_TISNUM, LJ_TISNUM); 1601 dasm_put(Dst, 10890, LJ_TISNUM, LJ_TISNUM);
1593 if (sse) { 1602 if (sse) {
1594 dasm_put(Dst, 10901); 1603 dasm_put(Dst, 10911);
1595 } else { 1604 } else {
1596 dasm_put(Dst, 10916);
1597 if (cmov) {
1598 dasm_put(Dst, 10926); 1605 dasm_put(Dst, 10926);
1606 if (cmov) {
1607 dasm_put(Dst, 10936);
1599 } else { 1608 } else {
1600 dasm_put(Dst, 10932); 1609 dasm_put(Dst, 10942);
1601 } 1610 }
1602 } 1611 }
1603 switch (op) { 1612 switch (op) {
1604 case BC_ISLT: 1613 case BC_ISLT:
1605 dasm_put(Dst, 10939); 1614 dasm_put(Dst, 10949);
1606 break; 1615 break;
1607 case BC_ISGE: 1616 case BC_ISGE:
1608 dasm_put(Dst, 10081); 1617 dasm_put(Dst, 10081);
@@ -1611,615 +1620,615 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
1611 dasm_put(Dst, 6207); 1620 dasm_put(Dst, 6207);
1612 break; 1621 break;
1613 case BC_ISGT: 1622 case BC_ISGT:
1614 dasm_put(Dst, 10944); 1623 dasm_put(Dst, 10954);
1615 break; 1624 break;
1616 default: break; /* Shut up GCC. */ 1625 default: break; /* Shut up GCC. */
1617 } 1626 }
1618 dasm_put(Dst, 10949, -BCBIAS_J*4); 1627 dasm_put(Dst, 10959, -BCBIAS_J*4);
1619 break; 1628 break;
1620 1629
1621 case BC_ISEQV: case BC_ISNEV: 1630 case BC_ISEQV: case BC_ISNEV:
1622 vk = op == BC_ISEQV; 1631 vk = op == BC_ISEQV;
1623 dasm_put(Dst, 10982, LJ_TISNUM, LJ_TISNUM); 1632 dasm_put(Dst, 10992, LJ_TISNUM, LJ_TISNUM);
1624 if (sse) { 1633 if (sse) {
1625 dasm_put(Dst, 11008); 1634 dasm_put(Dst, 11018);
1626 } else { 1635 } else {
1627 dasm_put(Dst, 11020); 1636 dasm_put(Dst, 11030);
1628 if (cmov) { 1637 if (cmov) {
1629 dasm_put(Dst, 10926); 1638 dasm_put(Dst, 10936);
1630 } else { 1639 } else {
1631 dasm_put(Dst, 10932); 1640 dasm_put(Dst, 10942);
1632 } 1641 }
1633 } 1642 }
1634 iseqne_fp: 1643 iseqne_fp:
1635 if (vk) { 1644 if (vk) {
1636 dasm_put(Dst, 11027); 1645 dasm_put(Dst, 11037);
1637 } else { 1646 } else {
1638 dasm_put(Dst, 11036); 1647 dasm_put(Dst, 11046);
1639 } 1648 }
1640 iseqne_end: 1649 iseqne_end:
1641 if (vk) { 1650 if (vk) {
1642 dasm_put(Dst, 11045, -BCBIAS_J*4); 1651 dasm_put(Dst, 11055, -BCBIAS_J*4);
1643 } else { 1652 } else {
1644 dasm_put(Dst, 11060, -BCBIAS_J*4); 1653 dasm_put(Dst, 11070, -BCBIAS_J*4);
1645 } 1654 }
1646 dasm_put(Dst, 10963); 1655 dasm_put(Dst, 10973);
1647 if (op == BC_ISEQV || op == BC_ISNEV) { 1656 if (op == BC_ISEQV || op == BC_ISNEV) {
1648 dasm_put(Dst, 11075, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq); 1657 dasm_put(Dst, 11085, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<<MM_eq);
1649 if (vk) { 1658 if (vk) {
1650 dasm_put(Dst, 11133); 1659 dasm_put(Dst, 11143);
1651 } else { 1660 } else {
1652 dasm_put(Dst, 11137); 1661 dasm_put(Dst, 11147);
1653 } 1662 }
1654 dasm_put(Dst, 11143); 1663 dasm_put(Dst, 11153);
1655 } 1664 }
1656 break; 1665 break;
1657 case BC_ISEQS: case BC_ISNES: 1666 case BC_ISEQS: case BC_ISNES:
1658 vk = op == BC_ISEQS; 1667 vk = op == BC_ISEQS;
1659 dasm_put(Dst, 11148, LJ_TSTR); 1668 dasm_put(Dst, 11158, LJ_TSTR);
1660 iseqne_test: 1669 iseqne_test:
1661 if (vk) { 1670 if (vk) {
1662 dasm_put(Dst, 11031); 1671 dasm_put(Dst, 11041);
1663 } else { 1672 } else {
1664 dasm_put(Dst, 2829); 1673 dasm_put(Dst, 2829);
1665 } 1674 }
1666 goto iseqne_end; 1675 goto iseqne_end;
1667 case BC_ISEQN: case BC_ISNEN: 1676 case BC_ISEQN: case BC_ISNEN:
1668 vk = op == BC_ISEQN; 1677 vk = op == BC_ISEQN;
1669 dasm_put(Dst, 11171, LJ_TISNUM); 1678 dasm_put(Dst, 11181, LJ_TISNUM);
1670 if (sse) { 1679 if (sse) {
1671 dasm_put(Dst, 11185); 1680 dasm_put(Dst, 11195);
1672 } else { 1681 } else {
1673 dasm_put(Dst, 11197); 1682 dasm_put(Dst, 11207);
1674 if (cmov) { 1683 if (cmov) {
1675 dasm_put(Dst, 10926); 1684 dasm_put(Dst, 10936);
1676 } else { 1685 } else {
1677 dasm_put(Dst, 10932); 1686 dasm_put(Dst, 10942);
1678 } 1687 }
1679 } 1688 }
1680 goto iseqne_fp; 1689 goto iseqne_fp;
1681 case BC_ISEQP: case BC_ISNEP: 1690 case BC_ISEQP: case BC_ISNEP:
1682 vk = op == BC_ISEQP; 1691 vk = op == BC_ISEQP;
1683 dasm_put(Dst, 11204); 1692 dasm_put(Dst, 11214);
1684 goto iseqne_test; 1693 goto iseqne_test;
1685 1694
1686 /* -- Unary test and copy ops ------------------------------------------- */ 1695 /* -- Unary test and copy ops ------------------------------------------- */
1687 1696
1688 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 1697 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
1689 dasm_put(Dst, 11215, LJ_TISTRUECOND); 1698 dasm_put(Dst, 11225, LJ_TISTRUECOND);
1690 if (op == BC_IST || op == BC_ISTC) { 1699 if (op == BC_IST || op == BC_ISTC) {
1691 dasm_put(Dst, 11227); 1700 dasm_put(Dst, 11237);
1692 } else { 1701 } else {
1693 dasm_put(Dst, 11232); 1702 dasm_put(Dst, 11242);
1694 } 1703 }
1695 if (op == BC_ISTC || op == BC_ISFC) { 1704 if (op == BC_ISTC || op == BC_ISFC) {
1696 dasm_put(Dst, 11237); 1705 dasm_put(Dst, 11247);
1697 } 1706 }
1698 dasm_put(Dst, 11248, -BCBIAS_J*4); 1707 dasm_put(Dst, 11258, -BCBIAS_J*4);
1699 break; 1708 break;
1700 1709
1701 /* -- Unary ops --------------------------------------------------------- */ 1710 /* -- Unary ops --------------------------------------------------------- */
1702 1711
1703 case BC_MOV: 1712 case BC_MOV:
1704 dasm_put(Dst, 11279); 1713 dasm_put(Dst, 11289);
1705 break; 1714 break;
1706 case BC_NOT: 1715 case BC_NOT:
1707 dasm_put(Dst, 11312, LJ_TISTRUECOND, LJ_TTRUE); 1716 dasm_put(Dst, 11322, LJ_TISTRUECOND, LJ_TTRUE);
1708 break; 1717 break;
1709 case BC_UNM: 1718 case BC_UNM:
1710 dasm_put(Dst, 11347, LJ_TISNUM); 1719 dasm_put(Dst, 11357, LJ_TISNUM);
1711 if (sse) { 1720 if (sse) {
1712 dasm_put(Dst, 11358); 1721 dasm_put(Dst, 11368);
1713 } else { 1722 } else {
1714 dasm_put(Dst, 11388); 1723 dasm_put(Dst, 11398);
1715 } 1724 }
1716 dasm_put(Dst, 10963); 1725 dasm_put(Dst, 10973);
1717 break; 1726 break;
1718 case BC_LEN: 1727 case BC_LEN:
1719 dasm_put(Dst, 11397, LJ_TSTR); 1728 dasm_put(Dst, 11407, LJ_TSTR);
1720 if (sse) { 1729 if (sse) {
1721 dasm_put(Dst, 11411, Dt5(->len)); 1730 dasm_put(Dst, 11421, Dt5(->len));
1722 } else { 1731 } else {
1723 dasm_put(Dst, 11429, Dt5(->len)); 1732 dasm_put(Dst, 11439, Dt5(->len));
1724 } 1733 }
1725 dasm_put(Dst, 11438, LJ_TTAB); 1734 dasm_put(Dst, 11448, LJ_TTAB);
1726 if (sse) { 1735 if (sse) {
1727 dasm_put(Dst, 11478); 1736 dasm_put(Dst, 11488);
1728 } else { 1737 } else {
1729 dasm_put(Dst, 11487); 1738 dasm_put(Dst, 11497);
1730 } 1739 }
1731 dasm_put(Dst, 11497); 1740 dasm_put(Dst, 11507);
1732 break; 1741 break;
1733 1742
1734 /* -- Binary ops -------------------------------------------------------- */ 1743 /* -- Binary ops -------------------------------------------------------- */
1735 1744
1736 1745
1737 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 1746 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
1738 dasm_put(Dst, 11507); 1747 dasm_put(Dst, 11517);
1739 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1748 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1740 switch (vk) { 1749 switch (vk) {
1741 case 0: 1750 case 0:
1742 dasm_put(Dst, 11515, LJ_TISNUM); 1751 dasm_put(Dst, 11525, LJ_TISNUM);
1743 if (sse) { 1752 if (sse) {
1744 dasm_put(Dst, 11527); 1753 dasm_put(Dst, 11537);
1745 } else { 1754 } else {
1746 dasm_put(Dst, 11541); 1755 dasm_put(Dst, 11551);
1747 } 1756 }
1748 break; 1757 break;
1749 case 1: 1758 case 1:
1750 dasm_put(Dst, 11549, LJ_TISNUM); 1759 dasm_put(Dst, 11559, LJ_TISNUM);
1751 if (sse) { 1760 if (sse) {
1752 dasm_put(Dst, 11561); 1761 dasm_put(Dst, 11571);
1753 } else { 1762 } else {
1754 dasm_put(Dst, 11575); 1763 dasm_put(Dst, 11585);
1755 } 1764 }
1756 break; 1765 break;
1757 default: 1766 default:
1758 dasm_put(Dst, 11583, LJ_TISNUM, LJ_TISNUM); 1767 dasm_put(Dst, 11593, LJ_TISNUM, LJ_TISNUM);
1759 if (sse) { 1768 if (sse) {
1760 dasm_put(Dst, 11605); 1769 dasm_put(Dst, 11615);
1761 } else { 1770 } else {
1762 dasm_put(Dst, 11619); 1771 dasm_put(Dst, 11629);
1763 } 1772 }
1764 break; 1773 break;
1765 } 1774 }
1766 if (sse) { 1775 if (sse) {
1767 dasm_put(Dst, 11381); 1776 dasm_put(Dst, 11391);
1768 } else { 1777 } else {
1769 dasm_put(Dst, 11393); 1778 dasm_put(Dst, 11403);
1770 } 1779 }
1771 dasm_put(Dst, 10963); 1780 dasm_put(Dst, 10973);
1772 break; 1781 break;
1773 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 1782 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
1774 dasm_put(Dst, 11507); 1783 dasm_put(Dst, 11517);
1775 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1784 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1776 switch (vk) { 1785 switch (vk) {
1777 case 0: 1786 case 0:
1778 dasm_put(Dst, 11515, LJ_TISNUM); 1787 dasm_put(Dst, 11525, LJ_TISNUM);
1779 if (sse) { 1788 if (sse) {
1780 dasm_put(Dst, 11627); 1789 dasm_put(Dst, 11637);
1781 } else { 1790 } else {
1782 dasm_put(Dst, 11641); 1791 dasm_put(Dst, 11651);
1783 } 1792 }
1784 break; 1793 break;
1785 case 1: 1794 case 1:
1786 dasm_put(Dst, 11549, LJ_TISNUM); 1795 dasm_put(Dst, 11559, LJ_TISNUM);
1787 if (sse) { 1796 if (sse) {
1788 dasm_put(Dst, 11649); 1797 dasm_put(Dst, 11659);
1789 } else { 1798 } else {
1790 dasm_put(Dst, 11663); 1799 dasm_put(Dst, 11673);
1791 } 1800 }
1792 break; 1801 break;
1793 default: 1802 default:
1794 dasm_put(Dst, 11583, LJ_TISNUM, LJ_TISNUM); 1803 dasm_put(Dst, 11593, LJ_TISNUM, LJ_TISNUM);
1795 if (sse) { 1804 if (sse) {
1796 dasm_put(Dst, 11671); 1805 dasm_put(Dst, 11681);
1797 } else { 1806 } else {
1798 dasm_put(Dst, 11685); 1807 dasm_put(Dst, 11695);
1799 } 1808 }
1800 break; 1809 break;
1801 } 1810 }
1802 if (sse) { 1811 if (sse) {
1803 dasm_put(Dst, 11381); 1812 dasm_put(Dst, 11391);
1804 } else { 1813 } else {
1805 dasm_put(Dst, 11393); 1814 dasm_put(Dst, 11403);
1806 } 1815 }
1807 dasm_put(Dst, 10963); 1816 dasm_put(Dst, 10973);
1808 break; 1817 break;
1809 case BC_MULVN: case BC_MULNV: case BC_MULVV: 1818 case BC_MULVN: case BC_MULNV: case BC_MULVV:
1810 dasm_put(Dst, 11507); 1819 dasm_put(Dst, 11517);
1811 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1820 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1812 switch (vk) { 1821 switch (vk) {
1813 case 0: 1822 case 0:
1814 dasm_put(Dst, 11515, LJ_TISNUM); 1823 dasm_put(Dst, 11525, LJ_TISNUM);
1815 if (sse) { 1824 if (sse) {
1816 dasm_put(Dst, 11693); 1825 dasm_put(Dst, 11703);
1817 } else { 1826 } else {
1818 dasm_put(Dst, 11707); 1827 dasm_put(Dst, 11717);
1819 } 1828 }
1820 break; 1829 break;
1821 case 1: 1830 case 1:
1822 dasm_put(Dst, 11549, LJ_TISNUM); 1831 dasm_put(Dst, 11559, LJ_TISNUM);
1823 if (sse) { 1832 if (sse) {
1824 dasm_put(Dst, 11715); 1833 dasm_put(Dst, 11725);
1825 } else { 1834 } else {
1826 dasm_put(Dst, 11729); 1835 dasm_put(Dst, 11739);
1827 } 1836 }
1828 break; 1837 break;
1829 default: 1838 default:
1830 dasm_put(Dst, 11583, LJ_TISNUM, LJ_TISNUM); 1839 dasm_put(Dst, 11593, LJ_TISNUM, LJ_TISNUM);
1831 if (sse) { 1840 if (sse) {
1832 dasm_put(Dst, 11737); 1841 dasm_put(Dst, 11747);
1833 } else { 1842 } else {
1834 dasm_put(Dst, 11751); 1843 dasm_put(Dst, 11761);
1835 } 1844 }
1836 break; 1845 break;
1837 } 1846 }
1838 if (sse) { 1847 if (sse) {
1839 dasm_put(Dst, 11381); 1848 dasm_put(Dst, 11391);
1840 } else { 1849 } else {
1841 dasm_put(Dst, 11393); 1850 dasm_put(Dst, 11403);
1842 } 1851 }
1843 dasm_put(Dst, 10963); 1852 dasm_put(Dst, 10973);
1844 break; 1853 break;
1845 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 1854 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
1846 dasm_put(Dst, 11507); 1855 dasm_put(Dst, 11517);
1847 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1856 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1848 switch (vk) { 1857 switch (vk) {
1849 case 0: 1858 case 0:
1850 dasm_put(Dst, 11515, LJ_TISNUM); 1859 dasm_put(Dst, 11525, LJ_TISNUM);
1851 if (sse) { 1860 if (sse) {
1852 dasm_put(Dst, 11759); 1861 dasm_put(Dst, 11769);
1853 } else { 1862 } else {
1854 dasm_put(Dst, 11773); 1863 dasm_put(Dst, 11783);
1855 } 1864 }
1856 break; 1865 break;
1857 case 1: 1866 case 1:
1858 dasm_put(Dst, 11549, LJ_TISNUM); 1867 dasm_put(Dst, 11559, LJ_TISNUM);
1859 if (sse) { 1868 if (sse) {
1860 dasm_put(Dst, 11781); 1869 dasm_put(Dst, 11791);
1861 } else { 1870 } else {
1862 dasm_put(Dst, 11795); 1871 dasm_put(Dst, 11805);
1863 } 1872 }
1864 break; 1873 break;
1865 default: 1874 default:
1866 dasm_put(Dst, 11583, LJ_TISNUM, LJ_TISNUM); 1875 dasm_put(Dst, 11593, LJ_TISNUM, LJ_TISNUM);
1867 if (sse) { 1876 if (sse) {
1868 dasm_put(Dst, 11803); 1877 dasm_put(Dst, 11813);
1869 } else { 1878 } else {
1870 dasm_put(Dst, 11817); 1879 dasm_put(Dst, 11827);
1871 } 1880 }
1872 break; 1881 break;
1873 } 1882 }
1874 if (sse) { 1883 if (sse) {
1875 dasm_put(Dst, 11381); 1884 dasm_put(Dst, 11391);
1876 } else { 1885 } else {
1877 dasm_put(Dst, 11393); 1886 dasm_put(Dst, 11403);
1878 } 1887 }
1879 dasm_put(Dst, 10963); 1888 dasm_put(Dst, 10973);
1880 break; 1889 break;
1881 case BC_MODVN: 1890 case BC_MODVN:
1882 dasm_put(Dst, 11507); 1891 dasm_put(Dst, 11517);
1883 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1892 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1884 switch (vk) { 1893 switch (vk) {
1885 case 0: 1894 case 0:
1886 dasm_put(Dst, 11515, LJ_TISNUM); 1895 dasm_put(Dst, 11525, LJ_TISNUM);
1887 if (sse) { 1896 if (sse) {
1888 dasm_put(Dst, 11825); 1897 dasm_put(Dst, 11835);
1889 } else { 1898 } else {
1890 dasm_put(Dst, 11839); 1899 dasm_put(Dst, 11849);
1891 } 1900 }
1892 break; 1901 break;
1893 case 1: 1902 case 1:
1894 dasm_put(Dst, 11549, LJ_TISNUM); 1903 dasm_put(Dst, 11559, LJ_TISNUM);
1895 if (sse) { 1904 if (sse) {
1896 dasm_put(Dst, 11847); 1905 dasm_put(Dst, 11857);
1897 } else { 1906 } else {
1898 dasm_put(Dst, 11861); 1907 dasm_put(Dst, 11871);
1899 } 1908 }
1900 break; 1909 break;
1901 default: 1910 default:
1902 dasm_put(Dst, 11583, LJ_TISNUM, LJ_TISNUM); 1911 dasm_put(Dst, 11593, LJ_TISNUM, LJ_TISNUM);
1903 if (sse) { 1912 if (sse) {
1904 dasm_put(Dst, 11869); 1913 dasm_put(Dst, 11879);
1905 } else { 1914 } else {
1906 dasm_put(Dst, 11883); 1915 dasm_put(Dst, 11893);
1907 } 1916 }
1908 break; 1917 break;
1909 } 1918 }
1910 dasm_put(Dst, 11891); 1919 dasm_put(Dst, 11901);
1911 if (sse) { 1920 if (sse) {
1912 dasm_put(Dst, 11381); 1921 dasm_put(Dst, 11391);
1913 } else { 1922 } else {
1914 dasm_put(Dst, 11393); 1923 dasm_put(Dst, 11403);
1915 } 1924 }
1916 dasm_put(Dst, 10963); 1925 dasm_put(Dst, 10973);
1917 break; 1926 break;
1918 case BC_MODNV: case BC_MODVV: 1927 case BC_MODNV: case BC_MODVV:
1919 dasm_put(Dst, 11507); 1928 dasm_put(Dst, 11517);
1920 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1929 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1921 switch (vk) { 1930 switch (vk) {
1922 case 0: 1931 case 0:
1923 dasm_put(Dst, 11515, LJ_TISNUM); 1932 dasm_put(Dst, 11525, LJ_TISNUM);
1924 if (sse) { 1933 if (sse) {
1925 dasm_put(Dst, 11825); 1934 dasm_put(Dst, 11835);
1926 } else { 1935 } else {
1927 dasm_put(Dst, 11839); 1936 dasm_put(Dst, 11849);
1928 } 1937 }
1929 break; 1938 break;
1930 case 1: 1939 case 1:
1931 dasm_put(Dst, 11549, LJ_TISNUM); 1940 dasm_put(Dst, 11559, LJ_TISNUM);
1932 if (sse) { 1941 if (sse) {
1933 dasm_put(Dst, 11847); 1942 dasm_put(Dst, 11857);
1934 } else { 1943 } else {
1935 dasm_put(Dst, 11861); 1944 dasm_put(Dst, 11871);
1936 } 1945 }
1937 break; 1946 break;
1938 default: 1947 default:
1939 dasm_put(Dst, 11583, LJ_TISNUM, LJ_TISNUM); 1948 dasm_put(Dst, 11593, LJ_TISNUM, LJ_TISNUM);
1940 if (sse) { 1949 if (sse) {
1941 dasm_put(Dst, 11869); 1950 dasm_put(Dst, 11879);
1942 } else { 1951 } else {
1943 dasm_put(Dst, 11883); 1952 dasm_put(Dst, 11893);
1944 } 1953 }
1945 break; 1954 break;
1946 } 1955 }
1947 dasm_put(Dst, 11897); 1956 dasm_put(Dst, 11907);
1948 break; 1957 break;
1949 case BC_POW: 1958 case BC_POW:
1950 dasm_put(Dst, 11507); 1959 dasm_put(Dst, 11517);
1951 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 1960 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
1952 switch (vk) { 1961 switch (vk) {
1953 case 0: 1962 case 0:
1954 dasm_put(Dst, 11515, LJ_TISNUM); 1963 dasm_put(Dst, 11525, LJ_TISNUM);
1955 if (sse) { 1964 if (sse) {
1956 dasm_put(Dst, 11825); 1965 dasm_put(Dst, 11835);
1957 } else { 1966 } else {
1958 dasm_put(Dst, 11839); 1967 dasm_put(Dst, 11849);
1959 } 1968 }
1960 break; 1969 break;
1961 case 1: 1970 case 1:
1962 dasm_put(Dst, 11549, LJ_TISNUM); 1971 dasm_put(Dst, 11559, LJ_TISNUM);
1963 if (sse) { 1972 if (sse) {
1964 dasm_put(Dst, 11847); 1973 dasm_put(Dst, 11857);
1965 } else { 1974 } else {
1966 dasm_put(Dst, 11861); 1975 dasm_put(Dst, 11871);
1967 } 1976 }
1968 break; 1977 break;
1969 default: 1978 default:
1970 dasm_put(Dst, 11583, LJ_TISNUM, LJ_TISNUM); 1979 dasm_put(Dst, 11593, LJ_TISNUM, LJ_TISNUM);
1971 if (sse) { 1980 if (sse) {
1972 dasm_put(Dst, 11869); 1981 dasm_put(Dst, 11879);
1973 } else { 1982 } else {
1974 dasm_put(Dst, 11883); 1983 dasm_put(Dst, 11893);
1975 } 1984 }
1976 break; 1985 break;
1977 } 1986 }
1978 dasm_put(Dst, 11902); 1987 dasm_put(Dst, 11912);
1979 if (sse) { 1988 if (sse) {
1980 dasm_put(Dst, 11381); 1989 dasm_put(Dst, 11391);
1981 } else { 1990 } else {
1982 dasm_put(Dst, 11393); 1991 dasm_put(Dst, 11403);
1983 } 1992 }
1984 dasm_put(Dst, 10963); 1993 dasm_put(Dst, 10973);
1985 break; 1994 break;
1986 1995
1987 case BC_CAT: 1996 case BC_CAT:
1988 dasm_put(Dst, 11906, Dt1(->base), Dt1(->base)); 1997 dasm_put(Dst, 11916, Dt1(->base), Dt1(->base));
1989 break; 1998 break;
1990 1999
1991 /* -- Constant ops ------------------------------------------------------ */ 2000 /* -- Constant ops ------------------------------------------------------ */
1992 2001
1993 case BC_KSTR: 2002 case BC_KSTR:
1994 dasm_put(Dst, 12000, LJ_TSTR); 2003 dasm_put(Dst, 12010, LJ_TSTR);
1995 break; 2004 break;
1996 case BC_KCDATA: 2005 case BC_KCDATA:
1997#if LJ_HASFFI 2006#if LJ_HASFFI
1998 dasm_put(Dst, 12000, LJ_TCDATA); 2007 dasm_put(Dst, 12010, LJ_TCDATA);
1999#endif 2008#endif
2000 break; 2009 break;
2001 case BC_KSHORT: 2010 case BC_KSHORT:
2002 if (sse) { 2011 if (sse) {
2003 dasm_put(Dst, 12033); 2012 dasm_put(Dst, 12043);
2004 } else { 2013 } else {
2005 dasm_put(Dst, 12048); 2014 dasm_put(Dst, 12058);
2006 } 2015 }
2007 dasm_put(Dst, 10963); 2016 dasm_put(Dst, 10973);
2008 break; 2017 break;
2009 case BC_KNUM: 2018 case BC_KNUM:
2010 if (sse) { 2019 if (sse) {
2011 dasm_put(Dst, 12056); 2020 dasm_put(Dst, 12066);
2012 } else { 2021 } else {
2013 dasm_put(Dst, 12069); 2022 dasm_put(Dst, 12079);
2014 } 2023 }
2015 dasm_put(Dst, 10963); 2024 dasm_put(Dst, 10973);
2016 break; 2025 break;
2017 case BC_KPRI: 2026 case BC_KPRI:
2018 dasm_put(Dst, 12076); 2027 dasm_put(Dst, 12086);
2019 break; 2028 break;
2020 case BC_KNIL: 2029 case BC_KNIL:
2021 dasm_put(Dst, 12102, LJ_TNIL); 2030 dasm_put(Dst, 12112, LJ_TNIL);
2022 break; 2031 break;
2023 2032
2024 /* -- Upvalue and function ops ------------------------------------------ */ 2033 /* -- Upvalue and function ops ------------------------------------------ */
2025 2034
2026 case BC_UGET: 2035 case BC_UGET:
2027 dasm_put(Dst, 12148, offsetof(GCfuncL, uvptr), DtA(->v)); 2036 dasm_put(Dst, 12158, offsetof(GCfuncL, uvptr), DtA(->v));
2028 break; 2037 break;
2029 case BC_USETV: 2038 case BC_USETV:
2030#define TV2MARKOFS \ 2039#define TV2MARKOFS \
2031 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) 2040 ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))
2032 dasm_put(Dst, 12192, 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); 2041 dasm_put(Dst, 12202, 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);
2033 dasm_put(Dst, 12282); 2042 dasm_put(Dst, 12292);
2034 break; 2043 break;
2035#undef TV2MARKOFS 2044#undef TV2MARKOFS
2036 case BC_USETS: 2045 case BC_USETS:
2037 dasm_put(Dst, 12294, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); 2046 dasm_put(Dst, 12304, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G);
2038 break; 2047 break;
2039 case BC_USETN: 2048 case BC_USETN:
2040 dasm_put(Dst, 12385); 2049 dasm_put(Dst, 12395);
2041 if (sse) { 2050 if (sse) {
2042 dasm_put(Dst, 12390); 2051 dasm_put(Dst, 12400);
2043 } else { 2052 } else {
2044 dasm_put(Dst, 11200); 2053 dasm_put(Dst, 11210);
2045 } 2054 }
2046 dasm_put(Dst, 12397, offsetof(GCfuncL, uvptr), DtA(->v)); 2055 dasm_put(Dst, 12407, offsetof(GCfuncL, uvptr), DtA(->v));
2047 if (sse) { 2056 if (sse) {
2048 dasm_put(Dst, 12406); 2057 dasm_put(Dst, 12416);
2049 } else { 2058 } else {
2050 dasm_put(Dst, 12412); 2059 dasm_put(Dst, 12422);
2051 } 2060 }
2052 dasm_put(Dst, 10963); 2061 dasm_put(Dst, 10973);
2053 break; 2062 break;
2054 case BC_USETP: 2063 case BC_USETP:
2055 dasm_put(Dst, 12415, offsetof(GCfuncL, uvptr), DtA(->v)); 2064 dasm_put(Dst, 12425, offsetof(GCfuncL, uvptr), DtA(->v));
2056 break; 2065 break;
2057 case BC_UCLO: 2066 case BC_UCLO:
2058 dasm_put(Dst, 12452, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); 2067 dasm_put(Dst, 12462, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base));
2059 break; 2068 break;
2060 2069
2061 case BC_FNEW: 2070 case BC_FNEW:
2062 dasm_put(Dst, 12506, Dt1(->base), Dt1(->base), LJ_TFUNC); 2071 dasm_put(Dst, 12516, Dt1(->base), Dt1(->base), LJ_TFUNC);
2063 break; 2072 break;
2064 2073
2065 /* -- Table ops --------------------------------------------------------- */ 2074 /* -- Table ops --------------------------------------------------------- */
2066 2075
2067 case BC_TNEW: 2076 case BC_TNEW:
2068 dasm_put(Dst, 12577, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); 2077 dasm_put(Dst, 12587, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB);
2069 break; 2078 break;
2070 case BC_TDUP: 2079 case BC_TDUP:
2071 dasm_put(Dst, 12703, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 2080 dasm_put(Dst, 12713, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
2072 break; 2081 break;
2073 2082
2074 case BC_GGET: 2083 case BC_GGET:
2075 dasm_put(Dst, 12795, Dt7(->env)); 2084 dasm_put(Dst, 12805, Dt7(->env));
2076 break; 2085 break;
2077 case BC_GSET: 2086 case BC_GSET:
2078 dasm_put(Dst, 12813, Dt7(->env)); 2087 dasm_put(Dst, 12823, Dt7(->env));
2079 break; 2088 break;
2080 2089
2081 case BC_TGETV: 2090 case BC_TGETV:
2082 dasm_put(Dst, 12831, LJ_TTAB, LJ_TISNUM); 2091 dasm_put(Dst, 12841, LJ_TTAB, LJ_TISNUM);
2083 if (sse) { 2092 if (sse) {
2084 dasm_put(Dst, 12864); 2093 dasm_put(Dst, 12874);
2085 } else { 2094 } else {
2086 dasm_put(Dst, 12885); 2095 dasm_put(Dst, 12895);
2087 if (cmov) { 2096 if (cmov) {
2088 dasm_put(Dst, 10926); 2097 dasm_put(Dst, 10936);
2089 } else { 2098 } else {
2090 dasm_put(Dst, 10932); 2099 dasm_put(Dst, 10942);
2091 } 2100 }
2092 dasm_put(Dst, 2539); 2101 dasm_put(Dst, 2539);
2093 } 2102 }
2094 dasm_put(Dst, 12895, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2103 dasm_put(Dst, 12905, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2095 dasm_put(Dst, 12983, LJ_TNIL, LJ_TSTR); 2104 dasm_put(Dst, 12993, LJ_TNIL, LJ_TSTR);
2096 break; 2105 break;
2097 case BC_TGETS: 2106 case BC_TGETS:
2098 dasm_put(Dst, 13012, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2107 dasm_put(Dst, 13022, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2099 dasm_put(Dst, 13100, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2108 dasm_put(Dst, 13110, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2100 break; 2109 break;
2101 case BC_TGETB: 2110 case BC_TGETB:
2102 dasm_put(Dst, 13170, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2111 dasm_put(Dst, 13180, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2103 dasm_put(Dst, 13269, LJ_TNIL); 2112 dasm_put(Dst, 13279, LJ_TNIL);
2104 break; 2113 break;
2105 2114
2106 case BC_TSETV: 2115 case BC_TSETV:
2107 dasm_put(Dst, 13286, LJ_TTAB, LJ_TISNUM); 2116 dasm_put(Dst, 13296, LJ_TTAB, LJ_TISNUM);
2108 if (sse) { 2117 if (sse) {
2109 dasm_put(Dst, 12864); 2118 dasm_put(Dst, 12874);
2110 } else { 2119 } else {
2111 dasm_put(Dst, 12885); 2120 dasm_put(Dst, 12895);
2112 if (cmov) { 2121 if (cmov) {
2113 dasm_put(Dst, 10926); 2122 dasm_put(Dst, 10936);
2114 } else { 2123 } else {
2115 dasm_put(Dst, 10932); 2124 dasm_put(Dst, 10942);
2116 } 2125 }
2117 dasm_put(Dst, 2539); 2126 dasm_put(Dst, 2539);
2118 } 2127 }
2119 dasm_put(Dst, 13319, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 2128 dasm_put(Dst, 13329, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
2120 dasm_put(Dst, 13402, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2129 dasm_put(Dst, 13412, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2121 break; 2130 break;
2122 case BC_TSETS: 2131 case BC_TSETS:
2123 dasm_put(Dst, 13464, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2132 dasm_put(Dst, 13474, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2124 dasm_put(Dst, 13539, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 2133 dasm_put(Dst, 13549, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
2125 dasm_put(Dst, 13631, 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)); 2134 dasm_put(Dst, 13641, 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));
2126 break; 2135 break;
2127 case BC_TSETB: 2136 case BC_TSETB:
2128 dasm_put(Dst, 13727, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 2137 dasm_put(Dst, 13737, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
2129 dasm_put(Dst, 13825, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2138 dasm_put(Dst, 13835, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2130 break; 2139 break;
2131 2140
2132 case BC_TSETM: 2141 case BC_TSETM:
2133 dasm_put(Dst, 13871, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); 2142 dasm_put(Dst, 13881, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
2134 dasm_put(Dst, 14020, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2143 dasm_put(Dst, 14030, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2135 break; 2144 break;
2136 2145
2137 /* -- Calls and vararg handling ----------------------------------------- */ 2146 /* -- Calls and vararg handling ----------------------------------------- */
2138 2147
2139 case BC_CALL: case BC_CALLM: 2148 case BC_CALL: case BC_CALLM:
2140 dasm_put(Dst, 11511); 2149 dasm_put(Dst, 11521);
2141 if (op == BC_CALLM) { 2150 if (op == BC_CALLM) {
2142 dasm_put(Dst, 14038); 2151 dasm_put(Dst, 14048);
2143 } 2152 }
2144 dasm_put(Dst, 14043, LJ_TFUNC, Dt7(->pc)); 2153 dasm_put(Dst, 14053, LJ_TFUNC, Dt7(->pc));
2145 break; 2154 break;
2146 2155
2147 case BC_CALLMT: 2156 case BC_CALLMT:
2148 dasm_put(Dst, 14038); 2157 dasm_put(Dst, 14048);
2149 break; 2158 break;
2150 case BC_CALLT: 2159 case BC_CALLT:
2151 dasm_put(Dst, 14084, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); 2160 dasm_put(Dst, 14094, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
2152 dasm_put(Dst, 14202, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); 2161 dasm_put(Dst, 14212, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG);
2153 break; 2162 break;
2154 2163
2155 case BC_ITERC: 2164 case BC_ITERC:
2156 dasm_put(Dst, 14272, LJ_TFUNC, 2+1, Dt7(->pc)); 2165 dasm_put(Dst, 14282, LJ_TFUNC, 2+1, Dt7(->pc));
2157 break; 2166 break;
2158 2167
2159 case BC_ITERN: 2168 case BC_ITERN:
2160#if LJ_HASJIT 2169#if LJ_HASJIT
2161#endif 2170#endif
2162 dasm_put(Dst, 14352, Dt6(->asize), Dt6(->array), LJ_TNIL); 2171 dasm_put(Dst, 14362, Dt6(->asize), Dt6(->array), LJ_TNIL);
2163 if (sse) { 2172 if (sse) {
2164 dasm_put(Dst, 14398); 2173 dasm_put(Dst, 14408);
2165 } else { 2174 } else {
2166 dasm_put(Dst, 14404); 2175 dasm_put(Dst, 14414);
2167 } 2176 }
2168 dasm_put(Dst, 14410); 2177 dasm_put(Dst, 14420);
2169 if (sse) { 2178 if (sse) {
2170 dasm_put(Dst, 11381); 2179 dasm_put(Dst, 11391);
2171 } else { 2180 } else {
2172 dasm_put(Dst, 11393); 2181 dasm_put(Dst, 11403);
2173 } 2182 }
2174 dasm_put(Dst, 14429, -BCBIAS_J*4); 2183 dasm_put(Dst, 14439, -BCBIAS_J*4);
2175 if (!sse) { 2184 if (!sse) {
2176 dasm_put(Dst, 14480); 2185 dasm_put(Dst, 14490);
2177 } 2186 }
2178 dasm_put(Dst, 14486, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key.gcr), DtB(->key.it), DtB(->val.gcr), DtB(->val.it)); 2187 dasm_put(Dst, 14496, Dt6(->hmask), sizeof(Node), Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key.gcr), DtB(->key.it), DtB(->val.gcr), DtB(->val.it));
2179 dasm_put(Dst, 14561); 2188 dasm_put(Dst, 14571);
2180 break; 2189 break;
2181 2190
2182 case BC_ISNEXT: 2191 case BC_ISNEXT:
2183 dasm_put(Dst, 14569, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); 2192 dasm_put(Dst, 14579, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC);
2184 break; 2193 break;
2185 2194
2186 case BC_VARG: 2195 case BC_VARG:
2187 dasm_put(Dst, 14668, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); 2196 dasm_put(Dst, 14678, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack));
2188 dasm_put(Dst, 14832, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2197 dasm_put(Dst, 14842, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2189 break; 2198 break;
2190 2199
2191 /* -- Returns ----------------------------------------------------------- */ 2200 /* -- Returns ----------------------------------------------------------- */
2192 2201
2193 case BC_RETM: 2202 case BC_RETM:
2194 dasm_put(Dst, 14038); 2203 dasm_put(Dst, 14048);
2195 break; 2204 break;
2196 2205
2197 case BC_RET: case BC_RET0: case BC_RET1: 2206 case BC_RET: case BC_RET0: case BC_RET1:
2198 if (op != BC_RET0) { 2207 if (op != BC_RET0) {
2199 dasm_put(Dst, 14903); 2208 dasm_put(Dst, 14913);
2200 } 2209 }
2201 dasm_put(Dst, 14907, FRAME_TYPE); 2210 dasm_put(Dst, 14917, FRAME_TYPE);
2202 switch (op) { 2211 switch (op) {
2203 case BC_RET: 2212 case BC_RET:
2204 dasm_put(Dst, 14926); 2213 dasm_put(Dst, 14936);
2205 break; 2214 break;
2206 case BC_RET1: 2215 case BC_RET1:
2207 dasm_put(Dst, 14984); 2216 dasm_put(Dst, 14994);
2208 /* fallthrough */ 2217 /* fallthrough */
2209 case BC_RET0: 2218 case BC_RET0:
2210 dasm_put(Dst, 15000); 2219 dasm_put(Dst, 15010);
2211 default: 2220 default:
2212 break; 2221 break;
2213 } 2222 }
2214 dasm_put(Dst, 15011, Dt7(->pc), PC2PROTO(k)); 2223 dasm_put(Dst, 15021, Dt7(->pc), PC2PROTO(k));
2215 if (op == BC_RET) { 2224 if (op == BC_RET) {
2216 dasm_put(Dst, 15053, LJ_TNIL); 2225 dasm_put(Dst, 15063, LJ_TNIL);
2217 } else { 2226 } else {
2218 dasm_put(Dst, 15062, LJ_TNIL); 2227 dasm_put(Dst, 15072, LJ_TNIL);
2219 } 2228 }
2220 dasm_put(Dst, 15069, -FRAME_VARG, FRAME_TYPEP); 2229 dasm_put(Dst, 15079, -FRAME_VARG, FRAME_TYPEP);
2221 if (op != BC_RET0) { 2230 if (op != BC_RET0) {
2222 dasm_put(Dst, 15093); 2231 dasm_put(Dst, 15103);
2223 } 2232 }
2224 dasm_put(Dst, 4704); 2233 dasm_put(Dst, 4704);
2225 break; 2234 break;
@@ -2229,7 +2238,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2229 2238
2230 case BC_FORL: 2239 case BC_FORL:
2231#if LJ_HASJIT 2240#if LJ_HASJIT
2232 dasm_put(Dst, 15097, HOTCOUNT_PCMASK, GG_DISP2HOT); 2241 dasm_put(Dst, 15107, HOTCOUNT_PCMASK, GG_DISP2HOT);
2233#endif 2242#endif
2234 break; 2243 break;
2235 2244
@@ -2241,57 +2250,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2241 case BC_FORI: 2250 case BC_FORI:
2242 case BC_IFORL: 2251 case BC_IFORL:
2243 vk = (op == BC_IFORL || op == BC_JFORL); 2252 vk = (op == BC_IFORL || op == BC_JFORL);
2244 dasm_put(Dst, 15118); 2253 dasm_put(Dst, 15128);
2245 if (!vk) { 2254 if (!vk) {
2246 dasm_put(Dst, 15122, LJ_TISNUM, LJ_TISNUM); 2255 dasm_put(Dst, 15132, LJ_TISNUM, LJ_TISNUM);
2247 } 2256 }
2248 dasm_put(Dst, 15141); 2257 dasm_put(Dst, 15151);
2249 if (!vk) { 2258 if (!vk) {
2250 dasm_put(Dst, 15145, LJ_TISNUM); 2259 dasm_put(Dst, 15155, LJ_TISNUM);
2251 } 2260 }
2252 if (sse) { 2261 if (sse) {
2253 dasm_put(Dst, 15154); 2262 dasm_put(Dst, 15164);
2254 if (vk) { 2263 if (vk) {
2255 dasm_put(Dst, 15166); 2264 dasm_put(Dst, 15176);
2256 } else { 2265 } else {
2257 dasm_put(Dst, 15185); 2266 dasm_put(Dst, 15195);
2258 } 2267 }
2259 dasm_put(Dst, 15190); 2268 dasm_put(Dst, 15200);
2260 } else { 2269 } else {
2261 dasm_put(Dst, 15203); 2270 dasm_put(Dst, 15213);
2262 if (vk) { 2271 if (vk) {
2263 dasm_put(Dst, 15209); 2272 dasm_put(Dst, 15219);
2264 } else { 2273 } else {
2265 dasm_put(Dst, 15225); 2274 dasm_put(Dst, 15235);
2266 } 2275 }
2267 dasm_put(Dst, 15233); 2276 dasm_put(Dst, 15243);
2268 if (cmov) { 2277 if (cmov) {
2269 dasm_put(Dst, 10926); 2278 dasm_put(Dst, 10936);
2270 } else { 2279 } else {
2271 dasm_put(Dst, 10932); 2280 dasm_put(Dst, 10942);
2272 } 2281 }
2273 if (!cmov) { 2282 if (!cmov) {
2274 dasm_put(Dst, 15238); 2283 dasm_put(Dst, 15248);
2275 } 2284 }
2276 } 2285 }
2277 if (op == BC_FORI) { 2286 if (op == BC_FORI) {
2278 dasm_put(Dst, 15244, -BCBIAS_J*4); 2287 dasm_put(Dst, 15254, -BCBIAS_J*4);
2279 } else if (op == BC_JFORI) { 2288 } else if (op == BC_JFORI) {
2280 dasm_put(Dst, 15254, -BCBIAS_J*4, BC_JLOOP); 2289 dasm_put(Dst, 15264, -BCBIAS_J*4, BC_JLOOP);
2281 } else if (op == BC_IFORL) { 2290 } else if (op == BC_IFORL) {
2282 dasm_put(Dst, 15268, -BCBIAS_J*4); 2291 dasm_put(Dst, 15278, -BCBIAS_J*4);
2283 } else { 2292 } else {
2284 dasm_put(Dst, 15264, BC_JLOOP); 2293 dasm_put(Dst, 15274, BC_JLOOP);
2285 } 2294 }
2286 dasm_put(Dst, 10961); 2295 dasm_put(Dst, 10971);
2287 if (sse) { 2296 if (sse) {
2288 dasm_put(Dst, 15278); 2297 dasm_put(Dst, 15288);
2289 } 2298 }
2290 break; 2299 break;
2291 2300
2292 case BC_ITERL: 2301 case BC_ITERL:
2293#if LJ_HASJIT 2302#if LJ_HASJIT
2294 dasm_put(Dst, 15097, HOTCOUNT_PCMASK, GG_DISP2HOT); 2303 dasm_put(Dst, 15107, HOTCOUNT_PCMASK, GG_DISP2HOT);
2295#endif 2304#endif
2296 break; 2305 break;
2297 2306
@@ -2300,33 +2309,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2300 break; 2309 break;
2301#endif 2310#endif
2302 case BC_IITERL: 2311 case BC_IITERL:
2303 dasm_put(Dst, 15289, LJ_TNIL); 2312 dasm_put(Dst, 15299, LJ_TNIL);
2304 if (op == BC_JITERL) { 2313 if (op == BC_JITERL) {
2305 dasm_put(Dst, 15304, BC_JLOOP); 2314 dasm_put(Dst, 15314, BC_JLOOP);
2306 } else { 2315 } else {
2307 dasm_put(Dst, 15318, -BCBIAS_J*4); 2316 dasm_put(Dst, 15328, -BCBIAS_J*4);
2308 } 2317 }
2309 dasm_put(Dst, 11258); 2318 dasm_put(Dst, 11268);
2310 break; 2319 break;
2311 2320
2312 case BC_LOOP: 2321 case BC_LOOP:
2313#if LJ_HASJIT 2322#if LJ_HASJIT
2314 dasm_put(Dst, 15097, HOTCOUNT_PCMASK, GG_DISP2HOT); 2323 dasm_put(Dst, 15107, HOTCOUNT_PCMASK, GG_DISP2HOT);
2315#endif 2324#endif
2316 break; 2325 break;
2317 2326
2318 case BC_ILOOP: 2327 case BC_ILOOP:
2319 dasm_put(Dst, 10963); 2328 dasm_put(Dst, 10973);
2320 break; 2329 break;
2321 2330
2322 case BC_JLOOP: 2331 case BC_JLOOP:
2323#if LJ_HASJIT 2332#if LJ_HASJIT
2324 dasm_put(Dst, 15334, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2333 dasm_put(Dst, 15344, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2325#endif 2334#endif
2326 break; 2335 break;
2327 2336
2328 case BC_JMP: 2337 case BC_JMP:
2329 dasm_put(Dst, 15357, -BCBIAS_J*4); 2338 dasm_put(Dst, 15367, -BCBIAS_J*4);
2330 break; 2339 break;
2331 2340
2332 /* -- Function headers -------------------------------------------------- */ 2341 /* -- Function headers -------------------------------------------------- */
@@ -2340,7 +2349,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2340 2349
2341 case BC_FUNCF: 2350 case BC_FUNCF:
2342#if LJ_HASJIT 2351#if LJ_HASJIT
2343 dasm_put(Dst, 15381, HOTCOUNT_PCMASK, GG_DISP2HOT); 2352 dasm_put(Dst, 15391, HOTCOUNT_PCMASK, GG_DISP2HOT);
2344#endif 2353#endif
2345 case BC_FUNCV: /* NYI: compiled vararg functions. */ 2354 case BC_FUNCV: /* NYI: compiled vararg functions. */
2346 break; 2355 break;
@@ -2350,13 +2359,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2350 break; 2359 break;
2351#endif 2360#endif
2352 case BC_IFUNCF: 2361 case BC_IFUNCF:
2353 dasm_put(Dst, 15402, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); 2362 dasm_put(Dst, 15412, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
2354 if (op == BC_JFUNCF) { 2363 if (op == BC_JFUNCF) {
2355 dasm_put(Dst, 15432, BC_JLOOP); 2364 dasm_put(Dst, 15442, BC_JLOOP);
2356 } else { 2365 } else {
2357 dasm_put(Dst, 10963); 2366 dasm_put(Dst, 10973);
2358 } 2367 }
2359 dasm_put(Dst, 15441, LJ_TNIL); 2368 dasm_put(Dst, 15451, LJ_TNIL);
2360 break; 2369 break;
2361 2370
2362 case BC_JFUNCV: 2371 case BC_JFUNCV:
@@ -2367,30 +2376,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2367 break; /* NYI: compiled vararg functions. */ 2376 break; /* NYI: compiled vararg functions. */
2368 2377
2369 case BC_IFUNCV: 2378 case BC_IFUNCV:
2370 dasm_put(Dst, 15463, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); 2379 dasm_put(Dst, 15473, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
2371 if (op == BC_JFUNCV) { 2380 if (op == BC_JFUNCV) {
2372 dasm_put(Dst, 15432, BC_JLOOP); 2381 dasm_put(Dst, 15442, BC_JLOOP);
2373 } else { 2382 } else {
2374 dasm_put(Dst, 15554, -4+PC2PROTO(k)); 2383 dasm_put(Dst, 15564, -4+PC2PROTO(k));
2375 } 2384 }
2376 dasm_put(Dst, 15576, LJ_TNIL); 2385 dasm_put(Dst, 15586, LJ_TNIL);
2377 break; 2386 break;
2378 2387
2379 case BC_FUNCC: 2388 case BC_FUNCC:
2380 case BC_FUNCCW: 2389 case BC_FUNCCW:
2381 dasm_put(Dst, 15598, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); 2390 dasm_put(Dst, 15608, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
2382 if (op == BC_FUNCC) { 2391 if (op == BC_FUNCC) {
2383 dasm_put(Dst, 15627); 2392 dasm_put(Dst, 15637);
2384 } else { 2393 } else {
2385 dasm_put(Dst, 15631); 2394 dasm_put(Dst, 15641);
2386 } 2395 }
2387 dasm_put(Dst, 15639, DISPATCH_GL(vmstate), ~LJ_VMST_C); 2396 dasm_put(Dst, 15649, DISPATCH_GL(vmstate), ~LJ_VMST_C);
2388 if (op == BC_FUNCC) { 2397 if (op == BC_FUNCC) {
2389 dasm_put(Dst, 15648); 2398 dasm_put(Dst, 15658);
2390 } else { 2399 } else {
2391 dasm_put(Dst, 15652, DISPATCH_GL(wrapf)); 2400 dasm_put(Dst, 15662, DISPATCH_GL(wrapf));
2392 } 2401 }
2393 dasm_put(Dst, 15657, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); 2402 dasm_put(Dst, 15667, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
2394 break; 2403 break;
2395 2404
2396 /* ---------------------------------------------------------------------- */ 2405 /* ---------------------------------------------------------------------- */
@@ -2418,7 +2427,7 @@ static int build_backend(BuildCtx *ctx)
2418 2427
2419 build_subroutines(ctx, cmov, sse); 2428 build_subroutines(ctx, cmov, sse);
2420 2429
2421 dasm_put(Dst, 15682); 2430 dasm_put(Dst, 15692);
2422 for (op = 0; op < BC__MAX; op++) 2431 for (op = 0; op < BC__MAX; op++)
2423 build_ins(ctx, (BCOp)op, op, cmov, sse); 2432 build_ins(ctx, (BCOp)op, op, cmov, sse);
2424 2433
diff --git a/src/lj_ccall.c b/src/lj_ccall.c
index 03f0ec06..6d5156fb 100644
--- a/src/lj_ccall.c
+++ b/src/lj_ccall.c
@@ -14,6 +14,7 @@
14#include "lj_cconv.h" 14#include "lj_cconv.h"
15#include "lj_cdata.h" 15#include "lj_cdata.h"
16#include "lj_ccall.h" 16#include "lj_ccall.h"
17#include "lj_trace.h"
17 18
18/* Target-specific handling of register arguments. */ 19/* Target-specific handling of register arguments. */
19#if LJ_TARGET_X86 20#if LJ_TARGET_X86
@@ -127,7 +128,7 @@ static int ccall_set_args(lua_State *L, CTState *cts, CType *ct,
127#if LJ_TARGET_X86 128#if LJ_TARGET_X86
128 /* x86 has several different calling conventions. */ 129 /* x86 has several different calling conventions. */
129 cc->resx87 = 0; 130 cc->resx87 = 0;
130 switch ((ct->info >> CTSHIFT_CCONV) & CTMASK_CCONV) { 131 switch (ctype_cconv(ct->info)) {
131 case CTCC_FASTCALL: maxgpr = 2; break; 132 case CTCC_FASTCALL: maxgpr = 2; break;
132 case CTCC_THISCALL: maxgpr = 1; break; 133 case CTCC_THISCALL: maxgpr = 1; break;
133 default: maxgpr = 0; break; 134 default: maxgpr = 0; break;
@@ -352,6 +353,13 @@ int lj_ccall_func(lua_State *L, GCcdata *cd)
352 gcsteps = ccall_set_args(L, cts, ct, &cc); 353 gcsteps = ccall_set_args(L, cts, ct, &cc);
353 lj_vm_ffi_call(&cc); 354 lj_vm_ffi_call(&cc);
354 gcsteps += ccall_get_results(L, cts, ct, &cc, &ret); 355 gcsteps += ccall_get_results(L, cts, ct, &cc, &ret);
356#if LJ_TARGET_X86 && LJ_ABI_WIN
357 /* Automatically detect __stdcall and fix up C function declaration. */
358 if (cc.spadj && ctype_cconv(ct->info) == CTCC_CDECL) {
359 CTF_INSERT(ct->info, CCONV, CTCC_STDCALL);
360 lj_trace_abort(G(L));
361 }
362#endif
355 while (gcsteps-- > 0) 363 while (gcsteps-- > 0)
356 lj_gc_check(L); 364 lj_gc_check(L);
357 return ret; 365 return ret;
diff --git a/src/lj_ctype.h b/src/lj_ctype.h
index c804b706..17a6fdc3 100644
--- a/src/lj_ctype.h
+++ b/src/lj_ctype.h
@@ -173,6 +173,7 @@ typedef struct CTState {
173#define ctype_bitcsz(info) (((info) >> CTSHIFT_BITCSZ) & CTMASK_BITCSZ) 173#define ctype_bitcsz(info) (((info) >> CTSHIFT_BITCSZ) & CTMASK_BITCSZ)
174#define ctype_vsizeP(info) (((info) >> CTSHIFT_VSIZEP) & CTMASK_VSIZEP) 174#define ctype_vsizeP(info) (((info) >> CTSHIFT_VSIZEP) & CTMASK_VSIZEP)
175#define ctype_msizeP(info) (((info) >> CTSHIFT_MSIZEP) & CTMASK_MSIZEP) 175#define ctype_msizeP(info) (((info) >> CTSHIFT_MSIZEP) & CTMASK_MSIZEP)
176#define ctype_cconv(info) (((info) >> CTSHIFT_CCONV) & CTMASK_CCONV)
176 177
177/* Simple type checks. */ 178/* Simple type checks. */
178#define ctype_isnum(info) (ctype_type((info)) == CT_NUM) 179#define ctype_isnum(info) (ctype_type((info)) == CT_NUM)