aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2012-01-23 19:15:52 +0100
committerMike Pall <mike>2012-01-23 19:18:40 +0100
commit7d2774e4c5ee7c649ccb41f75bfbbb1e7f370a96 (patch)
tree8082645032c7ed6ceb6fe73a30743ad7e52cbed0 /src
parent9f485115efde0a36962ae0da7b3f7e3c281233ad (diff)
downloadluajit-7d2774e4c5ee7c649ccb41f75bfbbb1e7f370a96.tar.gz
luajit-7d2774e4c5ee7c649ccb41f75bfbbb1e7f370a96.tar.bz2
luajit-7d2774e4c5ee7c649ccb41f75bfbbb1e7f370a96.zip
PPC: Avoid pointless arg clearing in BC_IFUNCF. Remove dead code.
Diffstat (limited to 'src')
-rw-r--r--src/buildvm_ppc.dasc31
-rw-r--r--src/buildvm_ppc.h1086
2 files changed, 537 insertions, 580 deletions
diff --git a/src/buildvm_ppc.dasc b/src/buildvm_ppc.dasc
index 99f4586f..77854ae1 100644
--- a/src/buildvm_ppc.dasc
+++ b/src/buildvm_ppc.dasc
@@ -1347,7 +1347,6 @@ static void build_subroutines(BuildCtx *ctx)
1347 | cmplwi NARGS8:RC, 16 1347 | cmplwi NARGS8:RC, 16
1348 | lwz CARG4, 8(BASE) 1348 | lwz CARG4, 8(BASE)
1349 | lfd FARG2, 8(BASE) 1349 | lfd FARG2, 8(BASE)
1350 | lwz CARG3, 0(BASE)
1351 | lfd FARG1, 0(BASE) 1350 | lfd FARG1, 0(BASE)
1352 | blt ->fff_fallback 1351 | blt ->fff_fallback
1353 | lbz TMP1, DISPATCH_GL(hookmask)(DISPATCH) 1352 | lbz TMP1, DISPATCH_GL(hookmask)(DISPATCH)
@@ -1356,9 +1355,9 @@ static void build_subroutines(BuildCtx *ctx)
1356 | la BASE, 16(BASE) 1355 | la BASE, 16(BASE)
1357 | // Remember active hook before pcall. 1356 | // Remember active hook before pcall.
1358 | rlwinm TMP1, TMP1, 32-HOOK_ACTIVE_SHIFT, 31, 31 1357 | rlwinm TMP1, TMP1, 32-HOOK_ACTIVE_SHIFT, 31, 31
1359 | stfd FARG2, 0(TMP2) // Swap function and traceback. 1358 | stfd FARG2, 0(TMP2) // Swap function and traceback.
1360 | subi NARGS8:RC, NARGS8:RC, 16 1359 | subi NARGS8:RC, NARGS8:RC, 16
1361 | stfd FARG1, 8(TMP2) 1360 | stfd FARG1, 8(TMP2)
1362 | addi PC, TMP1, 16+FRAME_PCALL 1361 | addi PC, TMP1, 16+FRAME_PCALL
1363 | b ->vm_call_dispatch 1362 | b ->vm_call_dispatch
1364 | 1363 |
@@ -2570,14 +2569,14 @@ static void build_subroutines(BuildCtx *ctx)
2570 | bl extern lj_ccallback_enter // (CTState *cts, void *cf) 2569 | bl extern lj_ccallback_enter // (CTState *cts, void *cf)
2571 | // Returns lua_State *. 2570 | // Returns lua_State *.
2572 | lwz BASE, L:CRET1->base 2571 | lwz BASE, L:CRET1->base
2573 | li TISNUM, LJ_TISNUM // Setup type comparison constants. 2572 | li TISNUM, LJ_TISNUM // Setup type comparison constants.
2574 | lwz RC, L:CRET1->top 2573 | lwz RC, L:CRET1->top
2575 | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). 2574 | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float).
2576 | li ZERO, 0 2575 | li ZERO, 0
2577 | mr L, CRET1 2576 | mr L, CRET1
2578 | stw TMP3, TMPD 2577 | stw TMP3, TMPD
2579 | lwz LFUNC:RB, FRAME_FUNC(BASE) 2578 | lwz LFUNC:RB, FRAME_FUNC(BASE)
2580 | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). 2579 | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float).
2581 | li TISNIL, LJ_TNIL 2580 | li TISNIL, LJ_TNIL
2582 | li_vmstate INTERP 2581 | li_vmstate INTERP
2583 | lfs TOBIT, TMPD 2582 | lfs TOBIT, TMPD
@@ -2588,7 +2587,7 @@ static void build_subroutines(BuildCtx *ctx)
2588 | ins_callt 2587 | ins_callt
2589#endif 2588#endif
2590 | 2589 |
2591 |->cont_ffi_callback: // Return from FFI callback. 2590 |->cont_ffi_callback: // Return from FFI callback.
2592#if LJ_HASFFI 2591#if LJ_HASFFI
2593 | lwz CTSTATE, DISPATCH_GL(ctype_state)(DISPATCH) 2592 | lwz CTSTATE, DISPATCH_GL(ctype_state)(DISPATCH)
2594 | stw BASE, L->base 2593 | stw BASE, L->base
@@ -2619,7 +2618,6 @@ static void build_subroutines(BuildCtx *ctx)
2619 | stwux sp, sp, TMP1 2618 | stwux sp, sp, TMP1
2620 | crnot 4*cr1+eq, 4*cr1+eq // For vararg calls. 2619 | crnot 4*cr1+eq, 4*cr1+eq // For vararg calls.
2621 | stw r14, -4(TMP2) 2620 | stw r14, -4(TMP2)
2622 | li TMP3, 0
2623 | stw CCSTATE, -8(TMP2) 2621 | stw CCSTATE, -8(TMP2)
2624 | mr r14, TMP2 2622 | mr r14, TMP2
2625 | la TMP1, CCSTATE->stack 2623 | la TMP1, CCSTATE->stack
@@ -3840,14 +3838,6 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3840 | barrierback TAB:RB, TMP3, TMP0 3838 | barrierback TAB:RB, TMP3, TMP0
3841 | b <2 3839 | b <2
3842 break; 3840 break;
3843 |1:
3844 | checkstr CARG1; bne >4
3845 | cmpw TMP0, STR:RC; bne >4
3846 | checknil CARG2; beq >5 // Key found, but nil value?
3847 |3:
3848 | stwux CARG2, RA, BASE
3849 | stw TMP1, 4(RA)
3850 | ins_next
3851 case BC_TSETS: 3841 case BC_TSETS:
3852 | // RA = src*8, RB = table*8, RC = str_const*8 (~) 3842 | // RA = src*8, RB = table*8, RC = str_const*8 (~)
3853 | lwzux CARG1, RB, BASE 3843 | lwzux CARG1, RB, BASE
@@ -3874,7 +3864,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3874 | lwz CARG1, NODE:TMP2->key 3864 | lwz CARG1, NODE:TMP2->key
3875 | lwz TMP0, 4+offsetof(Node, key)(NODE:TMP2) 3865 | lwz TMP0, 4+offsetof(Node, key)(NODE:TMP2)
3876 | lwz CARG2, NODE:TMP2->val 3866 | lwz CARG2, NODE:TMP2->val
3877 | lwz TMP1, 4+offsetof(Node, val)(NODE:TMP2) 3867 | lwz NODE:TMP1, NODE:TMP2->next
3878 | checkstr CARG1; bne >5 3868 | checkstr CARG1; bne >5
3879 | cmpw TMP0, STR:RC; bne >5 3869 | cmpw TMP0, STR:RC; bne >5
3880 | checknil CARG2; beq >4 // Key found, but nil value? 3870 | checknil CARG2; beq >4 // Key found, but nil value?
@@ -3895,8 +3885,8 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3895 | b ->vmeta_tsets 3885 | b ->vmeta_tsets
3896 | 3886 |
3897 |5: // Follow hash chain. 3887 |5: // Follow hash chain.
3898 | lwz NODE:TMP2, NODE:TMP2->next 3888 | cmplwi NODE:TMP1, 0
3899 | cmplwi NODE:TMP2, 0 3889 | mr NODE:TMP2, NODE:TMP1
3900 | bne <1 3890 | bne <1
3901 | // End of hash chain: key not found, add a new one. 3891 | // End of hash chain: key not found, add a new one.
3902 | 3892 |
@@ -4470,7 +4460,6 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
4470 } 4460 }
4471 | lfd f1, FORL_IDX*8(RA) 4461 | lfd f1, FORL_IDX*8(RA)
4472 | crand 4*cr0+lt, 4*cr0+lt, 4*cr7+lt 4462 | crand 4*cr0+lt, 4*cr0+lt, 4*cr7+lt
4473 | lfd f3, FORL_STEP*8(RA)
4474 | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt 4463 | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt
4475 | lfd f2, FORL_STOP*8(RA) 4464 | lfd f2, FORL_STOP*8(RA)
4476 | bge ->vmeta_for 4465 | bge ->vmeta_for
@@ -4625,7 +4614,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
4625 } 4614 }
4626 |2: 4615 |2:
4627 | cmplw NARGS8:RC, TMP1 // Check for missing parameters. 4616 | cmplw NARGS8:RC, TMP1 // Check for missing parameters.
4628 | ble >3 4617 | blt >3
4629 if (op == BC_JFUNCF) { 4618 if (op == BC_JFUNCF) {
4630 | decode_RD8 RD, INS 4619 | decode_RD8 RD, INS
4631 | b =>BC_JLOOP 4620 | b =>BC_JLOOP
diff --git a/src/buildvm_ppc.h b/src/buildvm_ppc.h
index b42b5faa..c8d76fda 100644
--- a/src/buildvm_ppc.h
+++ b/src/buildvm_ppc.h
@@ -12,7 +12,7 @@
12#define DASM_SECTION_CODE_OP 0 12#define DASM_SECTION_CODE_OP 0
13#define DASM_SECTION_CODE_SUB 1 13#define DASM_SECTION_CODE_SUB 1
14#define DASM_MAXSECTION 2 14#define DASM_MAXSECTION 2
15static const unsigned int build_actionlist[7771] = { 15static const unsigned int build_actionlist[7740] = {
160x00010001, 160x00010001,
170x00060014, 170x00060014,
180x72000000, 180x72000000,
@@ -384,27 +384,27 @@ static const unsigned int build_actionlist[7771] = {
3840x00098200, 3840x00098200,
3850x820efff8, 3850x820efff8,
3860x3cc059c0, 3860x3cc059c0,
3870x7d8e4050,
3880x98b20000, 3870x98b20000,
3890x00098200, 3880x00098200,
3900x90c10010, 3890x90c10010,
3910x72000000,
3920x00090200,
3930x60c60004, 3900x60c60004,
3940xc3c10010, 3910xc3c10010,
3950x3b000000, 3920x7d8e4050,
3960x90c10010, 3930x90c10010,
3970x398c0008,
3980x3c004338, 3940x3c004338,
3990x7d936378, 3950x398c0008,
4000x90010008, 3960x90010008,
4010x38000000, 3970x38000000,
4020x00098200, 3980x00098200,
3990x3b000000,
4000x90110000,
4010x00098200,
4020x72000000,
4030x00090200,
4040x7d936378,
4030xc3e10010, 4050xc3e10010,
4040x3ae00000, 4060x3ae00000,
4050x00098200, 4070x00098200,
4060x90110000,
4070x00098200,
4080x00000000, 4080x00000000,
4090x41820000, 4090x41820000,
4100x00050817, 4100x00050817,
@@ -1362,7 +1362,7 @@ static const unsigned int build_actionlist[7771] = {
13620x48000000, 13620x48000000,
13630x0005004e, 13630x0005004e,
13640x00060050, 13640x00060050,
13650x280b0008, 13650x280b0010,
13660x80ce0000, 13660x80ce0000,
13670x808e0004, 13670x808e0004,
13680x41800000, 13680x41800000,
@@ -1640,7 +1640,6 @@ static const unsigned int build_actionlist[7771] = {
16400x280b0010, 16400x280b0010,
16410x80ce0008, 16410x80ce0008,
16420xc84e0008, 16420xc84e0008,
16430x80ae0000,
16440xc82e0000, 16430xc82e0000,
16450x41800000, 16440x41800000,
16460x00050849, 16450x00050849,
@@ -4304,7 +4303,6 @@ static const unsigned int build_actionlist[7771] = {
43040x7c21416e, 43030x7c21416e,
43050x4cc63042, 43040x4cc63042,
43060x91c9fffc, 43050x91c9fffc,
43070x38c00000,
43080x9069fff8, 43060x9069fff8,
43090x7d2e4b78, 43070x7d2e4b78,
43100x39030000, 43080x39030000,
@@ -6553,32 +6551,6 @@ static const unsigned int build_actionlist[7771] = {
65530x48000000, 65510x48000000,
65540x0005000c, 65520x0005000c,
65550x00000000, 65530x00000000,
65560x0006000b,
65570x2c030000,
65580x00098200,
65590x40820000,
65600x00050804,
65610x7c005800,
65620x40820000,
65630x00050804,
65640x2c040000,
65650x00098200,
65660x41820000,
65670x00050805,
65680x0006000d,
65690x7c94716e,
65700x91140004,
65710x80f00000,
65720x3a100004,
65730x54e815ba,
65740x7c11402e,
65750x7c0903a6,
65760x54ea5d78,
65770x54ec9b78,
65780x54f4dd78,
65790x54eb9d78,
65800x4e800420,
65810x00000000,
65820x7c6a706e, 65540x7c6a706e,
65830x5568007e, 65550x5568007e,
65840x000900ab, 65560x000900ab,
@@ -6662,9 +6634,8 @@ static const unsigned int build_actionlist[7771] = {
66620x48000000, 66340x48000000,
66630x00050032, 66350x00050032,
66640x0006000f, 66360x0006000f,
66650x81290000, 66370x28080000,
66660x00098200, 66380x7d094378,
66670x28090000,
66680x40820000, 66390x40820000,
66690x0005080b, 66400x0005080b,
66700x810a0000, 66410x810a0000,
@@ -6685,9 +6656,9 @@ static const unsigned int build_actionlist[7771] = {
66850x41820000, 66560x41820000,
66860x00050832, 66570x00050832,
66870x00060010, 66580x00060010,
66880x00000000,
66890x38000000, 66590x38000000,
66900x00098200, 66600x00098200,
66610x00000000,
66910x91650004, 66620x91650004,
66920x7d445378, 66630x7d445378,
66930x90050000, 66640x90050000,
@@ -7452,8 +7423,6 @@ static const unsigned int build_actionlist[7771] = {
74520xc8340000, 74230xc8340000,
74530x00098200, 74240x00098200,
74540x4c00e202, 74250x4c00e202,
74550xc8740000,
74560x00098200,
74570x4c002202, 74260x4c002202,
74580xc8540000, 74270xc8540000,
74590x00098200, 74280x00098200,
@@ -7663,7 +7632,7 @@ static const unsigned int build_actionlist[7771] = {
76630x00000000, 76320x00000000,
76640x0006000c, 76330x0006000c,
76650x7c0b4040, 76340x7c0b4040,
76660x40810000, 76350x41800000,
76670x00050803, 76360x00050803,
76680x00000000, 76370x00000000,
76690x54ec9b78, 76380x54ec9b78,
@@ -8172,7 +8141,7 @@ static void build_subroutines(BuildCtx *ctx)
8172 dasm_put(Dst, 154, Dt1(->top), 31-3, Dt1(->top), ~LJ_VMST_C, Dt1(->glref), Dt2(->vmstate), LJ_TISNUM, Dt1(->base), Dt1(->glref), LJ_TFALSE, LJ_TNIL, ~LJ_VMST_INTERP, GG_G2DISP); 8141 dasm_put(Dst, 154, Dt1(->top), 31-3, Dt1(->top), ~LJ_VMST_C, Dt1(->glref), Dt2(->vmstate), LJ_TISNUM, Dt1(->base), Dt1(->glref), LJ_TFALSE, LJ_TNIL, ~LJ_VMST_INTERP, GG_G2DISP);
8173 dasm_put(Dst, 217, DISPATCH_GL(vmstate), LUA_MINSTACK, Dt1(->base), Dt1(->top), 32-3, Dt1(->base), Dt1(->top), Dt7(->pc), 56+(14-14)*4, 128+(14-14)*8, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4); 8142 dasm_put(Dst, 217, DISPATCH_GL(vmstate), LUA_MINSTACK, Dt1(->base), Dt1(->top), 32-3, Dt1(->base), Dt1(->top), Dt7(->pc), 56+(14-14)*4, 128+(14-14)*8, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4);
8174 dasm_put(Dst, 278, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8, 56+(25-14)*4, 128+(25-14)*8, 56+(26-14)*4, 128+(26-14)*8, 56+(27-14)*4, 128+(27-14)*8, 56+(28-14)*4); 8143 dasm_put(Dst, 278, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8, 56+(25-14)*4, 128+(25-14)*8, 56+(26-14)*4, 128+(26-14)*8, 56+(27-14)*4, 128+(27-14)*8, 56+(28-14)*4);
8175 dasm_put(Dst, 325, 128+(28-14)*8, 56+(29-14)*4, 128+(29-14)*8, 56+(30-14)*4, 128+(30-14)*8, 56+(31-14)*4, 128+(31-14)*8, Dt1(->glref), Dt1(->status), FRAME_CP, CFRAME_RESUME, GG_G2DISP, Dt1(->cframe), Dt1(->base), LJ_TISNUM, Dt1(->top), Dt1(->status), FRAME_TYPE, ~LJ_VMST_INTERP, LJ_TNIL, DISPATCH_GL(vmstate)); 8144 dasm_put(Dst, 325, 128+(28-14)*8, 56+(29-14)*4, 128+(29-14)*8, 56+(30-14)*4, 128+(30-14)*8, 56+(31-14)*4, 128+(31-14)*8, Dt1(->glref), Dt1(->status), FRAME_CP, CFRAME_RESUME, GG_G2DISP, Dt1(->cframe), Dt1(->base), LJ_TISNUM, Dt1(->top), Dt1(->status), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate), FRAME_TYPE, LJ_TNIL);
8176 dasm_put(Dst, 393, 56+(14-14)*4, 128+(14-14)*8, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4); 8145 dasm_put(Dst, 393, 56+(14-14)*4, 128+(14-14)*8, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4);
8177 dasm_put(Dst, 440, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8, 56+(25-14)*4, 128+(25-14)*8, 56+(26-14)*4, 128+(26-14)*8, 56+(27-14)*4, 128+(27-14)*8, 56+(28-14)*4, 128+(28-14)*8, 56+(29-14)*4, 128+(29-14)*8, 56+(30-14)*4, 128+(30-14)*8, 56+(31-14)*4, 128+(31-14)*8, FRAME_CP, 56+(14-14)*4, 128+(14-14)*8); 8146 dasm_put(Dst, 440, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8, 56+(25-14)*4, 128+(25-14)*8, 56+(26-14)*4, 128+(26-14)*8, 56+(27-14)*4, 128+(27-14)*8, 56+(28-14)*4, 128+(28-14)*8, 56+(29-14)*4, 128+(29-14)*8, 56+(30-14)*4, 128+(30-14)*8, 56+(31-14)*4, 128+(31-14)*8, FRAME_CP, 56+(14-14)*4, 128+(14-14)*8);
8178 dasm_put(Dst, 488, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8, 56+(25-14)*4, 128+(25-14)*8); 8147 dasm_put(Dst, 488, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8, 56+(25-14)*4, 128+(25-14)*8);
@@ -8311,267 +8280,267 @@ static void build_subroutines(BuildCtx *ctx)
8311 dasm_put(Dst, 1600); 8280 dasm_put(Dst, 1600);
8312 } 8281 }
8313 dasm_put(Dst, 1602, (3+1)*8, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 8+FRAME_PCALL, DISPATCH_GL(hookmask), LJ_TFUNC, 32-HOOK_ACTIVE_SHIFT, 16+FRAME_PCALL, LJ_TTHREAD, Dt1(->status), Dt1(->cframe)); 8282 dasm_put(Dst, 1602, (3+1)*8, DISPATCH_GL(hookmask), 32-HOOK_ACTIVE_SHIFT, 8+FRAME_PCALL, DISPATCH_GL(hookmask), LJ_TFUNC, 32-HOOK_ACTIVE_SHIFT, 16+FRAME_PCALL, LJ_TTHREAD, Dt1(->status), Dt1(->cframe));
8314 dasm_put(Dst, 1663, Dt1(->top), 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)); 8283 dasm_put(Dst, 1662, Dt1(->top), 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));
8315 dasm_put(Dst, 1725, Dt1(->maxstack), Dt1(->top), FRAME_TYPE, LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top), (2+1)*8, 32-3); 8284 dasm_put(Dst, 1724, Dt1(->maxstack), Dt1(->top), FRAME_TYPE, LJ_TTRUE, FRAME_TYPE, LJ_TFALSE, Dt1(->top), (2+1)*8, 32-3);
8316 dasm_put(Dst, 1788, 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); 8285 dasm_put(Dst, 1787, 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);
8317 dasm_put(Dst, 1847, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, 32-3, Dt1(->cframe)); 8286 dasm_put(Dst, 1846, Dt1(->base), DISPATCH_GL(vmstate), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, 32-3, Dt1(->cframe));
8318 dasm_put(Dst, 1904, Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status)); 8287 dasm_put(Dst, 1903, Dt1(->base), CFRAME_RESUME, Dt1(->top), LUA_YIELD, Dt1(->cframe), Dt1(->status));
8319 if (LJ_DUALNUM) { 8288 if (LJ_DUALNUM) {
8320 dasm_put(Dst, 1929); 8289 dasm_put(Dst, 1928);
8321 } 8290 }
8322 dasm_put(Dst, 1950, (1+1)*8, FRAME_TYPE); 8291 dasm_put(Dst, 1949, (1+1)*8, FRAME_TYPE);
8323 if (LJ_DUALNUM) { 8292 if (LJ_DUALNUM) {
8324 dasm_put(Dst, 1992, 31-11, 32-21, 31-11); 8293 dasm_put(Dst, 1991, 31-11, 32-21, 31-11);
8325 dasm_put(Dst, 2074, 31-11, 32-21, 31-11); 8294 dasm_put(Dst, 2073, 31-11, 32-21, 31-11);
8326 } else { 8295 } else {
8327 dasm_put(Dst, 2128); 8296 dasm_put(Dst, 2127);
8328 } 8297 }
8329 dasm_put(Dst, 2155); 8298 dasm_put(Dst, 2154);
8330 dasm_put(Dst, 2214); 8299 dasm_put(Dst, 2213);
8331 dasm_put(Dst, 2272); 8300 dasm_put(Dst, 2271);
8332 dasm_put(Dst, 2328, Dt8(->upvalue[0])); 8301 dasm_put(Dst, 2327, Dt8(->upvalue[0]));
8333 dasm_put(Dst, 2394); 8302 dasm_put(Dst, 2393);
8334 if (LJ_DUALNUM) { 8303 if (LJ_DUALNUM) {
8335 dasm_put(Dst, 2398); 8304 dasm_put(Dst, 2397);
8336 } else { 8305 } else {
8337 dasm_put(Dst, 2413); 8306 dasm_put(Dst, 2412);
8338 } 8307 }
8339 dasm_put(Dst, 2431, DISPATCH_GL(tmptv), DISPATCH_GL(tmptv)); 8308 dasm_put(Dst, 2430, DISPATCH_GL(tmptv), DISPATCH_GL(tmptv));
8340 if (!LJ_DUALNUM) { 8309 if (!LJ_DUALNUM) {
8341 dasm_put(Dst, 2453); 8310 dasm_put(Dst, 2452);
8342 } 8311 }
8343 dasm_put(Dst, 2458, (2+1)*8); 8312 dasm_put(Dst, 2457, (2+1)*8);
8344 if (LJ_DUALNUM) { 8313 if (LJ_DUALNUM) {
8345 dasm_put(Dst, 2462); 8314 dasm_put(Dst, 2461);
8346 } else { 8315 } else {
8347 dasm_put(Dst, 2465); 8316 dasm_put(Dst, 2464);
8348 } 8317 }
8349 dasm_put(Dst, 2467, (2+1)*8); 8318 dasm_put(Dst, 2466, (2+1)*8);
8350 if (LJ_DUALNUM) { 8319 if (LJ_DUALNUM) {
8351 dasm_put(Dst, 2489); 8320 dasm_put(Dst, 2488);
8352 } else { 8321 } else {
8353 dasm_put(Dst, 2558); 8322 dasm_put(Dst, 2557);
8354 } 8323 }
8355 if (LJ_DUALNUM) { 8324 if (LJ_DUALNUM) {
8356 dasm_put(Dst, 2583); 8325 dasm_put(Dst, 2582);
8357 } else { 8326 } else {
8358 dasm_put(Dst, 2652); 8327 dasm_put(Dst, 2651);
8359 } 8328 }
8360 dasm_put(Dst, 2677, LJ_TSTR, Dt5(->len), LJ_TSTR, Dt5(->len)); 8329 dasm_put(Dst, 2676, LJ_TSTR, Dt5(->len), LJ_TSTR, Dt5(->len));
8361 if (LJ_DUALNUM) { 8330 if (LJ_DUALNUM) {
8362 dasm_put(Dst, 2704, Dt5([1]), (0+1)*8); 8331 dasm_put(Dst, 2703, Dt5([1]), (0+1)*8);
8363 } else { 8332 } else {
8364 dasm_put(Dst, 2716, Dt5([1]), 31-3); 8333 dasm_put(Dst, 2715, Dt5([1]), 31-3);
8365 } 8334 }
8366 dasm_put(Dst, 2732, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); 8335 dasm_put(Dst, 2731, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold));
8367 if (LJ_DUALNUM) { 8336 if (LJ_DUALNUM) {
8368 dasm_put(Dst, 2743); 8337 dasm_put(Dst, 2742);
8369 } else { 8338 } else {
8370 dasm_put(Dst, 2751); 8339 dasm_put(Dst, 2750);
8371 } 8340 }
8372 dasm_put(Dst, 2762, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); 8341 dasm_put(Dst, 2761, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold));
8373 if (!LJ_DUALNUM) { 8342 if (!LJ_DUALNUM) {
8374 dasm_put(Dst, 2790); 8343 dasm_put(Dst, 2789);
8375 } 8344 }
8376 dasm_put(Dst, 2792); 8345 dasm_put(Dst, 2791);
8377 if (LJ_DUALNUM) { 8346 if (LJ_DUALNUM) {
8378 dasm_put(Dst, 2798); 8347 dasm_put(Dst, 2797);
8379 } else { 8348 } else {
8380 dasm_put(Dst, 2800); 8349 dasm_put(Dst, 2799);
8381 } 8350 }
8382 dasm_put(Dst, 2802); 8351 dasm_put(Dst, 2801);
8383 if (LJ_DUALNUM) { 8352 if (LJ_DUALNUM) {
8384 dasm_put(Dst, 2806); 8353 dasm_put(Dst, 2805);
8385 } else { 8354 } else {
8386 dasm_put(Dst, 2815); 8355 dasm_put(Dst, 2814);
8387 } 8356 }
8388 dasm_put(Dst, 2826, LJ_TSTR); 8357 dasm_put(Dst, 2825, LJ_TSTR);
8389 if (!LJ_DUALNUM) { 8358 if (!LJ_DUALNUM) {
8390 dasm_put(Dst, 2831); 8359 dasm_put(Dst, 2830);
8391 } 8360 }
8392 dasm_put(Dst, 2835, Dt5(->len), sizeof(GCstr)-1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); 8361 dasm_put(Dst, 2834, Dt5(->len), sizeof(GCstr)-1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold));
8393 if (LJ_DUALNUM) { 8362 if (LJ_DUALNUM) {
8394 dasm_put(Dst, 2885); 8363 dasm_put(Dst, 2884);
8395 } else { 8364 } else {
8396 dasm_put(Dst, 2887); 8365 dasm_put(Dst, 2886);
8397 } 8366 }
8398 dasm_put(Dst, 2889, LJ_TSTR); 8367 dasm_put(Dst, 2888, LJ_TSTR);
8399 if (LJ_DUALNUM) { 8368 if (LJ_DUALNUM) {
8400 dasm_put(Dst, 2896); 8369 dasm_put(Dst, 2895);
8401 } else { 8370 } else {
8402 dasm_put(Dst, 2900); 8371 dasm_put(Dst, 2899);
8403 } 8372 }
8404 dasm_put(Dst, 2907, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(strempty), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, DISPATCH_GL(tmpbuf.sz)); 8373 dasm_put(Dst, 2906, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(strempty), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, DISPATCH_GL(tmpbuf.sz));
8405 dasm_put(Dst, 2960, Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); 8374 dasm_put(Dst, 2959, Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf));
8406 dasm_put(Dst, 3018, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), LJ_TTAB); 8375 dasm_put(Dst, 3017, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, DISPATCH_GL(tmpbuf.sz), Dt5(->len), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf), LJ_TTAB);
8407 if (LJ_DUALNUM) { 8376 if (LJ_DUALNUM) {
8408 dasm_put(Dst, 3087); 8377 dasm_put(Dst, 3086);
8409 } else { 8378 } else {
8410 dasm_put(Dst, 3097); 8379 dasm_put(Dst, 3096);
8411 } 8380 }
8412 dasm_put(Dst, 3110); 8381 dasm_put(Dst, 3109);
8413 if (LJ_DUALNUM) { 8382 if (LJ_DUALNUM) {
8414 dasm_put(Dst, 3116); 8383 dasm_put(Dst, 3115);
8415 } else { 8384 } else {
8416 dasm_put(Dst, 3118); 8385 dasm_put(Dst, 3117);
8417 } 8386 }
8418 dasm_put(Dst, 3120); 8387 dasm_put(Dst, 3119);
8419 if (LJ_DUALNUM) { 8388 if (LJ_DUALNUM) {
8420 dasm_put(Dst, 3124); 8389 dasm_put(Dst, 3123);
8421 } else { 8390 } else {
8422 dasm_put(Dst, 3127); 8391 dasm_put(Dst, 3126);
8423 } 8392 }
8424 dasm_put(Dst, 3133); 8393 dasm_put(Dst, 3132);
8425 if (LJ_DUALNUM) { 8394 if (LJ_DUALNUM) {
8426 dasm_put(Dst, 3138); 8395 dasm_put(Dst, 3137);
8427 } else { 8396 } else {
8428 dasm_put(Dst, 3148); 8397 dasm_put(Dst, 3147);
8429 } 8398 }
8430 dasm_put(Dst, 3161); 8399 dasm_put(Dst, 3160);
8431 if (LJ_DUALNUM) { 8400 if (LJ_DUALNUM) {
8432 dasm_put(Dst, 3167); 8401 dasm_put(Dst, 3166);
8433 } else { 8402 } else {
8434 dasm_put(Dst, 3169); 8403 dasm_put(Dst, 3168);
8435 } 8404 }
8436 dasm_put(Dst, 3171); 8405 dasm_put(Dst, 3170);
8437 if (LJ_DUALNUM) { 8406 if (LJ_DUALNUM) {
8438 dasm_put(Dst, 3175); 8407 dasm_put(Dst, 3174);
8439 } else { 8408 } else {
8440 dasm_put(Dst, 3178); 8409 dasm_put(Dst, 3177);
8441 } 8410 }
8442 dasm_put(Dst, 3184); 8411 dasm_put(Dst, 3183);
8443 if (LJ_DUALNUM) { 8412 if (LJ_DUALNUM) {
8444 dasm_put(Dst, 3189); 8413 dasm_put(Dst, 3188);
8445 } else { 8414 } else {
8446 dasm_put(Dst, 3199); 8415 dasm_put(Dst, 3198);
8447 } 8416 }
8448 dasm_put(Dst, 3212); 8417 dasm_put(Dst, 3211);
8449 if (LJ_DUALNUM) { 8418 if (LJ_DUALNUM) {
8450 dasm_put(Dst, 3218); 8419 dasm_put(Dst, 3217);
8451 } else { 8420 } else {
8452 dasm_put(Dst, 3220); 8421 dasm_put(Dst, 3219);
8453 } 8422 }
8454 dasm_put(Dst, 3222); 8423 dasm_put(Dst, 3221);
8455 if (LJ_DUALNUM) { 8424 if (LJ_DUALNUM) {
8456 dasm_put(Dst, 3226); 8425 dasm_put(Dst, 3225);
8457 } else { 8426 } else {
8458 dasm_put(Dst, 3229); 8427 dasm_put(Dst, 3228);
8459 } 8428 }
8460 dasm_put(Dst, 3235); 8429 dasm_put(Dst, 3234);
8461 if (LJ_DUALNUM) { 8430 if (LJ_DUALNUM) {
8462 dasm_put(Dst, 3240); 8431 dasm_put(Dst, 3239);
8463 } else { 8432 } else {
8464 dasm_put(Dst, 3250); 8433 dasm_put(Dst, 3249);
8465 } 8434 }
8466 dasm_put(Dst, 3263); 8435 dasm_put(Dst, 3262);
8467 if (LJ_DUALNUM) { 8436 if (LJ_DUALNUM) {
8468 dasm_put(Dst, 3270); 8437 dasm_put(Dst, 3269);
8469 } else { 8438 } else {
8470 dasm_put(Dst, 3280); 8439 dasm_put(Dst, 3279);
8471 } 8440 }
8472 dasm_put(Dst, 3293); 8441 dasm_put(Dst, 3292);
8473 if (LJ_DUALNUM) { 8442 if (LJ_DUALNUM) {
8474 dasm_put(Dst, 3297); 8443 dasm_put(Dst, 3296);
8475 } else { 8444 } else {
8476 dasm_put(Dst, 3312); 8445 dasm_put(Dst, 3311);
8477 } 8446 }
8478 dasm_put(Dst, 3333); 8447 dasm_put(Dst, 3332);
8479 if (LJ_DUALNUM) { 8448 if (LJ_DUALNUM) {
8480 dasm_put(Dst, 3338); 8449 dasm_put(Dst, 3337);
8481 } else { 8450 } else {
8482 dasm_put(Dst, 3353); 8451 dasm_put(Dst, 3352);
8483 } 8452 }
8484 dasm_put(Dst, 3374); 8453 dasm_put(Dst, 3373);
8485 if (LJ_DUALNUM) { 8454 if (LJ_DUALNUM) {
8486 dasm_put(Dst, 3379); 8455 dasm_put(Dst, 3378);
8487 } else { 8456 } else {
8488 dasm_put(Dst, 3394); 8457 dasm_put(Dst, 3393);
8489 } 8458 }
8490 dasm_put(Dst, 3415); 8459 dasm_put(Dst, 3414);
8491 if (LJ_DUALNUM) { 8460 if (LJ_DUALNUM) {
8492 dasm_put(Dst, 3420); 8461 dasm_put(Dst, 3419);
8493 } else { 8462 } else {
8494 dasm_put(Dst, 3435); 8463 dasm_put(Dst, 3434);
8495 } 8464 }
8496 dasm_put(Dst, 3456); 8465 dasm_put(Dst, 3455);
8497 if (LJ_DUALNUM) { 8466 if (LJ_DUALNUM) {
8498 dasm_put(Dst, 3460); 8467 dasm_put(Dst, 3459);
8499 } else { 8468 } else {
8500 dasm_put(Dst, 3475); 8469 dasm_put(Dst, 3474);
8501 } 8470 }
8502 dasm_put(Dst, 3496); 8471 dasm_put(Dst, 3495);
8503 if (LJ_DUALNUM) { 8472 if (LJ_DUALNUM) {
8504 dasm_put(Dst, 3501); 8473 dasm_put(Dst, 3500);
8505 } else { 8474 } else {
8506 dasm_put(Dst, 3511); 8475 dasm_put(Dst, 3510);
8507 } 8476 }
8508 if (LJ_DUALNUM) { 8477 if (LJ_DUALNUM) {
8509 dasm_put(Dst, 3524); 8478 dasm_put(Dst, 3523);
8510 } else { 8479 } else {
8511 dasm_put(Dst, 3527); 8480 dasm_put(Dst, 3526);
8512 } 8481 }
8513 dasm_put(Dst, 3533); 8482 dasm_put(Dst, 3532);
8514 if (LJ_DUALNUM) { 8483 if (LJ_DUALNUM) {
8515 dasm_put(Dst, 3541); 8484 dasm_put(Dst, 3540);
8516 } 8485 }
8517 dasm_put(Dst, 3549); 8486 dasm_put(Dst, 3548);
8518 if (LJ_DUALNUM) { 8487 if (LJ_DUALNUM) {
8519 dasm_put(Dst, 3551); 8488 dasm_put(Dst, 3550);
8520 } 8489 }
8521 dasm_put(Dst, 3559, Dt8(->f), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), 31-3, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK); 8490 dasm_put(Dst, 3558, Dt8(->f), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), 31-3, Dt1(->top), Dt7(->pc), FRAME_TYPE, LUA_MINSTACK);
8522 dasm_put(Dst, 3622, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 8491 dasm_put(Dst, 3621, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
8523#if LJ_HASJIT 8492#if LJ_HASJIT
8524 dasm_put(Dst, 3648, DISPATCH_GL(hookmask), HOOK_VMEVENT, DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); 8493 dasm_put(Dst, 3647, DISPATCH_GL(hookmask), HOOK_VMEVENT, DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount));
8525#endif 8494#endif
8526 dasm_put(Dst, 3670, 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)); 8495 dasm_put(Dst, 3669, 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));
8527 dasm_put(Dst, 3717, GG_DISP2STATIC); 8496 dasm_put(Dst, 3716, GG_DISP2STATIC);
8528#if LJ_HASJIT 8497#if LJ_HASJIT
8529 dasm_put(Dst, 3735, GG_DISP2J, Dt7(->pc), DISPATCH_J(L), PC2PROTO(framesize), Dt1(->base), 31-3, Dt1(->top)); 8498 dasm_put(Dst, 3734, GG_DISP2J, Dt7(->pc), DISPATCH_J(L), PC2PROTO(framesize), Dt1(->base), 31-3, Dt1(->top));
8530#endif 8499#endif
8531 dasm_put(Dst, 3758); 8500 dasm_put(Dst, 3757);
8532#if LJ_HASJIT 8501#if LJ_HASJIT
8533 dasm_put(Dst, 3761); 8502 dasm_put(Dst, 3760);
8534#endif 8503#endif
8535 dasm_put(Dst, 3764); 8504 dasm_put(Dst, 3763);
8536#if LJ_HASJIT 8505#if LJ_HASJIT
8537 dasm_put(Dst, 3766); 8506 dasm_put(Dst, 3765);
8538#endif 8507#endif
8539 dasm_put(Dst, 3769, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 8508 dasm_put(Dst, 3768, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
8540#if LJ_HASJIT 8509#if LJ_HASJIT
8541 dasm_put(Dst, 3792, -(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); 8510 dasm_put(Dst, 3791, -(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);
8542 dasm_put(Dst, 3839, 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); 8511 dasm_put(Dst, 3838, 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);
8543 dasm_put(Dst, 3888, DISPATCH_J(L), DISPATCH_GL(jit_L), DISPATCH_J(parent), Dt1(->base), GG_DISP2J, DISPATCH_J(exitno), Dt1(->cframe), Dt1(->base)); 8512 dasm_put(Dst, 3887, DISPATCH_J(L), DISPATCH_GL(jit_L), DISPATCH_J(parent), Dt1(->base), GG_DISP2J, DISPATCH_J(exitno), Dt1(->cframe), Dt1(->base));
8544#endif 8513#endif
8545 dasm_put(Dst, 3916); 8514 dasm_put(Dst, 3915);
8546#if LJ_HASJIT 8515#if LJ_HASJIT
8547 dasm_put(Dst, 3918, -GG_DISP2G-32768, 31-3, Dt7(->pc), DISPATCH_GL(jit_L), PC2PROTO(k), LJ_TISNUM, LJ_TNIL, DISPATCH_GL(vmstate), BC_FUNCF*4); 8516 dasm_put(Dst, 3917, -GG_DISP2G-32768, 31-3, Dt7(->pc), DISPATCH_GL(jit_L), PC2PROTO(k), LJ_TISNUM, LJ_TNIL, DISPATCH_GL(vmstate), BC_FUNCF*4);
8548#endif 8517#endif
8549 dasm_put(Dst, 3975); 8518 dasm_put(Dst, 3974);
8550#if LJ_HASJIT 8519#if LJ_HASJIT
8551 dasm_put(Dst, 3983); 8520 dasm_put(Dst, 3982);
8552#endif 8521#endif
8553 dasm_put(Dst, 3986); 8522 dasm_put(Dst, 3985);
8554#if LJ_HASJIT 8523#if LJ_HASJIT
8555 dasm_put(Dst, 4066); 8524 dasm_put(Dst, 4065);
8556#else 8525#else
8557 dasm_put(Dst, 4088); 8526 dasm_put(Dst, 4087);
8558#endif 8527#endif
8559 dasm_put(Dst, 4090); 8528 dasm_put(Dst, 4089);
8560#if LJ_HASFFI 8529#if LJ_HASFFI
8561#define DtE(_V) (int)(ptrdiff_t)&(((CTState *)0)_V) 8530#define DtE(_V) (int)(ptrdiff_t)&(((CTState *)0)_V)
8562 dasm_put(Dst, 4092, 56+(14-14)*4, 128+(14-14)*8, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8); 8531 dasm_put(Dst, 4091, 56+(14-14)*4, 128+(14-14)*8, 56+(15-14)*4, 128+(15-14)*8, 56+(16-14)*4, 128+(16-14)*8, 56+(17-14)*4, 128+(17-14)*8, 56+(18-14)*4, 128+(18-14)*8, 56+(19-14)*4, 128+(19-14)*8, 56+(20-14)*4, 128+(20-14)*8, 56+(21-14)*4, 128+(21-14)*8, 56+(22-14)*4, 128+(22-14)*8, 56+(23-14)*4, 128+(23-14)*8, 56+(24-14)*4, 128+(24-14)*8);
8563 dasm_put(Dst, 4140, 56+(25-14)*4, 128+(25-14)*8, 56+(26-14)*4, 128+(26-14)*8, 56+(27-14)*4, 128+(27-14)*8, 56+(28-14)*4, 128+(28-14)*8, 56+(29-14)*4, 128+(29-14)*8, 56+(30-14)*4, 128+(30-14)*8, 56+(31-14)*4, 128+(31-14)*8, Dt2(->ctype_state), GG_G2DISP, DtE(->cb.slot), DtE(->cb.gpr[0]), DtE(->cb.fpr[0]), DtE(->cb.gpr[1]), DtE(->cb.fpr[1]), DtE(->cb.gpr[2])); 8532 dasm_put(Dst, 4139, 56+(25-14)*4, 128+(25-14)*8, 56+(26-14)*4, 128+(26-14)*8, 56+(27-14)*4, 128+(27-14)*8, 56+(28-14)*4, 128+(28-14)*8, 56+(29-14)*4, 128+(29-14)*8, 56+(30-14)*4, 128+(30-14)*8, 56+(31-14)*4, 128+(31-14)*8, Dt2(->ctype_state), GG_G2DISP, DtE(->cb.slot), DtE(->cb.gpr[0]), DtE(->cb.fpr[0]), DtE(->cb.gpr[1]), DtE(->cb.fpr[1]), DtE(->cb.gpr[2]));
8564 dasm_put(Dst, 4187, DtE(->cb.fpr[2]), DtE(->cb.gpr[3]), DtE(->cb.fpr[3]), DtE(->cb.gpr[4]), DtE(->cb.fpr[4]), DtE(->cb.gpr[5]), DtE(->cb.fpr[5]), DtE(->cb.gpr[6]), DtE(->cb.fpr[6]), DtE(->cb.gpr[7]), DtE(->cb.fpr[7]), 272+8, DtE(->cb.stack), Dt1(->base), LJ_TISNUM, Dt1(->top), LJ_TNIL, ~LJ_VMST_INTERP, DISPATCH_GL(vmstate), Dt7(->pc)); 8533 dasm_put(Dst, 4186, DtE(->cb.fpr[2]), DtE(->cb.gpr[3]), DtE(->cb.fpr[3]), DtE(->cb.gpr[4]), DtE(->cb.fpr[4]), DtE(->cb.gpr[5]), DtE(->cb.fpr[5]), DtE(->cb.gpr[6]), DtE(->cb.fpr[6]), DtE(->cb.gpr[7]), DtE(->cb.fpr[7]), 272+8, DtE(->cb.stack), Dt1(->base), LJ_TISNUM, Dt1(->top), LJ_TNIL, ~LJ_VMST_INTERP, DISPATCH_GL(vmstate), Dt7(->pc));
8565#endif 8534#endif
8566 dasm_put(Dst, 4251); 8535 dasm_put(Dst, 4250);
8567#if LJ_HASFFI 8536#if LJ_HASFFI
8568 dasm_put(Dst, 4253, DISPATCH_GL(ctype_state), Dt1(->base), Dt1(->top), DtE(->L), DtE(->cb.gpr[0]), DtE(->cb.fpr[0]), DtE(->cb.gpr[1])); 8537 dasm_put(Dst, 4252, DISPATCH_GL(ctype_state), Dt1(->base), Dt1(->top), DtE(->L), DtE(->cb.gpr[0]), DtE(->cb.fpr[0]), DtE(->cb.gpr[1]));
8569#endif 8538#endif
8570 dasm_put(Dst, 4274); 8539 dasm_put(Dst, 4273);
8571#if LJ_HASFFI 8540#if LJ_HASFFI
8572#define DtF(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) 8541#define DtF(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V)
8573 dasm_put(Dst, 4276, DtF(->spadj), DtF(->nsp), DtF(->nfpr), DtF(->stack), 31-2, DtF(->fpr[0]), DtF(->fpr[1]), DtF(->fpr[2]), DtF(->fpr[3]), DtF(->fpr[4]), DtF(->fpr[5]), DtF(->fpr[6]), DtF(->fpr[7]), DtF(->func), DtF(->gpr[1]), DtF(->gpr[2])); 8542 dasm_put(Dst, 4275, DtF(->spadj), DtF(->nsp), DtF(->nfpr), DtF(->stack), 31-2, DtF(->fpr[0]), DtF(->fpr[1]), DtF(->fpr[2]), DtF(->fpr[3]), DtF(->fpr[4]), DtF(->fpr[5]), DtF(->fpr[6]), DtF(->fpr[7]), DtF(->func), DtF(->gpr[1]), DtF(->gpr[2]));
8574 dasm_put(Dst, 4334, DtF(->gpr[3]), DtF(->gpr[4]), DtF(->gpr[5]), DtF(->gpr[6]), DtF(->gpr[7]), DtF(->gpr[0]), DtF(->gpr[0]), DtF(->fpr[0]), DtF(->gpr[1]), DtF(->gpr[2]), DtF(->gpr[3])); 8543 dasm_put(Dst, 4332, DtF(->gpr[3]), DtF(->gpr[4]), DtF(->gpr[5]), DtF(->gpr[6]), DtF(->gpr[7]), DtF(->gpr[0]), DtF(->gpr[0]), DtF(->fpr[0]), DtF(->gpr[1]), DtF(->gpr[2]), DtF(->gpr[3]));
8575#endif 8544#endif
8576} 8545}
8577 8546
@@ -8579,7 +8548,7 @@ static void build_subroutines(BuildCtx *ctx)
8579static void build_ins(BuildCtx *ctx, BCOp op, int defop) 8548static void build_ins(BuildCtx *ctx, BCOp op, int defop)
8580{ 8549{
8581 int vk = 0; 8550 int vk = 0;
8582 dasm_put(Dst, 4366, defop); 8551 dasm_put(Dst, 4364, defop);
8583 8552
8584 switch (op) { 8553 switch (op) {
8585 8554
@@ -8589,224 +8558,224 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
8589 8558
8590 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 8559 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
8591 if (LJ_DUALNUM) { 8560 if (LJ_DUALNUM) {
8592 dasm_put(Dst, 4368, -(BCBIAS_J*4 >> 16)); 8561 dasm_put(Dst, 4366, -(BCBIAS_J*4 >> 16));
8593 if (op == BC_ISLT) { 8562 if (op == BC_ISLT) {
8594 dasm_put(Dst, 4385); 8563 dasm_put(Dst, 4383);
8595 } else if (op == BC_ISGE) { 8564 } else if (op == BC_ISGE) {
8596 dasm_put(Dst, 4388); 8565 dasm_put(Dst, 4386);
8597 } else if (op == BC_ISLE) { 8566 } else if (op == BC_ISLE) {
8598 dasm_put(Dst, 4391); 8567 dasm_put(Dst, 4389);
8599 } else { 8568 } else {
8600 dasm_put(Dst, 4394); 8569 dasm_put(Dst, 4392);
8601 } 8570 }
8602 dasm_put(Dst, 4397); 8571 dasm_put(Dst, 4395);
8603 if (op == BC_ISLT) { 8572 if (op == BC_ISLT) {
8604 dasm_put(Dst, 4436); 8573 dasm_put(Dst, 4434);
8605 } else if (op == BC_ISGE) { 8574 } else if (op == BC_ISGE) {
8606 dasm_put(Dst, 4439); 8575 dasm_put(Dst, 4437);
8607 } else if (op == BC_ISLE) { 8576 } else if (op == BC_ISLE) {
8608 dasm_put(Dst, 4442); 8577 dasm_put(Dst, 4440);
8609 } else { 8578 } else {
8610 dasm_put(Dst, 4446); 8579 dasm_put(Dst, 4444);
8611 } 8580 }
8612 dasm_put(Dst, 4450); 8581 dasm_put(Dst, 4448);
8613 } else { 8582 } else {
8614 dasm_put(Dst, 4453, -(BCBIAS_J*4 >> 16)); 8583 dasm_put(Dst, 4451, -(BCBIAS_J*4 >> 16));
8615 if (op == BC_ISLT) { 8584 if (op == BC_ISLT) {
8616 dasm_put(Dst, 4470); 8585 dasm_put(Dst, 4468);
8617 } else if (op == BC_ISGE) { 8586 } else if (op == BC_ISGE) {
8618 dasm_put(Dst, 4473); 8587 dasm_put(Dst, 4471);
8619 } else if (op == BC_ISLE) { 8588 } else if (op == BC_ISLE) {
8620 dasm_put(Dst, 4476); 8589 dasm_put(Dst, 4474);
8621 } else { 8590 } else {
8622 dasm_put(Dst, 4480); 8591 dasm_put(Dst, 4478);
8623 } 8592 }
8624 dasm_put(Dst, 4484); 8593 dasm_put(Dst, 4482);
8625 } 8594 }
8626 break; 8595 break;
8627 8596
8628 case BC_ISEQV: case BC_ISNEV: 8597 case BC_ISEQV: case BC_ISNEV:
8629 vk = op == BC_ISEQV; 8598 vk = op == BC_ISEQV;
8630 if (LJ_DUALNUM) { 8599 if (LJ_DUALNUM) {
8631 dasm_put(Dst, 4497, -(BCBIAS_J*4 >> 16)); 8600 dasm_put(Dst, 4495, -(BCBIAS_J*4 >> 16));
8632 if (vk) { 8601 if (vk) {
8633 dasm_put(Dst, 4510); 8602 dasm_put(Dst, 4508);
8634 } else { 8603 } else {
8635 dasm_put(Dst, 4513); 8604 dasm_put(Dst, 4511);
8636 } 8605 }
8637 } else { 8606 } else {
8638 dasm_put(Dst, 4516, -(BCBIAS_J*4 >> 16)); 8607 dasm_put(Dst, 4514, -(BCBIAS_J*4 >> 16));
8639 if (vk) { 8608 if (vk) {
8640 dasm_put(Dst, 4533); 8609 dasm_put(Dst, 4531);
8641 } else { 8610 } else {
8642 dasm_put(Dst, 4537); 8611 dasm_put(Dst, 4535);
8643 } 8612 }
8644 dasm_put(Dst, 4541); 8613 dasm_put(Dst, 4539);
8645 } 8614 }
8646 dasm_put(Dst, 4553); 8615 dasm_put(Dst, 4551);
8647 if (!LJ_DUALNUM) { 8616 if (!LJ_DUALNUM) {
8648 dasm_put(Dst, 4555); 8617 dasm_put(Dst, 4553);
8649 } 8618 }
8650 if (LJ_HASFFI) { 8619 if (LJ_HASFFI) {
8651 dasm_put(Dst, 4558, LJ_TCDATA, LJ_TCDATA); 8620 dasm_put(Dst, 4556, LJ_TCDATA, LJ_TCDATA);
8652 } 8621 }
8653 dasm_put(Dst, 4563, ~LJ_TISPRI); 8622 dasm_put(Dst, 4561, ~LJ_TISPRI);
8654 if (LJ_HASFFI) { 8623 if (LJ_HASFFI) {
8655 dasm_put(Dst, 4568); 8624 dasm_put(Dst, 4566);
8656 } 8625 }
8657 dasm_put(Dst, 4570, ~LJ_TISTABUD); 8626 dasm_put(Dst, 4568, ~LJ_TISTABUD);
8658 if (LJ_HASFFI) { 8627 if (LJ_HASFFI) {
8659 dasm_put(Dst, 4573); 8628 dasm_put(Dst, 4571);
8660 } 8629 }
8661 dasm_put(Dst, 4576); 8630 dasm_put(Dst, 4574);
8662 if (vk) { 8631 if (vk) {
8663 dasm_put(Dst, 4584); 8632 dasm_put(Dst, 4582);
8664 } else { 8633 } else {
8665 dasm_put(Dst, 4589); 8634 dasm_put(Dst, 4587);
8666 } 8635 }
8667 if (LJ_DUALNUM) { 8636 if (LJ_DUALNUM) {
8668 dasm_put(Dst, 4594); 8637 dasm_put(Dst, 4592);
8669 } else { 8638 } else {
8670 dasm_put(Dst, 4609); 8639 dasm_put(Dst, 4607);
8671 } 8640 }
8672 dasm_put(Dst, 4612, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<<MM_eq); 8641 dasm_put(Dst, 4610, Dt6(->metatable), 1-vk, Dt6(->nomm), 1<<MM_eq);
8673 break; 8642 break;
8674 8643
8675 case BC_ISEQS: case BC_ISNES: 8644 case BC_ISEQS: case BC_ISNES:
8676 vk = op == BC_ISEQS; 8645 vk = op == BC_ISEQS;
8677 dasm_put(Dst, 4631, 32-1); 8646 dasm_put(Dst, 4629, 32-1);
8678 if (LJ_HASFFI) { 8647 if (LJ_HASFFI) {
8679 dasm_put(Dst, 4639, LJ_TCDATA); 8648 dasm_put(Dst, 4637, LJ_TCDATA);
8680 } 8649 }
8681 dasm_put(Dst, 4642, LJ_TSTR); 8650 dasm_put(Dst, 4640, LJ_TSTR);
8682 if (LJ_HASFFI) { 8651 if (LJ_HASFFI) {
8683 dasm_put(Dst, 4646); 8652 dasm_put(Dst, 4644);
8684 } 8653 }
8685 dasm_put(Dst, 4649, -(BCBIAS_J*4 >> 16)); 8654 dasm_put(Dst, 4647, -(BCBIAS_J*4 >> 16));
8686 if (vk) { 8655 if (vk) {
8687 dasm_put(Dst, 4657); 8656 dasm_put(Dst, 4655);
8688 } else { 8657 } else {
8689 dasm_put(Dst, 4659); 8658 dasm_put(Dst, 4657);
8690 } 8659 }
8691 dasm_put(Dst, 4661); 8660 dasm_put(Dst, 4659);
8692 break; 8661 break;
8693 8662
8694 case BC_ISEQN: case BC_ISNEN: 8663 case BC_ISEQN: case BC_ISNEN:
8695 vk = op == BC_ISEQN; 8664 vk = op == BC_ISEQN;
8696 if (LJ_DUALNUM) { 8665 if (LJ_DUALNUM) {
8697 dasm_put(Dst, 4673, -(BCBIAS_J*4 >> 16)); 8666 dasm_put(Dst, 4671, -(BCBIAS_J*4 >> 16));
8698 if (vk) { 8667 if (vk) {
8699 dasm_put(Dst, 4685); 8668 dasm_put(Dst, 4683);
8700 } else { 8669 } else {
8701 dasm_put(Dst, 4687); 8670 dasm_put(Dst, 4685);
8702 } 8671 }
8703 dasm_put(Dst, 4689); 8672 dasm_put(Dst, 4687);
8704 } else { 8673 } else {
8705 if (vk) { 8674 if (vk) {
8706 dasm_put(Dst, 4696); 8675 dasm_put(Dst, 4694);
8707 } else { 8676 } else {
8708 dasm_put(Dst, 4698); 8677 dasm_put(Dst, 4696);
8709 } 8678 }
8710 dasm_put(Dst, 4700, -(BCBIAS_J*4 >> 16)); 8679 dasm_put(Dst, 4698, -(BCBIAS_J*4 >> 16));
8711 } 8680 }
8712 if (vk) { 8681 if (vk) {
8713 dasm_put(Dst, 4713); 8682 dasm_put(Dst, 4711);
8714 if (!LJ_HASFFI) { 8683 if (!LJ_HASFFI) {
8715 dasm_put(Dst, 4718); 8684 dasm_put(Dst, 4716);
8716 } 8685 }
8717 } else { 8686 } else {
8718 dasm_put(Dst, 4720); 8687 dasm_put(Dst, 4718);
8719 if (!LJ_HASFFI) { 8688 if (!LJ_HASFFI) {
8720 dasm_put(Dst, 4724); 8689 dasm_put(Dst, 4722);
8721 } 8690 }
8722 dasm_put(Dst, 4726); 8691 dasm_put(Dst, 4724);
8723 } 8692 }
8724 dasm_put(Dst, 4729); 8693 dasm_put(Dst, 4727);
8725 if (LJ_HASFFI) { 8694 if (LJ_HASFFI) {
8726 dasm_put(Dst, 4740, LJ_TCDATA); 8695 dasm_put(Dst, 4738, LJ_TCDATA);
8727 } 8696 }
8728 if (LJ_DUALNUM) { 8697 if (LJ_DUALNUM) {
8729 dasm_put(Dst, 4748); 8698 dasm_put(Dst, 4746);
8730 } 8699 }
8731 break; 8700 break;
8732 8701
8733 case BC_ISEQP: case BC_ISNEP: 8702 case BC_ISEQP: case BC_ISNEP:
8734 vk = op == BC_ISEQP; 8703 vk = op == BC_ISEQP;
8735 dasm_put(Dst, 4772, 32-3); 8704 dasm_put(Dst, 4770, 32-3);
8736 if (LJ_HASFFI) { 8705 if (LJ_HASFFI) {
8737 dasm_put(Dst, 4779, LJ_TCDATA); 8706 dasm_put(Dst, 4777, LJ_TCDATA);
8738 } 8707 }
8739 dasm_put(Dst, 4782); 8708 dasm_put(Dst, 4780);
8740 if (LJ_HASFFI) { 8709 if (LJ_HASFFI) {
8741 dasm_put(Dst, 4784); 8710 dasm_put(Dst, 4782);
8742 } 8711 }
8743 dasm_put(Dst, 4787, -(BCBIAS_J*4 >> 16)); 8712 dasm_put(Dst, 4785, -(BCBIAS_J*4 >> 16));
8744 if (vk) { 8713 if (vk) {
8745 dasm_put(Dst, 4793); 8714 dasm_put(Dst, 4791);
8746 } else { 8715 } else {
8747 dasm_put(Dst, 4795); 8716 dasm_put(Dst, 4793);
8748 } 8717 }
8749 dasm_put(Dst, 4797); 8718 dasm_put(Dst, 4795);
8750 break; 8719 break;
8751 8720
8752 /* -- Unary test and copy ops ------------------------------------------- */ 8721 /* -- Unary test and copy ops ------------------------------------------- */
8753 8722
8754 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 8723 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
8755 dasm_put(Dst, 4809); 8724 dasm_put(Dst, 4807);
8756 if (op == BC_IST || op == BC_ISF) { 8725 if (op == BC_IST || op == BC_ISF) {
8757 dasm_put(Dst, 4813, LJ_TTRUE, -(BCBIAS_J*4 >> 16)); 8726 dasm_put(Dst, 4811, LJ_TTRUE, -(BCBIAS_J*4 >> 16));
8758 if (op == BC_IST) { 8727 if (op == BC_IST) {
8759 dasm_put(Dst, 4820); 8728 dasm_put(Dst, 4818);
8760 } else { 8729 } else {
8761 dasm_put(Dst, 4822); 8730 dasm_put(Dst, 4820);
8762 } 8731 }
8763 dasm_put(Dst, 4824); 8732 dasm_put(Dst, 4822);
8764 } else { 8733 } else {
8765 dasm_put(Dst, 4826, LJ_TFALSE); 8734 dasm_put(Dst, 4824, LJ_TFALSE);
8766 if (op == BC_ISTC) { 8735 if (op == BC_ISTC) {
8767 dasm_put(Dst, 4831); 8736 dasm_put(Dst, 4829);
8768 } else { 8737 } else {
8769 dasm_put(Dst, 4834); 8738 dasm_put(Dst, 4832);
8770 } 8739 }
8771 dasm_put(Dst, 4837, -(BCBIAS_J*4 >> 16)); 8740 dasm_put(Dst, 4835, -(BCBIAS_J*4 >> 16));
8772 } 8741 }
8773 dasm_put(Dst, 4844); 8742 dasm_put(Dst, 4842);
8774 break; 8743 break;
8775 8744
8776 /* -- Unary ops --------------------------------------------------------- */ 8745 /* -- Unary ops --------------------------------------------------------- */
8777 8746
8778 case BC_MOV: 8747 case BC_MOV:
8779 dasm_put(Dst, 4855); 8748 dasm_put(Dst, 4853);
8780 break; 8749 break;
8781 case BC_NOT: 8750 case BC_NOT:
8782 dasm_put(Dst, 4868, LJ_TTRUE); 8751 dasm_put(Dst, 4866, LJ_TTRUE);
8783 break; 8752 break;
8784 case BC_UNM: 8753 case BC_UNM:
8785 dasm_put(Dst, 4884); 8754 dasm_put(Dst, 4882);
8786 if (LJ_DUALNUM) { 8755 if (LJ_DUALNUM) {
8787 dasm_put(Dst, 4888); 8756 dasm_put(Dst, 4886);
8788 } 8757 }
8789 dasm_put(Dst, 4916); 8758 dasm_put(Dst, 4914);
8790 if (LJ_DUALNUM) { 8759 if (LJ_DUALNUM) {
8791 dasm_put(Dst, 4926); 8760 dasm_put(Dst, 4924);
8792 } else { 8761 } else {
8793 dasm_put(Dst, 4929); 8762 dasm_put(Dst, 4927);
8794 } 8763 }
8795 break; 8764 break;
8796 case BC_LEN: 8765 case BC_LEN:
8797 dasm_put(Dst, 4938, LJ_TSTR, Dt5(->len)); 8766 dasm_put(Dst, 4936, LJ_TSTR, Dt5(->len));
8798 if (LJ_DUALNUM) { 8767 if (LJ_DUALNUM) {
8799 dasm_put(Dst, 4948); 8768 dasm_put(Dst, 4946);
8800 } else { 8769 } else {
8801 dasm_put(Dst, 4953); 8770 dasm_put(Dst, 4951);
8802 } 8771 }
8803 dasm_put(Dst, 4960, LJ_TTAB); 8772 dasm_put(Dst, 4958, LJ_TTAB);
8804#ifdef LUAJIT_ENABLE_LUA52COMPAT 8773#ifdef LUAJIT_ENABLE_LUA52COMPAT
8805 dasm_put(Dst, 4974, Dt6(->metatable)); 8774 dasm_put(Dst, 4972, Dt6(->metatable));
8806#endif 8775#endif
8807 dasm_put(Dst, 4981); 8776 dasm_put(Dst, 4979);
8808#ifdef LUAJIT_ENABLE_LUA52COMPAT 8777#ifdef LUAJIT_ENABLE_LUA52COMPAT
8809 dasm_put(Dst, 4987, Dt6(->nomm), 1<<MM_len); 8778 dasm_put(Dst, 4985, Dt6(->nomm), 1<<MM_len);
8810#endif 8779#endif
8811 break; 8780 break;
8812 8781
@@ -8818,77 +8787,77 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
8818 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 8787 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
8819 switch (vk) { 8788 switch (vk) {
8820 case 0: 8789 case 0:
8821 dasm_put(Dst, 4997); 8790 dasm_put(Dst, 4995);
8822 break; 8791 break;
8823 case 1: 8792 case 1:
8824 dasm_put(Dst, 5003); 8793 dasm_put(Dst, 5001);
8825 break; 8794 break;
8826 default: 8795 default:
8827 dasm_put(Dst, 5009); 8796 dasm_put(Dst, 5007);
8828 break; 8797 break;
8829 } 8798 }
8830 dasm_put(Dst, 5015); 8799 dasm_put(Dst, 5013);
8831 switch (vk) { 8800 switch (vk) {
8832 case 0: 8801 case 0:
8833 dasm_put(Dst, 5042); 8802 dasm_put(Dst, 5040);
8834 break; 8803 break;
8835 case 1: 8804 case 1:
8836 dasm_put(Dst, 5045); 8805 dasm_put(Dst, 5043);
8837 break; 8806 break;
8838 default: 8807 default:
8839 dasm_put(Dst, 5048); 8808 dasm_put(Dst, 5046);
8840 break; 8809 break;
8841 } 8810 }
8842 dasm_put(Dst, 5051); 8811 dasm_put(Dst, 5049);
8843 if (vk == 1) { 8812 if (vk == 1) {
8844 dasm_put(Dst, 5053); 8813 dasm_put(Dst, 5051);
8845 } else { 8814 } else {
8846 dasm_put(Dst, 5057); 8815 dasm_put(Dst, 5055);
8847 } 8816 }
8848 switch (vk) { 8817 switch (vk) {
8849 case 0: 8818 case 0:
8850 dasm_put(Dst, 5061); 8819 dasm_put(Dst, 5059);
8851 break; 8820 break;
8852 case 1: 8821 case 1:
8853 dasm_put(Dst, 5064); 8822 dasm_put(Dst, 5062);
8854 break; 8823 break;
8855 default: 8824 default:
8856 dasm_put(Dst, 5067); 8825 dasm_put(Dst, 5065);
8857 break; 8826 break;
8858 } 8827 }
8859 dasm_put(Dst, 5070); 8828 dasm_put(Dst, 5068);
8860 } else { 8829 } else {
8861 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 8830 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
8862 switch (vk) { 8831 switch (vk) {
8863 case 0: 8832 case 0:
8864 dasm_put(Dst, 5077); 8833 dasm_put(Dst, 5075);
8865 if (LJ_DUALNUM) { 8834 if (LJ_DUALNUM) {
8866 dasm_put(Dst, 5079); 8835 dasm_put(Dst, 5077);
8867 } 8836 }
8868 dasm_put(Dst, 5081); 8837 dasm_put(Dst, 5079);
8869 if (LJ_DUALNUM) { 8838 if (LJ_DUALNUM) {
8870 dasm_put(Dst, 5084); 8839 dasm_put(Dst, 5082);
8871 } else { 8840 } else {
8872 dasm_put(Dst, 5090); 8841 dasm_put(Dst, 5088);
8873 } 8842 }
8874 break; 8843 break;
8875 case 1: 8844 case 1:
8876 dasm_put(Dst, 5094); 8845 dasm_put(Dst, 5092);
8877 if (LJ_DUALNUM) { 8846 if (LJ_DUALNUM) {
8878 dasm_put(Dst, 5096); 8847 dasm_put(Dst, 5094);
8879 } 8848 }
8880 dasm_put(Dst, 5098); 8849 dasm_put(Dst, 5096);
8881 if (LJ_DUALNUM) { 8850 if (LJ_DUALNUM) {
8882 dasm_put(Dst, 5101); 8851 dasm_put(Dst, 5099);
8883 } else { 8852 } else {
8884 dasm_put(Dst, 5107); 8853 dasm_put(Dst, 5105);
8885 } 8854 }
8886 break; 8855 break;
8887 default: 8856 default:
8888 dasm_put(Dst, 5111); 8857 dasm_put(Dst, 5109);
8889 break; 8858 break;
8890 } 8859 }
8891 dasm_put(Dst, 5121); 8860 dasm_put(Dst, 5119);
8892 } 8861 }
8893 break; 8862 break;
8894 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 8863 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
@@ -8896,77 +8865,77 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
8896 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 8865 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
8897 switch (vk) { 8866 switch (vk) {
8898 case 0: 8867 case 0:
8899 dasm_put(Dst, 5134); 8868 dasm_put(Dst, 5132);
8900 break; 8869 break;
8901 case 1: 8870 case 1:
8902 dasm_put(Dst, 5140); 8871 dasm_put(Dst, 5138);
8903 break; 8872 break;
8904 default: 8873 default:
8905 dasm_put(Dst, 5146); 8874 dasm_put(Dst, 5144);
8906 break; 8875 break;
8907 } 8876 }
8908 dasm_put(Dst, 5152); 8877 dasm_put(Dst, 5150);
8909 switch (vk) { 8878 switch (vk) {
8910 case 0: 8879 case 0:
8911 dasm_put(Dst, 5179); 8880 dasm_put(Dst, 5177);
8912 break; 8881 break;
8913 case 1: 8882 case 1:
8914 dasm_put(Dst, 5182); 8883 dasm_put(Dst, 5180);
8915 break; 8884 break;
8916 default: 8885 default:
8917 dasm_put(Dst, 5185); 8886 dasm_put(Dst, 5183);
8918 break; 8887 break;
8919 } 8888 }
8920 dasm_put(Dst, 5188); 8889 dasm_put(Dst, 5186);
8921 if (vk == 1) { 8890 if (vk == 1) {
8922 dasm_put(Dst, 5190); 8891 dasm_put(Dst, 5188);
8923 } else { 8892 } else {
8924 dasm_put(Dst, 5194); 8893 dasm_put(Dst, 5192);
8925 } 8894 }
8926 switch (vk) { 8895 switch (vk) {
8927 case 0: 8896 case 0:
8928 dasm_put(Dst, 5198); 8897 dasm_put(Dst, 5196);
8929 break; 8898 break;
8930 case 1: 8899 case 1:
8931 dasm_put(Dst, 5201); 8900 dasm_put(Dst, 5199);
8932 break; 8901 break;
8933 default: 8902 default:
8934 dasm_put(Dst, 5204); 8903 dasm_put(Dst, 5202);
8935 break; 8904 break;
8936 } 8905 }
8937 dasm_put(Dst, 5207); 8906 dasm_put(Dst, 5205);
8938 } else { 8907 } else {
8939 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 8908 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
8940 switch (vk) { 8909 switch (vk) {
8941 case 0: 8910 case 0:
8942 dasm_put(Dst, 5214); 8911 dasm_put(Dst, 5212);
8943 if (LJ_DUALNUM) { 8912 if (LJ_DUALNUM) {
8944 dasm_put(Dst, 5216); 8913 dasm_put(Dst, 5214);
8945 } 8914 }
8946 dasm_put(Dst, 5218); 8915 dasm_put(Dst, 5216);
8947 if (LJ_DUALNUM) { 8916 if (LJ_DUALNUM) {
8948 dasm_put(Dst, 5221); 8917 dasm_put(Dst, 5219);
8949 } else { 8918 } else {
8950 dasm_put(Dst, 5227); 8919 dasm_put(Dst, 5225);
8951 } 8920 }
8952 break; 8921 break;
8953 case 1: 8922 case 1:
8954 dasm_put(Dst, 5231); 8923 dasm_put(Dst, 5229);
8955 if (LJ_DUALNUM) { 8924 if (LJ_DUALNUM) {
8956 dasm_put(Dst, 5233); 8925 dasm_put(Dst, 5231);
8957 } 8926 }
8958 dasm_put(Dst, 5235); 8927 dasm_put(Dst, 5233);
8959 if (LJ_DUALNUM) { 8928 if (LJ_DUALNUM) {
8960 dasm_put(Dst, 5238); 8929 dasm_put(Dst, 5236);
8961 } else { 8930 } else {
8962 dasm_put(Dst, 5244); 8931 dasm_put(Dst, 5242);
8963 } 8932 }
8964 break; 8933 break;
8965 default: 8934 default:
8966 dasm_put(Dst, 5248); 8935 dasm_put(Dst, 5246);
8967 break; 8936 break;
8968 } 8937 }
8969 dasm_put(Dst, 5258); 8938 dasm_put(Dst, 5256);
8970 } 8939 }
8971 break; 8940 break;
8972 case BC_MULVN: case BC_MULNV: case BC_MULVV: 8941 case BC_MULVN: case BC_MULNV: case BC_MULVV:
@@ -8974,188 +8943,188 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
8974 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 8943 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
8975 switch (vk) { 8944 switch (vk) {
8976 case 0: 8945 case 0:
8977 dasm_put(Dst, 5271); 8946 dasm_put(Dst, 5269);
8978 break; 8947 break;
8979 case 1: 8948 case 1:
8980 dasm_put(Dst, 5277); 8949 dasm_put(Dst, 5275);
8981 break; 8950 break;
8982 default: 8951 default:
8983 dasm_put(Dst, 5283); 8952 dasm_put(Dst, 5281);
8984 break; 8953 break;
8985 } 8954 }
8986 dasm_put(Dst, 5289); 8955 dasm_put(Dst, 5287);
8987 switch (vk) { 8956 switch (vk) {
8988 case 0: 8957 case 0:
8989 dasm_put(Dst, 5316); 8958 dasm_put(Dst, 5314);
8990 break; 8959 break;
8991 case 1: 8960 case 1:
8992 dasm_put(Dst, 5319); 8961 dasm_put(Dst, 5317);
8993 break; 8962 break;
8994 default: 8963 default:
8995 dasm_put(Dst, 5322); 8964 dasm_put(Dst, 5320);
8996 break; 8965 break;
8997 } 8966 }
8998 dasm_put(Dst, 5325); 8967 dasm_put(Dst, 5323);
8999 if (vk == 1) { 8968 if (vk == 1) {
9000 dasm_put(Dst, 5327); 8969 dasm_put(Dst, 5325);
9001 } else { 8970 } else {
9002 dasm_put(Dst, 5331); 8971 dasm_put(Dst, 5329);
9003 } 8972 }
9004 switch (vk) { 8973 switch (vk) {
9005 case 0: 8974 case 0:
9006 dasm_put(Dst, 5335); 8975 dasm_put(Dst, 5333);
9007 break; 8976 break;
9008 case 1: 8977 case 1:
9009 dasm_put(Dst, 5338); 8978 dasm_put(Dst, 5336);
9010 break; 8979 break;
9011 default: 8980 default:
9012 dasm_put(Dst, 5341); 8981 dasm_put(Dst, 5339);
9013 break; 8982 break;
9014 } 8983 }
9015 dasm_put(Dst, 5344); 8984 dasm_put(Dst, 5342);
9016 } else { 8985 } else {
9017 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 8986 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
9018 switch (vk) { 8987 switch (vk) {
9019 case 0: 8988 case 0:
9020 dasm_put(Dst, 5351); 8989 dasm_put(Dst, 5349);
9021 if (LJ_DUALNUM) { 8990 if (LJ_DUALNUM) {
9022 dasm_put(Dst, 5353); 8991 dasm_put(Dst, 5351);
9023 } 8992 }
9024 dasm_put(Dst, 5355); 8993 dasm_put(Dst, 5353);
9025 if (LJ_DUALNUM) { 8994 if (LJ_DUALNUM) {
9026 dasm_put(Dst, 5358); 8995 dasm_put(Dst, 5356);
9027 } else { 8996 } else {
9028 dasm_put(Dst, 5364); 8997 dasm_put(Dst, 5362);
9029 } 8998 }
9030 break; 8999 break;
9031 case 1: 9000 case 1:
9032 dasm_put(Dst, 5368); 9001 dasm_put(Dst, 5366);
9033 if (LJ_DUALNUM) { 9002 if (LJ_DUALNUM) {
9034 dasm_put(Dst, 5370); 9003 dasm_put(Dst, 5368);
9035 } 9004 }
9036 dasm_put(Dst, 5372); 9005 dasm_put(Dst, 5370);
9037 if (LJ_DUALNUM) { 9006 if (LJ_DUALNUM) {
9038 dasm_put(Dst, 5375); 9007 dasm_put(Dst, 5373);
9039 } else { 9008 } else {
9040 dasm_put(Dst, 5381); 9009 dasm_put(Dst, 5379);
9041 } 9010 }
9042 break; 9011 break;
9043 default: 9012 default:
9044 dasm_put(Dst, 5385); 9013 dasm_put(Dst, 5383);
9045 break; 9014 break;
9046 } 9015 }
9047 dasm_put(Dst, 5395); 9016 dasm_put(Dst, 5393);
9048 } 9017 }
9049 break; 9018 break;
9050 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 9019 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
9051 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 9020 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
9052 switch (vk) { 9021 switch (vk) {
9053 case 0: 9022 case 0:
9054 dasm_put(Dst, 5408); 9023 dasm_put(Dst, 5406);
9055 if (LJ_DUALNUM) { 9024 if (LJ_DUALNUM) {
9056 dasm_put(Dst, 5410); 9025 dasm_put(Dst, 5408);
9057 } 9026 }
9058 dasm_put(Dst, 5412); 9027 dasm_put(Dst, 5410);
9059 if (LJ_DUALNUM) { 9028 if (LJ_DUALNUM) {
9060 dasm_put(Dst, 5415); 9029 dasm_put(Dst, 5413);
9061 } else { 9030 } else {
9062 dasm_put(Dst, 5421); 9031 dasm_put(Dst, 5419);
9063 } 9032 }
9064 break; 9033 break;
9065 case 1: 9034 case 1:
9066 dasm_put(Dst, 5425); 9035 dasm_put(Dst, 5423);
9067 if (LJ_DUALNUM) { 9036 if (LJ_DUALNUM) {
9068 dasm_put(Dst, 5427); 9037 dasm_put(Dst, 5425);
9069 } 9038 }
9070 dasm_put(Dst, 5429); 9039 dasm_put(Dst, 5427);
9071 if (LJ_DUALNUM) { 9040 if (LJ_DUALNUM) {
9072 dasm_put(Dst, 5432); 9041 dasm_put(Dst, 5430);
9073 } else { 9042 } else {
9074 dasm_put(Dst, 5438); 9043 dasm_put(Dst, 5436);
9075 } 9044 }
9076 break; 9045 break;
9077 default: 9046 default:
9078 dasm_put(Dst, 5442); 9047 dasm_put(Dst, 5440);
9079 break; 9048 break;
9080 } 9049 }
9081 dasm_put(Dst, 5452); 9050 dasm_put(Dst, 5450);
9082 break; 9051 break;
9083 case BC_MODVN: 9052 case BC_MODVN:
9084 if (LJ_DUALNUM) { 9053 if (LJ_DUALNUM) {
9085 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 9054 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
9086 switch (vk) { 9055 switch (vk) {
9087 case 0: 9056 case 0:
9088 dasm_put(Dst, 5465); 9057 dasm_put(Dst, 5463);
9089 break; 9058 break;
9090 case 1: 9059 case 1:
9091 dasm_put(Dst, 5471); 9060 dasm_put(Dst, 5469);
9092 break; 9061 break;
9093 default: 9062 default:
9094 dasm_put(Dst, 5477); 9063 dasm_put(Dst, 5475);
9095 break; 9064 break;
9096 } 9065 }
9097 dasm_put(Dst, 5483); 9066 dasm_put(Dst, 5481);
9098 switch (vk) { 9067 switch (vk) {
9099 case 0: 9068 case 0:
9100 dasm_put(Dst, 5511); 9069 dasm_put(Dst, 5509);
9101 break; 9070 break;
9102 case 1: 9071 case 1:
9103 dasm_put(Dst, 5514); 9072 dasm_put(Dst, 5512);
9104 break; 9073 break;
9105 default: 9074 default:
9106 dasm_put(Dst, 5517); 9075 dasm_put(Dst, 5515);
9107 break; 9076 break;
9108 } 9077 }
9109 dasm_put(Dst, 5520); 9078 dasm_put(Dst, 5518);
9110 if (vk == 1) { 9079 if (vk == 1) {
9111 dasm_put(Dst, 5522); 9080 dasm_put(Dst, 5520);
9112 } else { 9081 } else {
9113 dasm_put(Dst, 5526); 9082 dasm_put(Dst, 5524);
9114 } 9083 }
9115 switch (vk) { 9084 switch (vk) {
9116 case 0: 9085 case 0:
9117 dasm_put(Dst, 5530); 9086 dasm_put(Dst, 5528);
9118 break; 9087 break;
9119 case 1: 9088 case 1:
9120 dasm_put(Dst, 5533); 9089 dasm_put(Dst, 5531);
9121 break; 9090 break;
9122 default: 9091 default:
9123 dasm_put(Dst, 5536); 9092 dasm_put(Dst, 5534);
9124 break; 9093 break;
9125 } 9094 }
9126 dasm_put(Dst, 5539); 9095 dasm_put(Dst, 5537);
9127 } else { 9096 } else {
9128 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 9097 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
9129 switch (vk) { 9098 switch (vk) {
9130 case 0: 9099 case 0:
9131 dasm_put(Dst, 5551); 9100 dasm_put(Dst, 5549);
9132 if (LJ_DUALNUM) { 9101 if (LJ_DUALNUM) {
9133 dasm_put(Dst, 5553); 9102 dasm_put(Dst, 5551);
9134 } 9103 }
9135 dasm_put(Dst, 5555); 9104 dasm_put(Dst, 5553);
9136 if (LJ_DUALNUM) { 9105 if (LJ_DUALNUM) {
9137 dasm_put(Dst, 5558); 9106 dasm_put(Dst, 5556);
9138 } else { 9107 } else {
9139 dasm_put(Dst, 5564); 9108 dasm_put(Dst, 5562);
9140 } 9109 }
9141 break; 9110 break;
9142 case 1: 9111 case 1:
9143 dasm_put(Dst, 5568); 9112 dasm_put(Dst, 5566);
9144 if (LJ_DUALNUM) { 9113 if (LJ_DUALNUM) {
9145 dasm_put(Dst, 5570); 9114 dasm_put(Dst, 5568);
9146 } 9115 }
9147 dasm_put(Dst, 5572); 9116 dasm_put(Dst, 5570);
9148 if (LJ_DUALNUM) { 9117 if (LJ_DUALNUM) {
9149 dasm_put(Dst, 5575); 9118 dasm_put(Dst, 5573);
9150 } else { 9119 } else {
9151 dasm_put(Dst, 5581); 9120 dasm_put(Dst, 5579);
9152 } 9121 }
9153 break; 9122 break;
9154 default: 9123 default:
9155 dasm_put(Dst, 5585); 9124 dasm_put(Dst, 5583);
9156 break; 9125 break;
9157 } 9126 }
9158 dasm_put(Dst, 5595); 9127 dasm_put(Dst, 5593);
9159 } 9128 }
9160 break; 9129 break;
9161 case BC_MODNV: case BC_MODVV: 9130 case BC_MODNV: case BC_MODVV:
@@ -9163,298 +9132,297 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
9163 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 9132 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
9164 switch (vk) { 9133 switch (vk) {
9165 case 0: 9134 case 0:
9166 dasm_put(Dst, 5613); 9135 dasm_put(Dst, 5611);
9167 break; 9136 break;
9168 case 1: 9137 case 1:
9169 dasm_put(Dst, 5619); 9138 dasm_put(Dst, 5617);
9170 break; 9139 break;
9171 default: 9140 default:
9172 dasm_put(Dst, 5625); 9141 dasm_put(Dst, 5623);
9173 break; 9142 break;
9174 } 9143 }
9175 dasm_put(Dst, 5631); 9144 dasm_put(Dst, 5629);
9176 switch (vk) { 9145 switch (vk) {
9177 case 0: 9146 case 0:
9178 dasm_put(Dst, 5659); 9147 dasm_put(Dst, 5657);
9179 break; 9148 break;
9180 case 1: 9149 case 1:
9181 dasm_put(Dst, 5662); 9150 dasm_put(Dst, 5660);
9182 break; 9151 break;
9183 default: 9152 default:
9184 dasm_put(Dst, 5665); 9153 dasm_put(Dst, 5663);
9185 break; 9154 break;
9186 } 9155 }
9187 dasm_put(Dst, 5668); 9156 dasm_put(Dst, 5666);
9188 if (vk == 1) { 9157 if (vk == 1) {
9189 dasm_put(Dst, 5670); 9158 dasm_put(Dst, 5668);
9190 } else { 9159 } else {
9191 dasm_put(Dst, 5674); 9160 dasm_put(Dst, 5672);
9192 } 9161 }
9193 switch (vk) { 9162 switch (vk) {
9194 case 0: 9163 case 0:
9195 dasm_put(Dst, 5678); 9164 dasm_put(Dst, 5676);
9196 break; 9165 break;
9197 case 1: 9166 case 1:
9198 dasm_put(Dst, 5681); 9167 dasm_put(Dst, 5679);
9199 break; 9168 break;
9200 default: 9169 default:
9201 dasm_put(Dst, 5684); 9170 dasm_put(Dst, 5682);
9202 break; 9171 break;
9203 } 9172 }
9204 dasm_put(Dst, 5687); 9173 dasm_put(Dst, 5685);
9205 } else { 9174 } else {
9206 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 9175 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
9207 switch (vk) { 9176 switch (vk) {
9208 case 0: 9177 case 0:
9209 dasm_put(Dst, 5690); 9178 dasm_put(Dst, 5688);
9210 if (LJ_DUALNUM) { 9179 if (LJ_DUALNUM) {
9211 dasm_put(Dst, 5692); 9180 dasm_put(Dst, 5690);
9212 } 9181 }
9213 dasm_put(Dst, 5694); 9182 dasm_put(Dst, 5692);
9214 if (LJ_DUALNUM) { 9183 if (LJ_DUALNUM) {
9215 dasm_put(Dst, 5697); 9184 dasm_put(Dst, 5695);
9216 } else { 9185 } else {
9217 dasm_put(Dst, 5703); 9186 dasm_put(Dst, 5701);
9218 } 9187 }
9219 break; 9188 break;
9220 case 1: 9189 case 1:
9221 dasm_put(Dst, 5707); 9190 dasm_put(Dst, 5705);
9222 if (LJ_DUALNUM) { 9191 if (LJ_DUALNUM) {
9223 dasm_put(Dst, 5709); 9192 dasm_put(Dst, 5707);
9224 } 9193 }
9225 dasm_put(Dst, 5711); 9194 dasm_put(Dst, 5709);
9226 if (LJ_DUALNUM) { 9195 if (LJ_DUALNUM) {
9227 dasm_put(Dst, 5714); 9196 dasm_put(Dst, 5712);
9228 } else { 9197 } else {
9229 dasm_put(Dst, 5720); 9198 dasm_put(Dst, 5718);
9230 } 9199 }
9231 break; 9200 break;
9232 default: 9201 default:
9233 dasm_put(Dst, 5724); 9202 dasm_put(Dst, 5722);
9234 break; 9203 break;
9235 } 9204 }
9236 dasm_put(Dst, 5734); 9205 dasm_put(Dst, 5732);
9237 } 9206 }
9238 break; 9207 break;
9239 case BC_POW: 9208 case BC_POW:
9240 dasm_put(Dst, 5737); 9209 dasm_put(Dst, 5735);
9241 break; 9210 break;
9242 9211
9243 case BC_CAT: 9212 case BC_CAT:
9244 dasm_put(Dst, 5760, Dt1(->base), 32-3, Dt1(->base)); 9213 dasm_put(Dst, 5758, Dt1(->base), 32-3, Dt1(->base));
9245 break; 9214 break;
9246 9215
9247 /* -- Constant ops ------------------------------------------------------ */ 9216 /* -- Constant ops ------------------------------------------------------ */
9248 9217
9249 case BC_KSTR: 9218 case BC_KSTR:
9250 dasm_put(Dst, 5790, 32-1, LJ_TSTR); 9219 dasm_put(Dst, 5788, 32-1, LJ_TSTR);
9251 break; 9220 break;
9252 case BC_KCDATA: 9221 case BC_KCDATA:
9253#if LJ_HASFFI 9222#if LJ_HASFFI
9254 dasm_put(Dst, 5809, 32-1, LJ_TCDATA); 9223 dasm_put(Dst, 5807, 32-1, LJ_TCDATA);
9255#endif 9224#endif
9256 break; 9225 break;
9257 case BC_KSHORT: 9226 case BC_KSHORT:
9258 if (LJ_DUALNUM) { 9227 if (LJ_DUALNUM) {
9259 dasm_put(Dst, 5828, 31-13); 9228 dasm_put(Dst, 5826, 31-13);
9260 } else { 9229 } else {
9261 dasm_put(Dst, 5844, 31-13, 31-20); 9230 dasm_put(Dst, 5842, 31-13, 31-20);
9262 } 9231 }
9263 break; 9232 break;
9264 case BC_KNUM: 9233 case BC_KNUM:
9265 dasm_put(Dst, 5872); 9234 dasm_put(Dst, 5870);
9266 break; 9235 break;
9267 case BC_KPRI: 9236 case BC_KPRI:
9268 dasm_put(Dst, 5885, 32-3); 9237 dasm_put(Dst, 5883, 32-3);
9269 break; 9238 break;
9270 case BC_KNIL: 9239 case BC_KNIL:
9271 dasm_put(Dst, 5900); 9240 dasm_put(Dst, 5898);
9272 break; 9241 break;
9273 9242
9274 /* -- Upvalue and function ops ------------------------------------------ */ 9243 /* -- Upvalue and function ops ------------------------------------------ */
9275 9244
9276 case BC_UGET: 9245 case BC_UGET:
9277 dasm_put(Dst, 5919, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); 9246 dasm_put(Dst, 5917, 32-1, offsetof(GCfuncL, uvptr), DtA(->v));
9278 break; 9247 break;
9279 case BC_USETV: 9248 case BC_USETV:
9280 dasm_put(Dst, 5940, 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); 9249 dasm_put(Dst, 5938, 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);
9281 break; 9250 break;
9282 case BC_USETS: 9251 case BC_USETS:
9283 dasm_put(Dst, 5993, 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); 9252 dasm_put(Dst, 5991, 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);
9284 break; 9253 break;
9285 case BC_USETN: 9254 case BC_USETN:
9286 dasm_put(Dst, 6044, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); 9255 dasm_put(Dst, 6042, 32-1, offsetof(GCfuncL, uvptr), DtA(->v));
9287 break; 9256 break;
9288 case BC_USETP: 9257 case BC_USETP:
9289 dasm_put(Dst, 6065, 32-1, 32-3, offsetof(GCfuncL, uvptr), DtA(->v)); 9258 dasm_put(Dst, 6063, 32-1, 32-3, offsetof(GCfuncL, uvptr), DtA(->v));
9290 break; 9259 break;
9291 9260
9292 case BC_UCLO: 9261 case BC_UCLO:
9293 dasm_put(Dst, 6088, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); 9262 dasm_put(Dst, 6086, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base));
9294 break; 9263 break;
9295 9264
9296 case BC_FNEW: 9265 case BC_FNEW:
9297 dasm_put(Dst, 6118, 32-1, Dt1(->base), Dt1(->base), LJ_TFUNC); 9266 dasm_put(Dst, 6116, 32-1, Dt1(->base), Dt1(->base), LJ_TFUNC);
9298 break; 9267 break;
9299 9268
9300 /* -- Table ops --------------------------------------------------------- */ 9269 /* -- Table ops --------------------------------------------------------- */
9301 9270
9302 case BC_TNEW: 9271 case BC_TNEW:
9303 case BC_TDUP: 9272 case BC_TDUP:
9304 dasm_put(Dst, 6146, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); 9273 dasm_put(Dst, 6144, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base));
9305 if (op == BC_TNEW) { 9274 if (op == BC_TNEW) {
9306 dasm_put(Dst, 6159); 9275 dasm_put(Dst, 6157);
9307 } else { 9276 } else {
9308 dasm_put(Dst, 6168, 32-1); 9277 dasm_put(Dst, 6166, 32-1);
9309 } 9278 }
9310 dasm_put(Dst, 6175, Dt1(->base), LJ_TTAB); 9279 dasm_put(Dst, 6173, Dt1(->base), LJ_TTAB);
9311 if (op == BC_TNEW) { 9280 if (op == BC_TNEW) {
9312 dasm_put(Dst, 6192); 9281 dasm_put(Dst, 6190);
9313 } 9282 }
9314 dasm_put(Dst, 6197); 9283 dasm_put(Dst, 6195);
9315 break; 9284 break;
9316 9285
9317 case BC_GGET: 9286 case BC_GGET:
9318 case BC_GSET: 9287 case BC_GSET:
9319 dasm_put(Dst, 6206, 32-1, Dt7(->env)); 9288 dasm_put(Dst, 6204, 32-1, Dt7(->env));
9320 if (op == BC_GGET) { 9289 if (op == BC_GGET) {
9321 dasm_put(Dst, 6214); 9290 dasm_put(Dst, 6212);
9322 } else { 9291 } else {
9323 dasm_put(Dst, 6217); 9292 dasm_put(Dst, 6215);
9324 } 9293 }
9325 break; 9294 break;
9326 9295
9327 case BC_TGETV: 9296 case BC_TGETV:
9328 dasm_put(Dst, 6220); 9297 dasm_put(Dst, 6218);
9329 if (LJ_DUALNUM) { 9298 if (LJ_DUALNUM) {
9330 dasm_put(Dst, 6224); 9299 dasm_put(Dst, 6222);
9331 } else { 9300 } else {
9332 dasm_put(Dst, 6226); 9301 dasm_put(Dst, 6224);
9333 } 9302 }
9334 dasm_put(Dst, 6228, LJ_TTAB); 9303 dasm_put(Dst, 6226, LJ_TTAB);
9335 if (LJ_DUALNUM) { 9304 if (LJ_DUALNUM) {
9336 dasm_put(Dst, 6234, Dt6(->asize), Dt6(->array), 31-3); 9305 dasm_put(Dst, 6232, Dt6(->asize), Dt6(->array), 31-3);
9337 } else { 9306 } else {
9338 dasm_put(Dst, 6244, Dt6(->asize), Dt6(->array), 31-3); 9307 dasm_put(Dst, 6242, Dt6(->asize), Dt6(->array), 31-3);
9339 } 9308 }
9340 dasm_put(Dst, 6261, LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, LJ_TSTR); 9309 dasm_put(Dst, 6259, LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, LJ_TSTR);
9341 if (!LJ_DUALNUM) { 9310 if (!LJ_DUALNUM) {
9342 dasm_put(Dst, 6301); 9311 dasm_put(Dst, 6299);
9343 } 9312 }
9344 dasm_put(Dst, 6303); 9313 dasm_put(Dst, 6301);
9345 break; 9314 break;
9346 case BC_TGETS: 9315 case BC_TGETS:
9347 dasm_put(Dst, 6306, 32-1, LJ_TTAB, Dt6(->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)); 9316 dasm_put(Dst, 6304, 32-1, LJ_TTAB, Dt6(->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));
9348 dasm_put(Dst, 6367, LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 9317 dasm_put(Dst, 6365, LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
9349 break; 9318 break;
9350 case BC_TGETB: 9319 case BC_TGETB:
9351 dasm_put(Dst, 6387, 32-3, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 9320 dasm_put(Dst, 6385, 32-3, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
9352 break; 9321 break;
9353 9322
9354 case BC_TSETV: 9323 case BC_TSETV:
9355 dasm_put(Dst, 6435); 9324 dasm_put(Dst, 6433);
9356 if (LJ_DUALNUM) { 9325 if (LJ_DUALNUM) {
9357 dasm_put(Dst, 6439); 9326 dasm_put(Dst, 6437);
9358 } else { 9327 } else {
9359 dasm_put(Dst, 6441); 9328 dasm_put(Dst, 6439);
9360 } 9329 }
9361 dasm_put(Dst, 6443, LJ_TTAB); 9330 dasm_put(Dst, 6441, LJ_TTAB);
9362 if (LJ_DUALNUM) { 9331 if (LJ_DUALNUM) {
9363 dasm_put(Dst, 6449, Dt6(->asize), Dt6(->array), 31-3); 9332 dasm_put(Dst, 6447, Dt6(->asize), Dt6(->array), 31-3);
9364 } else { 9333 } else {
9365 dasm_put(Dst, 6459, Dt6(->asize), Dt6(->array), 31-3); 9334 dasm_put(Dst, 6457, Dt6(->asize), Dt6(->array), 31-3);
9366 } 9335 }
9367 dasm_put(Dst, 6476, Dt6(->marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR); 9336 dasm_put(Dst, 6474, Dt6(->marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR);
9368 if (!LJ_DUALNUM) { 9337 if (!LJ_DUALNUM) {
9369 dasm_put(Dst, 6523); 9338 dasm_put(Dst, 6521);
9370 } 9339 }
9371 dasm_put(Dst, 6525, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 9340 dasm_put(Dst, 6523, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
9372 break; 9341 break;
9373 dasm_put(Dst, 6540, LJ_TSTR, LJ_TNIL);
9374 case BC_TSETS: 9342 case BC_TSETS:
9375 dasm_put(Dst, 6566, 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); 9343 dasm_put(Dst, 6538, 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), DtB(->next), LJ_TSTR, LJ_TNIL);
9376 dasm_put(Dst, 6617, LJ_GC_BLACK, DtB(->val), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<<MM_newindex); 9344 dasm_put(Dst, 6589, LJ_GC_BLACK, DtB(->val), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR);
9377 dasm_put(Dst, 6673, LJ_TSTR, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 9345 dasm_put(Dst, 6646, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
9378 break; 9346 break;
9379 case BC_TSETB: 9347 case BC_TSETB:
9380 dasm_put(Dst, 6698, 32-3, LJ_TTAB, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain)); 9348 dasm_put(Dst, 6669, 32-3, LJ_TTAB, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_TNIL, LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain));
9381 dasm_put(Dst, 6756, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 9349 dasm_put(Dst, 6727, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
9382 break; 9350 break;
9383 9351
9384 case BC_TSETM: 9352 case BC_TSETM:
9385 dasm_put(Dst, 6766, 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)); 9353 dasm_put(Dst, 6737, 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));
9386 dasm_put(Dst, 6835); 9354 dasm_put(Dst, 6806);
9387 break; 9355 break;
9388 9356
9389 /* -- Calls and vararg handling ----------------------------------------- */ 9357 /* -- Calls and vararg handling ----------------------------------------- */
9390 9358
9391 case BC_CALLM: 9359 case BC_CALLM:
9392 dasm_put(Dst, 6838); 9360 dasm_put(Dst, 6809);
9393 break; 9361 break;
9394 case BC_CALL: 9362 case BC_CALL:
9395 dasm_put(Dst, 6840, LJ_TFUNC, Dt7(->pc)); 9363 dasm_put(Dst, 6811, LJ_TFUNC, Dt7(->pc));
9396 break; 9364 break;
9397 9365
9398 case BC_CALLMT: 9366 case BC_CALLMT:
9399 dasm_put(Dst, 6861); 9367 dasm_put(Dst, 6832);
9400 break; 9368 break;
9401 case BC_CALLT: 9369 case BC_CALLT:
9402 dasm_put(Dst, 6863, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); 9370 dasm_put(Dst, 6834, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP);
9403 dasm_put(Dst, 6927, FRAME_TYPE); 9371 dasm_put(Dst, 6898, FRAME_TYPE);
9404 break; 9372 break;
9405 9373
9406 case BC_ITERC: 9374 case BC_ITERC:
9407 dasm_put(Dst, 6936, LJ_TFUNC, Dt7(->pc)); 9375 dasm_put(Dst, 6907, LJ_TFUNC, Dt7(->pc));
9408 break; 9376 break;
9409 9377
9410 case BC_ITERN: 9378 case BC_ITERN:
9411#if LJ_HASJIT 9379#if LJ_HASJIT
9412#endif 9380#endif
9413 dasm_put(Dst, 6963, Dt6(->asize), Dt6(->array), 31-3, LJ_TNIL); 9381 dasm_put(Dst, 6934, Dt6(->asize), Dt6(->array), 31-3, LJ_TNIL);
9414 if (LJ_DUALNUM) { 9382 if (LJ_DUALNUM) {
9415 dasm_put(Dst, 6985); 9383 dasm_put(Dst, 6956);
9416 } else { 9384 } else {
9417 dasm_put(Dst, 6988); 9385 dasm_put(Dst, 6959);
9418 } 9386 }
9419 dasm_put(Dst, 6992, -(BCBIAS_J*4 >> 16)); 9387 dasm_put(Dst, 6963, -(BCBIAS_J*4 >> 16));
9420 if (!LJ_DUALNUM) { 9388 if (!LJ_DUALNUM) {
9421 dasm_put(Dst, 7000); 9389 dasm_put(Dst, 6971);
9422 } 9390 }
9423 dasm_put(Dst, 7002, Dt6(->hmask), Dt6(->node), 31-5, 31-3, LJ_TNIL, DtB(->key), -(BCBIAS_J*4 >> 16)); 9391 dasm_put(Dst, 6973, Dt6(->hmask), Dt6(->node), 31-5, 31-3, LJ_TNIL, DtB(->key), -(BCBIAS_J*4 >> 16));
9424 break; 9392 break;
9425 9393
9426 case BC_ISNEXT: 9394 case BC_ISNEXT:
9427 dasm_put(Dst, 7058, 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)); 9395 dasm_put(Dst, 7029, 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));
9428 break; 9396 break;
9429 9397
9430 case BC_VARG: 9398 case BC_VARG:
9431 dasm_put(Dst, 7108, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); 9399 dasm_put(Dst, 7079, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base));
9432 dasm_put(Dst, 7188); 9400 dasm_put(Dst, 7159);
9433 break; 9401 break;
9434 9402
9435 /* -- Returns ----------------------------------------------------------- */ 9403 /* -- Returns ----------------------------------------------------------- */
9436 9404
9437 case BC_RETM: 9405 case BC_RETM:
9438 dasm_put(Dst, 7194); 9406 dasm_put(Dst, 7165);
9439 break; 9407 break;
9440 9408
9441 case BC_RET: 9409 case BC_RET:
9442 dasm_put(Dst, 7196, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); 9410 dasm_put(Dst, 7167, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP);
9443 break; 9411 break;
9444 9412
9445 case BC_RET0: case BC_RET1: 9413 case BC_RET0: case BC_RET1:
9446 dasm_put(Dst, 7266, FRAME_TYPE, FRAME_VARG); 9414 dasm_put(Dst, 7237, FRAME_TYPE, FRAME_VARG);
9447 if (op == BC_RET1) { 9415 if (op == BC_RET1) {
9448 dasm_put(Dst, 7279); 9416 dasm_put(Dst, 7250);
9449 } 9417 }
9450 dasm_put(Dst, 7282, Dt7(->pc), PC2PROTO(k)); 9418 dasm_put(Dst, 7253, Dt7(->pc), PC2PROTO(k));
9451 break; 9419 break;
9452 9420
9453 /* -- Loops and branches ------------------------------------------------ */ 9421 /* -- Loops and branches ------------------------------------------------ */
9454 9422
9455 case BC_FORL: 9423 case BC_FORL:
9456#if LJ_HASJIT 9424#if LJ_HASJIT
9457 dasm_put(Dst, 7310, GG_DISP2HOT, -HOTCOUNT_LOOP); 9425 dasm_put(Dst, 7281, GG_DISP2HOT, -HOTCOUNT_LOOP);
9458#endif 9426#endif
9459 break; 9427 break;
9460 9428
@@ -9467,100 +9435,100 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
9467 case BC_IFORL: 9435 case BC_IFORL:
9468 vk = (op == BC_IFORL || op == BC_JFORL); 9436 vk = (op == BC_IFORL || op == BC_JFORL);
9469 if (LJ_DUALNUM) { 9437 if (LJ_DUALNUM) {
9470 dasm_put(Dst, 7320, FORL_IDX*8+4); 9438 dasm_put(Dst, 7291, FORL_IDX*8+4);
9471 if (vk) { 9439 if (vk) {
9472 dasm_put(Dst, 7325, FORL_STEP*8+4, FORL_STOP*8+4, FORL_IDX*8+4); 9440 dasm_put(Dst, 7296, FORL_STEP*8+4, FORL_STOP*8+4, FORL_IDX*8+4);
9473 } else { 9441 } else {
9474 dasm_put(Dst, 7339, FORL_STEP*8, FORL_STEP*8+4, FORL_STOP*8, FORL_STOP*8+4); 9442 dasm_put(Dst, 7310, FORL_STEP*8, FORL_STEP*8+4, FORL_STOP*8, FORL_STOP*8+4);
9475 } 9443 }
9476 dasm_put(Dst, 7355, FORL_EXT*8); 9444 dasm_put(Dst, 7326, FORL_EXT*8);
9477 if (op != BC_JFORL) { 9445 if (op != BC_JFORL) {
9478 dasm_put(Dst, 7362, 32-1); 9446 dasm_put(Dst, 7333, 32-1);
9479 } 9447 }
9480 dasm_put(Dst, 7365, FORL_EXT*8+4); 9448 dasm_put(Dst, 7336, FORL_EXT*8+4);
9481 if (op != BC_JFORL) { 9449 if (op != BC_JFORL) {
9482 dasm_put(Dst, 7368); 9450 dasm_put(Dst, 7339);
9483 } 9451 }
9484 if (op == BC_FORI) { 9452 if (op == BC_FORI) {
9485 dasm_put(Dst, 7370); 9453 dasm_put(Dst, 7341);
9486 } else if (op == BC_JFORI) { 9454 } else if (op == BC_JFORI) {
9487 dasm_put(Dst, 7373, -(BCBIAS_J*4 >> 16)); 9455 dasm_put(Dst, 7344, -(BCBIAS_J*4 >> 16));
9488 } else if (op == BC_IFORL) { 9456 } else if (op == BC_IFORL) {
9489 dasm_put(Dst, 7378, -(BCBIAS_J*4 >> 16)); 9457 dasm_put(Dst, 7349, -(BCBIAS_J*4 >> 16));
9490 } else { 9458 } else {
9491 dasm_put(Dst, 7383, BC_JLOOP); 9459 dasm_put(Dst, 7354, BC_JLOOP);
9492 } 9460 }
9493 dasm_put(Dst, 7386); 9461 dasm_put(Dst, 7357);
9494 if (vk) { 9462 if (vk) {
9495 dasm_put(Dst, 7402); 9463 dasm_put(Dst, 7373);
9496 } 9464 }
9497 } 9465 }
9498 if (vk) { 9466 if (vk) {
9499 if (LJ_DUALNUM) { 9467 if (LJ_DUALNUM) {
9500 dasm_put(Dst, 7409, FORL_IDX*8); 9468 dasm_put(Dst, 7380, FORL_IDX*8);
9501 } else { 9469 } else {
9502 dasm_put(Dst, 7413); 9470 dasm_put(Dst, 7384);
9503 } 9471 }
9504 dasm_put(Dst, 7415, FORL_STEP*8, FORL_STOP*8, FORL_STEP*8, FORL_IDX*8); 9472 dasm_put(Dst, 7386, FORL_STEP*8, FORL_STOP*8, FORL_STEP*8, FORL_IDX*8);
9505 } else { 9473 } else {
9506 if (LJ_DUALNUM) { 9474 if (LJ_DUALNUM) {
9507 dasm_put(Dst, 7425); 9475 dasm_put(Dst, 7396);
9508 } else { 9476 } else {
9509 dasm_put(Dst, 7427, FORL_STEP*8, FORL_STOP*8); 9477 dasm_put(Dst, 7398, FORL_STEP*8, FORL_STOP*8);
9510 } 9478 }
9511 dasm_put(Dst, 7436, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); 9479 dasm_put(Dst, 7407, FORL_IDX*8, FORL_STOP*8);
9512 } 9480 }
9513 dasm_put(Dst, 7447); 9481 dasm_put(Dst, 7416);
9514 if (op != BC_JFORL) { 9482 if (op != BC_JFORL) {
9515 dasm_put(Dst, 7449, 32-1); 9483 dasm_put(Dst, 7418, 32-1);
9516 } 9484 }
9517 dasm_put(Dst, 7452, FORL_EXT*8); 9485 dasm_put(Dst, 7421, FORL_EXT*8);
9518 if (op != BC_JFORL) { 9486 if (op != BC_JFORL) {
9519 dasm_put(Dst, 7455); 9487 dasm_put(Dst, 7424);
9520 } 9488 }
9521 dasm_put(Dst, 7457); 9489 dasm_put(Dst, 7426);
9522 if (op == BC_JFORI) { 9490 if (op == BC_JFORI) {
9523 dasm_put(Dst, 7459, -(BCBIAS_J*4 >> 16)); 9491 dasm_put(Dst, 7428, -(BCBIAS_J*4 >> 16));
9524 } 9492 }
9525 dasm_put(Dst, 7462); 9493 dasm_put(Dst, 7431);
9526 if (op == BC_FORI) { 9494 if (op == BC_FORI) {
9527 dasm_put(Dst, 7465); 9495 dasm_put(Dst, 7434);
9528 } else if (op == BC_IFORL) { 9496 } else if (op == BC_IFORL) {
9529 if (LJ_DUALNUM) { 9497 if (LJ_DUALNUM) {
9530 dasm_put(Dst, 7468); 9498 dasm_put(Dst, 7437);
9531 } else { 9499 } else {
9532 dasm_put(Dst, 7471); 9500 dasm_put(Dst, 7440);
9533 } 9501 }
9534 dasm_put(Dst, 7474, -(BCBIAS_J*4 >> 16)); 9502 dasm_put(Dst, 7443, -(BCBIAS_J*4 >> 16));
9535 } else if (op == BC_JFORI) { 9503 } else if (op == BC_JFORI) {
9536 dasm_put(Dst, 7478); 9504 dasm_put(Dst, 7447);
9537 } else { 9505 } else {
9538 dasm_put(Dst, 7481, BC_JLOOP); 9506 dasm_put(Dst, 7450, BC_JLOOP);
9539 } 9507 }
9540 if (LJ_DUALNUM) { 9508 if (LJ_DUALNUM) {
9541 dasm_put(Dst, 7484); 9509 dasm_put(Dst, 7453);
9542 } else { 9510 } else {
9543 dasm_put(Dst, 7487); 9511 dasm_put(Dst, 7456);
9544 } 9512 }
9545 dasm_put(Dst, 7499); 9513 dasm_put(Dst, 7468);
9546 if (op == BC_FORI) { 9514 if (op == BC_FORI) {
9547 dasm_put(Dst, 7501, -(BCBIAS_J*4 >> 16)); 9515 dasm_put(Dst, 7470, -(BCBIAS_J*4 >> 16));
9548 } else if (op == BC_IFORL) { 9516 } else if (op == BC_IFORL) {
9549 dasm_put(Dst, 7507); 9517 dasm_put(Dst, 7476);
9550 } else if (op == BC_JFORI) { 9518 } else if (op == BC_JFORI) {
9551 dasm_put(Dst, 7510); 9519 dasm_put(Dst, 7479);
9552 } else { 9520 } else {
9553 dasm_put(Dst, 7513, BC_JLOOP); 9521 dasm_put(Dst, 7482, BC_JLOOP);
9554 } 9522 }
9555 dasm_put(Dst, 7516); 9523 dasm_put(Dst, 7485);
9556 if (op == BC_JFORI) { 9524 if (op == BC_JFORI) {
9557 dasm_put(Dst, 7519, BC_JLOOP); 9525 dasm_put(Dst, 7488, BC_JLOOP);
9558 } 9526 }
9559 break; 9527 break;
9560 9528
9561 case BC_ITERL: 9529 case BC_ITERL:
9562#if LJ_HASJIT 9530#if LJ_HASJIT
9563 dasm_put(Dst, 7525, GG_DISP2HOT, -HOTCOUNT_LOOP); 9531 dasm_put(Dst, 7494, GG_DISP2HOT, -HOTCOUNT_LOOP);
9564#endif 9532#endif
9565 break; 9533 break;
9566 9534
@@ -9569,40 +9537,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
9569 break; 9537 break;
9570#endif 9538#endif
9571 case BC_IITERL: 9539 case BC_IITERL:
9572 dasm_put(Dst, 7535, LJ_TNIL); 9540 dasm_put(Dst, 7504, LJ_TNIL);
9573 if (op == BC_JITERL) { 9541 if (op == BC_JITERL) {
9574 dasm_put(Dst, 7542, BC_JLOOP); 9542 dasm_put(Dst, 7511, BC_JLOOP);
9575 } else { 9543 } else {
9576 dasm_put(Dst, 7547, 32-1, -(BCBIAS_J*4 >> 16)); 9544 dasm_put(Dst, 7516, 32-1, -(BCBIAS_J*4 >> 16));
9577 } 9545 }
9578 dasm_put(Dst, 7555); 9546 dasm_put(Dst, 7524);
9579 break; 9547 break;
9580 9548
9581 case BC_LOOP: 9549 case BC_LOOP:
9582#if LJ_HASJIT 9550#if LJ_HASJIT
9583 dasm_put(Dst, 7567, GG_DISP2HOT, -HOTCOUNT_LOOP); 9551 dasm_put(Dst, 7536, GG_DISP2HOT, -HOTCOUNT_LOOP);
9584#endif 9552#endif
9585 break; 9553 break;
9586 9554
9587 case BC_ILOOP: 9555 case BC_ILOOP:
9588 dasm_put(Dst, 7577); 9556 dasm_put(Dst, 7546);
9589 break; 9557 break;
9590 9558
9591 case BC_JLOOP: 9559 case BC_JLOOP:
9592#if LJ_HASJIT 9560#if LJ_HASJIT
9593 dasm_put(Dst, 7588, DISPATCH_J(trace), 32-1, DISPATCH_GL(vmstate), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), GG_DISP2G+32768); 9561 dasm_put(Dst, 7557, DISPATCH_J(trace), 32-1, DISPATCH_GL(vmstate), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), GG_DISP2G+32768);
9594#endif 9562#endif
9595 break; 9563 break;
9596 9564
9597 case BC_JMP: 9565 case BC_JMP:
9598 dasm_put(Dst, 7607, 32-1, -(BCBIAS_J*4 >> 16)); 9566 dasm_put(Dst, 7576, 32-1, -(BCBIAS_J*4 >> 16));
9599 break; 9567 break;
9600 9568
9601 /* -- Function headers -------------------------------------------------- */ 9569 /* -- Function headers -------------------------------------------------- */
9602 9570
9603 case BC_FUNCF: 9571 case BC_FUNCF:
9604#if LJ_HASJIT 9572#if LJ_HASJIT
9605 dasm_put(Dst, 7623, GG_DISP2HOT, -HOTCOUNT_CALL); 9573 dasm_put(Dst, 7592, GG_DISP2HOT, -HOTCOUNT_CALL);
9606#endif 9574#endif
9607 case BC_FUNCV: /* NYI: compiled vararg functions. */ 9575 case BC_FUNCV: /* NYI: compiled vararg functions. */
9608 break; 9576 break;
@@ -9612,42 +9580,42 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
9612 break; 9580 break;
9613#endif 9581#endif
9614 case BC_IFUNCF: 9582 case BC_IFUNCF:
9615 dasm_put(Dst, 7633, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); 9583 dasm_put(Dst, 7602, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3);
9616 if (op != BC_JFUNCF) { 9584 if (op != BC_JFUNCF) {
9617 dasm_put(Dst, 7645); 9585 dasm_put(Dst, 7614);
9618 } 9586 }
9619 dasm_put(Dst, 7648); 9587 dasm_put(Dst, 7617);
9620 if (op == BC_JFUNCF) { 9588 if (op == BC_JFUNCF) {
9621 dasm_put(Dst, 7653, BC_JLOOP); 9589 dasm_put(Dst, 7622, BC_JLOOP);
9622 } else { 9590 } else {
9623 dasm_put(Dst, 7657); 9591 dasm_put(Dst, 7626);
9624 } 9592 }
9625 dasm_put(Dst, 7666); 9593 dasm_put(Dst, 7635);
9626 break; 9594 break;
9627 9595
9628 case BC_JFUNCV: 9596 case BC_JFUNCV:
9629#if !LJ_HASJIT 9597#if !LJ_HASJIT
9630 break; 9598 break;
9631#endif 9599#endif
9632 dasm_put(Dst, 7672); 9600 dasm_put(Dst, 7641);
9633 break; /* NYI: compiled vararg functions. */ 9601 break; /* NYI: compiled vararg functions. */
9634 9602
9635 case BC_IFUNCV: 9603 case BC_IFUNCV:
9636 dasm_put(Dst, 7674, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), LJ_TNIL); 9604 dasm_put(Dst, 7643, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), LJ_TNIL);
9637 break; 9605 break;
9638 9606
9639 case BC_FUNCC: 9607 case BC_FUNCC:
9640 case BC_FUNCCW: 9608 case BC_FUNCCW:
9641 if (op == BC_FUNCC) { 9609 if (op == BC_FUNCC) {
9642 dasm_put(Dst, 7727, Dt8(->f)); 9610 dasm_put(Dst, 7696, Dt8(->f));
9643 } else { 9611 } else {
9644 dasm_put(Dst, 7730, DISPATCH_GL(wrapf)); 9612 dasm_put(Dst, 7699, DISPATCH_GL(wrapf));
9645 } 9613 }
9646 dasm_put(Dst, 7733, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); 9614 dasm_put(Dst, 7702, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C);
9647 if (op == BC_FUNCCW) { 9615 if (op == BC_FUNCCW) {
9648 dasm_put(Dst, 7746, Dt8(->f)); 9616 dasm_put(Dst, 7715, Dt8(->f));
9649 } 9617 }
9650 dasm_put(Dst, 7749, DISPATCH_GL(vmstate), Dt1(->base), 31-3, Dt1(->top), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); 9618 dasm_put(Dst, 7718, DISPATCH_GL(vmstate), Dt1(->base), 31-3, Dt1(->top), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate));
9651 break; 9619 break;
9652 9620
9653 /* ---------------------------------------------------------------------- */ 9621 /* ---------------------------------------------------------------------- */
@@ -9667,7 +9635,7 @@ static int build_backend(BuildCtx *ctx)
9667 9635
9668 build_subroutines(ctx); 9636 build_subroutines(ctx);
9669 9637
9670 dasm_put(Dst, 7770); 9638 dasm_put(Dst, 7739);
9671 for (op = 0; op < BC__MAX; op++) 9639 for (op = 0; op < BC__MAX; op++)
9672 build_ins(ctx, (BCOp)op, op); 9640 build_ins(ctx, (BCOp)op, op);
9673 9641