diff --git a/src/buildvm_ppc.dasc b/src/buildvm_ppc.dasc index db89ac3d..7b5919ba 100644 --- a/src/buildvm_ppc.dasc +++ b/src/buildvm_ppc.dasc @@ -1108,7 +1108,6 @@ static void build_subroutines(BuildCtx *ctx) | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] | la RA, -8(BASE) #endif - | evstdd TAB:CARG1, 0(BASE) | evstdd TISNIL, 8(BASE) | li RD, (3+1)*8 | evstdd CFUNC:TMP0, 0(RA) @@ -1169,9 +1168,8 @@ static void build_subroutines(BuildCtx *ctx) | la RA, -8(BASE) #endif | evsplati TMP1, 0 - | evstdd TAB:CARG1, 0(BASE) - | evstdd TMP1, 8(BASE) | li RD, (3+1)*8 + | evstdd TMP1, 8(BASE) | evstdd CFUNC:TMP0, 0(RA) | b ->fff_res | @@ -1780,7 +1778,7 @@ static void build_subroutines(BuildCtx *ctx) | lwz TMP3, CFUNC:RB->f | add TMP1, BASE, NARGS8:RC | lwz PC, FRAME_PC(BASE) // Fallback may overwrite PC. - | addi TMP0, TMP1, 8*LUA_MINSTACK-8 + | addi TMP0, TMP1, 8*LUA_MINSTACK | lwz TMP2, L->maxstack | stw PC, SAVE_PC // Redundant (but a defined value). | cmplw TMP0, TMP2 @@ -1796,7 +1794,7 @@ static void build_subroutines(BuildCtx *ctx) | slwi RD, CRET1, 3 | la RA, -8(BASE) | bgt ->fff_res // Returned nresults+1? - |1: // Returned 0: retry fast path. + |1: // Returned 0 or -1: retry fast path. | lwz TMP0, L->top | lwz LFUNC:RB, FRAME_FUNC(BASE) | sub NARGS8:RC, TMP0, BASE @@ -1814,11 +1812,10 @@ static void build_subroutines(BuildCtx *ctx) | b ->vm_call_dispatch // Resolve again for tailcall. | |5: // Grow stack for fallback handler. - | mr CARG1, L | li CARG2, LUA_MINSTACK | bl extern lj_state_growstack // (lua_State *L, int n) | lwz BASE, L->base - | cmpw TMP0, TMP0 // Set 4*cr0+eq. + | cmpw TMP0, TMP0 // Set 4*cr0+eq to force retry. | b <1 | |->fff_gcstep: // Call GC step function. @@ -3073,7 +3070,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) break; case BC_ITERC: - | // RA = base*8, (RB = (nresults+1)*8,) RC = (nargs+1)*8 ((2+1)*8) + | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 ((2+1)*8)) | subi RA, RA, 24 // evldd doesn't support neg. offsets. | mr TMP2, BASE | evlddx LFUNC:RB, BASE, RA diff --git a/src/buildvm_ppcspe.h b/src/buildvm_ppcspe.h index e3665b35..5afd2379 100644 --- a/src/buildvm_ppcspe.h +++ b/src/buildvm_ppcspe.h @@ -12,7 +12,7 @@ #define DASM_SECTION_CODE_OP 0 #define DASM_SECTION_CODE_SUB 1 #define DASM_MAXSECTION 2 -static const unsigned int build_actionlist[4950] = { +static const unsigned int build_actionlist[4947] = { 0x00010001, 0x00060014, 0x72000000, @@ -1069,7 +1069,6 @@ static const unsigned int build_actionlist[4950] = { 0x00090cab, 0x3a8efff8, 0x00000000, -0x106e0321, 0x134e0b21, 0x39800000, 0x00098200, @@ -1161,10 +1160,9 @@ static const unsigned int build_actionlist[4950] = { 0x3a8efff8, 0x00000000, 0x11000229, -0x106e0321, -0x110e0b21, 0x39800000, 0x00098200, +0x110e0b21, 0x10140321, 0x48000000, 0x00050043, @@ -2493,7 +2491,6 @@ static const unsigned int build_actionlist[4950] = { 0x48000000, 0x00050024, 0x0006000f, -0x7e439378, 0x38800000, 0x00098200, 0x48000001, @@ -5348,74 +5345,74 @@ static void build_subroutines(BuildCtx *ctx) dasm_put(Dst, 1052, Dt8(->upvalue[0])); #endif dasm_put(Dst, 1056, (3+1)*8, Dt6(->asize), Dt6(->array), 31-3, (0+1)*8, (2+1)*8, Dt6(->hmask), (0+1)*8, (0+1)*8); - dasm_put(Dst, 1121); + dasm_put(Dst, 1120); #ifdef LUAJIT_ENABLE_LUA52COMPAT - dasm_put(Dst, 1134, Dt6(->metatable), Dt8(->upvalue[0])); + dasm_put(Dst, 1133, Dt6(->metatable), Dt8(->upvalue[0])); #else - dasm_put(Dst, 1143, Dt8(->upvalue[0])); + dasm_put(Dst, 1142, Dt8(->upvalue[0])); #endif - dasm_put(Dst, 1147, (3+1)*8, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 8+FRAME_PCALL, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 16+FRAME_PCALL, LJ_TTHREAD, Dt1(->status), Dt1(->cframe), Dt1(->top)); - dasm_put(Dst, 1209, LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack)); - dasm_put(Dst, 1272, Dt1(->top), FRAME_TYPE, LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top), (2+1)*8, 32-3); - dasm_put(Dst, 1332, Dt8(->upvalue[0].gcr), Dt1(->status), Dt1(->cframe), Dt1(->top), LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP); - dasm_put(Dst, 1391, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, 32-3, Dt1(->cframe)); - dasm_put(Dst, 1448, Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status), (1+1)*8, FRAME_TYPE); - dasm_put(Dst, 1513); - dasm_put(Dst, 1582); - dasm_put(Dst, 1645); - dasm_put(Dst, 1710); - dasm_put(Dst, 1780, Dt8(->upvalue[0]), DISPATCH_GL(tmptv), DISPATCH_GL(tmptv), (2+1)*8, (2+1)*8); - dasm_put(Dst, 1852, Dt5(->len)); - dasm_put(Dst, 1919, Dt5(->len), (0+1)*8, Dt5([1]), (1+1)*8, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmptv), Dt1(->base), Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); - dasm_put(Dst, 1979, Dt5(->len), sizeof(GCstr)-1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); - dasm_put(Dst, 2045, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(strempty), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); - dasm_put(Dst, 2104, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); - dasm_put(Dst, 2163, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); - dasm_put(Dst, 2230); - dasm_put(Dst, 2301); - dasm_put(Dst, 2389, Dt8(->f), 8*LUA_MINSTACK-8, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), 31-3, Dt1(->top), Dt7(->pc)); - dasm_put(Dst, 2468, FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 1146, (3+1)*8, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 8+FRAME_PCALL, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 16+FRAME_PCALL, LJ_TTHREAD, Dt1(->status), Dt1(->cframe), Dt1(->top)); + dasm_put(Dst, 1207, LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack)); + dasm_put(Dst, 1270, Dt1(->top), FRAME_TYPE, LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top), (2+1)*8, 32-3); + dasm_put(Dst, 1330, Dt8(->upvalue[0].gcr), Dt1(->status), Dt1(->cframe), Dt1(->top), LUA_YIELD, Dt1(->base), Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->base), LUA_YIELD, Dt1(->top), ~LJ_VMST_INTERP); + dasm_put(Dst, 1389, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, 32-3, Dt1(->cframe)); + dasm_put(Dst, 1446, Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status), (1+1)*8, FRAME_TYPE); + dasm_put(Dst, 1511); + dasm_put(Dst, 1580); + dasm_put(Dst, 1643); + dasm_put(Dst, 1708); + dasm_put(Dst, 1778, Dt8(->upvalue[0]), DISPATCH_GL(tmptv), DISPATCH_GL(tmptv), (2+1)*8, (2+1)*8); + dasm_put(Dst, 1850, Dt5(->len)); + dasm_put(Dst, 1917, Dt5(->len), (0+1)*8, Dt5([1]), (1+1)*8, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmptv), Dt1(->base), Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); + dasm_put(Dst, 1977, Dt5(->len), sizeof(GCstr)-1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); + dasm_put(Dst, 2043, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(strempty), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); + dasm_put(Dst, 2102, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); + dasm_put(Dst, 2161, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); + dasm_put(Dst, 2228); + dasm_put(Dst, 2299); + dasm_put(Dst, 2387, Dt8(->f), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), 31-3, Dt1(->top), Dt7(->pc)); + dasm_put(Dst, 2466, FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 2511); + dasm_put(Dst, 2508); #endif - dasm_put(Dst, 2513, DISPATCH_GL(hookmask), HOOK_ACTIVE, GG_DISP2STATIC, DISPATCH_GL(hookmask), DISPATCH_GL(hookcount), HOOK_ACTIVE, 31-LUA_HOOKLINE, DISPATCH_GL(hookcount), Dt1(->base), Dt1(->base)); - dasm_put(Dst, 2560, GG_DISP2STATIC); + dasm_put(Dst, 2510, DISPATCH_GL(hookmask), HOOK_ACTIVE, GG_DISP2STATIC, DISPATCH_GL(hookmask), DISPATCH_GL(hookcount), HOOK_ACTIVE, 31-LUA_HOOKLINE, DISPATCH_GL(hookcount), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 2557, GG_DISP2STATIC); #if LJ_HASJIT - dasm_put(Dst, 2578); + dasm_put(Dst, 2575); #endif + dasm_put(Dst, 2577); +#if LJ_HASJIT dasm_put(Dst, 2580); -#if LJ_HASJIT +#endif dasm_put(Dst, 2583); -#endif - dasm_put(Dst, 2586); #if LJ_HASJIT - dasm_put(Dst, 2588); + dasm_put(Dst, 2585); #endif - dasm_put(Dst, 2591, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 2588, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 2613); + dasm_put(Dst, 2610); #endif - dasm_put(Dst, 2615); + dasm_put(Dst, 2612); #if LJ_HASJIT - dasm_put(Dst, 2617); + dasm_put(Dst, 2614); #endif - dasm_put(Dst, 2619); + dasm_put(Dst, 2616); #if LJ_HASJIT - dasm_put(Dst, 2696); + dasm_put(Dst, 2693); #else + dasm_put(Dst, 2716); +#endif dasm_put(Dst, 2719); -#endif - dasm_put(Dst, 2722); #if LJ_HASJIT - dasm_put(Dst, 2724); + dasm_put(Dst, 2721); #endif - dasm_put(Dst, 2726); + dasm_put(Dst, 2723); #if LJ_HASJIT - dasm_put(Dst, 2728); + dasm_put(Dst, 2725); #endif - dasm_put(Dst, 2730); + dasm_put(Dst, 2727); #if LJ_HASFFI - dasm_put(Dst, 2793); + dasm_put(Dst, 2790); #endif } @@ -5423,7 +5420,7 @@ static void build_subroutines(BuildCtx *ctx) static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; - dasm_put(Dst, 2795, defop); + dasm_put(Dst, 2792, defop); switch (op) { @@ -5432,112 +5429,112 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) /* 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, 2797, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 2794, -(BCBIAS_J*4 >> 16)); if (op == BC_ISLE || op == BC_ISGT) { - dasm_put(Dst, 2811); + dasm_put(Dst, 2808); } if (op == BC_ISLT || op == BC_ISLE) { - dasm_put(Dst, 2814); + dasm_put(Dst, 2811); } else { - dasm_put(Dst, 2816); + dasm_put(Dst, 2813); } - dasm_put(Dst, 2818); + dasm_put(Dst, 2815); break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; - dasm_put(Dst, 2829, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 2826, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 2843); + dasm_put(Dst, 2840); } else { - dasm_put(Dst, 2845); + dasm_put(Dst, 2842); } - dasm_put(Dst, 2847, ~LJ_TISPRI, ~LJ_TISTABUD); + dasm_put(Dst, 2844, ~LJ_TISPRI, ~LJ_TISTABUD); if (vk) { - dasm_put(Dst, 2869); + dasm_put(Dst, 2866); } else { - dasm_put(Dst, 2871); + dasm_put(Dst, 2868); } - dasm_put(Dst, 2873); + dasm_put(Dst, 2870); if (vk) { - dasm_put(Dst, 2875); + dasm_put(Dst, 2872); } else { - dasm_put(Dst, 2877); + dasm_put(Dst, 2874); } - dasm_put(Dst, 2879, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<metatable), 1-vk, Dt6(->nomm), 1<> 16)); + dasm_put(Dst, 2897, 32-1, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 2914); + dasm_put(Dst, 2911); } else { - dasm_put(Dst, 2916); + dasm_put(Dst, 2913); } - dasm_put(Dst, 2918); + dasm_put(Dst, 2915); break; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; - dasm_put(Dst, 2929, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 2926, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 2943); + dasm_put(Dst, 2940); } else { - dasm_put(Dst, 2946); + dasm_put(Dst, 2943); } - dasm_put(Dst, 2948); + dasm_put(Dst, 2945); if (!vk) { - dasm_put(Dst, 2960); + dasm_put(Dst, 2957); } break; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; - dasm_put(Dst, 2966, 32-3, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 2963, 32-3, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 2978); + dasm_put(Dst, 2975); } else { - dasm_put(Dst, 2980); + dasm_put(Dst, 2977); } - dasm_put(Dst, 2982); + dasm_put(Dst, 2979); break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: - dasm_put(Dst, 2993); + dasm_put(Dst, 2990); if (op == BC_IST || op == BC_ISF) { - dasm_put(Dst, 2999, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 2996, -(BCBIAS_J*4 >> 16)); if (op == BC_IST) { - dasm_put(Dst, 3004); + dasm_put(Dst, 3001); } else { - dasm_put(Dst, 3006); + dasm_put(Dst, 3003); } } else { if (op == BC_ISTC) { - dasm_put(Dst, 3008); + dasm_put(Dst, 3005); } else { - dasm_put(Dst, 3011); + dasm_put(Dst, 3008); } - dasm_put(Dst, 3014, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 3011, -(BCBIAS_J*4 >> 16)); } - dasm_put(Dst, 3021); + dasm_put(Dst, 3018); break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: - dasm_put(Dst, 3032); + dasm_put(Dst, 3029); break; case BC_NOT: - dasm_put(Dst, 3045, LJ_TTRUE); + dasm_put(Dst, 3042, LJ_TTRUE); break; case BC_UNM: - dasm_put(Dst, 3061); + dasm_put(Dst, 3058); break; case BC_LEN: - dasm_put(Dst, 3078, Dt5(->len)); + dasm_put(Dst, 3075, Dt5(->len)); break; /* -- Binary ops -------------------------------------------------------- */ @@ -5547,262 +5544,262 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 3106); + dasm_put(Dst, 3103); break; case 1: - dasm_put(Dst, 3112); + dasm_put(Dst, 3109); break; default: - dasm_put(Dst, 3118); + dasm_put(Dst, 3115); break; } - dasm_put(Dst, 3125); + dasm_put(Dst, 3122); break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 3138); + dasm_put(Dst, 3135); break; case 1: - dasm_put(Dst, 3144); + dasm_put(Dst, 3141); break; default: - dasm_put(Dst, 3150); + dasm_put(Dst, 3147); break; } - dasm_put(Dst, 3157); + dasm_put(Dst, 3154); break; case BC_MULVN: case BC_MULNV: case BC_MULVV: vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 3170); + dasm_put(Dst, 3167); break; case 1: - dasm_put(Dst, 3176); + dasm_put(Dst, 3173); break; default: - dasm_put(Dst, 3182); + dasm_put(Dst, 3179); break; } - dasm_put(Dst, 3189); + dasm_put(Dst, 3186); break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 3202); + dasm_put(Dst, 3199); break; case 1: - dasm_put(Dst, 3208); + dasm_put(Dst, 3205); break; default: - dasm_put(Dst, 3214); + dasm_put(Dst, 3211); break; } - dasm_put(Dst, 3221); + dasm_put(Dst, 3218); break; case BC_MODVN: vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 3234); + dasm_put(Dst, 3231); break; case 1: - dasm_put(Dst, 3240); + dasm_put(Dst, 3237); break; default: - dasm_put(Dst, 3246); + dasm_put(Dst, 3243); break; } - dasm_put(Dst, 3253); + dasm_put(Dst, 3250); break; case BC_MODNV: case BC_MODVV: vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 3271); + dasm_put(Dst, 3268); break; case 1: - dasm_put(Dst, 3277); + dasm_put(Dst, 3274); break; default: - dasm_put(Dst, 3283); + dasm_put(Dst, 3280); break; } - dasm_put(Dst, 3290); + dasm_put(Dst, 3287); break; case BC_POW: - dasm_put(Dst, 3293); + dasm_put(Dst, 3290); break; case BC_CAT: - dasm_put(Dst, 3315, Dt1(->base), 32-3, Dt1(->base)); + dasm_put(Dst, 3312, Dt1(->base), 32-3, Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 3345, 32-1); + dasm_put(Dst, 3342, 32-1); break; case BC_KCDATA: #if LJ_HASFFI - dasm_put(Dst, 3362, 32-1, LJ_TCDATA); + dasm_put(Dst, 3359, 32-1, LJ_TCDATA); #endif break; case BC_KSHORT: - dasm_put(Dst, 3381, 32-3); + dasm_put(Dst, 3378, 32-3); break; case BC_KNUM: - dasm_put(Dst, 3397); + dasm_put(Dst, 3394); break; case BC_KPRI: - dasm_put(Dst, 3410, 32-3); + dasm_put(Dst, 3407, 32-3); break; case BC_KNIL: - dasm_put(Dst, 3425); + dasm_put(Dst, 3422); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 3444, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 3441, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: - dasm_put(Dst, 3465, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -LJ_TISNUM, LJ_TISGCV - LJ_TISNUM, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 3462, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -LJ_TISNUM, LJ_TISGCV - LJ_TISNUM, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); break; case BC_USETS: - dasm_put(Dst, 3517, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 3514, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_GC_WHITES, GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 3566, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 3563, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETP: - dasm_put(Dst, 3587, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v)); + dasm_put(Dst, 3584, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 3610, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 3607, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 3640, 32-1, Dt1(->base), Dt1(->base)); + dasm_put(Dst, 3637, 32-1, Dt1(->base), Dt1(->base)); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: case BC_TDUP: - dasm_put(Dst, 3666, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); + dasm_put(Dst, 3663, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); if (op == BC_TNEW) { - dasm_put(Dst, 3679); + dasm_put(Dst, 3676); } else { - dasm_put(Dst, 3687, 32-1); + dasm_put(Dst, 3684, 32-1); } - dasm_put(Dst, 3694, Dt1(->base)); + dasm_put(Dst, 3691, Dt1(->base)); break; case BC_GGET: case BC_GSET: - dasm_put(Dst, 3717, 32-1, Dt7(->env)); + dasm_put(Dst, 3714, 32-1, Dt7(->env)); if (op == BC_GGET) { - dasm_put(Dst, 3725); + dasm_put(Dst, 3722); } else { - dasm_put(Dst, 3728); + dasm_put(Dst, 3725); } break; case BC_TGETV: - dasm_put(Dst, 3731, Dt6(->asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked), Dt6(->gclist)); + dasm_put(Dst, 3899, Dt6(->asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked), Dt6(->gclist)); break; case BC_TSETS: - dasm_put(Dst, 3981, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), DtB(->val), LJ_GC_BLACK, DtB(->val), Dt6(->metatable)); - dasm_put(Dst, 4042, Dt6(->nomm), 1<next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); - dasm_put(Dst, 4093, Dt6(->marked), Dt6(->gclist)); + dasm_put(Dst, 3978, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), DtB(->val), LJ_GC_BLACK, DtB(->val), Dt6(->metatable)); + dasm_put(Dst, 4039, Dt6(->nomm), 1<next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); + dasm_put(Dst, 4090, Dt6(->marked), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 4100, 32-3, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked)); - dasm_put(Dst, 4160, Dt6(->gclist)); + dasm_put(Dst, 4097, 32-3, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked)); + dasm_put(Dst, 4157, Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 4165, 32-3, Dt6(->asize), 31-3, Dt6(->marked), Dt6(->array), LJ_GC_BLACK, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); - dasm_put(Dst, 4234); + dasm_put(Dst, 4162, 32-3, Dt6(->asize), 31-3, Dt6(->marked), Dt6(->array), LJ_GC_BLACK, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); + dasm_put(Dst, 4231); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALLM: - dasm_put(Dst, 4237); + dasm_put(Dst, 4234); break; case BC_CALL: - dasm_put(Dst, 4239, Dt7(->pc)); + dasm_put(Dst, 4236, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 4259); + dasm_put(Dst, 4256); break; case BC_CALLT: - dasm_put(Dst, 4261, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); - dasm_put(Dst, 4326, FRAME_TYPE); + dasm_put(Dst, 4258, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); + dasm_put(Dst, 4323, FRAME_TYPE); break; case BC_ITERC: - dasm_put(Dst, 4333, Dt7(->pc)); + dasm_put(Dst, 4330, Dt7(->pc)); break; case BC_ITERN: #if LJ_HASJIT #endif - dasm_put(Dst, 4359, Dt6(->asize), Dt6(->array), 31-3, -(BCBIAS_J*4 >> 16), Dt6(->hmask), Dt6(->node), 31-5, 31-3, DtB(->key), -(BCBIAS_J*4 >> 16)); - dasm_put(Dst, 4438); + dasm_put(Dst, 4356, Dt6(->asize), Dt6(->array), 31-3, -(BCBIAS_J*4 >> 16), Dt6(->hmask), Dt6(->node), 31-5, 31-3, DtB(->key), -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4435); break; case BC_ISNEXT: - dasm_put(Dst, 4442, LJ_TTAB, LJ_TFUNC, LJ_TNIL, Dt8(->ffid), FF_next_N, 32-1, -(BCBIAS_J*4 >> 16), BC_JMP, BC_ITERC, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4439, LJ_TTAB, LJ_TFUNC, LJ_TNIL, Dt8(->ffid), FF_next_N, 32-1, -(BCBIAS_J*4 >> 16), BC_JMP, BC_ITERC, -(BCBIAS_J*4 >> 16)); break; case BC_VARG: - dasm_put(Dst, 4493, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); - dasm_put(Dst, 4573); + dasm_put(Dst, 4490, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); + dasm_put(Dst, 4570); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 4579); + dasm_put(Dst, 4576); break; case BC_RET: - dasm_put(Dst, 4581, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); + dasm_put(Dst, 4578, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); break; case BC_RET0: case BC_RET1: - dasm_put(Dst, 4651, FRAME_TYPE, FRAME_VARG); + dasm_put(Dst, 4648, FRAME_TYPE, FRAME_VARG); if (op == BC_RET1) { - dasm_put(Dst, 4664); + dasm_put(Dst, 4661); } - dasm_put(Dst, 4667, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 4664, Dt7(->pc), PC2PROTO(k)); break; /* -- Loops and branches ------------------------------------------------ */ case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 4695); + dasm_put(Dst, 4692); #endif break; @@ -5814,35 +5811,35 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) case BC_FORI: case BC_IFORL: vk = (op == BC_IFORL || op == BC_JFORL); - dasm_put(Dst, 4697, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); + dasm_put(Dst, 4694, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); if (!vk) { - dasm_put(Dst, 4705); + dasm_put(Dst, 4702); } if (vk) { - dasm_put(Dst, 4713, FORL_IDX*8); + dasm_put(Dst, 4710, FORL_IDX*8); } - dasm_put(Dst, 4717, FORL_EXT*8); + dasm_put(Dst, 4714, FORL_EXT*8); if (op != BC_JFORL) { - dasm_put(Dst, 4725, 32-1); + dasm_put(Dst, 4722, 32-1); if (op == BC_JFORI) { - dasm_put(Dst, 4729, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4726, -(BCBIAS_J*4 >> 16)); } else { - dasm_put(Dst, 4732, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4729, -(BCBIAS_J*4 >> 16)); } } if (op == BC_FORI) { - dasm_put(Dst, 4735); + dasm_put(Dst, 4732); } else if (op == BC_IFORL) { - dasm_put(Dst, 4737); + dasm_put(Dst, 4734); } else { - dasm_put(Dst, 4739, BC_JLOOP); + dasm_put(Dst, 4736, BC_JLOOP); } - dasm_put(Dst, 4742); + dasm_put(Dst, 4739); break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 4757); + dasm_put(Dst, 4754); #endif break; @@ -5851,40 +5848,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) break; #endif case BC_IITERL: - dasm_put(Dst, 4759); + dasm_put(Dst, 4756); if (op == BC_JITERL) { - dasm_put(Dst, 4765); + dasm_put(Dst, 4762); } else { - dasm_put(Dst, 4767, 32-1, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4764, 32-1, -(BCBIAS_J*4 >> 16)); } - dasm_put(Dst, 4774); + dasm_put(Dst, 4771); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 4786); + dasm_put(Dst, 4783); #endif break; case BC_ILOOP: - dasm_put(Dst, 4788); + dasm_put(Dst, 4785); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 4799); + dasm_put(Dst, 4796); #endif break; case BC_JMP: - dasm_put(Dst, 4801, 32-1, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4798, 32-1, -(BCBIAS_J*4 >> 16)); break; /* -- Function headers -------------------------------------------------- */ case BC_FUNCF: #if LJ_HASJIT - dasm_put(Dst, 4817); + dasm_put(Dst, 4814); #endif case BC_FUNCV: /* NYI: compiled vararg functions. */ break; @@ -5894,38 +5891,38 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) break; #endif case BC_IFUNCF: - dasm_put(Dst, 4819, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); + dasm_put(Dst, 4816, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); if (op == BC_JFUNCF) { - dasm_put(Dst, 4837); + dasm_put(Dst, 4834); } else { - dasm_put(Dst, 4839); + dasm_put(Dst, 4836); } - dasm_put(Dst, 4848); + dasm_put(Dst, 4845); break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif - dasm_put(Dst, 4854); + dasm_put(Dst, 4851); break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 4856, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams)); + dasm_put(Dst, 4853, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams)); break; case BC_FUNCC: case BC_FUNCCW: if (op == BC_FUNCC) { - dasm_put(Dst, 4906, Dt8(->f)); + dasm_put(Dst, 4903, Dt8(->f)); } else { - dasm_put(Dst, 4909, DISPATCH_GL(wrapf)); + dasm_put(Dst, 4906, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 4912, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); + dasm_put(Dst, 4909, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); if (op == BC_FUNCCW) { - dasm_put(Dst, 4925, Dt8(->f)); + dasm_put(Dst, 4922, Dt8(->f)); } - dasm_put(Dst, 4928, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); + dasm_put(Dst, 4925, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); break; /* ---------------------------------------------------------------------- */ @@ -5945,7 +5942,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx); - dasm_put(Dst, 4949); + dasm_put(Dst, 4946); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op);