diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h index c738eaa4..7632f70b 100644 --- a/src/buildvm_x64.h +++ b/src/buildvm_x64.h @@ -12,7 +12,7 @@ #define DASM_SECTION_CODE_OP 0 #define DASM_SECTION_CODE_SUB 1 #define DASM_MAXSECTION 2 -static const unsigned char build_actionlist[13682] = { +static const unsigned char build_actionlist[13678] = { 254,1,248,10,252,247,195,237,15,132,244,11,131,227,252,248,41,218,72,141, 76,25,252,248,139,90,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,4, 252,247,195,237,15,132,244,13,248,14,252,247,195,237,15,132,244,10,65,199, @@ -360,53 +360,53 @@ static const unsigned char build_actionlist[13682] = { 233,137,222,137,252,239,232,251,1,20,248,3,139,149,233,248,4,15,182,75,252, 253,248,5,15,182,107,252,252,15,183,67,252,254,65,252,255,164,253,252,238, 233,248,139,131,195,4,139,77,232,137,76,36,4,252,233,244,4,248,140,255,204, - 255,248,141,255,73,199,134,233,0,0,0,0,252,233,244,247,255,248,142,255,73, - 137,174,233,248,1,255,141,68,194,252,248,139,108,36,16,137,149,233,137,133, - 233,137,222,137,252,239,137,92,36,20,232,251,1,21,199,68,36,20,0,0,0,0,139, - 149,233,72,137,193,139,133,233,41,208,72,137,205,15,182,75,252,253,193,232, - 3,131,192,1,252,255,229,248,143,255,248,144,255,68,139,122,252,248,69,139, - 191,233,69,139,191,233,65,199,134,233,0,0,0,0,65,199,134,233,237,139,3,15, - 182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,248,82, - 255,217,124,36,4,137,68,36,8,102,184,0,4,102,11,68,36,4,102,37,252,255,252, - 247,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195, - 255,248,145,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110, - 216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252, - 242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110, - 208,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193,248,1, - 195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4,102,37, - 252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139, - 68,36,8,195,255,248,146,72,184,237,237,102,72,15,110,208,72,184,237,237,102, - 72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15, - 85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102, - 72,15,110,208,252,242,15,194,193,6,102,15,84,194,252,242,15,92,200,15,40, - 193,248,1,195,248,104,255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68, - 36,4,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195, - 255,248,147,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110, - 216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,15, - 40,193,252,242,15,88,203,252,242,15,92,203,72,184,237,237,102,72,15,110,216, - 252,242,15,194,193,1,102,15,84,195,252,242,15,92,200,102,15,86,202,15,40, - 193,248,1,195,248,148,255,15,40,232,252,242,15,94,193,72,184,237,237,102, - 72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,224,102,15,84,226,102, - 15,46,220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242,15,92,227, - 102,15,86,226,72,184,237,237,102,72,15,110,208,252,242,15,194,196,1,102,15, - 84,194,252,242,15,92,224,15,40,197,252,242,15,89,204,252,242,15,92,193,195, - 248,1,252,242,15,89,200,15,40,197,252,242,15,92,193,195,255,217,193,216,252, - 241,217,124,36,4,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137, - 68,36,6,217,108,36,6,217,252,252,217,108,36,4,222,201,222,252,233,195,255, - 248,88,217,252,234,222,201,248,149,217,84,36,252,248,129,124,36,252,248,0, - 0,128,127,15,132,244,247,129,124,36,252,248,0,0,128,252,255,15,132,244,248, - 248,150,217,192,217,252,252,220,252,233,217,201,217,252,240,217,232,222,193, - 217,252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,255,248,107,255, - 248,151,252,242,15,45,193,252,242,15,42,208,102,15,46,202,15,133,244,254, - 15,138,244,255,248,152,131,252,248,1,15,142,244,252,248,1,169,1,0,0,0,15, - 133,244,248,252,242,15,89,192,209,232,252,233,244,1,248,2,209,232,15,132, - 244,251,15,40,200,248,3,252,242,15,89,192,209,232,15,132,244,250,15,131,244, - 3,255,252,242,15,89,200,252,233,244,3,248,4,252,242,15,89,193,248,5,195,248, - 6,15,132,244,5,15,130,244,253,80,72,184,237,237,102,72,15,110,200,252,242, - 15,94,200,88,15,40,193,252,247,216,131,252,248,1,15,132,244,5,252,233,244, - 1,248,7,72,184,237,237,102,72,15,110,192,195,248,8,102,72,15,126,200,72,209, - 224,72,193,192,12,72,61,252,254,15,0,0,15,132,244,248,255,102,72,15,126,192, - 72,209,224,15,132,244,250,72,193,192,12,72,61,252,254,15,0,0,15,132,244,251, + 255,248,141,137,92,36,20,255,248,142,255,137,92,36,20,131,203,1,248,1,255, + 141,68,194,252,248,139,108,36,16,137,149,233,137,133,233,137,222,137,252, + 239,232,251,1,21,199,68,36,20,0,0,0,0,255,131,227,252,254,255,139,149,233, + 72,137,193,139,133,233,41,208,72,137,205,15,182,75,252,253,193,232,3,131, + 192,1,252,255,229,248,143,255,248,144,255,68,139,122,252,248,69,139,191,233, + 69,139,191,233,65,199,134,233,0,0,0,0,65,199,134,233,237,139,3,15,182,204, + 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,248,82,255,217, + 124,36,4,137,68,36,8,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102, + 137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248, + 145,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15, + 40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15, + 88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110,208,252, + 242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193,248,1,195,248, + 84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4,102,37,252,255, + 252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8, + 195,255,248,146,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15, + 110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208, + 252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15, + 110,208,252,242,15,194,193,6,102,15,84,194,252,242,15,92,200,15,40,193,248, + 1,195,248,104,255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68,36,4,102, + 137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248, + 147,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15, + 40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,15,40,193, + 252,242,15,88,203,252,242,15,92,203,72,184,237,237,102,72,15,110,216,252, + 242,15,194,193,1,102,15,84,195,252,242,15,92,200,102,15,86,202,15,40,193, + 248,1,195,248,148,255,15,40,232,252,242,15,94,193,72,184,237,237,102,72,15, + 110,208,72,184,237,237,102,72,15,110,216,15,40,224,102,15,84,226,102,15,46, + 220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242,15,92,227,102, + 15,86,226,72,184,237,237,102,72,15,110,208,252,242,15,194,196,1,102,15,84, + 194,252,242,15,92,224,15,40,197,252,242,15,89,204,252,242,15,92,193,195,248, + 1,252,242,15,89,200,15,40,197,252,242,15,92,193,195,255,217,193,216,252,241, + 217,124,36,4,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68, + 36,6,217,108,36,6,217,252,252,217,108,36,4,222,201,222,252,233,195,255,248, + 88,217,252,234,222,201,248,149,217,84,36,252,248,129,124,36,252,248,0,0,128, + 127,15,132,244,247,129,124,36,252,248,0,0,128,252,255,15,132,244,248,248, + 150,217,192,217,252,252,220,252,233,217,201,217,252,240,217,232,222,193,217, + 252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,255,248,107,255,248, + 151,252,242,15,45,193,252,242,15,42,208,102,15,46,202,15,133,244,254,15,138, + 244,255,248,152,131,252,248,1,15,142,244,252,248,1,169,1,0,0,0,15,133,244, + 248,252,242,15,89,192,209,232,252,233,244,1,248,2,209,232,15,132,244,251, + 15,40,200,248,3,252,242,15,89,192,209,232,15,132,244,250,15,131,244,3,255, + 252,242,15,89,200,252,233,244,3,248,4,252,242,15,89,193,248,5,195,248,6,15, + 132,244,5,15,130,244,253,80,72,184,237,237,102,72,15,110,200,252,242,15,94, + 200,88,15,40,193,252,247,216,131,252,248,1,15,132,244,5,252,233,244,1,248, + 7,72,184,237,237,102,72,15,110,192,195,248,8,102,72,15,126,200,72,209,224, + 72,193,192,12,72,61,252,254,15,0,0,15,132,244,248,255,102,72,15,126,192,72, + 209,224,15,132,244,250,72,193,192,12,72,61,252,254,15,0,0,15,132,244,251, 252,242,15,17,76,36,252,240,252,242,15,17,68,36,252,248,221,68,36,252,240, 221,68,36,252,248,217,252,241,217,192,217,252,252,220,252,233,217,201,217, 252,240,217,232,222,193,217,252,253,221,217,221,92,36,252,248,252,242,15, @@ -1332,77 +1332,81 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) #endif dasm_put(Dst, 7165); #if LJ_HASJIT - dasm_put(Dst, 7168, DISPATCH_J(L)); + dasm_put(Dst, 7037); #endif - dasm_put(Dst, 7181); + dasm_put(Dst, 7172); #if LJ_HASJIT - dasm_put(Dst, 7184, DISPATCH_J(L)); + dasm_put(Dst, 7175); #endif - dasm_put(Dst, 7191, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 7185, Dt1(->base), Dt1(->top)); +#if LJ_HASJIT + dasm_put(Dst, 7218); +#endif + dasm_put(Dst, 7223, Dt1(->base), Dt1(->top)); #if LJ_HASJIT dasm_put(Dst, 7163); #endif - dasm_put(Dst, 7258); + dasm_put(Dst, 7254); #if LJ_HASJIT - dasm_put(Dst, 7261, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); + dasm_put(Dst, 7257, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); #endif - dasm_put(Dst, 7308); + dasm_put(Dst, 7304); if (!sse) { - dasm_put(Dst, 7311); + dasm_put(Dst, 7307); } - dasm_put(Dst, 7356, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7352, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7442); + dasm_put(Dst, 7438); } - dasm_put(Dst, 7487, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); + dasm_put(Dst, 7483, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7573); + dasm_put(Dst, 7569); } - dasm_put(Dst, 7612, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7608, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (sse) { - dasm_put(Dst, 7701, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7697, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); } else { - dasm_put(Dst, 7815); + dasm_put(Dst, 7811); } - dasm_put(Dst, 7862); + dasm_put(Dst, 7858); if (!sse) { } else { - dasm_put(Dst, 7939); + dasm_put(Dst, 7935); } - dasm_put(Dst, 7942); - dasm_put(Dst, 8027, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); - dasm_put(Dst, 8128, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); - dasm_put(Dst, 8302); + dasm_put(Dst, 7938); + dasm_put(Dst, 8023, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 8124, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); + dasm_put(Dst, 8298); if (sse) { - dasm_put(Dst, 8343); - dasm_put(Dst, 8413); - dasm_put(Dst, 8485); + dasm_put(Dst, 8339); + dasm_put(Dst, 8409); + dasm_put(Dst, 8481); } else { - dasm_put(Dst, 8537); - dasm_put(Dst, 8629); + dasm_put(Dst, 8533); + dasm_put(Dst, 8625); } - dasm_put(Dst, 8675); + dasm_put(Dst, 8671); if (sse) { - dasm_put(Dst, 8681, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); - dasm_put(Dst, 8766, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); + dasm_put(Dst, 8677, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); + dasm_put(Dst, 8762, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); } else { - dasm_put(Dst, 8894); - dasm_put(Dst, 8977); - if (cmov) { - dasm_put(Dst, 9032); - } else { - dasm_put(Dst, 9051); - } dasm_put(Dst, 8890); + dasm_put(Dst, 8973); + if (cmov) { + dasm_put(Dst, 9028); + } else { + dasm_put(Dst, 9047); + } + dasm_put(Dst, 8886); } - dasm_put(Dst, 9092); + dasm_put(Dst, 9088); } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) { int vk = 0; - dasm_put(Dst, 9114, defop); + dasm_put(Dst, 9110, defop); switch (op) { @@ -1411,600 +1415,600 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: - dasm_put(Dst, 9116, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9112, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9137); + dasm_put(Dst, 9133); } else { - dasm_put(Dst, 9152); + dasm_put(Dst, 9148); if (cmov) { - dasm_put(Dst, 9162); + dasm_put(Dst, 9158); } else { - dasm_put(Dst, 9168); + dasm_put(Dst, 9164); } } switch (op) { case BC_ISLT: - dasm_put(Dst, 9175); + dasm_put(Dst, 9171); break; case BC_ISGE: - dasm_put(Dst, 8972); + dasm_put(Dst, 8968); break; case BC_ISLE: dasm_put(Dst, 5914); break; case BC_ISGT: - dasm_put(Dst, 9180); + dasm_put(Dst, 9176); break; default: break; /* Shut up GCC. */ } - dasm_put(Dst, 9185, -BCBIAS_J*4); + dasm_put(Dst, 9181, -BCBIAS_J*4); break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; - dasm_put(Dst, 9220, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9216, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9246); + dasm_put(Dst, 9242); } else { - dasm_put(Dst, 9258); + dasm_put(Dst, 9254); if (cmov) { - dasm_put(Dst, 9162); + dasm_put(Dst, 9158); } else { - dasm_put(Dst, 9168); + dasm_put(Dst, 9164); } } iseqne_fp: if (vk) { - dasm_put(Dst, 9265); + dasm_put(Dst, 9261); } else { - dasm_put(Dst, 9274); + dasm_put(Dst, 9270); } iseqne_end: if (vk) { - dasm_put(Dst, 9283, -BCBIAS_J*4); + dasm_put(Dst, 9279, -BCBIAS_J*4); } else { - dasm_put(Dst, 9298, -BCBIAS_J*4); + dasm_put(Dst, 9294, -BCBIAS_J*4); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); if (op == BC_ISEQV || op == BC_ISNEV) { - dasm_put(Dst, 9313, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<metatable), Dt6(->nomm), 1<>32)); + dasm_put(Dst, 9603, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); } else { - dasm_put(Dst, 9632); + dasm_put(Dst, 9628); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_LEN: - dasm_put(Dst, 9641, LJ_TSTR); + dasm_put(Dst, 9637, LJ_TSTR); if (sse) { - dasm_put(Dst, 9655, Dt5(->len)); + dasm_put(Dst, 9651, Dt5(->len)); } else { - dasm_put(Dst, 9673, Dt5(->len)); + dasm_put(Dst, 9669, Dt5(->len)); } - dasm_put(Dst, 9682, LJ_TTAB); + dasm_put(Dst, 9678, LJ_TTAB); if (sse) { - dasm_put(Dst, 9724); + dasm_put(Dst, 9720); } else { } - dasm_put(Dst, 9733); + dasm_put(Dst, 9729); break; /* -- Binary ops -------------------------------------------------------- */ case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: - dasm_put(Dst, 9743); + dasm_put(Dst, 9739); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9751, LJ_TISNUM); + dasm_put(Dst, 9747, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9763); + dasm_put(Dst, 9759); } else { - dasm_put(Dst, 9778); + dasm_put(Dst, 9774); } break; case 1: - dasm_put(Dst, 9787, LJ_TISNUM); + dasm_put(Dst, 9783, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9799); + dasm_put(Dst, 9795); } else { - dasm_put(Dst, 9814); + dasm_put(Dst, 9810); } break; default: - dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9845); + dasm_put(Dst, 9841); } else { - dasm_put(Dst, 9859); + dasm_put(Dst, 9855); } break; } if (sse) { - dasm_put(Dst, 9625); + dasm_put(Dst, 9621); } else { - dasm_put(Dst, 9637); + dasm_put(Dst, 9633); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: - dasm_put(Dst, 9743); + dasm_put(Dst, 9739); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9751, LJ_TISNUM); + dasm_put(Dst, 9747, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9867); + dasm_put(Dst, 9863); } else { - dasm_put(Dst, 9882); + dasm_put(Dst, 9878); } break; case 1: - dasm_put(Dst, 9787, LJ_TISNUM); + dasm_put(Dst, 9783, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9891); + dasm_put(Dst, 9887); } else { - dasm_put(Dst, 9906); + dasm_put(Dst, 9902); } break; default: - dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9915); + dasm_put(Dst, 9911); } else { - dasm_put(Dst, 9929); + dasm_put(Dst, 9925); } break; } if (sse) { - dasm_put(Dst, 9625); + dasm_put(Dst, 9621); } else { - dasm_put(Dst, 9637); + dasm_put(Dst, 9633); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_MULVN: case BC_MULNV: case BC_MULVV: - dasm_put(Dst, 9743); + dasm_put(Dst, 9739); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9751, LJ_TISNUM); + dasm_put(Dst, 9747, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9937); + dasm_put(Dst, 9933); } else { - dasm_put(Dst, 9952); + dasm_put(Dst, 9948); } break; case 1: - dasm_put(Dst, 9787, LJ_TISNUM); + dasm_put(Dst, 9783, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9961); + dasm_put(Dst, 9957); } else { - dasm_put(Dst, 9976); + dasm_put(Dst, 9972); } break; default: - dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9985); + dasm_put(Dst, 9981); } else { - dasm_put(Dst, 9999); + dasm_put(Dst, 9995); } break; } if (sse) { - dasm_put(Dst, 9625); + dasm_put(Dst, 9621); } else { - dasm_put(Dst, 9637); + dasm_put(Dst, 9633); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: - dasm_put(Dst, 9743); + dasm_put(Dst, 9739); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9751, LJ_TISNUM); + dasm_put(Dst, 9747, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10007); + dasm_put(Dst, 10003); } else { - dasm_put(Dst, 10022); + dasm_put(Dst, 10018); } break; case 1: - dasm_put(Dst, 9787, LJ_TISNUM); + dasm_put(Dst, 9783, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10031); + dasm_put(Dst, 10027); } else { - dasm_put(Dst, 10046); + dasm_put(Dst, 10042); } break; default: - dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10055); + dasm_put(Dst, 10051); } else { - dasm_put(Dst, 10069); + dasm_put(Dst, 10065); } break; } if (sse) { - dasm_put(Dst, 9625); + dasm_put(Dst, 9621); } else { - dasm_put(Dst, 9637); + dasm_put(Dst, 9633); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_MODVN: - dasm_put(Dst, 9743); + dasm_put(Dst, 9739); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9751, LJ_TISNUM); + dasm_put(Dst, 9747, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10077); + dasm_put(Dst, 10073); } else { - dasm_put(Dst, 10092); + dasm_put(Dst, 10088); } break; case 1: - dasm_put(Dst, 9787, LJ_TISNUM); + dasm_put(Dst, 9783, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10101); + dasm_put(Dst, 10097); } else { - dasm_put(Dst, 10116); + dasm_put(Dst, 10112); } break; default: - dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10125); + dasm_put(Dst, 10121); } else { - dasm_put(Dst, 10139); + dasm_put(Dst, 10135); } break; } - dasm_put(Dst, 10147); + dasm_put(Dst, 10143); if (sse) { - dasm_put(Dst, 9625); + dasm_put(Dst, 9621); } else { - dasm_put(Dst, 9637); + dasm_put(Dst, 9633); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_MODNV: case BC_MODVV: - dasm_put(Dst, 9743); + dasm_put(Dst, 9739); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9751, LJ_TISNUM); + dasm_put(Dst, 9747, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10077); + dasm_put(Dst, 10073); } else { - dasm_put(Dst, 10092); + dasm_put(Dst, 10088); } break; case 1: - dasm_put(Dst, 9787, LJ_TISNUM); + dasm_put(Dst, 9783, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10101); + dasm_put(Dst, 10097); } else { - dasm_put(Dst, 10116); + dasm_put(Dst, 10112); } break; default: - dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10125); + dasm_put(Dst, 10121); } else { - dasm_put(Dst, 10139); + dasm_put(Dst, 10135); } break; } - dasm_put(Dst, 10153); + dasm_put(Dst, 10149); break; case BC_POW: - dasm_put(Dst, 9743); + dasm_put(Dst, 9739); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9751, LJ_TISNUM); + dasm_put(Dst, 9747, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10077); + dasm_put(Dst, 10073); } else { - dasm_put(Dst, 10092); + dasm_put(Dst, 10088); } break; case 1: - dasm_put(Dst, 9787, LJ_TISNUM); + dasm_put(Dst, 9783, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10101); + dasm_put(Dst, 10097); } else { - dasm_put(Dst, 10116); + dasm_put(Dst, 10112); } break; default: - dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9819, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10125); + dasm_put(Dst, 10121); } else { - dasm_put(Dst, 10139); + dasm_put(Dst, 10135); } break; } - dasm_put(Dst, 10158); + dasm_put(Dst, 10154); if (sse) { - dasm_put(Dst, 9625); + dasm_put(Dst, 9621); } else { - dasm_put(Dst, 9637); + dasm_put(Dst, 9633); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_CAT: - dasm_put(Dst, 10162, Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10158, Dt1(->base), Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 10253, LJ_TSTR); + dasm_put(Dst, 10249, LJ_TSTR); break; case BC_KSHORT: if (sse) { - dasm_put(Dst, 10290); + dasm_put(Dst, 10286); } else { - dasm_put(Dst, 10305); + dasm_put(Dst, 10301); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_KNUM: if (sse) { - dasm_put(Dst, 10313); + dasm_put(Dst, 10309); } else { - dasm_put(Dst, 10327); + dasm_put(Dst, 10323); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_KPRI: - dasm_put(Dst, 10335); + dasm_put(Dst, 10331); break; case BC_KNIL: - dasm_put(Dst, 10364, LJ_TNIL); + dasm_put(Dst, 10360, LJ_TNIL); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 10412, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10408, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) - dasm_put(Dst, 10458, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); - dasm_put(Dst, 10554); + dasm_put(Dst, 10454, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 10550); break; #undef TV2MARKOFS case BC_USETS: - dasm_put(Dst, 10566, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); + dasm_put(Dst, 10562, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 10662); + dasm_put(Dst, 10658); if (sse) { - dasm_put(Dst, 10667); + dasm_put(Dst, 10663); } else { - dasm_put(Dst, 9441); + dasm_put(Dst, 9437); } - dasm_put(Dst, 10675, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10671, offsetof(GCfuncL, uvptr), DtA(->v)); if (sse) { - dasm_put(Dst, 10684); + dasm_put(Dst, 10680); } else { - dasm_put(Dst, 10690); + dasm_put(Dst, 10686); } - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_USETP: - dasm_put(Dst, 10693, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10689, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 10733, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10729, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 10789, Dt1(->base), Dt1(->base), LJ_TFUNC); + dasm_put(Dst, 10785, Dt1(->base), Dt1(->base), LJ_TFUNC); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: - dasm_put(Dst, 10856, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10852, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); break; case BC_TDUP: - dasm_put(Dst, 10980, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10976, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_GGET: - dasm_put(Dst, 11079, Dt7(->env)); + dasm_put(Dst, 11075, Dt7(->env)); break; case BC_GSET: - dasm_put(Dst, 11099, Dt7(->env)); + dasm_put(Dst, 11095, Dt7(->env)); break; case BC_TGETV: - dasm_put(Dst, 11119, LJ_TTAB, LJ_TISNUM); + dasm_put(Dst, 11115, LJ_TTAB, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11152); + dasm_put(Dst, 11148); } else { } - dasm_put(Dst, 11173, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11371, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11367, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); - dasm_put(Dst, 11663, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11574, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); + dasm_put(Dst, 11659, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETS: - dasm_put(Dst, 11727, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11804, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); - dasm_put(Dst, 11896, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11723, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11800, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); + dasm_put(Dst, 11892, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 11988, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); - dasm_put(Dst, 12088, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11984, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); + dasm_put(Dst, 12084, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 12136); + dasm_put(Dst, 12132); if (sse) { - dasm_put(Dst, 10667); + dasm_put(Dst, 10663); } else { } - dasm_put(Dst, 12141, Dt6(->marked), LJ_GC_BLACK); + dasm_put(Dst, 12137, Dt6(->marked), LJ_GC_BLACK); if (sse) { - dasm_put(Dst, 12166); + dasm_put(Dst, 12162); } else { } - dasm_put(Dst, 12174, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); - dasm_put(Dst, 12310, Dt6(->gclist)); + dasm_put(Dst, 12170, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); + dasm_put(Dst, 12306, Dt6(->gclist)); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: - dasm_put(Dst, 9747); + dasm_put(Dst, 9743); if (op == BC_CALLM) { - dasm_put(Dst, 12318); + dasm_put(Dst, 12314); } - dasm_put(Dst, 12323, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 12319, LJ_TFUNC, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 12318); + dasm_put(Dst, 12314); break; case BC_CALLT: - dasm_put(Dst, 12366, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); - dasm_put(Dst, 12490, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 12362, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); + dasm_put(Dst, 12486, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); break; case BC_ITERC: - dasm_put(Dst, 12551, LJ_TFUNC, 2+1, Dt7(->pc)); + dasm_put(Dst, 12547, LJ_TFUNC, 2+1, Dt7(->pc)); break; case BC_VARG: - dasm_put(Dst, 12633, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); - dasm_put(Dst, 12787, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 12629, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); + dasm_put(Dst, 12783, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 12318); + dasm_put(Dst, 12314); break; case BC_RET: case BC_RET0: case BC_RET1: if (op != BC_RET0) { - dasm_put(Dst, 12892); + dasm_put(Dst, 12888); } - dasm_put(Dst, 12896, FRAME_TYPE); + dasm_put(Dst, 12892, FRAME_TYPE); switch (op) { case BC_RET: - dasm_put(Dst, 12915); + dasm_put(Dst, 12911); break; case BC_RET1: - dasm_put(Dst, 12979); + dasm_put(Dst, 12975); /* fallthrough */ case BC_RET0: - dasm_put(Dst, 12995); + dasm_put(Dst, 12991); default: break; } - dasm_put(Dst, 13006, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 13002, Dt7(->pc), PC2PROTO(k)); if (op == BC_RET) { - dasm_put(Dst, 13054, LJ_TNIL); + dasm_put(Dst, 13050, LJ_TNIL); } else { - dasm_put(Dst, 13065, LJ_TNIL); + dasm_put(Dst, 13061, LJ_TNIL); } - dasm_put(Dst, 13072); + dasm_put(Dst, 13068); if (op != BC_RET0) { - dasm_put(Dst, 13092); + dasm_put(Dst, 13088); } dasm_put(Dst, 4568); break; @@ -2014,7 +2018,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 13091, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2026,57 +2030,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORI: case BC_IFORL: vk = (op == BC_IFORL || op == BC_JFORL); - dasm_put(Dst, 13116); + dasm_put(Dst, 13112); if (!vk) { - dasm_put(Dst, 13120, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 13116, LJ_TISNUM, LJ_TISNUM); } - dasm_put(Dst, 13139); + dasm_put(Dst, 13135); if (!vk) { - dasm_put(Dst, 13143, LJ_TISNUM); + dasm_put(Dst, 13139, LJ_TISNUM); } if (sse) { - dasm_put(Dst, 13152); + dasm_put(Dst, 13148); if (vk) { - dasm_put(Dst, 13164); + dasm_put(Dst, 13160); } else { - dasm_put(Dst, 13183); + dasm_put(Dst, 13179); } - dasm_put(Dst, 13188); + dasm_put(Dst, 13184); } else { - dasm_put(Dst, 13201); + dasm_put(Dst, 13197); if (vk) { - dasm_put(Dst, 13207); + dasm_put(Dst, 13203); } else { - dasm_put(Dst, 13223); + dasm_put(Dst, 13219); } - dasm_put(Dst, 13231); + dasm_put(Dst, 13227); if (cmov) { - dasm_put(Dst, 9162); + dasm_put(Dst, 9158); } else { - dasm_put(Dst, 9168); + dasm_put(Dst, 9164); } if (!cmov) { - dasm_put(Dst, 13236); + dasm_put(Dst, 13232); } } if (op == BC_FORI) { - dasm_put(Dst, 13242, -BCBIAS_J*4); + dasm_put(Dst, 13238, -BCBIAS_J*4); } else if (op == BC_JFORI) { - dasm_put(Dst, 13252, -BCBIAS_J*4, BC_JLOOP); + dasm_put(Dst, 13248, -BCBIAS_J*4, BC_JLOOP); } else if (op == BC_IFORL) { - dasm_put(Dst, 13266, -BCBIAS_J*4); + dasm_put(Dst, 13262, -BCBIAS_J*4); } else { - dasm_put(Dst, 13262, BC_JLOOP); + dasm_put(Dst, 13258, BC_JLOOP); } - dasm_put(Dst, 9197); + dasm_put(Dst, 9193); if (sse) { - dasm_put(Dst, 13276); + dasm_put(Dst, 13272); } break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 13091, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2085,33 +2089,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IITERL: - dasm_put(Dst, 13287, LJ_TNIL); + dasm_put(Dst, 13283, LJ_TNIL); if (op == BC_JITERL) { - dasm_put(Dst, 13302, BC_JLOOP); + dasm_put(Dst, 13298, BC_JLOOP); } else { - dasm_put(Dst, 13316, -BCBIAS_J*4); + dasm_put(Dst, 13312, -BCBIAS_J*4); } - dasm_put(Dst, 9501); + dasm_put(Dst, 9497); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 13091, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; case BC_ILOOP: - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 13332, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); + dasm_put(Dst, 13328, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); #endif break; case BC_JMP: - dasm_put(Dst, 13359, -BCBIAS_J*4); + dasm_put(Dst, 13355, -BCBIAS_J*4); break; /* -- Function headers -------------------------------------------------- */ @@ -2134,13 +2138,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IFUNCF: - dasm_put(Dst, 13385, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); + dasm_put(Dst, 13381, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); if (op == BC_JFUNCF) { - dasm_put(Dst, 13416, BC_JLOOP); + dasm_put(Dst, 13412, BC_JLOOP); } else { - dasm_put(Dst, 7287); + dasm_put(Dst, 7283); } - dasm_put(Dst, 13425, LJ_TNIL); + dasm_put(Dst, 13421, LJ_TNIL); break; case BC_JFUNCV: @@ -2151,30 +2155,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 13447, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); + dasm_put(Dst, 13443, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); if (op == BC_JFUNCV) { - dasm_put(Dst, 13416, BC_JLOOP); + dasm_put(Dst, 13412, BC_JLOOP); } else { - dasm_put(Dst, 13544, -4+PC2PROTO(k)); + dasm_put(Dst, 13540, -4+PC2PROTO(k)); } - dasm_put(Dst, 13569, LJ_TNIL); + dasm_put(Dst, 13565, LJ_TNIL); break; case BC_FUNCC: case BC_FUNCCW: - dasm_put(Dst, 13591, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); + dasm_put(Dst, 13587, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); if (op == BC_FUNCC) { + dasm_put(Dst, 13617); + } else { dasm_put(Dst, 13621); - } else { - dasm_put(Dst, 13625); } - dasm_put(Dst, 13633, DISPATCH_GL(vmstate), ~LJ_VMST_C); + dasm_put(Dst, 13629, DISPATCH_GL(vmstate), ~LJ_VMST_C); if (op == BC_FUNCC) { - dasm_put(Dst, 13643); + dasm_put(Dst, 13639); } else { - dasm_put(Dst, 13648, DISPATCH_GL(wrapf)); + dasm_put(Dst, 13644, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 13654, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); + dasm_put(Dst, 13650, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); break; /* ---------------------------------------------------------------------- */ @@ -2202,7 +2206,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx, cmov, sse); - dasm_put(Dst, 13680); + dasm_put(Dst, 13676); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op, cmov, sse); diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h index 093b5fa0..742cf19b 100644 --- a/src/buildvm_x64win.h +++ b/src/buildvm_x64win.h @@ -12,7 +12,7 @@ #define DASM_SECTION_CODE_OP 0 #define DASM_SECTION_CODE_SUB 1 #define DASM_MAXSECTION 2 -static const unsigned char build_actionlist[13494] = { +static const unsigned char build_actionlist[13490] = { 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,72, 141,76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68, 36,84,252,247,198,237,15,132,244,13,248,14,252,247,198,237,15,132,244,10, @@ -359,106 +359,106 @@ static const unsigned char build_actionlist[13494] = { 235,15,132,244,251,248,1,255,139,108,36,96,137,149,233,137,252,242,137,252, 233,232,251,1,20,248,3,139,149,233,248,4,15,182,78,252,253,248,5,15,182,110, 252,252,15,183,70,252,254,252,255,164,253,252,235,233,248,139,131,198,4,139, - 77,232,137,76,36,84,252,233,244,4,248,140,255,204,255,248,141,255,72,199, - 131,233,0,0,0,0,252,233,244,247,255,248,142,255,72,137,171,233,248,1,255, - 141,68,194,252,248,139,108,36,96,137,149,233,137,133,233,137,252,242,137, - 252,233,137,116,36,100,232,251,1,21,199,68,36,100,0,0,0,0,139,149,233,72, - 137,193,139,133,233,41,208,72,137,205,15,182,78,252,253,193,232,3,131,192, - 1,252,255,229,248,143,255,248,144,255,139,122,252,248,139,191,233,139,191, - 233,199,131,233,0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232,131,198, - 4,193,232,16,252,255,36,252,235,255,248,82,255,217,124,36,4,137,68,36,8,102, - 184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36, - 6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,145,72,184,237,237,102, - 72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200,102,15,84,202,102, - 15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252,242,15,92,203, - 102,15,86,202,72,184,237,237,102,72,15,110,208,252,242,15,194,193,1,102,15, - 84,194,252,242,15,92,200,15,40,193,248,1,195,248,84,255,217,124,36,4,137, - 68,36,8,102,184,0,8,102,11,68,36,4,102,37,252,255,252,251,102,137,68,36,6, - 217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,146,72,184, - 237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200,102, - 15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252, - 242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110,208,252,242,15,194, - 193,6,102,15,84,194,252,242,15,92,200,15,40,193,248,1,195,248,104,255,217, - 124,36,4,137,68,36,8,102,184,0,12,102,11,68,36,4,102,137,68,36,6,217,108, - 36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,147,72,184,237,237, - 102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200,102,15,84,202, - 102,15,46,217,15,134,244,247,102,15,85,208,15,40,193,252,242,15,88,203,252, - 242,15,92,203,72,184,237,237,102,72,15,110,216,252,242,15,194,193,1,102,15, - 84,195,252,242,15,92,200,102,15,86,202,15,40,193,248,1,195,248,148,255,15, - 40,232,252,242,15,94,193,72,184,237,237,102,72,15,110,208,72,184,237,237, - 102,72,15,110,216,15,40,224,102,15,84,226,102,15,46,220,15,134,244,247,102, - 15,85,208,252,242,15,88,227,252,242,15,92,227,102,15,86,226,72,184,237,237, - 102,72,15,110,208,252,242,15,194,196,1,102,15,84,194,252,242,15,92,224,15, - 40,197,252,242,15,89,204,252,242,15,92,193,195,248,1,252,242,15,89,200,15, - 40,197,252,242,15,92,193,195,255,217,193,216,252,241,217,124,36,4,102,184, - 0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217, - 252,252,217,108,36,4,222,201,222,252,233,195,255,248,88,217,252,234,222,201, - 248,149,217,84,36,8,129,124,36,8,0,0,128,127,15,132,244,247,129,124,36,8, - 0,0,128,252,255,15,132,244,248,248,150,217,192,217,252,252,220,252,233,217, - 201,217,252,240,217,232,222,193,217,252,253,221,217,248,1,195,248,2,221,216, - 217,252,238,195,255,248,107,255,248,151,252,242,15,45,193,252,242,15,42,208, - 102,15,46,202,15,133,244,254,15,138,244,255,248,152,131,252,248,1,15,142, - 244,252,248,1,169,1,0,0,0,15,133,244,248,252,242,15,89,192,209,232,252,233, - 244,1,248,2,209,232,15,132,244,251,15,40,200,248,3,252,242,15,89,192,209, - 232,15,132,244,250,15,131,244,3,255,252,242,15,89,200,252,233,244,3,248,4, - 252,242,15,89,193,248,5,195,248,6,15,132,244,5,15,130,244,253,80,72,184,237, - 237,102,72,15,110,200,252,242,15,94,200,88,15,40,193,252,247,216,131,252, - 248,1,15,132,244,5,252,233,244,1,248,7,72,184,237,237,102,72,15,110,192,195, - 248,8,102,72,15,126,200,72,209,224,72,193,192,12,72,61,252,254,15,0,0,15, - 132,244,248,255,102,72,15,126,192,72,209,224,15,132,244,250,72,193,192,12, - 72,61,252,254,15,0,0,15,132,244,251,252,242,15,17,76,36,16,252,242,15,17, - 68,36,8,221,68,36,16,221,68,36,8,217,252,241,217,192,217,252,252,220,252, - 233,217,201,217,252,240,217,232,222,193,217,252,253,221,217,221,92,36,8,252, - 242,15,16,68,36,8,195,248,9,72,184,237,237,102,72,15,110,208,102,15,46,194, - 15,132,244,247,15,40,193,248,1,195,248,2,72,184,237,237,102,72,15,110,208, - 102,15,84,194,72,184,237,237,102,72,15,110,208,102,15,46,194,15,132,244,1, - 102,15,80,193,15,87,192,136,196,15,146,208,48,224,15,133,244,1,248,3,72,184, - 237,237,255,102,72,15,110,192,195,248,4,102,15,80,193,133,192,15,133,244, - 3,15,87,192,195,248,5,102,15,80,193,133,192,15,132,244,3,15,87,192,195,248, - 153,255,131,252,250,1,15,130,244,82,15,132,244,84,131,252,250,3,15,130,244, - 104,15,135,244,248,252,242,15,81,192,195,248,2,252,242,15,17,68,36,8,221, - 68,36,8,131,252,250,5,15,135,244,248,88,15,132,244,247,232,244,88,80,252, - 233,244,253,248,1,232,244,149,255,80,252,233,244,253,248,2,131,252,250,7, - 15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241,252,233,244, - 253,248,1,217,232,217,201,217,252,241,252,233,244,253,248,2,131,252,250,9, - 15,132,244,247,15,135,244,248,217,252,236,217,201,217,252,241,252,233,244, - 253,248,1,255,217,252,254,252,233,244,253,248,2,131,252,250,11,15,132,244, - 247,15,135,244,255,217,252,255,252,233,244,253,248,1,217,252,242,221,216, - 248,7,221,92,36,8,252,242,15,16,68,36,8,195,255,139,84,36,12,221,68,36,4, + 77,232,137,76,36,84,252,233,244,4,248,140,255,204,255,248,141,137,116,36, + 100,255,248,142,255,137,116,36,100,131,206,1,248,1,255,141,68,194,252,248, + 139,108,36,96,137,149,233,137,133,233,137,252,242,137,252,233,232,251,1,21, + 199,68,36,100,0,0,0,0,255,131,230,252,254,255,139,149,233,72,137,193,139, + 133,233,41,208,72,137,205,15,182,78,252,253,193,232,3,131,192,1,252,255,229, + 248,143,255,248,144,255,139,122,252,248,139,191,233,139,191,233,199,131,233, + 0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16, + 252,255,36,252,235,255,248,82,255,217,124,36,4,137,68,36,8,102,184,0,4,102, + 11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217,252,252, + 217,108,36,4,139,68,36,8,195,255,248,145,72,184,237,237,102,72,15,110,208, + 72,184,237,237,102,72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15, + 134,244,247,102,15,85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202, + 72,184,237,237,102,72,15,110,208,252,242,15,194,193,1,102,15,84,194,252,242, + 15,92,200,15,40,193,248,1,195,248,84,255,217,124,36,4,137,68,36,8,102,184, + 0,8,102,11,68,36,4,102,37,252,255,252,251,102,137,68,36,6,217,108,36,6,217, + 252,252,217,108,36,4,139,68,36,8,195,255,248,146,72,184,237,237,102,72,15, + 110,208,72,184,237,237,102,72,15,110,216,15,40,200,102,15,84,202,102,15,46, + 217,15,134,244,247,102,15,85,208,252,242,15,88,203,252,242,15,92,203,102, + 15,86,202,72,184,237,237,102,72,15,110,208,252,242,15,194,193,6,102,15,84, + 194,252,242,15,92,200,15,40,193,248,1,195,248,104,255,217,124,36,4,137,68, + 36,8,102,184,0,12,102,11,68,36,4,102,137,68,36,6,217,108,36,6,217,252,252, + 217,108,36,4,139,68,36,8,195,255,248,147,72,184,237,237,102,72,15,110,208, + 72,184,237,237,102,72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15, + 134,244,247,102,15,85,208,15,40,193,252,242,15,88,203,252,242,15,92,203,72, + 184,237,237,102,72,15,110,216,252,242,15,194,193,1,102,15,84,195,252,242, + 15,92,200,102,15,86,202,15,40,193,248,1,195,248,148,255,15,40,232,252,242, + 15,94,193,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216, + 15,40,224,102,15,84,226,102,15,46,220,15,134,244,247,102,15,85,208,252,242, + 15,88,227,252,242,15,92,227,102,15,86,226,72,184,237,237,102,72,15,110,208, + 252,242,15,194,196,1,102,15,84,194,252,242,15,92,224,15,40,197,252,242,15, + 89,204,252,242,15,92,193,195,248,1,252,242,15,89,200,15,40,197,252,242,15, + 92,193,195,255,217,193,216,252,241,217,124,36,4,102,184,0,4,102,11,68,36, + 4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217,252,252,217,108, + 36,4,222,201,222,252,233,195,255,248,88,217,252,234,222,201,248,149,217,84, + 36,8,129,124,36,8,0,0,128,127,15,132,244,247,129,124,36,8,0,0,128,252,255, + 15,132,244,248,248,150,217,192,217,252,252,220,252,233,217,201,217,252,240, + 217,232,222,193,217,252,253,221,217,248,1,195,248,2,221,216,217,252,238,195, + 255,248,107,255,248,151,252,242,15,45,193,252,242,15,42,208,102,15,46,202, + 15,133,244,254,15,138,244,255,248,152,131,252,248,1,15,142,244,252,248,1, + 169,1,0,0,0,15,133,244,248,252,242,15,89,192,209,232,252,233,244,1,248,2, + 209,232,15,132,244,251,15,40,200,248,3,252,242,15,89,192,209,232,15,132,244, + 250,15,131,244,3,255,252,242,15,89,200,252,233,244,3,248,4,252,242,15,89, + 193,248,5,195,248,6,15,132,244,5,15,130,244,253,80,72,184,237,237,102,72, + 15,110,200,252,242,15,94,200,88,15,40,193,252,247,216,131,252,248,1,15,132, + 244,5,252,233,244,1,248,7,72,184,237,237,102,72,15,110,192,195,248,8,102, + 72,15,126,200,72,209,224,72,193,192,12,72,61,252,254,15,0,0,15,132,244,248, + 255,102,72,15,126,192,72,209,224,15,132,244,250,72,193,192,12,72,61,252,254, + 15,0,0,15,132,244,251,252,242,15,17,76,36,16,252,242,15,17,68,36,8,221,68, + 36,16,221,68,36,8,217,252,241,217,192,217,252,252,220,252,233,217,201,217, + 252,240,217,232,222,193,217,252,253,221,217,221,92,36,8,252,242,15,16,68, + 36,8,195,248,9,72,184,237,237,102,72,15,110,208,102,15,46,194,15,132,244, + 247,15,40,193,248,1,195,248,2,72,184,237,237,102,72,15,110,208,102,15,84, + 194,72,184,237,237,102,72,15,110,208,102,15,46,194,15,132,244,1,102,15,80, + 193,15,87,192,136,196,15,146,208,48,224,15,133,244,1,248,3,72,184,237,237, + 255,102,72,15,110,192,195,248,4,102,15,80,193,133,192,15,133,244,3,15,87, + 192,195,248,5,102,15,80,193,133,192,15,132,244,3,15,87,192,195,248,153,255, 131,252,250,1,15,130,244,82,15,132,244,84,131,252,250,3,15,130,244,104,15, - 135,244,248,217,252,250,195,248,2,131,252,250,5,15,130,244,88,15,132,244, - 149,131,252,250,7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252, - 241,195,248,1,217,232,217,201,217,252,241,195,248,2,131,252,250,9,15,132, - 244,247,255,15,135,244,248,217,252,236,217,201,217,252,241,195,248,1,217, - 252,254,195,248,2,131,252,250,11,15,132,244,247,15,135,244,255,217,252,255, - 195,248,1,217,252,242,221,216,195,255,248,9,204,248,154,255,65,131,252,248, - 1,15,132,244,247,15,135,244,248,252,242,15,88,193,195,248,1,252,242,15,92, - 193,195,248,2,65,131,252,248,3,15,132,244,247,15,135,244,248,252,242,15,89, - 193,195,248,1,252,242,15,94,193,195,248,2,65,131,252,248,5,15,130,244,148, - 15,132,244,107,65,131,252,248,7,15,132,244,247,15,135,244,248,72,184,237, - 237,255,102,72,15,110,200,15,87,193,195,248,1,72,184,237,237,102,72,15,110, - 200,15,84,193,195,248,2,65,131,252,248,9,15,135,244,248,252,242,15,17,68, - 36,8,252,242,15,17,76,36,16,221,68,36,8,221,68,36,16,15,132,244,247,217,252, - 243,248,7,221,92,36,8,252,242,15,16,68,36,8,195,248,1,217,201,217,252,253, - 221,217,252,233,244,7,248,2,65,131,252,248,11,15,132,244,247,15,135,244,255, - 252,242,15,93,193,195,248,1,252,242,15,95,193,195,248,9,204,255,139,68,36, - 20,221,68,36,4,221,68,36,12,131,252,248,1,15,132,244,247,15,135,244,248,222, - 193,195,248,1,222,252,233,195,248,2,131,252,248,3,15,132,244,247,15,135,244, - 248,222,201,195,248,1,222,252,249,195,248,2,131,252,248,5,15,130,244,148, - 15,132,244,107,131,252,248,7,15,132,244,247,15,135,244,248,255,221,216,217, - 224,195,248,1,221,216,217,225,195,248,2,131,252,248,9,15,132,244,247,15,135, - 244,248,217,252,243,195,248,1,217,201,217,252,253,221,217,195,248,2,131,252, - 248,11,15,132,244,247,15,135,244,255,255,219,252,233,219,209,221,217,195, - 248,1,219,252,233,218,209,221,217,195,255,221,225,223,224,252,246,196,1,15, - 132,244,248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1, - 15,133,244,248,217,201,248,2,221,216,195,255,248,155,137,200,86,72,137,214, - 83,15,162,137,6,137,94,4,137,78,8,137,86,12,91,94,195,255,249,255,129,124, - 253,202,4,239,15,135,244,41,129,124,253,194,4,239,15,135,244,41,255,252,242, - 15,16,4,194,131,198,4,102,15,46,4,202,255,221,4,202,221,4,194,131,198,4,255, - 223,252,233,221,216,255,218,252,233,223,224,158,255,15,134,244,248,255,15, - 131,244,248,255,248,1,15,183,70,252,254,141,180,253,134,233,248,2,139,6,15, - 182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,139,108,194, - 4,131,198,4,129,252,253,239,15,135,244,251,129,124,253,202,4,239,15,135,244, + 135,244,248,252,242,15,81,192,195,248,2,252,242,15,17,68,36,8,221,68,36,8, + 131,252,250,5,15,135,244,248,88,15,132,244,247,232,244,88,80,252,233,244, + 253,248,1,232,244,149,255,80,252,233,244,253,248,2,131,252,250,7,15,132,244, + 247,15,135,244,248,217,252,237,217,201,217,252,241,252,233,244,253,248,1, + 217,232,217,201,217,252,241,252,233,244,253,248,2,131,252,250,9,15,132,244, + 247,15,135,244,248,217,252,236,217,201,217,252,241,252,233,244,253,248,1, + 255,217,252,254,252,233,244,253,248,2,131,252,250,11,15,132,244,247,15,135, + 244,255,217,252,255,252,233,244,253,248,1,217,252,242,221,216,248,7,221,92, + 36,8,252,242,15,16,68,36,8,195,255,139,84,36,12,221,68,36,4,131,252,250,1, + 15,130,244,82,15,132,244,84,131,252,250,3,15,130,244,104,15,135,244,248,217, + 252,250,195,248,2,131,252,250,5,15,130,244,88,15,132,244,149,131,252,250, + 7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241,195,248,1, + 217,232,217,201,217,252,241,195,248,2,131,252,250,9,15,132,244,247,255,15, + 135,244,248,217,252,236,217,201,217,252,241,195,248,1,217,252,254,195,248, + 2,131,252,250,11,15,132,244,247,15,135,244,255,217,252,255,195,248,1,217, + 252,242,221,216,195,255,248,9,204,248,154,255,65,131,252,248,1,15,132,244, + 247,15,135,244,248,252,242,15,88,193,195,248,1,252,242,15,92,193,195,248, + 2,65,131,252,248,3,15,132,244,247,15,135,244,248,252,242,15,89,193,195,248, + 1,252,242,15,94,193,195,248,2,65,131,252,248,5,15,130,244,148,15,132,244, + 107,65,131,252,248,7,15,132,244,247,15,135,244,248,72,184,237,237,255,102, + 72,15,110,200,15,87,193,195,248,1,72,184,237,237,102,72,15,110,200,15,84, + 193,195,248,2,65,131,252,248,9,15,135,244,248,252,242,15,17,68,36,8,252,242, + 15,17,76,36,16,221,68,36,8,221,68,36,16,15,132,244,247,217,252,243,248,7, + 221,92,36,8,252,242,15,16,68,36,8,195,248,1,217,201,217,252,253,221,217,252, + 233,244,7,248,2,65,131,252,248,11,15,132,244,247,15,135,244,255,252,242,15, + 93,193,195,248,1,252,242,15,95,193,195,248,9,204,255,139,68,36,20,221,68, + 36,4,221,68,36,12,131,252,248,1,15,132,244,247,15,135,244,248,222,193,195, + 248,1,222,252,233,195,248,2,131,252,248,3,15,132,244,247,15,135,244,248,222, + 201,195,248,1,222,252,249,195,248,2,131,252,248,5,15,130,244,148,15,132,244, + 107,131,252,248,7,15,132,244,247,15,135,244,248,255,221,216,217,224,195,248, + 1,221,216,217,225,195,248,2,131,252,248,9,15,132,244,247,15,135,244,248,217, + 252,243,195,248,1,217,201,217,252,253,221,217,195,248,2,131,252,248,11,15, + 132,244,247,15,135,244,255,255,219,252,233,219,209,221,217,195,248,1,219, + 252,233,218,209,221,217,195,255,221,225,223,224,252,246,196,1,15,132,244, + 248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133, + 244,248,217,201,248,2,221,216,195,255,248,155,137,200,86,72,137,214,83,15, + 162,137,6,137,94,4,137,78,8,137,86,12,91,94,195,255,249,255,129,124,253,202, + 4,239,15,135,244,41,129,124,253,194,4,239,15,135,244,41,255,252,242,15,16, + 4,194,131,198,4,102,15,46,4,202,255,221,4,202,221,4,194,131,198,4,255,223, + 252,233,221,216,255,218,252,233,223,224,158,255,15,134,244,248,255,15,131, + 244,248,255,248,1,15,183,70,252,254,141,180,253,134,233,248,2,139,6,15,182, + 204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,139,108,194,4, + 131,198,4,129,252,253,239,15,135,244,251,129,124,253,202,4,239,15,135,244, 251,255,252,242,15,16,4,194,102,15,46,4,202,255,221,4,202,221,4,194,255,15, 138,244,248,15,133,244,248,255,15,138,244,248,15,132,244,247,255,248,1,15, 183,70,252,254,141,180,253,134,233,248,2,255,248,2,15,183,70,252,254,141, @@ -1325,77 +1325,81 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) #endif dasm_put(Dst, 7119); #if LJ_HASJIT - dasm_put(Dst, 7122, DISPATCH_J(L)); + dasm_put(Dst, 6994); #endif - dasm_put(Dst, 7135); + dasm_put(Dst, 7126); #if LJ_HASJIT - dasm_put(Dst, 7138, DISPATCH_J(L)); + dasm_put(Dst, 7129); #endif - dasm_put(Dst, 7145, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 7139, Dt1(->base), Dt1(->top)); +#if LJ_HASJIT + dasm_put(Dst, 7173); +#endif + dasm_put(Dst, 7178, Dt1(->base), Dt1(->top)); #if LJ_HASJIT dasm_put(Dst, 7117); #endif - dasm_put(Dst, 7213); + dasm_put(Dst, 7209); #if LJ_HASJIT - dasm_put(Dst, 7216, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); + dasm_put(Dst, 7212, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); #endif - dasm_put(Dst, 7257); + dasm_put(Dst, 7253); if (!sse) { - dasm_put(Dst, 7260); + dasm_put(Dst, 7256); } - dasm_put(Dst, 7305, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7301, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7391); + dasm_put(Dst, 7387); } - dasm_put(Dst, 7436, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); + dasm_put(Dst, 7432, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7522); + dasm_put(Dst, 7518); } - dasm_put(Dst, 7561, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7557, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (sse) { - dasm_put(Dst, 7650, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7646, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); } else { - dasm_put(Dst, 7764); + dasm_put(Dst, 7760); } - dasm_put(Dst, 7811); + dasm_put(Dst, 7807); if (!sse) { } else { - dasm_put(Dst, 7885); + dasm_put(Dst, 7881); } - dasm_put(Dst, 7888); - dasm_put(Dst, 7973, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); - dasm_put(Dst, 8074, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); - dasm_put(Dst, 8242); + dasm_put(Dst, 7884); + dasm_put(Dst, 7969, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 8070, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); + dasm_put(Dst, 8238); if (sse) { - dasm_put(Dst, 8283); - dasm_put(Dst, 8353); - dasm_put(Dst, 8426); + dasm_put(Dst, 8279); + dasm_put(Dst, 8349); + dasm_put(Dst, 8422); } else { - dasm_put(Dst, 8476); - dasm_put(Dst, 8568); + dasm_put(Dst, 8472); + dasm_put(Dst, 8564); } - dasm_put(Dst, 8614); + dasm_put(Dst, 8610); if (sse) { - dasm_put(Dst, 8620, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); - dasm_put(Dst, 8709, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); + dasm_put(Dst, 8616, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); + dasm_put(Dst, 8705, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); } else { - dasm_put(Dst, 8833); - dasm_put(Dst, 8916); - if (cmov) { - dasm_put(Dst, 8971); - } else { - dasm_put(Dst, 8990); - } dasm_put(Dst, 8829); + dasm_put(Dst, 8912); + if (cmov) { + dasm_put(Dst, 8967); + } else { + dasm_put(Dst, 8986); + } + dasm_put(Dst, 8825); } - dasm_put(Dst, 9031); + dasm_put(Dst, 9027); } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) { int vk = 0; - dasm_put(Dst, 9057, defop); + dasm_put(Dst, 9053, defop); switch (op) { @@ -1404,600 +1408,600 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: - dasm_put(Dst, 9059, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9055, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9080); + dasm_put(Dst, 9076); } else { - dasm_put(Dst, 9095); + dasm_put(Dst, 9091); if (cmov) { - dasm_put(Dst, 9105); + dasm_put(Dst, 9101); } else { - dasm_put(Dst, 9111); + dasm_put(Dst, 9107); } } switch (op) { case BC_ISLT: - dasm_put(Dst, 9118); + dasm_put(Dst, 9114); break; case BC_ISGE: - dasm_put(Dst, 8911); + dasm_put(Dst, 8907); break; case BC_ISLE: dasm_put(Dst, 5872); break; case BC_ISGT: - dasm_put(Dst, 9123); + dasm_put(Dst, 9119); break; default: break; /* Shut up GCC. */ } - dasm_put(Dst, 9128, -BCBIAS_J*4); + dasm_put(Dst, 9124, -BCBIAS_J*4); break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; - dasm_put(Dst, 9162, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9158, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9188); + dasm_put(Dst, 9184); } else { - dasm_put(Dst, 9200); + dasm_put(Dst, 9196); if (cmov) { - dasm_put(Dst, 9105); + dasm_put(Dst, 9101); } else { - dasm_put(Dst, 9111); + dasm_put(Dst, 9107); } } iseqne_fp: if (vk) { - dasm_put(Dst, 9207); + dasm_put(Dst, 9203); } else { - dasm_put(Dst, 9216); + dasm_put(Dst, 9212); } iseqne_end: if (vk) { - dasm_put(Dst, 9225, -BCBIAS_J*4); + dasm_put(Dst, 9221, -BCBIAS_J*4); } else { - dasm_put(Dst, 9240, -BCBIAS_J*4); + dasm_put(Dst, 9236, -BCBIAS_J*4); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); if (op == BC_ISEQV || op == BC_ISNEV) { - dasm_put(Dst, 9255, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<metatable), Dt6(->nomm), 1<>32)); + dasm_put(Dst, 9539, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); } else { - dasm_put(Dst, 9568); + dasm_put(Dst, 9564); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_LEN: - dasm_put(Dst, 9577, LJ_TSTR); + dasm_put(Dst, 9573, LJ_TSTR); if (sse) { - dasm_put(Dst, 9591, Dt5(->len)); + dasm_put(Dst, 9587, Dt5(->len)); } else { - dasm_put(Dst, 9609, Dt5(->len)); + dasm_put(Dst, 9605, Dt5(->len)); } - dasm_put(Dst, 9618, LJ_TTAB); + dasm_put(Dst, 9614, LJ_TTAB); if (sse) { - dasm_put(Dst, 9659); + dasm_put(Dst, 9655); } else { } - dasm_put(Dst, 9668); + dasm_put(Dst, 9664); break; /* -- Binary ops -------------------------------------------------------- */ case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: - dasm_put(Dst, 9678); + dasm_put(Dst, 9674); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9686, LJ_TISNUM); + dasm_put(Dst, 9682, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9698); + dasm_put(Dst, 9694); } else { - dasm_put(Dst, 9712); + dasm_put(Dst, 9708); } break; case 1: - dasm_put(Dst, 9720, LJ_TISNUM); + dasm_put(Dst, 9716, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9732); + dasm_put(Dst, 9728); } else { - dasm_put(Dst, 9746); + dasm_put(Dst, 9742); } break; default: - dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9750, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9776); + dasm_put(Dst, 9772); } else { - dasm_put(Dst, 9790); + dasm_put(Dst, 9786); } break; } if (sse) { - dasm_put(Dst, 9561); + dasm_put(Dst, 9557); } else { - dasm_put(Dst, 9573); + dasm_put(Dst, 9569); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: - dasm_put(Dst, 9678); + dasm_put(Dst, 9674); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9686, LJ_TISNUM); + dasm_put(Dst, 9682, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9798); + dasm_put(Dst, 9794); } else { - dasm_put(Dst, 9812); + dasm_put(Dst, 9808); } break; case 1: - dasm_put(Dst, 9720, LJ_TISNUM); + dasm_put(Dst, 9716, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9820); + dasm_put(Dst, 9816); } else { - dasm_put(Dst, 9834); + dasm_put(Dst, 9830); } break; default: - dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9750, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9842); + dasm_put(Dst, 9838); } else { - dasm_put(Dst, 9856); + dasm_put(Dst, 9852); } break; } if (sse) { - dasm_put(Dst, 9561); + dasm_put(Dst, 9557); } else { - dasm_put(Dst, 9573); + dasm_put(Dst, 9569); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_MULVN: case BC_MULNV: case BC_MULVV: - dasm_put(Dst, 9678); + dasm_put(Dst, 9674); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9686, LJ_TISNUM); + dasm_put(Dst, 9682, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9864); + dasm_put(Dst, 9860); } else { - dasm_put(Dst, 9878); + dasm_put(Dst, 9874); } break; case 1: - dasm_put(Dst, 9720, LJ_TISNUM); + dasm_put(Dst, 9716, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9886); + dasm_put(Dst, 9882); } else { - dasm_put(Dst, 9900); + dasm_put(Dst, 9896); } break; default: - dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9750, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9908); + dasm_put(Dst, 9904); } else { - dasm_put(Dst, 9922); + dasm_put(Dst, 9918); } break; } if (sse) { - dasm_put(Dst, 9561); + dasm_put(Dst, 9557); } else { - dasm_put(Dst, 9573); + dasm_put(Dst, 9569); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: - dasm_put(Dst, 9678); + dasm_put(Dst, 9674); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9686, LJ_TISNUM); + dasm_put(Dst, 9682, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9930); + dasm_put(Dst, 9926); } else { - dasm_put(Dst, 9944); + dasm_put(Dst, 9940); } break; case 1: - dasm_put(Dst, 9720, LJ_TISNUM); + dasm_put(Dst, 9716, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9952); + dasm_put(Dst, 9948); } else { - dasm_put(Dst, 9966); + dasm_put(Dst, 9962); } break; default: - dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9750, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9974); + dasm_put(Dst, 9970); } else { - dasm_put(Dst, 9988); + dasm_put(Dst, 9984); } break; } if (sse) { - dasm_put(Dst, 9561); + dasm_put(Dst, 9557); } else { - dasm_put(Dst, 9573); + dasm_put(Dst, 9569); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_MODVN: - dasm_put(Dst, 9678); + dasm_put(Dst, 9674); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9686, LJ_TISNUM); + dasm_put(Dst, 9682, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9996); + dasm_put(Dst, 9992); } else { - dasm_put(Dst, 10010); + dasm_put(Dst, 10006); } break; case 1: - dasm_put(Dst, 9720, LJ_TISNUM); + dasm_put(Dst, 9716, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10018); + dasm_put(Dst, 10014); } else { - dasm_put(Dst, 10032); + dasm_put(Dst, 10028); } break; default: - dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9750, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10040); + dasm_put(Dst, 10036); } else { - dasm_put(Dst, 10054); + dasm_put(Dst, 10050); } break; } - dasm_put(Dst, 10062); + dasm_put(Dst, 10058); if (sse) { - dasm_put(Dst, 9561); + dasm_put(Dst, 9557); } else { - dasm_put(Dst, 9573); + dasm_put(Dst, 9569); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_MODNV: case BC_MODVV: - dasm_put(Dst, 9678); + dasm_put(Dst, 9674); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9686, LJ_TISNUM); + dasm_put(Dst, 9682, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9996); + dasm_put(Dst, 9992); } else { - dasm_put(Dst, 10010); + dasm_put(Dst, 10006); } break; case 1: - dasm_put(Dst, 9720, LJ_TISNUM); + dasm_put(Dst, 9716, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10018); + dasm_put(Dst, 10014); } else { - dasm_put(Dst, 10032); + dasm_put(Dst, 10028); } break; default: - dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9750, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10040); + dasm_put(Dst, 10036); } else { - dasm_put(Dst, 10054); + dasm_put(Dst, 10050); } break; } - dasm_put(Dst, 10068); + dasm_put(Dst, 10064); break; case BC_POW: - dasm_put(Dst, 9678); + dasm_put(Dst, 9674); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9686, LJ_TISNUM); + dasm_put(Dst, 9682, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9996); + dasm_put(Dst, 9992); } else { - dasm_put(Dst, 10010); + dasm_put(Dst, 10006); } break; case 1: - dasm_put(Dst, 9720, LJ_TISNUM); + dasm_put(Dst, 9716, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10018); + dasm_put(Dst, 10014); } else { - dasm_put(Dst, 10032); + dasm_put(Dst, 10028); } break; default: - dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9750, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10040); + dasm_put(Dst, 10036); } else { - dasm_put(Dst, 10054); + dasm_put(Dst, 10050); } break; } - dasm_put(Dst, 10073); + dasm_put(Dst, 10069); if (sse) { - dasm_put(Dst, 9561); + dasm_put(Dst, 9557); } else { - dasm_put(Dst, 9573); + dasm_put(Dst, 9569); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_CAT: - dasm_put(Dst, 10077, Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10073, Dt1(->base), Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 10167, LJ_TSTR); + dasm_put(Dst, 10163, LJ_TSTR); break; case BC_KSHORT: if (sse) { - dasm_put(Dst, 10202); + dasm_put(Dst, 10198); } else { - dasm_put(Dst, 10217); + dasm_put(Dst, 10213); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_KNUM: if (sse) { - dasm_put(Dst, 10225); + dasm_put(Dst, 10221); } else { - dasm_put(Dst, 10238); + dasm_put(Dst, 10234); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_KPRI: - dasm_put(Dst, 10245); + dasm_put(Dst, 10241); break; case BC_KNIL: - dasm_put(Dst, 10273, LJ_TNIL); + dasm_put(Dst, 10269, LJ_TNIL); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 10320, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10316, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) - dasm_put(Dst, 10365, 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); - dasm_put(Dst, 10456); + dasm_put(Dst, 10361, 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); + dasm_put(Dst, 10452); break; #undef TV2MARKOFS case BC_USETS: - dasm_put(Dst, 10468, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); + dasm_put(Dst, 10464, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 10561); + dasm_put(Dst, 10557); if (sse) { - dasm_put(Dst, 10566); + dasm_put(Dst, 10562); } else { - dasm_put(Dst, 9381); + dasm_put(Dst, 9377); } - dasm_put(Dst, 10573, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10569, offsetof(GCfuncL, uvptr), DtA(->v)); if (sse) { - dasm_put(Dst, 10582); + dasm_put(Dst, 10578); } else { - dasm_put(Dst, 10588); + dasm_put(Dst, 10584); } - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_USETP: - dasm_put(Dst, 10591, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10587, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 10630, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10626, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 10685, Dt1(->base), Dt1(->base), LJ_TFUNC); + dasm_put(Dst, 10681, Dt1(->base), Dt1(->base), LJ_TFUNC); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: - dasm_put(Dst, 10751, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10747, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); break; case BC_TDUP: - dasm_put(Dst, 10872, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10868, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_GGET: - dasm_put(Dst, 10967, Dt7(->env)); + dasm_put(Dst, 10963, Dt7(->env)); break; case BC_GSET: - dasm_put(Dst, 10986, Dt7(->env)); + dasm_put(Dst, 10982, Dt7(->env)); break; case BC_TGETV: - dasm_put(Dst, 11005, LJ_TTAB, LJ_TISNUM); + dasm_put(Dst, 11001, LJ_TTAB, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11038); + dasm_put(Dst, 11034); } else { } - dasm_put(Dst, 11059, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11255, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11251, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); - dasm_put(Dst, 11544, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11456, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); + dasm_put(Dst, 11540, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETS: - dasm_put(Dst, 11606, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11682, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); - dasm_put(Dst, 11775, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11602, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11678, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); + dasm_put(Dst, 11771, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 11866, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); - dasm_put(Dst, 11965, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11862, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); + dasm_put(Dst, 11961, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 12011); + dasm_put(Dst, 12007); if (sse) { - dasm_put(Dst, 10566); + dasm_put(Dst, 10562); } else { } - dasm_put(Dst, 12016, Dt6(->marked), LJ_GC_BLACK); + dasm_put(Dst, 12012, Dt6(->marked), LJ_GC_BLACK); if (sse) { - dasm_put(Dst, 12041); + dasm_put(Dst, 12037); } else { } - dasm_put(Dst, 12048, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); - dasm_put(Dst, 12174, Dt6(->gclist)); + dasm_put(Dst, 12044, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); + dasm_put(Dst, 12170, Dt6(->gclist)); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: - dasm_put(Dst, 9682); + dasm_put(Dst, 9678); if (op == BC_CALLM) { - dasm_put(Dst, 12182); + dasm_put(Dst, 12178); } - dasm_put(Dst, 12187, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 12183, LJ_TFUNC, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 12182); + dasm_put(Dst, 12178); break; case BC_CALLT: - dasm_put(Dst, 12229, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); - dasm_put(Dst, 12348, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 12225, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); + dasm_put(Dst, 12344, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); break; case BC_ITERC: - dasm_put(Dst, 12406, LJ_TFUNC, 2+1, Dt7(->pc)); + dasm_put(Dst, 12402, LJ_TFUNC, 2+1, Dt7(->pc)); break; case BC_VARG: - dasm_put(Dst, 12487, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); - dasm_put(Dst, 12632, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 12483, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); + dasm_put(Dst, 12628, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 12182); + dasm_put(Dst, 12178); break; case BC_RET: case BC_RET0: case BC_RET1: if (op != BC_RET0) { - dasm_put(Dst, 12731); + dasm_put(Dst, 12727); } - dasm_put(Dst, 12735, FRAME_TYPE); + dasm_put(Dst, 12731, FRAME_TYPE); switch (op) { case BC_RET: - dasm_put(Dst, 12754); + dasm_put(Dst, 12750); break; case BC_RET1: - dasm_put(Dst, 12812); + dasm_put(Dst, 12808); /* fallthrough */ case BC_RET0: - dasm_put(Dst, 12828); + dasm_put(Dst, 12824); default: break; } - dasm_put(Dst, 12839, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 12835, Dt7(->pc), PC2PROTO(k)); if (op == BC_RET) { - dasm_put(Dst, 12883, LJ_TNIL); + dasm_put(Dst, 12879, LJ_TNIL); } else { - dasm_put(Dst, 12892, LJ_TNIL); + dasm_put(Dst, 12888, LJ_TNIL); } - dasm_put(Dst, 12899); + dasm_put(Dst, 12895); if (op != BC_RET0) { - dasm_put(Dst, 12920); + dasm_put(Dst, 12916); } dasm_put(Dst, 4542); break; @@ -2007,7 +2011,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 12924, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 12920, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2019,57 +2023,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORI: case BC_IFORL: vk = (op == BC_IFORL || op == BC_JFORL); - dasm_put(Dst, 12945); + dasm_put(Dst, 12941); if (!vk) { - dasm_put(Dst, 12949, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 12945, LJ_TISNUM, LJ_TISNUM); } - dasm_put(Dst, 12968); + dasm_put(Dst, 12964); if (!vk) { - dasm_put(Dst, 12972, LJ_TISNUM); + dasm_put(Dst, 12968, LJ_TISNUM); } if (sse) { - dasm_put(Dst, 12981); + dasm_put(Dst, 12977); if (vk) { - dasm_put(Dst, 12993); + dasm_put(Dst, 12989); } else { - dasm_put(Dst, 13012); + dasm_put(Dst, 13008); } - dasm_put(Dst, 13017); + dasm_put(Dst, 13013); } else { - dasm_put(Dst, 13030); + dasm_put(Dst, 13026); if (vk) { - dasm_put(Dst, 13036); + dasm_put(Dst, 13032); } else { - dasm_put(Dst, 13052); + dasm_put(Dst, 13048); } - dasm_put(Dst, 13060); + dasm_put(Dst, 13056); if (cmov) { - dasm_put(Dst, 9105); + dasm_put(Dst, 9101); } else { - dasm_put(Dst, 9111); + dasm_put(Dst, 9107); } if (!cmov) { - dasm_put(Dst, 13065); + dasm_put(Dst, 13061); } } if (op == BC_FORI) { - dasm_put(Dst, 13071, -BCBIAS_J*4); + dasm_put(Dst, 13067, -BCBIAS_J*4); } else if (op == BC_JFORI) { - dasm_put(Dst, 13081, -BCBIAS_J*4, BC_JLOOP); + dasm_put(Dst, 13077, -BCBIAS_J*4, BC_JLOOP); } else if (op == BC_IFORL) { - dasm_put(Dst, 13095, -BCBIAS_J*4); + dasm_put(Dst, 13091, -BCBIAS_J*4); } else { - dasm_put(Dst, 13091, BC_JLOOP); + dasm_put(Dst, 13087, BC_JLOOP); } - dasm_put(Dst, 9140); + dasm_put(Dst, 9136); if (sse) { - dasm_put(Dst, 13105); + dasm_put(Dst, 13101); } break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 12924, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 12920, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2078,33 +2082,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IITERL: - dasm_put(Dst, 13116, LJ_TNIL); + dasm_put(Dst, 13112, LJ_TNIL); if (op == BC_JITERL) { - dasm_put(Dst, 13131, BC_JLOOP); + dasm_put(Dst, 13127, BC_JLOOP); } else { - dasm_put(Dst, 13145, -BCBIAS_J*4); + dasm_put(Dst, 13141, -BCBIAS_J*4); } - dasm_put(Dst, 9440); + dasm_put(Dst, 9436); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 12924, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 12920, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; case BC_ILOOP: - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 13161, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); + dasm_put(Dst, 13157, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); #endif break; case BC_JMP: - dasm_put(Dst, 13185, -BCBIAS_J*4); + dasm_put(Dst, 13181, -BCBIAS_J*4); break; /* -- Function headers -------------------------------------------------- */ @@ -2127,13 +2131,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IFUNCF: - dasm_put(Dst, 13210, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); + dasm_put(Dst, 13206, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); if (op == BC_JFUNCF) { - dasm_put(Dst, 13240, BC_JLOOP); + dasm_put(Dst, 13236, BC_JLOOP); } else { - dasm_put(Dst, 7237); + dasm_put(Dst, 7233); } - dasm_put(Dst, 13249, LJ_TNIL); + dasm_put(Dst, 13245, LJ_TNIL); break; case BC_JFUNCV: @@ -2144,30 +2148,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 13271, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); + dasm_put(Dst, 13267, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); if (op == BC_JFUNCV) { - dasm_put(Dst, 13240, BC_JLOOP); + dasm_put(Dst, 13236, BC_JLOOP); } else { - dasm_put(Dst, 13362, -4+PC2PROTO(k)); + dasm_put(Dst, 13358, -4+PC2PROTO(k)); } - dasm_put(Dst, 13385, LJ_TNIL); + dasm_put(Dst, 13381, LJ_TNIL); break; case BC_FUNCC: case BC_FUNCCW: - dasm_put(Dst, 13407, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); + dasm_put(Dst, 13403, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); if (op == BC_FUNCC) { + dasm_put(Dst, 13433); + } else { dasm_put(Dst, 13437); - } else { - dasm_put(Dst, 13441); } - dasm_put(Dst, 13449, DISPATCH_GL(vmstate), ~LJ_VMST_C); + dasm_put(Dst, 13445, DISPATCH_GL(vmstate), ~LJ_VMST_C); if (op == BC_FUNCC) { - dasm_put(Dst, 13458); + dasm_put(Dst, 13454); } else { - dasm_put(Dst, 13462, DISPATCH_GL(wrapf)); + dasm_put(Dst, 13458, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 13467, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); + dasm_put(Dst, 13463, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); break; /* ---------------------------------------------------------------------- */ @@ -2195,7 +2199,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx, cmov, sse); - dasm_put(Dst, 13492); + dasm_put(Dst, 13488); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op, cmov, sse); diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index 9d201f91..5ec87aa8 100644 --- a/src/buildvm_x86.dasc +++ b/src/buildvm_x86.dasc @@ -2518,14 +2518,15 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) #endif | |->vm_callhook: // Dispatch target for call hooks. + | mov SAVE_PC, PC #if LJ_HASJIT - | mov aword [DISPATCH+DISPATCH_J(L)], 0 // Marker for call hook. | jmp >1 #endif | |->vm_hotcall: // Hot call counter underflow. #if LJ_HASJIT - | mov aword [DISPATCH+DISPATCH_J(L)], L:RBa + | mov SAVE_PC, PC + | or PC, 1 // Marker for hot call. |1: #endif | lea RD, [BASE+NARGS:RD*8-8] @@ -2534,10 +2535,12 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | mov L:RB->top, RD | mov FCARG2, PC | mov FCARG1, L:RB - | mov SAVE_PC, PC | call extern lj_dispatch_call@8 // (lua_State *L, const BCIns *pc) | // ASMFunction returned in eax/rax (RDa). | mov SAVE_PC, 0 // Invalidate for subsequent line hook. +#if LJ_HASJIT + | and PC, -2 +#endif | mov BASE, L:RB->base | mov RAa, RDa | mov RD, L:RB->top diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h index cc1ac38d..ef160e61 100644 --- a/src/buildvm_x86.h +++ b/src/buildvm_x86.h @@ -12,7 +12,7 @@ #define DASM_SECTION_CODE_OP 0 #define DASM_SECTION_CODE_SUB 1 #define DASM_MAXSECTION 2 -static const unsigned char build_actionlist[15167] = { +static const unsigned char build_actionlist[15165] = { 254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141, 76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36, 20,252,247,198,237,15,132,244,13,248,14,252,247,198,237,15,132,244,10,199, @@ -406,30 +406,30 @@ static const unsigned char build_actionlist[15167] = { 183,70,252,254,252,255,164,253,171,233,248,139,131,198,4,139,77,232,137,76, 36,20,252,233,244,4,248,140,255,139,106,252,248,139,173,233,15,182,133,233, 141,4,194,139,108,36,48,137,149,233,137,133,233,137,252,242,141,139,233,137, - 171,233,137,116,36,24,232,251,1,21,252,233,244,3,255,248,141,255,199,131, - 233,0,0,0,0,252,233,244,247,255,248,142,255,137,171,233,248,1,255,141,68, - 194,252,248,139,108,36,48,137,149,233,137,133,233,137,252,242,137,252,233, - 137,116,36,24,232,251,1,22,199,68,36,24,0,0,0,0,139,149,233,137,193,139,133, - 233,41,208,137,205,15,182,78,252,253,193,232,3,131,192,1,252,255,229,248, - 143,255,85,141,108,36,12,85,83,82,81,80,15,182,69,252,252,138,101,252,248, - 137,125,252,252,137,117,252,248,139,93,0,139,139,233,199,131,233,237,137, - 131,233,137,139,233,129,252,236,239,252,247,131,233,237,15,132,244,247,252, - 242,15,17,125,216,252,242,15,17,117,208,252,242,15,17,109,200,252,242,15, - 17,101,192,252,242,15,17,93,184,252,242,15,17,85,176,252,242,15,17,77,168, - 252,242,15,17,69,160,248,1,139,171,233,139,147,233,137,171,233,137,149,233, - 141,84,36,16,141,139,233,232,251,1,23,137,196,139,149,233,139,116,36,24,137, - 108,36,48,255,248,144,255,139,122,252,248,139,191,233,139,191,233,199,131, - 233,0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232,131,198,4,193,232, - 16,252,255,36,171,255,248,82,255,217,124,36,4,137,68,36,8,102,184,0,4,102, - 11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217,252,252, - 217,108,36,4,139,68,36,8,195,255,248,145,102,15,252,239,210,102,15,118,210, - 102,15,115,210,1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15,40,200, - 102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203, - 252,242,15,92,203,102,15,86,202,184,0,0,252,240,63,102,15,110,208,102,15, - 112,210,81,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193, - 248,1,195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4, - 102,37,252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36, - 4,139,68,36,8,195,255,248,146,102,15,252,239,210,102,15,118,210,102,15,115, + 171,233,137,116,36,24,232,251,1,21,252,233,244,3,255,248,141,137,116,36,24, + 255,248,142,255,137,116,36,24,131,206,1,248,1,255,141,68,194,252,248,139, + 108,36,48,137,149,233,137,133,233,137,252,242,137,252,233,232,251,1,22,199, + 68,36,24,0,0,0,0,255,131,230,252,254,255,139,149,233,137,193,139,133,233, + 41,208,137,205,15,182,78,252,253,193,232,3,131,192,1,252,255,229,248,143, + 255,85,141,108,36,12,85,83,82,81,80,15,182,69,252,252,138,101,252,248,137, + 125,252,252,137,117,252,248,139,93,0,139,139,233,199,131,233,237,137,131, + 233,137,139,233,129,252,236,239,252,247,131,233,237,15,132,244,247,252,242, + 15,17,125,216,252,242,15,17,117,208,252,242,15,17,109,200,252,242,15,17,101, + 192,252,242,15,17,93,184,252,242,15,17,85,176,252,242,15,17,77,168,252,242, + 15,17,69,160,248,1,139,171,233,139,147,233,137,171,233,137,149,233,141,84, + 36,16,141,139,233,232,251,1,23,137,196,139,149,233,139,116,36,24,137,108, + 36,48,255,248,144,255,139,122,252,248,139,191,233,139,191,233,199,131,233, + 0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16, + 252,255,36,171,255,248,82,255,217,124,36,4,137,68,36,8,102,184,0,4,102,11, + 68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217,252,252,217, + 108,36,4,139,68,36,8,195,255,248,145,102,15,252,239,210,102,15,118,210,102, + 15,115,210,1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15,40,200,102, + 15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252, + 242,15,92,203,102,15,86,202,184,0,0,252,240,63,102,15,110,208,102,15,112, + 210,81,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193,248, + 1,195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4,102, + 37,252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4, + 139,68,36,8,195,255,248,146,102,15,252,239,210,102,15,118,210,102,15,115, 210,1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15,40,200,102,15,84, 202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252,242, 15,92,203,102,15,86,202,184,0,0,252,240,191,102,15,110,208,102,15,112,210, @@ -1441,99 +1441,103 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) #endif dasm_put(Dst, 8157); #if LJ_HASJIT - dasm_put(Dst, 8160, DISPATCH_J(L)); + dasm_put(Dst, 7989); #endif - dasm_put(Dst, 8172); + dasm_put(Dst, 8164); #if LJ_HASJIT - dasm_put(Dst, 8175, DISPATCH_J(L)); + dasm_put(Dst, 8167); #endif - dasm_put(Dst, 8181, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 8177, Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 8247, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_J(flags), JIT_F_SSE2, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), Dt1(->base), GG_DISP2J, Dt1(->base)); + dasm_put(Dst, 8211); #endif - dasm_put(Dst, 8390); + dasm_put(Dst, 8216, Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 8393, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); + dasm_put(Dst, 8245, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_J(flags), JIT_F_SSE2, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), Dt1(->base), GG_DISP2J, Dt1(->base)); #endif - dasm_put(Dst, 8433); + dasm_put(Dst, 8388); +#if LJ_HASJIT + dasm_put(Dst, 8391, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); +#endif + dasm_put(Dst, 8431); if (!sse) { - dasm_put(Dst, 8436); + dasm_put(Dst, 8434); } - dasm_put(Dst, 8481); + dasm_put(Dst, 8479); if (!sse) { - dasm_put(Dst, 8583); + dasm_put(Dst, 8581); } - dasm_put(Dst, 8628); + dasm_put(Dst, 8626); if (!sse) { - dasm_put(Dst, 8730); + dasm_put(Dst, 8728); } - dasm_put(Dst, 8769); + dasm_put(Dst, 8767); if (sse) { - dasm_put(Dst, 8874); + dasm_put(Dst, 8872); } else { - dasm_put(Dst, 9004); + dasm_put(Dst, 9002); } - dasm_put(Dst, 9051); + dasm_put(Dst, 9049); if (!sse) { - dasm_put(Dst, 9125); + dasm_put(Dst, 9123); if (cmov) { - dasm_put(Dst, 9136); + dasm_put(Dst, 9134); } else { - dasm_put(Dst, 9140); + dasm_put(Dst, 9138); } - dasm_put(Dst, 9147); - dasm_put(Dst, 9221); - dasm_put(Dst, 9321); + dasm_put(Dst, 9145); + dasm_put(Dst, 9219); + dasm_put(Dst, 9319); if (cmov) { - dasm_put(Dst, 9324); + dasm_put(Dst, 9322); } else { - dasm_put(Dst, 9328); + dasm_put(Dst, 9326); } - dasm_put(Dst, 9335); + dasm_put(Dst, 9333); if (cmov) { - dasm_put(Dst, 9136); + dasm_put(Dst, 9134); } else { - dasm_put(Dst, 9140); + dasm_put(Dst, 9138); } - dasm_put(Dst, 9353); + dasm_put(Dst, 9351); } else { - dasm_put(Dst, 9432); + dasm_put(Dst, 9430); } - dasm_put(Dst, 9435); - dasm_put(Dst, 9520); - dasm_put(Dst, 9651); - dasm_put(Dst, 9850); + dasm_put(Dst, 9433); + dasm_put(Dst, 9518); + dasm_put(Dst, 9649); + dasm_put(Dst, 9848); if (sse) { - dasm_put(Dst, 9873); - dasm_put(Dst, 9930); - dasm_put(Dst, 10021); + dasm_put(Dst, 9871); + dasm_put(Dst, 9928); + dasm_put(Dst, 10019); } else { - dasm_put(Dst, 10063); - dasm_put(Dst, 10155); + dasm_put(Dst, 10061); + dasm_put(Dst, 10153); } - dasm_put(Dst, 10201); + dasm_put(Dst, 10199); if (sse) { - dasm_put(Dst, 10207); - dasm_put(Dst, 10312); - dasm_put(Dst, 10395); + dasm_put(Dst, 10205); + dasm_put(Dst, 10310); + dasm_put(Dst, 10393); } else { - dasm_put(Dst, 10467); - dasm_put(Dst, 10550); + dasm_put(Dst, 10465); + dasm_put(Dst, 10548); if (cmov) { - dasm_put(Dst, 10605); + dasm_put(Dst, 10603); } else { - dasm_put(Dst, 10624); + dasm_put(Dst, 10622); } - dasm_put(Dst, 10463); + dasm_put(Dst, 10461); } - dasm_put(Dst, 10665); + dasm_put(Dst, 10663); } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) { int vk = 0; - dasm_put(Dst, 10719, defop); + dasm_put(Dst, 10717, defop); switch (op) { @@ -1542,617 +1546,617 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: - dasm_put(Dst, 10721, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 10719, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10742); + dasm_put(Dst, 10740); } else { - dasm_put(Dst, 10757); + dasm_put(Dst, 10755); if (cmov) { - dasm_put(Dst, 10767); + dasm_put(Dst, 10765); } else { - dasm_put(Dst, 10773); + dasm_put(Dst, 10771); } } switch (op) { case BC_ISLT: - dasm_put(Dst, 10780); + dasm_put(Dst, 10778); break; case BC_ISGE: - dasm_put(Dst, 10016); + dasm_put(Dst, 10014); break; case BC_ISLE: dasm_put(Dst, 6179); break; case BC_ISGT: - dasm_put(Dst, 10785); + dasm_put(Dst, 10783); break; default: break; /* Shut up GCC. */ } - dasm_put(Dst, 10790, -BCBIAS_J*4); + dasm_put(Dst, 10788, -BCBIAS_J*4); break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; - dasm_put(Dst, 10823, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 10821, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10849); + dasm_put(Dst, 10847); } else { - dasm_put(Dst, 10861); + dasm_put(Dst, 10859); if (cmov) { - dasm_put(Dst, 10767); + dasm_put(Dst, 10765); } else { - dasm_put(Dst, 10773); + dasm_put(Dst, 10771); } } iseqne_fp: if (vk) { - dasm_put(Dst, 10868); + dasm_put(Dst, 10866); } else { - dasm_put(Dst, 10877); + dasm_put(Dst, 10875); } iseqne_end: if (vk) { - dasm_put(Dst, 10886, -BCBIAS_J*4); + dasm_put(Dst, 10884, -BCBIAS_J*4); } else { - dasm_put(Dst, 10901, -BCBIAS_J*4); + dasm_put(Dst, 10899, -BCBIAS_J*4); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); if (op == BC_ISEQV || op == BC_ISNEV) { - dasm_put(Dst, 10916, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<metatable), Dt6(->nomm), 1<len)); + dasm_put(Dst, 11250, Dt5(->len)); } else { - dasm_put(Dst, 11270, Dt5(->len)); + dasm_put(Dst, 11268, Dt5(->len)); } - dasm_put(Dst, 11279, LJ_TTAB); + dasm_put(Dst, 11277, LJ_TTAB); if (sse) { - dasm_put(Dst, 11319); + dasm_put(Dst, 11317); } else { - dasm_put(Dst, 11328); + dasm_put(Dst, 11326); } - dasm_put(Dst, 11338); + dasm_put(Dst, 11336); break; /* -- Binary ops -------------------------------------------------------- */ case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: - dasm_put(Dst, 11348); + dasm_put(Dst, 11346); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11356, LJ_TISNUM); + dasm_put(Dst, 11354, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11368); + dasm_put(Dst, 11366); } else { - dasm_put(Dst, 11382); + dasm_put(Dst, 11380); } break; case 1: - dasm_put(Dst, 11390, LJ_TISNUM); + dasm_put(Dst, 11388, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11402); + dasm_put(Dst, 11400); } else { - dasm_put(Dst, 11416); + dasm_put(Dst, 11414); } break; default: - dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11422, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11446); + dasm_put(Dst, 11444); } else { - dasm_put(Dst, 11460); + dasm_put(Dst, 11458); } break; } if (sse) { - dasm_put(Dst, 11222); + dasm_put(Dst, 11220); } else { - dasm_put(Dst, 11234); + dasm_put(Dst, 11232); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: - dasm_put(Dst, 11348); + dasm_put(Dst, 11346); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11356, LJ_TISNUM); + dasm_put(Dst, 11354, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11468); + dasm_put(Dst, 11466); } else { - dasm_put(Dst, 11482); + dasm_put(Dst, 11480); } break; case 1: - dasm_put(Dst, 11390, LJ_TISNUM); + dasm_put(Dst, 11388, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11490); + dasm_put(Dst, 11488); } else { - dasm_put(Dst, 11504); + dasm_put(Dst, 11502); } break; default: - dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11422, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11512); + dasm_put(Dst, 11510); } else { - dasm_put(Dst, 11526); + dasm_put(Dst, 11524); } break; } if (sse) { - dasm_put(Dst, 11222); + dasm_put(Dst, 11220); } else { - dasm_put(Dst, 11234); + dasm_put(Dst, 11232); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_MULVN: case BC_MULNV: case BC_MULVV: - dasm_put(Dst, 11348); + dasm_put(Dst, 11346); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11356, LJ_TISNUM); + dasm_put(Dst, 11354, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11534); + dasm_put(Dst, 11532); } else { - dasm_put(Dst, 11548); + dasm_put(Dst, 11546); } break; case 1: - dasm_put(Dst, 11390, LJ_TISNUM); + dasm_put(Dst, 11388, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11556); + dasm_put(Dst, 11554); } else { - dasm_put(Dst, 11570); + dasm_put(Dst, 11568); } break; default: - dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11422, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11578); + dasm_put(Dst, 11576); } else { - dasm_put(Dst, 11592); + dasm_put(Dst, 11590); } break; } if (sse) { - dasm_put(Dst, 11222); + dasm_put(Dst, 11220); } else { - dasm_put(Dst, 11234); + dasm_put(Dst, 11232); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: - dasm_put(Dst, 11348); + dasm_put(Dst, 11346); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11356, LJ_TISNUM); + dasm_put(Dst, 11354, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11600); + dasm_put(Dst, 11598); } else { - dasm_put(Dst, 11614); + dasm_put(Dst, 11612); } break; case 1: - dasm_put(Dst, 11390, LJ_TISNUM); + dasm_put(Dst, 11388, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11622); + dasm_put(Dst, 11620); } else { - dasm_put(Dst, 11636); + dasm_put(Dst, 11634); } break; default: - dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11422, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11644); + dasm_put(Dst, 11642); } else { - dasm_put(Dst, 11658); + dasm_put(Dst, 11656); } break; } if (sse) { - dasm_put(Dst, 11222); + dasm_put(Dst, 11220); } else { - dasm_put(Dst, 11234); + dasm_put(Dst, 11232); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_MODVN: - dasm_put(Dst, 11348); + dasm_put(Dst, 11346); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11356, LJ_TISNUM); + dasm_put(Dst, 11354, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11666); + dasm_put(Dst, 11664); } else { - dasm_put(Dst, 11680); + dasm_put(Dst, 11678); } break; case 1: - dasm_put(Dst, 11390, LJ_TISNUM); + dasm_put(Dst, 11388, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11688); + dasm_put(Dst, 11686); } else { - dasm_put(Dst, 11702); + dasm_put(Dst, 11700); } break; default: - dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11422, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11710); + dasm_put(Dst, 11708); } else { - dasm_put(Dst, 11724); + dasm_put(Dst, 11722); } break; } - dasm_put(Dst, 11732); + dasm_put(Dst, 11730); if (sse) { - dasm_put(Dst, 11222); + dasm_put(Dst, 11220); } else { - dasm_put(Dst, 11234); + dasm_put(Dst, 11232); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_MODNV: case BC_MODVV: - dasm_put(Dst, 11348); + dasm_put(Dst, 11346); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11356, LJ_TISNUM); + dasm_put(Dst, 11354, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11666); + dasm_put(Dst, 11664); } else { - dasm_put(Dst, 11680); + dasm_put(Dst, 11678); } break; case 1: - dasm_put(Dst, 11390, LJ_TISNUM); + dasm_put(Dst, 11388, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11688); + dasm_put(Dst, 11686); } else { - dasm_put(Dst, 11702); + dasm_put(Dst, 11700); } break; default: - dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11422, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11710); + dasm_put(Dst, 11708); } else { - dasm_put(Dst, 11724); + dasm_put(Dst, 11722); } break; } - dasm_put(Dst, 11738); + dasm_put(Dst, 11736); break; case BC_POW: - dasm_put(Dst, 11348); + dasm_put(Dst, 11346); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11356, LJ_TISNUM); + dasm_put(Dst, 11354, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11666); + dasm_put(Dst, 11664); } else { - dasm_put(Dst, 11680); + dasm_put(Dst, 11678); } break; case 1: - dasm_put(Dst, 11390, LJ_TISNUM); + dasm_put(Dst, 11388, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11688); + dasm_put(Dst, 11686); } else { - dasm_put(Dst, 11702); + dasm_put(Dst, 11700); } break; default: - dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11422, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11710); + dasm_put(Dst, 11708); } else { - dasm_put(Dst, 11724); + dasm_put(Dst, 11722); } break; } - dasm_put(Dst, 11743); + dasm_put(Dst, 11741); if (sse) { - dasm_put(Dst, 11222); + dasm_put(Dst, 11220); } else { - dasm_put(Dst, 11234); + dasm_put(Dst, 11232); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_CAT: - dasm_put(Dst, 11747, Dt1(->base), Dt1(->base)); + dasm_put(Dst, 11745, Dt1(->base), Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 11841, LJ_TSTR); + dasm_put(Dst, 11839, LJ_TSTR); break; case BC_KSHORT: if (sse) { - dasm_put(Dst, 11874); + dasm_put(Dst, 11872); } else { - dasm_put(Dst, 11889); + dasm_put(Dst, 11887); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_KNUM: if (sse) { - dasm_put(Dst, 11897); + dasm_put(Dst, 11895); } else { - dasm_put(Dst, 11910); + dasm_put(Dst, 11908); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_KPRI: - dasm_put(Dst, 11917); + dasm_put(Dst, 11915); break; case BC_KNIL: - dasm_put(Dst, 11943, LJ_TNIL); + dasm_put(Dst, 11941, LJ_TNIL); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 11989, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 11987, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) - dasm_put(Dst, 12033, 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); - dasm_put(Dst, 12123); + dasm_put(Dst, 12031, 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); + dasm_put(Dst, 12121); break; #undef TV2MARKOFS case BC_USETS: - dasm_put(Dst, 12135, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); + dasm_put(Dst, 12133, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 12226); + dasm_put(Dst, 12224); if (sse) { - dasm_put(Dst, 12231); + dasm_put(Dst, 12229); } else { - dasm_put(Dst, 11041); + dasm_put(Dst, 11039); } - dasm_put(Dst, 12238, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 12236, offsetof(GCfuncL, uvptr), DtA(->v)); if (sse) { - dasm_put(Dst, 12247); + dasm_put(Dst, 12245); } else { - dasm_put(Dst, 12253); + dasm_put(Dst, 12251); } - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_USETP: - dasm_put(Dst, 12256, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 12254, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 12293, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 12291, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 12347, Dt1(->base), Dt1(->base), LJ_TFUNC); + dasm_put(Dst, 12345, Dt1(->base), Dt1(->base), LJ_TFUNC); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: - dasm_put(Dst, 12418, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 12416, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_TDUP: - dasm_put(Dst, 12539, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 12537, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_GGET: - dasm_put(Dst, 12631, Dt7(->env)); + dasm_put(Dst, 12629, Dt7(->env)); break; case BC_GSET: - dasm_put(Dst, 12649, Dt7(->env)); + dasm_put(Dst, 12647, Dt7(->env)); break; case BC_TGETV: - dasm_put(Dst, 12667, LJ_TTAB, LJ_TISNUM); + dasm_put(Dst, 12665, LJ_TTAB, LJ_TISNUM); if (sse) { - dasm_put(Dst, 12700); + dasm_put(Dst, 12698); } else { - dasm_put(Dst, 12721); + dasm_put(Dst, 12719); if (cmov) { - dasm_put(Dst, 10767); + dasm_put(Dst, 10765); } else { - dasm_put(Dst, 10773); + dasm_put(Dst, 10771); } dasm_put(Dst, 2522); } - dasm_put(Dst, 12731, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 12925, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 12923, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); - dasm_put(Dst, 13211, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 13126, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); + dasm_put(Dst, 13209, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETS: - dasm_put(Dst, 13273, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 13348, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); - dasm_put(Dst, 13440, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 13271, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 13346, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); + dasm_put(Dst, 13438, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 13536, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); - dasm_put(Dst, 13634, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 13534, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); + dasm_put(Dst, 13632, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 13680); + dasm_put(Dst, 13678); if (sse) { - dasm_put(Dst, 12231); + dasm_put(Dst, 12229); } else { - dasm_put(Dst, 13685); + dasm_put(Dst, 13683); } - dasm_put(Dst, 13693, Dt6(->marked), LJ_GC_BLACK); + dasm_put(Dst, 13691, Dt6(->marked), LJ_GC_BLACK); if (sse) { - dasm_put(Dst, 13718); + dasm_put(Dst, 13716); } else { - dasm_put(Dst, 13725); + dasm_put(Dst, 13723); } - dasm_put(Dst, 13730, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); - dasm_put(Dst, 13858, Dt6(->gclist)); + dasm_put(Dst, 13728, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); + dasm_put(Dst, 13856, Dt6(->gclist)); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: - dasm_put(Dst, 11352); + dasm_put(Dst, 11350); if (op == BC_CALLM) { - dasm_put(Dst, 13866); + dasm_put(Dst, 13864); } - dasm_put(Dst, 13871, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 13869, LJ_TFUNC, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 13866); + dasm_put(Dst, 13864); break; case BC_CALLT: - dasm_put(Dst, 13912, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); - dasm_put(Dst, 14030, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 13910, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); + dasm_put(Dst, 14028, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); break; case BC_ITERC: - dasm_put(Dst, 14087, LJ_TFUNC, 2+1, Dt7(->pc)); + dasm_put(Dst, 14085, LJ_TFUNC, 2+1, Dt7(->pc)); break; case BC_VARG: - dasm_put(Dst, 14167, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); - dasm_put(Dst, 14311, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 14165, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); + dasm_put(Dst, 14309, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 13866); + dasm_put(Dst, 13864); break; case BC_RET: case BC_RET0: case BC_RET1: if (op != BC_RET0) { - dasm_put(Dst, 14410); + dasm_put(Dst, 14408); } - dasm_put(Dst, 14414, FRAME_TYPE); + dasm_put(Dst, 14412, FRAME_TYPE); switch (op) { case BC_RET: - dasm_put(Dst, 14433); + dasm_put(Dst, 14431); break; case BC_RET1: - dasm_put(Dst, 14491); + dasm_put(Dst, 14489); /* fallthrough */ case BC_RET0: - dasm_put(Dst, 14507); + dasm_put(Dst, 14505); default: break; } - dasm_put(Dst, 14518, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 14516, Dt7(->pc), PC2PROTO(k)); if (op == BC_RET) { - dasm_put(Dst, 14560, LJ_TNIL); + dasm_put(Dst, 14558, LJ_TNIL); } else { - dasm_put(Dst, 14569, LJ_TNIL); + dasm_put(Dst, 14567, LJ_TNIL); } - dasm_put(Dst, 14576); + dasm_put(Dst, 14574); if (op != BC_RET0) { - dasm_put(Dst, 14597); + dasm_put(Dst, 14595); } dasm_put(Dst, 4678); break; @@ -2162,7 +2166,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 14601, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 14599, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2174,57 +2178,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORI: case BC_IFORL: vk = (op == BC_IFORL || op == BC_JFORL); - dasm_put(Dst, 14622); + dasm_put(Dst, 14620); if (!vk) { - dasm_put(Dst, 14626, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 14624, LJ_TISNUM, LJ_TISNUM); } - dasm_put(Dst, 14645); + dasm_put(Dst, 14643); if (!vk) { - dasm_put(Dst, 14649, LJ_TISNUM); + dasm_put(Dst, 14647, LJ_TISNUM); } if (sse) { - dasm_put(Dst, 14658); + dasm_put(Dst, 14656); if (vk) { - dasm_put(Dst, 14670); + dasm_put(Dst, 14668); } else { - dasm_put(Dst, 14689); + dasm_put(Dst, 14687); } - dasm_put(Dst, 14694); + dasm_put(Dst, 14692); } else { - dasm_put(Dst, 14707); + dasm_put(Dst, 14705); if (vk) { - dasm_put(Dst, 14713); + dasm_put(Dst, 14711); } else { - dasm_put(Dst, 14729); + dasm_put(Dst, 14727); } - dasm_put(Dst, 14737); + dasm_put(Dst, 14735); if (cmov) { - dasm_put(Dst, 10767); + dasm_put(Dst, 10765); } else { - dasm_put(Dst, 10773); + dasm_put(Dst, 10771); } if (!cmov) { - dasm_put(Dst, 14742); + dasm_put(Dst, 14740); } } if (op == BC_FORI) { - dasm_put(Dst, 14748, -BCBIAS_J*4); + dasm_put(Dst, 14746, -BCBIAS_J*4); } else if (op == BC_JFORI) { - dasm_put(Dst, 14758, -BCBIAS_J*4, BC_JLOOP); + dasm_put(Dst, 14756, -BCBIAS_J*4, BC_JLOOP); } else if (op == BC_IFORL) { - dasm_put(Dst, 14772, -BCBIAS_J*4); + dasm_put(Dst, 14770, -BCBIAS_J*4); } else { - dasm_put(Dst, 14768, BC_JLOOP); + dasm_put(Dst, 14766, BC_JLOOP); } - dasm_put(Dst, 10802); + dasm_put(Dst, 10800); if (sse) { - dasm_put(Dst, 14782); + dasm_put(Dst, 14780); } break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 14601, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 14599, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2233,33 +2237,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IITERL: - dasm_put(Dst, 14793, LJ_TNIL); + dasm_put(Dst, 14791, LJ_TNIL); if (op == BC_JITERL) { - dasm_put(Dst, 14808, BC_JLOOP); + dasm_put(Dst, 14806, BC_JLOOP); } else { - dasm_put(Dst, 14822, -BCBIAS_J*4); + dasm_put(Dst, 14820, -BCBIAS_J*4); } - dasm_put(Dst, 11099); + dasm_put(Dst, 11097); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 14601, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 14599, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; case BC_ILOOP: - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 14838, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); + dasm_put(Dst, 14836, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); #endif break; case BC_JMP: - dasm_put(Dst, 14861, -BCBIAS_J*4); + dasm_put(Dst, 14859, -BCBIAS_J*4); break; /* -- Function headers -------------------------------------------------- */ @@ -2282,47 +2286,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IFUNCF: - dasm_put(Dst, 14885, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); + dasm_put(Dst, 14883, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); if (op == BC_JFUNCF) { - dasm_put(Dst, 14915, BC_JLOOP); + dasm_put(Dst, 14913, BC_JLOOP); } else { - dasm_put(Dst, 8414); + dasm_put(Dst, 8412); } - dasm_put(Dst, 14924, LJ_TNIL); + dasm_put(Dst, 14922, LJ_TNIL); break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif - dasm_put(Dst, 10465); + dasm_put(Dst, 10463); break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 14946, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); + dasm_put(Dst, 14944, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); if (op == BC_JFUNCV) { - dasm_put(Dst, 14915, BC_JLOOP); + dasm_put(Dst, 14913, BC_JLOOP); } else { - dasm_put(Dst, 15037, -4+PC2PROTO(k)); + dasm_put(Dst, 15035, -4+PC2PROTO(k)); } - dasm_put(Dst, 15059, LJ_TNIL); + dasm_put(Dst, 15057, LJ_TNIL); break; case BC_FUNCC: case BC_FUNCCW: - dasm_put(Dst, 15081, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); + dasm_put(Dst, 15079, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); if (op == BC_FUNCC) { - dasm_put(Dst, 15110); + dasm_put(Dst, 15108); } else { - dasm_put(Dst, 15114); + dasm_put(Dst, 15112); } - dasm_put(Dst, 15122, DISPATCH_GL(vmstate), ~LJ_VMST_C); + dasm_put(Dst, 15120, DISPATCH_GL(vmstate), ~LJ_VMST_C); if (op == BC_FUNCC) { - dasm_put(Dst, 15131); + dasm_put(Dst, 15129); } else { - dasm_put(Dst, 15135, DISPATCH_GL(wrapf)); + dasm_put(Dst, 15133, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 15140, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); + dasm_put(Dst, 15138, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); break; /* ---------------------------------------------------------------------- */ @@ -2350,7 +2354,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx, cmov, sse); - dasm_put(Dst, 15165); + dasm_put(Dst, 15163); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op, cmov, sse); diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c index f1579c8d..29b06438 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c @@ -409,8 +409,9 @@ ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc) #endif call_init(L, fn); #if LJ_HASJIT - if (J->L) { /* Marker for hot call. */ - lj_trace_hot(J, pc); + if ((uintptr_t)pc & 1) { /* Marker for hot call. */ + J->L = L; + lj_trace_hot(J, (const BCIns *)((uintptr_t)pc & ~(uintptr_t)1)); goto out; } #endif