From 96d8611d1b3c038d565016c0383e2cb7a8064449 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 24 Oct 2011 16:23:01 +0200 Subject: [PATCH] PPC: Fix/improve interpreter/JIT integration. Switch to per-trace exit stubs. Drop register holding current trace number. --- src/buildvm_ppc.dasc | 34 ++- src/buildvm_ppc.h | 820 ++++++++++++++++++++++++++------------------------- 2 files changed, 444 insertions(+), 410 deletions(-) diff --git a/src/buildvm_ppc.dasc b/src/buildvm_ppc.dasc index c0a461cd..aa133dcc 100644 --- a/src/buildvm_ppc.dasc +++ b/src/buildvm_ppc.dasc @@ -25,8 +25,7 @@ |.define DISPATCH, r17 // Opcode dispatch table. |.define LREG, r18 // Register holding lua_State (also in SAVE_L). |.define MULTRES, r19 // Size of multi-result: (nresults+1)*8. -|.define JGL, r30 // On-trace: global_State + 32768. -|.define JTR, r31 // On-trace: trace number. +|.define JGL, r31 // On-trace: global_State + 32768. | |// Constants for type-comparisons, stores and conversions. C callee-save. |.define TISNUM, r22 @@ -2318,6 +2317,7 @@ static void build_subroutines(BuildCtx *ctx) | sub NARGS8:RC, TMP0, BASE | add RA, BASE, RA | lwz LFUNC:RB, FRAME_FUNC(BASE) + | lwz INS, -4(PC) | mtctr CRET1 | bctr | @@ -2353,7 +2353,7 @@ static void build_subroutines(BuildCtx *ctx) | savex_ 16,17,18,19 | stw TMP1, 16+32*8+0*4(sp) // Clear RID_TMP. | savex_ 20,21,22,23 - | lwz CARG4, 0(CARG3) // Load exit stub group offset. + | lhz CARG4, 2(CARG3) // Load trace number. | savex_ 24,25,26,27 | lwz L, DISPATCH_GL(jit_L)(DISPATCH) | savex_ 28,29,30,31 @@ -2363,12 +2363,11 @@ static void build_subroutines(BuildCtx *ctx) | stw L, DISPATCH_J(L)(DISPATCH) | subi CARG3, CARG3, 2 | stw TMP1, DISPATCH_GL(jit_L)(DISPATCH) - | add CARG3, CARG4, CARG3 + | stw CARG4, DISPATCH_J(parent)(DISPATCH) | stw BASE, L->base | addi CARG1, DISPATCH, GG_DISP2J | stw CARG3, DISPATCH_J(exitno)(DISPATCH) | addi CARG2, sp, 16 - | stw JTR, DISPATCH_J(parent)(DISPATCH) | bl extern lj_trace_exit // (jit_State *J, ExitState *ex) | // Returns MULTRES (unscaled) or negated error code. | lwz TMP1, L->cframe @@ -2416,13 +2415,14 @@ static void build_subroutines(BuildCtx *ctx) | decode_RA8 RA, INS | lwzx TMP0, DISPATCH, TMP1 | mtctr TMP0 - | cmpwi TMP1, BC_FUNCF*4 // Function header? - | beq >2 + | cmplwi TMP1, BC_FUNCF*4 // Function header? + | bge >2 | decode_RB8 RB, INS | decode_RD8 RD, INS | decode_RC8 RC, INS | bctr |2: + | subi RC, MULTRES, 8 | add RA, RA, BASE | bctr | @@ -4348,12 +4348,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | bgt >3 // See FP loop below. } else if (op == BC_JFORI) { | addis PC, RD, -(BCBIAS_J*4 >> 16) - | ble =>BC_JLOOP + | bley >7 } else if (op == BC_IFORL) { | bgt >2 | addis PC, RD, -(BCBIAS_J*4 >> 16) } else { - | ble =>BC_JLOOP + | bley =>BC_JLOOP } |2: | ins_next @@ -4419,8 +4419,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) } |1: | addis PC, RD, -(BCBIAS_J*4 >> 16) + } else if (op == BC_JFORI) { + | bley >7 } else { - | ble =>BC_JLOOP + | bley =>BC_JLOOP } if (LJ_DUALNUM) { | b <2 @@ -4435,10 +4437,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | addis PC, RD, -(BCBIAS_J*4 >> 16) } else if (op == BC_IFORL) { | bgey <1 + } else if (op == BC_JFORI) { + | bgey >7 } else { - | bge =>BC_JLOOP + | bgey =>BC_JLOOP } | b <2 + if (op == BC_JFORI) { + |7: + | lwz INS, -4(PC) + | decode_RD8 RD, INS + | b =>BC_JLOOP + } break; case BC_ITERL: @@ -4490,6 +4500,8 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | // RA = base*8 (ignored), RD = traceno*8 | lwz TMP1, DISPATCH_J(trace)(DISPATCH) | srwi RD, RD, 1 + | // Traces on PPC don't store the trace number, so use 0. + | stw ZERO, DISPATCH_GL(vmstate)(DISPATCH) | lwzx TRACE:TMP2, TMP1, RD | mcrxr cr0 // Clear SO flag. | lwz TMP2, TRACE:TMP2->mcode diff --git a/src/buildvm_ppc.h b/src/buildvm_ppc.h index 724ef661..0bc8229f 100644 --- a/src/buildvm_ppc.h +++ b/src/buildvm_ppc.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[7562] = { +static const unsigned int build_actionlist[7577] = { 0x00010001, 0x00060014, 0x72000000, @@ -3793,6 +3793,7 @@ static const unsigned int build_actionlist[7562] = { 0x7d6e0050, 0x7e8ea214, 0x814efffc, +0x80f0fffc, 0x7c6903a6, 0x4e800420, 0x00060096, @@ -3801,7 +3802,7 @@ static const unsigned int build_actionlist[7562] = { 0x00098200, 0xbc410000, 0x00098200, -0x3a3e0000, +0x3a3f0000, 0x00098200, 0x38800000, 0x00098200, @@ -3868,7 +3869,7 @@ static const unsigned int build_actionlist[7562] = { 0x00098200, 0xdae10000, 0x00098200, -0x80c50000, +0xa0c50002, 0xdb010000, 0x00098200, 0xdb210000, @@ -3898,7 +3899,8 @@ static const unsigned int build_actionlist[7562] = { 0x38a5fffe, 0x91110000, 0x00098200, -0x7ca62a14, +0x90d10000, +0x00098200, 0x91d20000, 0x00098200, 0x38710000, @@ -3906,8 +3908,6 @@ static const unsigned int build_actionlist[7562] = { 0x90b10000, 0x00098200, 0x38810010, -0x93f10000, -0x00098200, 0x48000001, 0x0003002b, 0x81120000, @@ -3925,7 +3925,7 @@ static const unsigned int build_actionlist[7562] = { 0x00060097, 0x00000000, 0x82410024, -0x3a3e0000, +0x3a3f0000, 0x00098200, 0x0006000b, 0x2c030000, @@ -3963,15 +3963,16 @@ static const unsigned int build_actionlist[7562] = { 0x54f4dd78, 0x7c11402e, 0x7c0903a6, -0x2c080000, -0x00098200, -0x41820000, +0x28080000, +0x00090200, +0x40800000, 0x00050802, 0x54ea5d78, 0x54ec9b78, 0x54eb9d78, 0x4e800420, 0x0006000c, +0x3973fff8, 0x7e947214, 0x4e800420, 0x0006000d, @@ -7193,15 +7194,15 @@ static const unsigned int build_actionlist[7562] = { 0x00000000, 0x3e0c0000, 0x00098200, -0x40810000, -0x00070800, +0x40a10000, +0x00050807, 0x00000000, 0x41810000, 0x00050802, 0x3e0c0000, 0x00098200, 0x00000000, -0x40810000, +0x40a10000, 0x00070800, 0x00000000, 0x0006000c, @@ -7296,7 +7297,10 @@ static const unsigned int build_actionlist[7562] = { 0x3e0c0000, 0x00098200, 0x00000000, -0x40810000, +0x40a10000, +0x00050807, +0x00000000, +0x40a10000, 0x00070800, 0x00000000, 0x48000000, @@ -7325,12 +7329,21 @@ static const unsigned int build_actionlist[7562] = { 0x40a00000, 0x0005080b, 0x00000000, -0x40800000, +0x40a00000, +0x00050807, +0x00000000, +0x40a00000, 0x00070800, 0x00000000, 0x48000000, 0x0005000c, 0x00000000, +0x00060011, +0x80f0fffc, +0x54ec9b78, +0x48000000, +0x00070000, +0x00000000, 0x5608fe7c, 0x39080000, 0x00098200, @@ -7398,6 +7411,8 @@ static const unsigned int build_actionlist[7562] = { 0x00098200, 0x558c007e, 0x000900ab, +0x93110000, +0x00098200, 0x7d28602e, 0x7c000400, 0x81290000, @@ -7407,7 +7422,7 @@ static const unsigned int build_actionlist[7562] = { 0x7d2903a6, 0x92510000, 0x00098200, -0x3bd10000, +0x3bf10000, 0x00098200, 0x4e800420, 0x00000000, @@ -8312,29 +8327,29 @@ static void build_subroutines(BuildCtx *ctx) #endif dasm_put(Dst, 3762, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 3784, -(16+32*8+32*4), 16+32*8+2*4, -GG_DISP2G-32768, ~LJ_VMST_EXIT, 16+32*8+32*4, DISPATCH_GL(vmstate), 16+0*8, 16+1*8, 16+2*8, 16+3*8, 16+4*8, 16+5*8, 16+6*8, 16+7*8, 16+32*8+32*4, 16+8*8, 16+9*8, 16+10*8, 16+11*8, 16+32*8+1*4, 16+12*8, 16+13*8); - dasm_put(Dst, 3831, 16+14*8, 16+15*8, 16+16*8, 16+17*8, 16+18*8, 16+19*8, 16+32*8+0*4, 16+20*8, 16+21*8, 16+22*8, 16+23*8, 16+24*8, 16+25*8, 16+26*8, 16+27*8, DISPATCH_GL(jit_L), 16+28*8, 16+29*8, 16+30*8, 16+31*8, DISPATCH_GL(jit_base), 32-2); - dasm_put(Dst, 3880, DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, DISPATCH_J(exitno), DISPATCH_J(parent), Dt1(->cframe), Dt1(->base)); + dasm_put(Dst, 3785, -(16+32*8+32*4), 16+32*8+2*4, -GG_DISP2G-32768, ~LJ_VMST_EXIT, 16+32*8+32*4, DISPATCH_GL(vmstate), 16+0*8, 16+1*8, 16+2*8, 16+3*8, 16+4*8, 16+5*8, 16+6*8, 16+7*8, 16+32*8+32*4, 16+8*8, 16+9*8, 16+10*8, 16+11*8, 16+32*8+1*4, 16+12*8, 16+13*8); + dasm_put(Dst, 3832, 16+14*8, 16+15*8, 16+16*8, 16+17*8, 16+18*8, 16+19*8, 16+32*8+0*4, 16+20*8, 16+21*8, 16+22*8, 16+23*8, 16+24*8, 16+25*8, 16+26*8, 16+27*8, DISPATCH_GL(jit_L), 16+28*8, 16+29*8, 16+30*8, 16+31*8, DISPATCH_GL(jit_base), 32-2); + dasm_put(Dst, 3881, DISPATCH_J(L), DISPATCH_GL(jit_L), DISPATCH_J(parent), Dt1(->base), GG_DISP2J, DISPATCH_J(exitno), Dt1(->cframe), Dt1(->base)); #endif dasm_put(Dst, 3909); #if LJ_HASJIT dasm_put(Dst, 3911, -GG_DISP2G-32768, 31-3, Dt7(->pc), DISPATCH_GL(jit_L), PC2PROTO(k), LJ_TISNUM, LJ_TNIL, DISPATCH_GL(vmstate), BC_FUNCF*4); #endif - dasm_put(Dst, 3967); + dasm_put(Dst, 3968); #if LJ_HASJIT - dasm_put(Dst, 3975); + dasm_put(Dst, 3976); #endif - dasm_put(Dst, 3978); + dasm_put(Dst, 3979); #if LJ_HASJIT - dasm_put(Dst, 4058); + dasm_put(Dst, 4059); #else - dasm_put(Dst, 4080); + dasm_put(Dst, 4081); #endif - dasm_put(Dst, 4082); + dasm_put(Dst, 4083); #if LJ_HASFFI #define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) - dasm_put(Dst, 4084, DtE(->spadj), DtE(->nsp), DtE(->nfpr), DtE(->stack), 31-2, DtE(->fpr[0]), DtE(->fpr[1]), DtE(->fpr[2]), DtE(->fpr[3]), DtE(->fpr[4]), DtE(->fpr[5]), DtE(->fpr[6]), DtE(->fpr[7]), DtE(->func), DtE(->gpr[1]), DtE(->gpr[2])); - dasm_put(Dst, 4140, DtE(->gpr[3]), DtE(->gpr[4]), DtE(->gpr[5]), DtE(->gpr[6]), DtE(->gpr[7]), DtE(->gpr[0]), DtE(->gpr[0]), DtE(->fpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3])); + dasm_put(Dst, 4085, DtE(->spadj), DtE(->nsp), DtE(->nfpr), DtE(->stack), 31-2, DtE(->fpr[0]), DtE(->fpr[1]), DtE(->fpr[2]), DtE(->fpr[3]), DtE(->fpr[4]), DtE(->fpr[5]), DtE(->fpr[6]), DtE(->fpr[7]), DtE(->func), DtE(->gpr[1]), DtE(->gpr[2])); + dasm_put(Dst, 4141, DtE(->gpr[3]), DtE(->gpr[4]), DtE(->gpr[5]), DtE(->gpr[6]), DtE(->gpr[7]), DtE(->gpr[0]), DtE(->gpr[0]), DtE(->fpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3])); #endif } @@ -8342,7 +8357,7 @@ static void build_subroutines(BuildCtx *ctx) static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; - dasm_put(Dst, 4171, defop); + dasm_put(Dst, 4172, defop); switch (op) { @@ -8352,224 +8367,224 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: if (LJ_DUALNUM) { - dasm_put(Dst, 4173, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4174, -(BCBIAS_J*4 >> 16)); if (op == BC_ISLT) { - dasm_put(Dst, 4190); + dasm_put(Dst, 4191); } else if (op == BC_ISGE) { - dasm_put(Dst, 4193); + dasm_put(Dst, 4194); } else if (op == BC_ISLE) { - dasm_put(Dst, 4196); + dasm_put(Dst, 4197); } else { - dasm_put(Dst, 4199); + dasm_put(Dst, 4200); } - dasm_put(Dst, 4202); + dasm_put(Dst, 4203); if (op == BC_ISLT) { - dasm_put(Dst, 4241); + dasm_put(Dst, 4242); } else if (op == BC_ISGE) { - dasm_put(Dst, 4244); + dasm_put(Dst, 4245); } else if (op == BC_ISLE) { - dasm_put(Dst, 4247); + dasm_put(Dst, 4248); } else { - dasm_put(Dst, 4251); + dasm_put(Dst, 4252); } - dasm_put(Dst, 4255); + dasm_put(Dst, 4256); } else { - dasm_put(Dst, 4258, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4259, -(BCBIAS_J*4 >> 16)); if (op == BC_ISLT) { - dasm_put(Dst, 4275); + dasm_put(Dst, 4276); } else if (op == BC_ISGE) { - dasm_put(Dst, 4278); + dasm_put(Dst, 4279); } else if (op == BC_ISLE) { - dasm_put(Dst, 4281); + dasm_put(Dst, 4282); } else { - dasm_put(Dst, 4285); + dasm_put(Dst, 4286); } - dasm_put(Dst, 4289); + dasm_put(Dst, 4290); } break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; if (LJ_DUALNUM) { - dasm_put(Dst, 4302, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4303, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 4315); + dasm_put(Dst, 4316); } else { - dasm_put(Dst, 4318); + dasm_put(Dst, 4319); } } else { - dasm_put(Dst, 4321, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4322, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 4338); + dasm_put(Dst, 4339); } else { - dasm_put(Dst, 4342); + dasm_put(Dst, 4343); } - dasm_put(Dst, 4346); + dasm_put(Dst, 4347); } - dasm_put(Dst, 4358); + dasm_put(Dst, 4359); if (!LJ_DUALNUM) { - dasm_put(Dst, 4360); + dasm_put(Dst, 4361); } if (LJ_HASFFI) { - dasm_put(Dst, 4363, LJ_TCDATA, LJ_TCDATA); + dasm_put(Dst, 4364, LJ_TCDATA, LJ_TCDATA); } - dasm_put(Dst, 4368, ~LJ_TISPRI); + dasm_put(Dst, 4369, ~LJ_TISPRI); if (LJ_HASFFI) { - dasm_put(Dst, 4373); + dasm_put(Dst, 4374); } - dasm_put(Dst, 4375, ~LJ_TISTABUD); + dasm_put(Dst, 4376, ~LJ_TISTABUD); if (LJ_HASFFI) { - dasm_put(Dst, 4378); + dasm_put(Dst, 4379); } - dasm_put(Dst, 4381); + dasm_put(Dst, 4382); if (vk) { - dasm_put(Dst, 4389); + dasm_put(Dst, 4390); } else { - dasm_put(Dst, 4394); + dasm_put(Dst, 4395); } if (LJ_DUALNUM) { - dasm_put(Dst, 4399); + dasm_put(Dst, 4400); } else { - dasm_put(Dst, 4414); + dasm_put(Dst, 4415); } - dasm_put(Dst, 4417, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<metatable), 1-vk, Dt6(->nomm), 1<> 16)); + dasm_put(Dst, 4455, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 4462); + dasm_put(Dst, 4463); } else { - dasm_put(Dst, 4464); + dasm_put(Dst, 4465); } - dasm_put(Dst, 4466); + dasm_put(Dst, 4467); break; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; if (LJ_DUALNUM) { - dasm_put(Dst, 4478, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4479, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 4490); + dasm_put(Dst, 4491); } else { - dasm_put(Dst, 4492); + dasm_put(Dst, 4493); } - dasm_put(Dst, 4494); + dasm_put(Dst, 4495); } else { if (vk) { - dasm_put(Dst, 4501); + dasm_put(Dst, 4502); } else { - dasm_put(Dst, 4503); + dasm_put(Dst, 4504); } - dasm_put(Dst, 4505, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4506, -(BCBIAS_J*4 >> 16)); } if (vk) { - dasm_put(Dst, 4518); + dasm_put(Dst, 4519); if (!LJ_HASFFI) { - dasm_put(Dst, 4523); + dasm_put(Dst, 4524); } } else { - dasm_put(Dst, 4525); + dasm_put(Dst, 4526); if (!LJ_HASFFI) { - dasm_put(Dst, 4529); + dasm_put(Dst, 4530); } - dasm_put(Dst, 4531); + dasm_put(Dst, 4532); } - dasm_put(Dst, 4534); + dasm_put(Dst, 4535); if (LJ_HASFFI) { - dasm_put(Dst, 4545, LJ_TCDATA); + dasm_put(Dst, 4546, LJ_TCDATA); } if (LJ_DUALNUM) { - dasm_put(Dst, 4553); + dasm_put(Dst, 4554); } break; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; - dasm_put(Dst, 4577, 32-3); + dasm_put(Dst, 4578, 32-3); if (LJ_HASFFI) { - dasm_put(Dst, 4584, LJ_TCDATA); + dasm_put(Dst, 4585, LJ_TCDATA); } - dasm_put(Dst, 4587); + dasm_put(Dst, 4588); if (LJ_HASFFI) { - dasm_put(Dst, 4589); + dasm_put(Dst, 4590); } - dasm_put(Dst, 4592, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4593, -(BCBIAS_J*4 >> 16)); if (vk) { - dasm_put(Dst, 4598); + dasm_put(Dst, 4599); } else { - dasm_put(Dst, 4600); + dasm_put(Dst, 4601); } - dasm_put(Dst, 4602); + dasm_put(Dst, 4603); break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: - dasm_put(Dst, 4614); + dasm_put(Dst, 4615); if (op == BC_IST || op == BC_ISF) { - dasm_put(Dst, 4618, LJ_TTRUE, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4619, LJ_TTRUE, -(BCBIAS_J*4 >> 16)); if (op == BC_IST) { - dasm_put(Dst, 4625); + dasm_put(Dst, 4626); } else { - dasm_put(Dst, 4627); + dasm_put(Dst, 4628); } - dasm_put(Dst, 4629); + dasm_put(Dst, 4630); } else { - dasm_put(Dst, 4631, LJ_TFALSE); + dasm_put(Dst, 4632, LJ_TFALSE); if (op == BC_ISTC) { - dasm_put(Dst, 4636); + dasm_put(Dst, 4637); } else { - dasm_put(Dst, 4639); + dasm_put(Dst, 4640); } - dasm_put(Dst, 4642, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 4643, -(BCBIAS_J*4 >> 16)); } - dasm_put(Dst, 4649); + dasm_put(Dst, 4650); break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: - dasm_put(Dst, 4660); + dasm_put(Dst, 4661); break; case BC_NOT: - dasm_put(Dst, 4673, LJ_TTRUE); + dasm_put(Dst, 4674, LJ_TTRUE); break; case BC_UNM: - dasm_put(Dst, 4689); + dasm_put(Dst, 4690); if (LJ_DUALNUM) { - dasm_put(Dst, 4693); + dasm_put(Dst, 4694); } - dasm_put(Dst, 4721); + dasm_put(Dst, 4722); if (LJ_DUALNUM) { - dasm_put(Dst, 4731); + dasm_put(Dst, 4732); } else { - dasm_put(Dst, 4734); + dasm_put(Dst, 4735); } break; case BC_LEN: - dasm_put(Dst, 4743, LJ_TSTR, Dt5(->len)); + dasm_put(Dst, 4744, LJ_TSTR, Dt5(->len)); if (LJ_DUALNUM) { - dasm_put(Dst, 4753); + dasm_put(Dst, 4754); } else { - dasm_put(Dst, 4758); + dasm_put(Dst, 4759); } - dasm_put(Dst, 4765, LJ_TTAB); + dasm_put(Dst, 4766, LJ_TTAB); #ifdef LUAJIT_ENABLE_LUA52COMPAT - dasm_put(Dst, 4779, Dt6(->metatable)); + dasm_put(Dst, 4780, Dt6(->metatable)); #endif - dasm_put(Dst, 4786); + dasm_put(Dst, 4787); #ifdef LUAJIT_ENABLE_LUA52COMPAT - dasm_put(Dst, 4792, Dt6(->nomm), 1<nomm), 1<base), 32-3, Dt1(->base)); + dasm_put(Dst, 5566, Dt1(->base), 32-3, Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 5595, 32-1, LJ_TSTR); + dasm_put(Dst, 5596, 32-1, LJ_TSTR); break; case BC_KCDATA: #if LJ_HASFFI - dasm_put(Dst, 5614, 32-1, LJ_TCDATA); + dasm_put(Dst, 5615, 32-1, LJ_TCDATA); #endif break; case BC_KSHORT: if (LJ_DUALNUM) { - dasm_put(Dst, 5633, 31-13); + dasm_put(Dst, 5634, 31-13); } else { - dasm_put(Dst, 5649, 31-13, 31-20); + dasm_put(Dst, 5650, 31-13, 31-20); } break; case BC_KNUM: - dasm_put(Dst, 5677); + dasm_put(Dst, 5678); break; case BC_KPRI: - dasm_put(Dst, 5690, 32-3); + dasm_put(Dst, 5691, 32-3); break; case BC_KNIL: - dasm_put(Dst, 5705); + dasm_put(Dst, 5706); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 5724, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 5725, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: - dasm_put(Dst, 5745, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -(LJ_TISNUM+1), LJ_TISGCV - (LJ_TISNUM+1), Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 5746, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -(LJ_TISNUM+1), LJ_TISGCV - (LJ_TISNUM+1), Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); break; case BC_USETS: - dasm_put(Dst, 5798, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_TSTR, LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 5799, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_TSTR, LJ_GC_WHITES, GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 5849, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 5850, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETP: - dasm_put(Dst, 5870, 32-1, 32-3, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 5871, 32-1, 32-3, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 5893, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 5894, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 5923, 32-1, Dt1(->base), Dt1(->base), LJ_TFUNC); + dasm_put(Dst, 5924, 32-1, Dt1(->base), Dt1(->base), LJ_TFUNC); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: case BC_TDUP: - dasm_put(Dst, 5951, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); + dasm_put(Dst, 5952, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); if (op == BC_TNEW) { - dasm_put(Dst, 5964); + dasm_put(Dst, 5965); } else { - dasm_put(Dst, 5973, 32-1); + dasm_put(Dst, 5974, 32-1); } - dasm_put(Dst, 5980, Dt1(->base), LJ_TTAB); + dasm_put(Dst, 5981, Dt1(->base), LJ_TTAB); if (op == BC_TNEW) { - dasm_put(Dst, 5997); + dasm_put(Dst, 5998); } - dasm_put(Dst, 6002); + dasm_put(Dst, 6003); break; case BC_GGET: case BC_GSET: - dasm_put(Dst, 6011, 32-1, Dt7(->env)); + dasm_put(Dst, 6012, 32-1, Dt7(->env)); if (op == BC_GGET) { - dasm_put(Dst, 6019); + dasm_put(Dst, 6020); } else { - dasm_put(Dst, 6022); + dasm_put(Dst, 6023); } break; case BC_TGETV: - dasm_put(Dst, 6025); + dasm_put(Dst, 6026); if (LJ_DUALNUM) { - dasm_put(Dst, 6029); + dasm_put(Dst, 6030); } else { - dasm_put(Dst, 6031); + dasm_put(Dst, 6032); } - dasm_put(Dst, 6033, LJ_TTAB); + dasm_put(Dst, 6034, LJ_TTAB); if (LJ_DUALNUM) { - dasm_put(Dst, 6039, Dt6(->asize), Dt6(->array), 31-3); + dasm_put(Dst, 6040, Dt6(->asize), Dt6(->array), 31-3); } else { - dasm_put(Dst, 6049, Dt6(->asize), Dt6(->array), 31-3); + dasm_put(Dst, 6050, Dt6(->asize), Dt6(->array), 31-3); } - dasm_put(Dst, 6066, LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), 4+offsetof(Node, key), DtB(->val), 4+offsetof(Node, val), LJ_TSTR, LJ_TNIL, DtB(->next)); - dasm_put(Dst, 6172, LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), 4+offsetof(Node, key), DtB(->val), 4+offsetof(Node, val), LJ_TSTR, LJ_TNIL, DtB(->next)); + dasm_put(Dst, 6173, LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), 31-3); + dasm_put(Dst, 6255, Dt6(->asize), Dt6(->array), 31-3); } else { - dasm_put(Dst, 6264, Dt6(->asize), Dt6(->array), 31-3); + dasm_put(Dst, 6265, Dt6(->asize), Dt6(->array), 31-3); } - dasm_put(Dst, 6281, Dt6(->marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked), Dt6(->gclist)); + dasm_put(Dst, 6331, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); break; - dasm_put(Dst, 6345, LJ_TSTR, LJ_TNIL); + dasm_put(Dst, 6346, LJ_TSTR, LJ_TNIL); case BC_TSETS: - dasm_put(Dst, 6371, 32-1, LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), 4+offsetof(Node, key), DtB(->val), 4+offsetof(Node, val), LJ_TSTR, LJ_TNIL); - dasm_put(Dst, 6422, LJ_GC_BLACK, DtB(->val), Dt6(->metatable), Dt6(->nomm), 1<next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); + dasm_put(Dst, 6372, 32-1, LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), 4+offsetof(Node, key), DtB(->val), 4+offsetof(Node, val), LJ_TSTR, LJ_TNIL); + dasm_put(Dst, 6423, LJ_GC_BLACK, DtB(->val), Dt6(->metatable), Dt6(->nomm), 1<next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 6503, 32-3, LJ_TTAB, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked), Dt6(->gclist)); + dasm_put(Dst, 6504, 32-3, LJ_TTAB, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<marked), Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 6571, 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, 6640); + dasm_put(Dst, 6572, 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, 6641); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALLM: - dasm_put(Dst, 6643); + dasm_put(Dst, 6644); break; case BC_CALL: - dasm_put(Dst, 6645, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 6646, LJ_TFUNC, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 6666); + dasm_put(Dst, 6667); break; case BC_CALLT: - dasm_put(Dst, 6668, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); - dasm_put(Dst, 6732, FRAME_TYPE); + dasm_put(Dst, 6669, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); + dasm_put(Dst, 6733, FRAME_TYPE); break; case BC_ITERC: - dasm_put(Dst, 6741, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 6742, LJ_TFUNC, Dt7(->pc)); break; case BC_ITERN: #if LJ_HASJIT #endif - dasm_put(Dst, 6768, Dt6(->asize), Dt6(->array), 31-3, LJ_TNIL); + dasm_put(Dst, 6769, Dt6(->asize), Dt6(->array), 31-3, LJ_TNIL); if (LJ_DUALNUM) { - dasm_put(Dst, 6790); + dasm_put(Dst, 6791); } else { - dasm_put(Dst, 6793); + dasm_put(Dst, 6794); } - dasm_put(Dst, 6797, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 6798, -(BCBIAS_J*4 >> 16)); if (!LJ_DUALNUM) { - dasm_put(Dst, 6805); + dasm_put(Dst, 6806); } - dasm_put(Dst, 6807, Dt6(->hmask), Dt6(->node), 31-5, 31-3, LJ_TNIL, DtB(->key), -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 6808, Dt6(->hmask), Dt6(->node), 31-5, 31-3, LJ_TNIL, DtB(->key), -(BCBIAS_J*4 >> 16)); break; case BC_ISNEXT: - dasm_put(Dst, 6863, 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, 6864, 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, 6913, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); - dasm_put(Dst, 6993); + dasm_put(Dst, 6914, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); + dasm_put(Dst, 6994); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 6999); + dasm_put(Dst, 7000); break; case BC_RET: - dasm_put(Dst, 7001, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); + dasm_put(Dst, 7002, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); break; case BC_RET0: case BC_RET1: - dasm_put(Dst, 7071, FRAME_TYPE, FRAME_VARG); + dasm_put(Dst, 7072, FRAME_TYPE, FRAME_VARG); if (op == BC_RET1) { - dasm_put(Dst, 7084); + dasm_put(Dst, 7085); } - dasm_put(Dst, 7087, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 7088, Dt7(->pc), PC2PROTO(k)); break; /* -- Loops and branches ------------------------------------------------ */ case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 7115, GG_DISP2HOT, -HOTCOUNT_LOOP); + dasm_put(Dst, 7116, GG_DISP2HOT, -HOTCOUNT_LOOP); #endif break; @@ -9230,93 +9245,100 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) case BC_IFORL: vk = (op == BC_IFORL || op == BC_JFORL); if (LJ_DUALNUM) { - dasm_put(Dst, 7125, FORL_IDX*8+4); + dasm_put(Dst, 7126, FORL_IDX*8+4); if (vk) { - dasm_put(Dst, 7130, FORL_STEP*8+4, FORL_STOP*8+4, FORL_IDX*8+4); + dasm_put(Dst, 7131, FORL_STEP*8+4, FORL_STOP*8+4, FORL_IDX*8+4); } else { - dasm_put(Dst, 7144, FORL_STEP*8, FORL_STEP*8+4, FORL_STOP*8, FORL_STOP*8+4); + dasm_put(Dst, 7145, FORL_STEP*8, FORL_STEP*8+4, FORL_STOP*8, FORL_STOP*8+4); } - dasm_put(Dst, 7160, FORL_EXT*8); + dasm_put(Dst, 7161, FORL_EXT*8); if (op != BC_JFORL) { - dasm_put(Dst, 7167, 32-1); + dasm_put(Dst, 7168, 32-1); } - dasm_put(Dst, 7170, FORL_EXT*8+4); + dasm_put(Dst, 7171, FORL_EXT*8+4); if (op != BC_JFORL) { - dasm_put(Dst, 7173); + dasm_put(Dst, 7174); } if (op == BC_FORI) { - dasm_put(Dst, 7175); + dasm_put(Dst, 7176); } else if (op == BC_JFORI) { - dasm_put(Dst, 7178, -(BCBIAS_J*4 >> 16), BC_JLOOP); + dasm_put(Dst, 7179, -(BCBIAS_J*4 >> 16)); } else if (op == BC_IFORL) { - dasm_put(Dst, 7183, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 7184, -(BCBIAS_J*4 >> 16)); } else { - dasm_put(Dst, 7188, BC_JLOOP); + dasm_put(Dst, 7189, BC_JLOOP); } - dasm_put(Dst, 7191); + dasm_put(Dst, 7192); if (vk) { - dasm_put(Dst, 7207); + dasm_put(Dst, 7208); } } if (vk) { if (LJ_DUALNUM) { - dasm_put(Dst, 7214, FORL_IDX*8); + dasm_put(Dst, 7215, FORL_IDX*8); } else { - dasm_put(Dst, 7218); + dasm_put(Dst, 7219); } - dasm_put(Dst, 7220, FORL_STEP*8, FORL_STOP*8, FORL_STEP*8, FORL_IDX*8); + dasm_put(Dst, 7221, FORL_STEP*8, FORL_STOP*8, FORL_STEP*8, FORL_IDX*8); } else { if (LJ_DUALNUM) { - dasm_put(Dst, 7230); + dasm_put(Dst, 7231); } else { - dasm_put(Dst, 7232, FORL_STEP*8, FORL_STOP*8); + dasm_put(Dst, 7233, FORL_STEP*8, FORL_STOP*8); } - dasm_put(Dst, 7241, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); + dasm_put(Dst, 7242, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); } - dasm_put(Dst, 7252); + dasm_put(Dst, 7253); if (op != BC_JFORL) { - dasm_put(Dst, 7254, 32-1); + dasm_put(Dst, 7255, 32-1); } - dasm_put(Dst, 7257, FORL_EXT*8); + dasm_put(Dst, 7258, FORL_EXT*8); if (op != BC_JFORL) { - dasm_put(Dst, 7260); + dasm_put(Dst, 7261); } - dasm_put(Dst, 7262); + dasm_put(Dst, 7263); if (op == BC_JFORI) { - dasm_put(Dst, 7264, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 7265, -(BCBIAS_J*4 >> 16)); } - dasm_put(Dst, 7267); + dasm_put(Dst, 7268); if (op == BC_FORI) { - dasm_put(Dst, 7270); + dasm_put(Dst, 7271); } else if (op == BC_IFORL) { if (LJ_DUALNUM) { - dasm_put(Dst, 7273); + dasm_put(Dst, 7274); } else { - dasm_put(Dst, 7276); + dasm_put(Dst, 7277); } - dasm_put(Dst, 7279, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 7280, -(BCBIAS_J*4 >> 16)); + } else if (op == BC_JFORI) { + dasm_put(Dst, 7284); } else { - dasm_put(Dst, 7283, BC_JLOOP); + dasm_put(Dst, 7287, BC_JLOOP); } if (LJ_DUALNUM) { - dasm_put(Dst, 7286); + dasm_put(Dst, 7290); } else { - dasm_put(Dst, 7289); + dasm_put(Dst, 7293); } - dasm_put(Dst, 7301); + dasm_put(Dst, 7305); if (op == BC_FORI) { - dasm_put(Dst, 7303, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 7307, -(BCBIAS_J*4 >> 16)); } else if (op == BC_IFORL) { - dasm_put(Dst, 7309); + dasm_put(Dst, 7313); + } else if (op == BC_JFORI) { + dasm_put(Dst, 7316); } else { - dasm_put(Dst, 7312, BC_JLOOP); + dasm_put(Dst, 7319, BC_JLOOP); + } + dasm_put(Dst, 7322); + if (op == BC_JFORI) { + dasm_put(Dst, 7325, BC_JLOOP); } - dasm_put(Dst, 7315); break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 7318, GG_DISP2HOT, -HOTCOUNT_LOOP); + dasm_put(Dst, 7331, GG_DISP2HOT, -HOTCOUNT_LOOP); #endif break; @@ -9325,40 +9347,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) break; #endif case BC_IITERL: - dasm_put(Dst, 7328, LJ_TNIL); + dasm_put(Dst, 7341, LJ_TNIL); if (op == BC_JITERL) { - dasm_put(Dst, 7335, BC_JLOOP); + dasm_put(Dst, 7348, BC_JLOOP); } else { - dasm_put(Dst, 7340, 32-1, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 7353, 32-1, -(BCBIAS_J*4 >> 16)); } - dasm_put(Dst, 7348); + dasm_put(Dst, 7361); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 7360, GG_DISP2HOT, -HOTCOUNT_LOOP); + dasm_put(Dst, 7373, GG_DISP2HOT, -HOTCOUNT_LOOP); #endif break; case BC_ILOOP: - dasm_put(Dst, 7370); + dasm_put(Dst, 7383); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 7381, DISPATCH_J(trace), 32-1, DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), GG_DISP2G+32768); + dasm_put(Dst, 7394, DISPATCH_J(trace), 32-1, DISPATCH_GL(vmstate), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), GG_DISP2G+32768); #endif break; case BC_JMP: - dasm_put(Dst, 7398, 32-1, -(BCBIAS_J*4 >> 16)); + dasm_put(Dst, 7413, 32-1, -(BCBIAS_J*4 >> 16)); break; /* -- Function headers -------------------------------------------------- */ case BC_FUNCF: #if LJ_HASJIT - dasm_put(Dst, 7414, GG_DISP2HOT, -HOTCOUNT_CALL); + dasm_put(Dst, 7429, GG_DISP2HOT, -HOTCOUNT_CALL); #endif case BC_FUNCV: /* NYI: compiled vararg functions. */ break; @@ -9368,42 +9390,42 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) break; #endif case BC_IFUNCF: - dasm_put(Dst, 7424, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); + dasm_put(Dst, 7439, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); if (op != BC_JFUNCF) { - dasm_put(Dst, 7436); + dasm_put(Dst, 7451); } - dasm_put(Dst, 7439); + dasm_put(Dst, 7454); if (op == BC_JFUNCF) { - dasm_put(Dst, 7444, BC_JLOOP); + dasm_put(Dst, 7459, BC_JLOOP); } else { - dasm_put(Dst, 7448); + dasm_put(Dst, 7463); } - dasm_put(Dst, 7457); + dasm_put(Dst, 7472); break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif - dasm_put(Dst, 7463); + dasm_put(Dst, 7478); break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 7465, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), LJ_TNIL); + dasm_put(Dst, 7480, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), LJ_TNIL); break; case BC_FUNCC: case BC_FUNCCW: if (op == BC_FUNCC) { - dasm_put(Dst, 7518, Dt8(->f)); + dasm_put(Dst, 7533, Dt8(->f)); } else { - dasm_put(Dst, 7521, DISPATCH_GL(wrapf)); + dasm_put(Dst, 7536, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 7524, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); + dasm_put(Dst, 7539, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); if (op == BC_FUNCCW) { - dasm_put(Dst, 7537, Dt8(->f)); + dasm_put(Dst, 7552, Dt8(->f)); } - dasm_put(Dst, 7540, DISPATCH_GL(vmstate), Dt1(->base), 31-3, Dt1(->top), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); + dasm_put(Dst, 7555, DISPATCH_GL(vmstate), Dt1(->base), 31-3, Dt1(->top), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); break; /* ---------------------------------------------------------------------- */ @@ -9423,7 +9445,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx); - dasm_put(Dst, 7561); + dasm_put(Dst, 7576); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op); -- 2.11.4.GIT