aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildvm_x86.dasc107
-rw-r--r--src/buildvm_x86.h380
2 files changed, 284 insertions, 203 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc
index eadd8d57..7167ffb1 100644
--- a/src/buildvm_x86.dasc
+++ b/src/buildvm_x86.dasc
@@ -863,12 +863,32 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
863 | je ->cont_ra 863 | je ->cont_ra
864 | neg RA 864 | neg RA
865 | shr RA, 3 865 | shr RA, 3
866 |.if X64WIN
867 | mov CARG3d, RA
868 | mov L:CARG1d, SAVE_L
869 | mov L:CARG1d->base, BASE
870 | mov CARG2d, [RC+4]
871 | mov RC, [RC]
872 | mov [RB+4], CARG2d
873 | mov [RB], RC
874 | mov CARG2d, RB
875 |.elif X64
876 | mov L:CARG1d, SAVE_L
877 | mov L:CARG1d->base, BASE
878 | mov CARG3d, RA
879 | mov RA, [RC+4]
880 | mov RC, [RC]
881 | mov [RB+4], RA
882 | mov [RB], RC
883 | mov CARG2d, RB
884 |.else
866 | mov ARG3, RA 885 | mov ARG3, RA
867 | mov RA, [RC+4] 886 | mov RA, [RC+4]
868 | mov RC, [RC] 887 | mov RC, [RC]
869 | mov [RB+4], RA 888 | mov [RB+4], RA
870 | mov [RB], RC 889 | mov [RB], RC
871 | mov ARG2, RB 890 | mov ARG2, RB
891 |.endif
872 | jmp ->BC_CAT_Z 892 | jmp ->BC_CAT_Z
873 | 893 |
874 |//-- Table indexing metamethods ----------------------------------------- 894 |//-- Table indexing metamethods -----------------------------------------
@@ -3624,6 +3644,15 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
3624 3644
3625 case BC_CAT: 3645 case BC_CAT:
3626 | ins_ABC // RA = dst, RB = src_start, RC = src_end 3646 | ins_ABC // RA = dst, RB = src_start, RC = src_end
3647 |.if X64
3648 | mov L:CARG1d, SAVE_L
3649 | mov L:CARG1d->base, BASE
3650 | lea CARG2d, [BASE+RC*8]
3651 | mov CARG3d, RC
3652 | sub CARG3d, RB
3653 |->BC_CAT_Z:
3654 | mov L:RB, L:CARG1d
3655 |.else
3627 | lea RA, [BASE+RC*8] 3656 | lea RA, [BASE+RC*8]
3628 | sub RC, RB 3657 | sub RC, RB
3629 | mov ARG2, RA 3658 | mov ARG2, RA
@@ -3631,8 +3660,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
3631 |->BC_CAT_Z: 3660 |->BC_CAT_Z:
3632 | mov L:RB, SAVE_L 3661 | mov L:RB, SAVE_L
3633 | mov ARG1, L:RB 3662 | mov ARG1, L:RB
3634 | mov SAVE_PC, PC
3635 | mov L:RB->base, BASE 3663 | mov L:RB->base, BASE
3664 |.endif
3665 | mov SAVE_PC, PC
3636 | call extern lj_meta_cat // (lua_State *L, TValue *top, int left) 3666 | call extern lj_meta_cat // (lua_State *L, TValue *top, int left)
3637 | // NULL (finished) or TValue * (metamethod) returned in eax (RC). 3667 | // NULL (finished) or TValue * (metamethod) returned in eax (RC).
3638 | mov BASE, L:RB->base 3668 | mov BASE, L:RB->base
@@ -3817,14 +3847,22 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
3817 3847
3818 case BC_FNEW: 3848 case BC_FNEW:
3819 | ins_AND // RA = dst, RD = proto const (~) (holding function prototype) 3849 | ins_AND // RA = dst, RD = proto const (~) (holding function prototype)
3850 |.if X64
3851 | mov L:RB, SAVE_L
3852 | mov L:RB->base, BASE // Caveat: CARG2d/CARG3d may be BASE.
3853 | mov CARG3d, [BASE-8]
3854 | mov CARG2d, [KBASE+RD*4] // Fetch GCproto *.
3855 | mov CARG1d, L:RB
3856 |.else
3820 | mov LFUNC:RA, [BASE-8] 3857 | mov LFUNC:RA, [BASE-8]
3821 | mov PROTO:RD, [KBASE+RD*4] // Fetch GCproto *. 3858 | mov PROTO:RD, [KBASE+RD*4] // Fetch GCproto *.
3822 | mov L:RB, SAVE_L 3859 | mov L:RB, SAVE_L
3823 | mov ARG3, LFUNC:RA 3860 | mov ARG3, LFUNC:RA
3824 | mov ARG2, PROTO:RD 3861 | mov ARG2, PROTO:RD
3825 | mov SAVE_PC, PC
3826 | mov ARG1, L:RB 3862 | mov ARG1, L:RB
3827 | mov L:RB->base, BASE 3863 | mov L:RB->base, BASE
3864 |.endif
3865 | mov SAVE_PC, PC
3828 | // (lua_State *L, GCproto *pt, GCfuncL *parent) 3866 | // (lua_State *L, GCproto *pt, GCfuncL *parent)
3829 | call extern lj_func_newL_gc 3867 | call extern lj_func_newL_gc
3830 | // GCfuncL * returned in eax (RC). 3868 | // GCfuncL * returned in eax (RC).
@@ -3839,23 +3877,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
3839 3877
3840 case BC_TNEW: 3878 case BC_TNEW:
3841 | ins_AD // RA = dst, RD = hbits|asize 3879 | ins_AD // RA = dst, RD = hbits|asize
3880 |.if X64
3881 | mov L:CARG1d, SAVE_L
3882 |1:
3883 | mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE.
3884 | mov CARG3d, RD
3885 | and RD, 0x7ff
3886 | shr CARG3d, 11
3887 | cmp RD, 0x7ff
3888 | je >3
3889 |2:
3890 | mov CARG2d, RD
3891 | mov RD, [DISPATCH+DISPATCH_GL(gc.total)]
3892 | mov L:RB, L:CARG1d
3893 | cmp RD, [DISPATCH+DISPATCH_GL(gc.threshold)]
3894 | mov SAVE_PC, PC
3895 | jae >5
3896 |.else
3842 | mov RB, RD 3897 | mov RB, RD
3843 | and RD, 0x7ff 3898 | and RD, 0x7ff
3844 | shr RB, 11 3899 | shr RB, 11
3845 | cmp RD, 0x7ff // Turn 0x7ff into 0x801. 3900 | cmp RD, 0x7ff
3846 | sete RAL 3901 | je >3
3902 |2:
3847 | mov ARG3, RB 3903 | mov ARG3, RB
3848 | add RD, RA
3849 | mov L:RB, SAVE_L 3904 | mov L:RB, SAVE_L
3850 | add RD, RA
3851 | mov ARG2, RD 3905 | mov ARG2, RD
3852 | mov SAVE_PC, PC 3906 | mov SAVE_PC, PC
3853 | mov RA, [DISPATCH+DISPATCH_GL(gc.total)] 3907 | mov RD, [DISPATCH+DISPATCH_GL(gc.total)]
3854 | mov ARG1, L:RB 3908 | mov ARG1, L:RB
3855 | cmp RA, [DISPATCH+DISPATCH_GL(gc.threshold)] 3909 | cmp RD, [DISPATCH+DISPATCH_GL(gc.threshold)]
3856 | mov L:RB->base, BASE 3910 | mov L:RB->base, BASE
3857 | jae >2 3911 | jae >5
3858 |1: 3912 |1:
3913 |.endif
3859 | call extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits) 3914 | call extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits)
3860 | // Table * returned in eax (RC). 3915 | // Table * returned in eax (RC).
3861 | mov BASE, L:RB->base 3916 | mov BASE, L:RB->base
@@ -3863,10 +3918,20 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
3863 | mov [BASE+RA*8], TAB:RC 3918 | mov [BASE+RA*8], TAB:RC
3864 | mov dword [BASE+RA*8+4], LJ_TTAB 3919 | mov dword [BASE+RA*8+4], LJ_TTAB
3865 | ins_next 3920 | ins_next
3866 |2: 3921 |3: // Turn 0x7ff into 0x801.
3922 | mov RD, 0x801
3923 | jmp <2
3924 |5:
3925 |.if X64
3926 | call extern lj_gc_step_fixtop@4 // (lua_State *L)
3927 | movzx RD, PC_RD
3928 | mov L:CARG1d, L:RB
3929 | jmp <1
3930 |.else
3867 | mov L:FCARG1, L:RB 3931 | mov L:FCARG1, L:RB
3868 | call extern lj_gc_step_fixtop@4 // (lua_State *L) 3932 | call extern lj_gc_step_fixtop@4 // (lua_State *L)
3869 | jmp <1 3933 | jmp <1
3934 |.endif
3870 break; 3935 break;
3871 case BC_TDUP: 3936 case BC_TDUP:
3872 | ins_AND // RA = dst, RD = table const (~) (holding template table) 3937 | ins_AND // RA = dst, RD = table const (~) (holding template table)
@@ -4144,14 +4209,22 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
4144 |6: 4209 |6:
4145 | mov TMP1, STR:RC 4210 | mov TMP1, STR:RC
4146 | mov TMP2, LJ_TSTR 4211 | mov TMP2, LJ_TSTR
4147 | lea RC, TMP1 // Store temp. TValue in TMP1/TMP2.
4148 | mov TMP3, TAB:RB // Save TAB:RB for us. 4212 | mov TMP3, TAB:RB // Save TAB:RB for us.
4213 |.if X64
4214 | mov L:CARG1d, SAVE_L
4215 | mov L:CARG1d->base, BASE
4216 | lea CARG3, TMP1
4217 | mov CARG2d, TAB:RB
4218 | mov L:RB, L:CARG1d
4219 |.else
4220 | lea RC, TMP1 // Store temp. TValue in TMP1/TMP2.
4149 | mov ARG2, TAB:RB 4221 | mov ARG2, TAB:RB
4150 | mov L:RB, SAVE_L 4222 | mov L:RB, SAVE_L
4151 | mov ARG3, RC 4223 | mov ARG3, RC
4152 | mov ARG1, L:RB 4224 | mov ARG1, L:RB
4153 | mov SAVE_PC, PC
4154 | mov L:RB->base, BASE 4225 | mov L:RB->base, BASE
4226 |.endif
4227 | mov SAVE_PC, PC
4155 | call extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k) 4228 | call extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k)
4156 | // Handles write barrier for the new key. TValue * returned in eax (RC). 4229 | // Handles write barrier for the new key. TValue * returned in eax (RC).
4157 | mov BASE, L:RB->base 4230 | mov BASE, L:RB->base
@@ -4245,12 +4318,20 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
4245 | ins_next 4318 | ins_next
4246 | 4319 |
4247 |5: // Need to resize array part. 4320 |5: // Need to resize array part.
4321 |.if X64
4322 | mov L:CARG1d, SAVE_L
4323 | mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE.
4324 | mov CARG2d, TAB:RB
4325 | mov CARG3d, RD
4326 | mov L:RB, L:CARG1d
4327 |.else
4248 | mov ARG2, TAB:RB 4328 | mov ARG2, TAB:RB
4249 | mov L:RB, SAVE_L 4329 | mov L:RB, SAVE_L
4330 | mov L:RB->base, BASE
4250 | mov ARG3, RD 4331 | mov ARG3, RD
4251 | mov ARG1, L:RB 4332 | mov ARG1, L:RB
4333 |.endif
4252 | mov SAVE_PC, PC 4334 | mov SAVE_PC, PC
4253 | mov L:RB->base, BASE
4254 | call extern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize) 4335 | call extern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize)
4255 | mov BASE, L:RB->base 4336 | mov BASE, L:RB->base
4256 | movzx RA, PC_RA // Restore RA. 4337 | movzx RA, PC_RA // Restore RA.
diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h
index bd2c7812..2d679b01 100644
--- a/src/buildvm_x86.h
+++ b/src/buildvm_x86.h
@@ -12,7 +12,7 @@
12#define DASM_SECTION_CODE_OP 0 12#define DASM_SECTION_CODE_OP 0
13#define DASM_SECTION_CODE_SUB 1 13#define DASM_SECTION_CODE_SUB 1
14#define DASM_MAXSECTION 2 14#define DASM_MAXSECTION 2
15static const unsigned char build_actionlist[15184] = { 15static const unsigned char build_actionlist[15194] = {
16 254,1,248,10,137,202,139,173,233,137,114,252,252,15,182,141,233,139,181,233, 16 254,1,248,10,137,202,139,173,233,137,114,252,252,15,182,141,233,139,181,233,
17 139,189,233,139,108,36,48,141,12,202,141,68,194,252,252,59,141,233,15,135, 17 139,189,233,139,108,36,48,141,12,202,141,68,194,252,252,59,141,233,15,135,
18 244,11,248,9,189,237,248,1,137,40,137,104,8,131,192,16,57,200,15,130,244, 18 244,11,248,9,189,237,248,1,137,40,137,104,8,131,192,16,57,200,15,130,244,
@@ -595,7 +595,7 @@ static const unsigned char build_actionlist[15184] = {
595 234,255,221,4,199,221,4,252,234,255,252,242,15,16,4,252,234,252,242,15,16, 595 234,255,221,4,199,221,4,252,234,255,252,242,15,16,4,252,234,252,242,15,16,
596 12,194,255,221,4,252,234,221,4,194,255,248,153,232,244,145,255,252,233,244, 596 12,194,255,221,4,252,234,221,4,194,255,248,153,232,244,145,255,252,233,244,
597 153,255,232,244,106,255,15,182,252,236,15,182,192,141,12,194,41,232,137,76, 597 153,255,232,244,106,255,15,182,252,236,15,182,192,141,12,194,41,232,137,76,
598 36,4,137,68,36,8,248,33,139,108,36,48,137,44,36,137,116,36,24,137,149,233, 598 36,4,137,68,36,8,248,33,139,108,36,48,137,44,36,137,149,233,137,116,36,24,
599 232,251,1,23,139,149,233,133,192,15,133,244,42,15,182,110,252,255,15,182, 599 232,251,1,23,139,149,233,133,192,15,133,244,42,15,182,110,252,255,15,182,
600 78,252,253,139,68,252,234,4,139,44,252,234,137,68,202,4,137,44,202,139,6, 600 78,252,253,139,68,252,234,4,139,44,252,234,137,68,202,4,137,44,202,139,6,
601 15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,252,247,208, 601 15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,252,247,208,
@@ -624,126 +624,126 @@ static const unsigned char build_actionlist[15184] = {
624 131,189,233,0,15,132,244,247,137,149,233,141,20,202,137,252,233,232,251,1, 624 131,189,233,0,15,132,244,247,137,149,233,141,20,202,137,252,233,232,251,1,
625 25,139,149,233,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 625 25,139,149,233,248,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,
626 255,36,171,255,252,247,208,139,74,252,248,139,4,135,139,108,36,48,137,76, 626 255,36,171,255,252,247,208,139,74,252,248,139,4,135,139,108,36,48,137,76,
627 36,8,137,68,36,4,137,116,36,24,137,44,36,137,149,233,232,251,1,26,139,149, 627 36,8,137,68,36,4,137,44,36,137,149,233,137,116,36,24,232,251,1,26,139,149,
628 233,15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182, 628 233,15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,15,182,
629 232,131,198,4,193,232,16,252,255,36,171,255,137,197,37,252,255,7,0,0,193, 629 232,131,198,4,193,232,16,252,255,36,171,255,137,197,37,252,255,7,0,0,193,
630 252,237,11,61,252,255,7,0,0,15,148,209,137,108,36,8,1,200,139,108,36,48,1, 630 252,237,11,61,252,255,7,0,0,15,132,244,249,248,2,137,108,36,8,139,108,36,
631 200,137,68,36,4,137,116,36,24,139,139,233,137,44,36,59,139,233,137,149,233, 631 48,137,68,36,4,137,116,36,24,139,131,233,137,44,36,59,131,233,137,149,233,
632 15,131,244,248,248,1,232,251,1,27,139,149,233,15,182,78,252,253,137,4,202, 632 15,131,244,251,248,1,232,251,1,27,139,149,233,15,182,78,252,253,137,4,202,
633 199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 633 199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,
634 36,171,248,2,137,252,233,232,251,1,28,252,233,244,1,255,252,247,208,139,108, 634 36,171,248,3,184,1,8,0,0,252,233,244,2,248,5,137,252,233,232,251,1,28,252,
635 36,48,139,139,233,137,116,36,24,59,139,233,137,149,233,15,131,244,249,248, 635 233,244,1,255,252,247,208,139,108,36,48,139,139,233,137,116,36,24,59,139,
636 2,139,20,135,137,252,233,232,251,1,29,139,149,233,15,182,78,252,253,137,4, 636 233,137,149,233,15,131,244,249,248,2,139,20,135,137,252,233,232,251,1,29,
637 202,199,68,202,4,237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 637 139,149,233,15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182,204,
638 255,36,171,248,3,137,252,233,232,251,1,28,15,183,70,252,254,252,247,208,252, 638 15,182,232,131,198,4,193,232,16,252,255,36,171,248,3,137,252,233,232,251,
639 233,244,2,255,252,247,208,139,106,252,248,139,173,233,139,4,135,252,233,244, 639 1,28,15,183,70,252,254,252,247,208,252,233,244,2,255,252,247,208,139,106,
640 154,255,252,247,208,139,106,252,248,139,173,233,139,4,135,252,233,244,155, 640 252,248,139,173,233,139,4,135,252,233,244,154,255,252,247,208,139,106,252,
641 255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,36,139, 641 248,139,173,233,139,4,135,252,233,244,155,255,15,182,252,236,15,182,192,129,
642 44,252,234,129,124,253,194,4,239,15,135,244,251,255,252,242,15,16,4,194,252, 642 124,253,252,234,4,239,15,133,244,36,139,44,252,234,129,124,253,194,4,239,
643 242,15,45,192,252,242,15,42,200,102,15,46,193,255,221,4,194,219,20,36,219, 643 15,135,244,251,255,252,242,15,16,4,194,252,242,15,45,192,252,242,15,42,200,
644 4,36,255,15,133,244,36,59,133,233,15,131,244,36,193,224,3,3,133,233,129,120, 644 102,15,46,193,255,221,4,194,219,20,36,219,4,36,255,15,133,244,36,59,133,233,
645 253,4,239,15,132,244,248,248,1,139,40,139,64,4,137,44,202,137,68,202,4,139, 645 15,131,244,36,193,224,3,3,133,233,129,120,253,4,239,15,132,244,248,248,1,
646 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,2,131,189, 646 139,40,139,64,4,137,44,202,137,68,202,4,139,6,15,182,204,15,182,232,131,198,
647 233,0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,36,15,182,78, 647 4,193,232,16,252,255,36,171,248,2,131,189,233,0,15,132,244,1,139,141,233,
648 252,253,252,233,244,1,248,5,255,129,124,253,194,4,239,15,133,244,36,139,4, 648 252,246,129,233,235,15,132,244,36,15,182,78,252,253,252,233,244,1,248,5,255,
649 194,252,233,244,154,255,15,182,252,236,15,182,192,252,247,208,139,4,135,129, 649 129,124,253,194,4,239,15,133,244,36,139,4,194,252,233,244,154,255,15,182,
650 124,253,252,234,4,239,15,133,244,34,139,44,252,234,248,154,139,141,233,35, 650 252,236,15,182,192,252,247,208,139,4,135,129,124,253,252,234,4,239,15,133,
651 136,233,105,201,239,3,141,233,248,1,129,185,233,239,15,133,244,250,57,129, 651 244,34,139,44,252,234,248,154,139,141,233,35,136,233,105,201,239,3,141,233,
652 233,15,133,244,250,129,121,253,4,239,15,132,244,251,15,182,70,252,253,139, 652 248,1,129,185,233,239,15,133,244,250,57,129,233,15,133,244,250,129,121,253,
653 41,139,73,4,137,44,194,248,2,255,137,76,194,4,139,6,15,182,204,15,182,232, 653 4,239,15,132,244,251,15,182,70,252,253,139,41,139,73,4,137,44,194,248,2,255,
654 131,198,4,193,232,16,252,255,36,171,248,3,15,182,70,252,253,185,237,252,233, 654 137,76,194,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,
655 244,2,248,4,139,137,233,133,201,15,133,244,1,248,5,139,141,233,133,201,15, 655 171,248,3,15,182,70,252,253,185,237,252,233,244,2,248,4,139,137,233,133,201,
656 132,244,3,252,246,129,233,235,15,133,244,3,252,233,244,34,255,15,182,252, 656 15,133,244,1,248,5,139,141,233,133,201,15,132,244,3,252,246,129,233,235,15,
657 236,15,182,192,129,124,253,252,234,4,239,15,133,244,35,139,44,252,234,59, 657 133,244,3,252,233,244,34,255,15,182,252,236,15,182,192,129,124,253,252,234,
658 133,233,15,131,244,35,193,224,3,3,133,233,129,120,253,4,239,15,132,244,248, 658 4,239,15,133,244,35,139,44,252,234,59,133,233,15,131,244,35,193,224,3,3,133,
659 248,1,139,40,139,64,4,137,44,202,137,68,202,4,139,6,15,182,204,15,182,232, 659 233,129,120,253,4,239,15,132,244,248,248,1,139,40,139,64,4,137,44,202,137,
660 131,198,4,193,232,16,252,255,36,171,248,2,131,189,233,0,15,132,244,1,139, 660 68,202,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,
661 141,233,252,246,129,233,235,15,132,244,35,255,15,182,252,236,15,182,192,129, 661 248,2,131,189,233,0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,
662 124,253,252,234,4,239,15,133,244,39,139,44,252,234,129,124,253,194,4,239, 662 35,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,39,
663 15,135,244,251,255,15,133,244,39,59,133,233,15,131,244,39,193,224,3,3,133, 663 139,44,252,234,129,124,253,194,4,239,15,135,244,251,255,15,133,244,39,59,
664 133,233,15,131,244,39,193,224,3,3,133,233,129,120,253,4,239,15,132,244,249,
665 248,1,252,246,133,233,235,15,133,244,253,248,2,139,108,202,4,139,12,202,137,
666 104,4,137,8,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,
667 248,3,131,189,233,0,15,132,244,1,139,141,233,255,252,246,129,233,235,15,132,
668 244,39,15,182,78,252,253,252,233,244,1,248,5,129,124,253,194,4,239,15,133,
669 244,39,139,4,194,252,233,244,155,248,7,128,165,233,235,139,139,233,137,171,
670 233,137,141,233,15,182,78,252,253,252,233,244,2,255,15,182,252,236,15,182,
671 192,252,247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,37,139,44,
672 252,234,248,155,139,141,233,35,136,233,105,201,239,198,133,233,0,3,141,233,
673 248,1,129,185,233,239,15,133,244,251,57,129,233,15,133,244,251,129,121,253,
674 4,239,15,132,244,250,248,2,255,252,246,133,233,235,15,133,244,253,248,3,15,
675 182,70,252,253,139,108,194,4,139,4,194,137,105,4,137,1,139,6,15,182,204,15,
676 182,232,131,198,4,193,232,16,252,255,36,171,248,4,131,189,233,0,15,132,244,
677 2,137,76,36,16,139,141,233,252,246,129,233,235,15,132,244,37,139,76,36,16,
678 252,233,244,2,248,5,139,137,233,133,201,15,133,244,1,255,139,141,233,133,
679 201,15,132,244,252,252,246,129,233,235,15,132,244,37,248,6,137,68,36,16,199,
680 68,36,20,237,137,108,36,12,141,68,36,16,137,108,36,4,139,108,36,48,137,68,
681 36,8,137,44,36,137,149,233,137,116,36,24,232,251,1,30,139,149,233,139,108,
682 36,12,137,193,252,233,244,2,248,7,128,165,233,235,139,131,233,137,171,233,
683 137,133,233,252,233,244,3,255,15,182,252,236,15,182,192,129,124,253,252,234,
684 4,239,15,133,244,38,139,44,252,234,59,133,233,15,131,244,38,193,224,3,3,133,
664 233,129,120,253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244, 685 233,129,120,253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244,
665 253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,139,6,15,182,204,15,182, 686 253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,139,6,15,182,204,15,182,
666 232,131,198,4,193,232,16,252,255,36,171,248,3,131,189,233,0,15,132,244,1, 687 232,131,198,4,193,232,16,252,255,36,171,248,3,131,189,233,0,15,132,244,1,
667 139,141,233,255,252,246,129,233,235,15,132,244,39,15,182,78,252,253,252,233, 688 255,139,141,233,252,246,129,233,235,15,132,244,38,15,182,78,252,253,252,233,
668 244,1,248,5,129,124,253,194,4,239,15,133,244,39,139,4,194,252,233,244,155, 689 244,1,248,7,128,165,233,235,139,139,233,137,171,233,137,141,233,15,182,78,
669 248,7,128,165,233,235,139,139,233,137,171,233,137,141,233,15,182,78,252,253, 690 252,253,252,233,244,2,255,137,124,36,16,255,221,4,199,219,92,36,12,255,248,
670 252,233,244,2,255,15,182,252,236,15,182,192,252,247,208,139,4,135,129,124, 691 1,141,12,202,139,105,252,248,252,246,133,233,235,15,133,244,253,248,2,139,
671 253,252,234,4,239,15,133,244,37,139,44,252,234,248,155,139,141,233,35,136, 692 68,36,20,255,252,242,15,45,252,248,255,139,124,36,12,255,131,232,1,15,132,
672 233,105,201,239,198,133,233,0,3,141,233,248,1,129,185,233,239,15,133,244, 693 244,250,1,252,248,59,133,233,15,131,244,251,41,252,248,193,231,3,3,189,233,
673 251,57,129,233,15,133,244,251,129,121,253,4,239,15,132,244,250,248,2,255, 694 248,3,139,41,137,47,139,105,4,131,193,8,137,111,4,131,199,8,131,232,1,15,
674 252,246,133,233,235,15,133,244,253,248,3,15,182,70,252,253,139,108,194,4, 695 133,244,3,248,4,139,124,36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,
675 139,4,194,137,105,4,137,1,139,6,15,182,204,15,182,232,131,198,4,193,232,16, 696 16,252,255,36,171,248,5,137,108,36,4,139,108,36,48,137,149,233,137,68,36,
676 252,255,36,171,248,4,131,189,233,0,15,132,244,2,137,76,36,16,139,141,233, 697 8,137,44,36,137,116,36,24,232,251,1,31,139,149,233,15,182,78,252,253,252,
677 252,246,129,233,235,15,132,244,37,139,76,36,16,252,233,244,2,248,5,139,137, 698 233,244,1,248,7,128,165,233,235,139,131,233,137,171,233,255,137,133,233,252,
678 233,133,201,15,133,244,1,255,139,141,233,133,201,15,132,244,252,252,246,129, 699 233,244,2,255,3,68,36,20,255,141,76,202,8,139,105,252,248,129,121,253,252,
679 233,235,15,132,244,37,248,6,137,68,36,16,199,68,36,20,237,141,68,36,16,137, 700 252,239,15,133,244,29,252,255,165,233,255,141,76,202,8,137,215,139,105,252,
680 108,36,12,137,108,36,4,139,108,36,48,137,68,36,8,137,44,36,137,116,36,24, 701 248,129,121,253,252,252,239,15,133,244,29,248,51,139,114,252,252,252,247,
681 137,149,233,232,251,1,30,139,149,233,139,108,36,12,137,193,252,233,244,2, 702 198,237,15,133,244,253,248,1,137,106,252,248,137,68,36,20,131,232,1,15,132,
682 248,7,128,165,233,235,139,131,233,137,171,233,137,133,233,252,233,244,3,255, 703 244,249,248,2,139,41,137,47,139,105,4,137,111,4,131,199,8,131,193,8,131,232,
683 15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,38,139,44, 704 1,15,133,244,2,139,106,252,248,248,3,137,209,128,189,233,1,15,135,244,251,
684 252,234,59,133,233,15,131,244,38,193,224,3,3,133,233,129,120,253,4,239,15, 705 248,4,139,68,36,20,252,255,165,233,248,5,255,252,247,198,237,15,133,244,4,
685 132,244,249,248,1,252,246,133,233,235,15,133,244,253,248,2,139,108,202,4, 706 15,182,70,252,253,252,247,208,141,20,194,139,122,252,248,139,191,233,139,
686 139,12,202,137,104,4,137,8,139,6,15,182,204,15,182,232,131,198,4,193,232, 707 191,233,252,233,244,4,248,7,15,139,244,1,131,230,252,248,41,252,242,137,215,
687 16,252,255,36,171,248,3,131,189,233,0,15,132,244,1,255,139,141,233,252,246, 708 139,114,252,252,252,233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,
688 129,233,235,15,132,244,38,15,182,78,252,253,252,233,244,1,248,7,128,165,233, 709 137,41,137,65,4,139,105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,
689 235,139,139,233,137,171,233,137,141,233,15,182,78,252,253,252,233,244,2,255, 710 224,139,65,228,137,105,252,248,137,65,252,252,129,252,248,239,184,3,0,0,0,
690 137,124,36,16,255,221,4,199,219,92,36,12,255,248,1,141,12,202,139,105,252, 711 15,133,244,29,252,255,165,233,255,15,182,252,236,139,66,252,248,141,12,202,
691 248,252,246,133,233,235,15,133,244,253,248,2,139,68,36,20,255,252,242,15, 712 139,128,233,15,182,128,233,137,124,36,16,141,188,253,194,233,43,122,252,252,
692 45,252,248,255,139,124,36,12,255,131,232,1,15,132,244,250,1,252,248,59,133, 713 133,252,237,15,132,244,251,141,108,252,233,252,248,57,215,15,131,244,248,
693 233,15,131,244,251,41,252,248,193,231,3,3,189,233,248,3,139,41,137,47,139, 714 248,1,139,71,252,248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,
694 105,4,131,193,8,137,111,4,131,199,8,131,232,1,15,133,244,3,248,4,139,124, 715 252,233,15,131,244,249,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,
695 36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248, 716 252,233,15,130,244,2,248,3,139,124,36,16,139,6,15,182,204,15,182,232,131,
696 5,137,108,36,4,139,108,36,48,137,68,36,8,137,44,36,137,116,36,24,137,149, 717 198,4,193,232,16,252,255,36,171,248,5,199,68,36,20,1,0,0,0,137,208,41,252,
697 233,232,251,1,31,139,149,233,15,182,78,252,253,252,233,244,1,248,7,128,165, 718 248,15,134,244,3,255,137,197,193,252,237,3,131,197,1,137,108,36,20,139,108,
698 233,235,139,131,233,137,171,233,255,137,133,233,252,233,244,2,255,3,68,36, 719 36,48,1,200,59,133,233,15,135,244,253,248,6,139,71,252,248,137,1,139,71,252,
699 20,255,141,76,202,8,139,105,252,248,129,121,253,252,252,239,15,133,244,29, 720 252,131,199,8,137,65,4,131,193,8,57,215,15,130,244,6,252,233,244,3,248,7,
700 252,255,165,233,255,141,76,202,8,137,215,139,105,252,248,129,121,253,252, 721 137,149,233,137,141,233,137,116,36,24,41,215,139,84,36,20,131,252,234,1,137,
701 252,239,15,133,244,29,248,51,139,114,252,252,252,247,198,237,15,133,244,253, 722 252,233,232,251,1,0,139,149,233,139,141,233,1,215,252,233,244,6,255,193,225,
702 248,1,137,106,252,248,137,68,36,20,131,232,1,15,132,244,249,248,2,139,41, 723 3,255,248,1,139,114,252,252,137,68,36,20,252,247,198,237,15,133,244,253,255,
703 137,47,139,105,4,137,111,4,131,199,8,131,193,8,131,232,1,15,133,244,2,139, 724 248,17,137,215,131,232,1,15,132,244,249,248,2,139,44,15,137,111,252,248,139,
704 106,252,248,248,3,137,209,128,189,233,1,15,135,244,251,248,4,139,68,36,20, 725 108,15,4,137,111,252,252,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,
705 252,255,165,233,248,5,255,252,247,198,237,15,133,244,4,15,182,70,252,253, 726 20,15,182,110,252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,
706 252,247,208,141,20,194,139,122,252,248,139,191,233,139,191,233,252,233,244, 727 252,252,139,44,10,137,106,252,248,255,248,5,56,70,252,255,15,135,244,252,
707 4,248,7,15,139,244,1,131,230,252,248,41,252,242,137,215,139,114,252,252,252, 728 255,15,182,78,252,253,252,247,209,141,20,202,139,122,252,248,139,191,233,
708 233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,137,41,137,65,4,139, 729 139,191,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,
709 105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,224,139,65,228,137, 730 248,6,255,199,71,252,252,237,131,199,8,255,199,68,194,252,244,237,255,131,
710 105,252,248,137,65,252,252,129,252,248,239,184,3,0,0,0,15,133,244,29,252, 731 192,1,252,233,244,5,248,7,15,139,244,18,131,230,252,248,41,252,242,255,1,
711 255,165,233,255,15,182,252,236,139,66,252,248,141,12,202,139,128,233,15,182, 732 252,241,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,
712 128,233,137,124,36,16,141,188,253,194,233,43,122,252,252,133,252,237,15,132, 733 15,132,244,138,255,141,12,202,255,129,121,253,4,239,15,135,244,52,129,121,
713 244,251,141,108,252,233,252,248,57,215,15,131,244,248,248,1,139,71,252,248, 734 253,12,239,15,135,244,52,255,139,105,20,255,129,252,253,239,15,135,244,52,
714 137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,252,233,15,131,244,249, 735 255,252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,
715 57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,233,15,130,244,2, 736 17,1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,
716 248,3,139,124,36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252, 737 1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,
717 255,36,171,248,5,199,68,36,20,1,0,0,0,137,208,41,252,248,15,134,244,3,255, 738 252,237,15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,
718 137,197,193,252,237,3,131,197,1,137,108,36,20,139,108,36,48,1,200,59,133, 739 15,183,70,252,254,255,15,131,244,248,141,180,253,134,233,255,141,180,253,
719 233,15,135,244,253,248,6,139,71,252,248,137,1,139,71,252,252,131,199,8,137, 740 134,233,15,183,70,252,254,15,131,245,255,15,130,244,248,141,180,253,134,233,
720 65,4,131,193,8,57,215,15,130,244,6,252,233,244,3,248,7,137,149,233,137,141, 741 255,248,3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,
721 233,137,116,36,24,41,215,139,84,36,20,131,252,234,1,137,252,233,232,251,1, 742 239,15,132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,
722 0,139,149,233,139,141,233,1,215,252,233,244,6,255,193,225,3,255,248,1,139, 743 255,141,180,253,134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,
723 114,252,252,137,68,36,20,252,247,198,237,15,133,244,253,255,248,17,137,215, 744 233,139,4,129,139,128,233,139,108,36,48,137,147,233,137,171,233,252,255,224,
724 131,232,1,15,132,244,249,248,2,139,44,15,137,111,252,248,139,108,15,4,137, 745 255,141,180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
725 111,252,252,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,20,15,182,110, 746 252,255,36,171,255,254,0
726 252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,252,252,139,
727 44,10,137,106,252,248,255,248,5,56,70,252,255,15,135,244,252,255,15,182,78,
728 252,253,252,247,209,141,20,202,139,122,252,248,139,191,233,139,191,233,139,
729 6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,6,255,199,
730 71,252,252,237,131,199,8,255,199,68,194,252,244,237,255,131,192,1,252,233,
731 244,5,248,7,15,139,244,18,131,230,252,248,41,252,242,255,1,252,241,255,137,
732 252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,138,255,
733 141,12,202,255,129,121,253,4,239,15,135,244,52,129,121,253,12,239,15,135,
734 244,52,255,139,105,20,255,129,252,253,239,15,135,244,52,255,252,242,15,16,
735 1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133,252,237,
736 15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,242,15,17,65,
737 24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237,15,136,244,
738 247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,183,70,252,254,
739 255,15,131,244,248,141,180,253,134,233,255,141,180,253,134,233,15,183,70,
740 252,254,15,131,245,255,15,130,244,248,141,180,253,134,233,255,248,3,102,15,
741 46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,239,15,132,244,
742 247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,255,141,180,253,
743 134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,233,139,4,129,139,
744 128,233,139,108,36,48,137,147,233,137,171,233,252,255,224,255,141,180,253,
745 134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,
746 254,0
747}; 747};
748 748
749enum { 749enum {
@@ -2024,22 +2024,22 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2024 dasm_put(Dst, 12774, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 2024 dasm_put(Dst, 12774, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
2025 break; 2025 break;
2026 case BC_TDUP: 2026 case BC_TDUP:
2027 dasm_put(Dst, 12885, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); 2027 dasm_put(Dst, 12895, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB);
2028 break; 2028 break;
2029 2029
2030 case BC_GGET: 2030 case BC_GGET:
2031 dasm_put(Dst, 12977, Dt7(->env)); 2031 dasm_put(Dst, 12987, Dt7(->env));
2032 break; 2032 break;
2033 case BC_GSET: 2033 case BC_GSET:
2034 dasm_put(Dst, 12995, Dt7(->env)); 2034 dasm_put(Dst, 13005, Dt7(->env));
2035 break; 2035 break;
2036 2036
2037 case BC_TGETV: 2037 case BC_TGETV:
2038 dasm_put(Dst, 13013, LJ_TTAB, LJ_TISNUM); 2038 dasm_put(Dst, 13023, LJ_TTAB, LJ_TISNUM);
2039 if (sse) { 2039 if (sse) {
2040 dasm_put(Dst, 13046); 2040 dasm_put(Dst, 13056);
2041 } else { 2041 } else {
2042 dasm_put(Dst, 13067); 2042 dasm_put(Dst, 13077);
2043 if (cmov) { 2043 if (cmov) {
2044 dasm_put(Dst, 11132); 2044 dasm_put(Dst, 11132);
2045 } else { 2045 } else {
@@ -2047,24 +2047,24 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2047 } 2047 }
2048 dasm_put(Dst, 2856); 2048 dasm_put(Dst, 2856);
2049 } 2049 }
2050 dasm_put(Dst, 13077, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2050 dasm_put(Dst, 13087, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2051 dasm_put(Dst, 13169, LJ_TSTR); 2051 dasm_put(Dst, 13179, LJ_TSTR);
2052 break; 2052 break;
2053 case BC_TGETS: 2053 case BC_TGETS:
2054 dasm_put(Dst, 13187, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2054 dasm_put(Dst, 13197, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2055 dasm_put(Dst, 13271, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2055 dasm_put(Dst, 13281, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2056 break; 2056 break;
2057 case BC_TGETB: 2057 case BC_TGETB:
2058 dasm_put(Dst, 13342, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 2058 dasm_put(Dst, 13352, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
2059 dasm_put(Dst, 11703); 2059 dasm_put(Dst, 11703);
2060 break; 2060 break;
2061 2061
2062 case BC_TSETV: 2062 case BC_TSETV:
2063 dasm_put(Dst, 13441, LJ_TTAB, LJ_TISNUM); 2063 dasm_put(Dst, 13451, LJ_TTAB, LJ_TISNUM);
2064 if (sse) { 2064 if (sse) {
2065 dasm_put(Dst, 13046); 2065 dasm_put(Dst, 13056);
2066 } else { 2066 } else {
2067 dasm_put(Dst, 13067); 2067 dasm_put(Dst, 13077);
2068 if (cmov) { 2068 if (cmov) {
2069 dasm_put(Dst, 11132); 2069 dasm_put(Dst, 11132);
2070 } else { 2070 } else {
@@ -2072,34 +2072,34 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2072 } 2072 }
2073 dasm_put(Dst, 2856); 2073 dasm_put(Dst, 2856);
2074 } 2074 }
2075 dasm_put(Dst, 13474, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); 2075 dasm_put(Dst, 13484, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable));
2076 dasm_put(Dst, 13557, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2076 dasm_put(Dst, 13567, Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2077 break; 2077 break;
2078 case BC_TSETS: 2078 case BC_TSETS:
2079 dasm_put(Dst, 13619, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); 2079 dasm_put(Dst, 13629, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL);
2080 dasm_put(Dst, 13694, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next)); 2080 dasm_put(Dst, 13704, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DtB(->next));
2081 dasm_put(Dst, 13786, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2081 dasm_put(Dst, 13796, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, LJ_TSTR, Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2082 break; 2082 break;
2083 case BC_TSETB: 2083 case BC_TSETB:
2084 dasm_put(Dst, 13882, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); 2084 dasm_put(Dst, 13892, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable));
2085 dasm_put(Dst, 13980, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); 2085 dasm_put(Dst, 13990, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
2086 break; 2086 break;
2087 2087
2088 case BC_TSETM: 2088 case BC_TSETM:
2089 dasm_put(Dst, 14026); 2089 dasm_put(Dst, 14036);
2090 if (sse) { 2090 if (sse) {
2091 dasm_put(Dst, 12596); 2091 dasm_put(Dst, 12596);
2092 } else { 2092 } else {
2093 dasm_put(Dst, 14031); 2093 dasm_put(Dst, 14041);
2094 } 2094 }
2095 dasm_put(Dst, 14039, Dt6(->marked), LJ_GC_BLACK); 2095 dasm_put(Dst, 14049, Dt6(->marked), LJ_GC_BLACK);
2096 if (sse) { 2096 if (sse) {
2097 dasm_put(Dst, 14064); 2097 dasm_put(Dst, 14074);
2098 } else { 2098 } else {
2099 dasm_put(Dst, 14071); 2099 dasm_put(Dst, 14081);
2100 } 2100 }
2101 dasm_put(Dst, 14076, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); 2101 dasm_put(Dst, 14086, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain));
2102 dasm_put(Dst, 14204, Dt6(->gclist)); 2102 dasm_put(Dst, 14214, Dt6(->gclist));
2103 break; 2103 break;
2104 2104
2105 /* -- Calls and vararg handling ----------------------------------------- */ 2105 /* -- Calls and vararg handling ----------------------------------------- */
@@ -2107,60 +2107,60 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2107 case BC_CALL: case BC_CALLM: 2107 case BC_CALL: case BC_CALLM:
2108 dasm_put(Dst, 11717); 2108 dasm_put(Dst, 11717);
2109 if (op == BC_CALLM) { 2109 if (op == BC_CALLM) {
2110 dasm_put(Dst, 14212); 2110 dasm_put(Dst, 14222);
2111 } 2111 }
2112 dasm_put(Dst, 14217, LJ_TFUNC, Dt7(->gate)); 2112 dasm_put(Dst, 14227, LJ_TFUNC, Dt7(->gate));
2113 break; 2113 break;
2114 2114
2115 case BC_CALLMT: 2115 case BC_CALLMT:
2116 dasm_put(Dst, 14212); 2116 dasm_put(Dst, 14222);
2117 break; 2117 break;
2118 case BC_CALLT: 2118 case BC_CALLT:
2119 dasm_put(Dst, 14240, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->gate)); 2119 dasm_put(Dst, 14250, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->gate));
2120 dasm_put(Dst, 14345, FRAME_TYPE, Dt7(->pt), Dt9(->k)); 2120 dasm_put(Dst, 14355, FRAME_TYPE, Dt7(->pt), Dt9(->k));
2121 break; 2121 break;
2122 2122
2123 case BC_ITERC: 2123 case BC_ITERC:
2124 dasm_put(Dst, 14402, LJ_TFUNC, Dt7(->gate)); 2124 dasm_put(Dst, 14412, LJ_TFUNC, Dt7(->gate));
2125 break; 2125 break;
2126 2126
2127 case BC_VARG: 2127 case BC_VARG:
2128 dasm_put(Dst, 14464, Dt7(->pt), Dt9(->numparams), (8+FRAME_VARG), LJ_TNIL); 2128 dasm_put(Dst, 14474, Dt7(->pt), Dt9(->numparams), (8+FRAME_VARG), LJ_TNIL);
2129 dasm_put(Dst, 14608, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 2129 dasm_put(Dst, 14618, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
2130 break; 2130 break;
2131 2131
2132 /* -- Returns ----------------------------------------------------------- */ 2132 /* -- Returns ----------------------------------------------------------- */
2133 2133
2134 case BC_RETM: 2134 case BC_RETM:
2135 dasm_put(Dst, 14212); 2135 dasm_put(Dst, 14222);
2136 break; 2136 break;
2137 2137
2138 case BC_RET: case BC_RET0: case BC_RET1: 2138 case BC_RET: case BC_RET0: case BC_RET1:
2139 if (op != BC_RET0) { 2139 if (op != BC_RET0) {
2140 dasm_put(Dst, 14707); 2140 dasm_put(Dst, 14717);
2141 } 2141 }
2142 dasm_put(Dst, 14711, FRAME_TYPE); 2142 dasm_put(Dst, 14721, FRAME_TYPE);
2143 switch (op) { 2143 switch (op) {
2144 case BC_RET: 2144 case BC_RET:
2145 dasm_put(Dst, 14730); 2145 dasm_put(Dst, 14740);
2146 break; 2146 break;
2147 case BC_RET1: 2147 case BC_RET1:
2148 dasm_put(Dst, 14788); 2148 dasm_put(Dst, 14798);
2149 /* fallthrough */ 2149 /* fallthrough */
2150 case BC_RET0: 2150 case BC_RET0:
2151 dasm_put(Dst, 14804); 2151 dasm_put(Dst, 14814);
2152 default: 2152 default:
2153 break; 2153 break;
2154 } 2154 }
2155 dasm_put(Dst, 14815, Dt7(->pt), Dt9(->k)); 2155 dasm_put(Dst, 14825, Dt7(->pt), Dt9(->k));
2156 if (op == BC_RET) { 2156 if (op == BC_RET) {
2157 dasm_put(Dst, 14857, LJ_TNIL); 2157 dasm_put(Dst, 14867, LJ_TNIL);
2158 } else { 2158 } else {
2159 dasm_put(Dst, 14866, LJ_TNIL); 2159 dasm_put(Dst, 14876, LJ_TNIL);
2160 } 2160 }
2161 dasm_put(Dst, 14873); 2161 dasm_put(Dst, 14883);
2162 if (op != BC_RET0) { 2162 if (op != BC_RET0) {
2163 dasm_put(Dst, 14894); 2163 dasm_put(Dst, 14904);
2164 } 2164 }
2165 dasm_put(Dst, 5061); 2165 dasm_put(Dst, 5061);
2166 break; 2166 break;
@@ -2170,7 +2170,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2170 2170
2171 case BC_FORL: 2171 case BC_FORL:
2172#if LJ_HASJIT 2172#if LJ_HASJIT
2173 dasm_put(Dst, 14898, HOTCOUNT_PCMASK, GG_DISP2HOT); 2173 dasm_put(Dst, 14908, HOTCOUNT_PCMASK, GG_DISP2HOT);
2174#endif 2174#endif
2175 break; 2175 break;
2176 2176
@@ -2182,57 +2182,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2182 case BC_FORI: 2182 case BC_FORI:
2183 case BC_IFORL: 2183 case BC_IFORL:
2184 vk = (op == BC_IFORL || op == BC_JFORL); 2184 vk = (op == BC_IFORL || op == BC_JFORL);
2185 dasm_put(Dst, 14919); 2185 dasm_put(Dst, 14929);
2186 if (!vk) { 2186 if (!vk) {
2187 dasm_put(Dst, 14923, LJ_TISNUM, LJ_TISNUM); 2187 dasm_put(Dst, 14933, LJ_TISNUM, LJ_TISNUM);
2188 } 2188 }
2189 dasm_put(Dst, 14942); 2189 dasm_put(Dst, 14952);
2190 if (!vk) { 2190 if (!vk) {
2191 dasm_put(Dst, 14946, LJ_TISNUM); 2191 dasm_put(Dst, 14956, LJ_TISNUM);
2192 } 2192 }
2193 if (sse) { 2193 if (sse) {
2194 dasm_put(Dst, 14955); 2194 dasm_put(Dst, 14965);
2195 if (vk) { 2195 if (vk) {
2196 dasm_put(Dst, 14967); 2196 dasm_put(Dst, 14977);
2197 } else { 2197 } else {
2198 dasm_put(Dst, 14986); 2198 dasm_put(Dst, 14996);
2199 } 2199 }
2200 dasm_put(Dst, 14991); 2200 dasm_put(Dst, 15001);
2201 } else { 2201 } else {
2202 dasm_put(Dst, 15004); 2202 dasm_put(Dst, 15014);
2203 if (vk) { 2203 if (vk) {
2204 dasm_put(Dst, 15010); 2204 dasm_put(Dst, 15020);
2205 } else { 2205 } else {
2206 dasm_put(Dst, 15026); 2206 dasm_put(Dst, 15036);
2207 } 2207 }
2208 dasm_put(Dst, 15034); 2208 dasm_put(Dst, 15044);
2209 if (cmov) { 2209 if (cmov) {
2210 dasm_put(Dst, 11132); 2210 dasm_put(Dst, 11132);
2211 } else { 2211 } else {
2212 dasm_put(Dst, 11138); 2212 dasm_put(Dst, 11138);
2213 } 2213 }
2214 if (!cmov) { 2214 if (!cmov) {
2215 dasm_put(Dst, 15039); 2215 dasm_put(Dst, 15049);
2216 } 2216 }
2217 } 2217 }
2218 if (op == BC_FORI) { 2218 if (op == BC_FORI) {
2219 dasm_put(Dst, 15045, -BCBIAS_J*4); 2219 dasm_put(Dst, 15055, -BCBIAS_J*4);
2220 } else if (op == BC_JFORI) { 2220 } else if (op == BC_JFORI) {
2221 dasm_put(Dst, 15055, -BCBIAS_J*4, BC_JLOOP); 2221 dasm_put(Dst, 15065, -BCBIAS_J*4, BC_JLOOP);
2222 } else if (op == BC_IFORL) { 2222 } else if (op == BC_IFORL) {
2223 dasm_put(Dst, 15069, -BCBIAS_J*4); 2223 dasm_put(Dst, 15079, -BCBIAS_J*4);
2224 } else { 2224 } else {
2225 dasm_put(Dst, 15065, BC_JLOOP); 2225 dasm_put(Dst, 15075, BC_JLOOP);
2226 } 2226 }
2227 dasm_put(Dst, 11167); 2227 dasm_put(Dst, 11167);
2228 if (sse) { 2228 if (sse) {
2229 dasm_put(Dst, 15079); 2229 dasm_put(Dst, 15089);
2230 } 2230 }
2231 break; 2231 break;
2232 2232
2233 case BC_ITERL: 2233 case BC_ITERL:
2234#if LJ_HASJIT 2234#if LJ_HASJIT
2235 dasm_put(Dst, 14898, HOTCOUNT_PCMASK, GG_DISP2HOT); 2235 dasm_put(Dst, 14908, HOTCOUNT_PCMASK, GG_DISP2HOT);
2236#endif 2236#endif
2237 break; 2237 break;
2238 2238
@@ -2241,18 +2241,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2241 break; 2241 break;
2242#endif 2242#endif
2243 case BC_IITERL: 2243 case BC_IITERL:
2244 dasm_put(Dst, 15090, LJ_TNIL); 2244 dasm_put(Dst, 15100, LJ_TNIL);
2245 if (op == BC_JITERL) { 2245 if (op == BC_JITERL) {
2246 dasm_put(Dst, 15105, BC_JLOOP); 2246 dasm_put(Dst, 15115, BC_JLOOP);
2247 } else { 2247 } else {
2248 dasm_put(Dst, 15119, -BCBIAS_J*4); 2248 dasm_put(Dst, 15129, -BCBIAS_J*4);
2249 } 2249 }
2250 dasm_put(Dst, 11464); 2250 dasm_put(Dst, 11464);
2251 break; 2251 break;
2252 2252
2253 case BC_LOOP: 2253 case BC_LOOP:
2254#if LJ_HASJIT 2254#if LJ_HASJIT
2255 dasm_put(Dst, 14898, HOTCOUNT_PCMASK, GG_DISP2HOT); 2255 dasm_put(Dst, 14908, HOTCOUNT_PCMASK, GG_DISP2HOT);
2256#endif 2256#endif
2257 break; 2257 break;
2258 2258
@@ -2262,12 +2262,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
2262 2262
2263 case BC_JLOOP: 2263 case BC_JLOOP:
2264#if LJ_HASJIT 2264#if LJ_HASJIT
2265 dasm_put(Dst, 15135, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 2265 dasm_put(Dst, 15145, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
2266#endif 2266#endif
2267 break; 2267 break;
2268 2268
2269 case BC_JMP: 2269 case BC_JMP:
2270 dasm_put(Dst, 15158, -BCBIAS_J*4); 2270 dasm_put(Dst, 15168, -BCBIAS_J*4);
2271 break; 2271 break;
2272 2272
2273 /* ---------------------------------------------------------------------- */ 2273 /* ---------------------------------------------------------------------- */
@@ -2295,7 +2295,7 @@ static int build_backend(BuildCtx *ctx)
2295 2295
2296 build_subroutines(ctx, cmov, sse); 2296 build_subroutines(ctx, cmov, sse);
2297 2297
2298 dasm_put(Dst, 15182); 2298 dasm_put(Dst, 15192);
2299 for (op = 0; op < BC__MAX; op++) 2299 for (op = 0; op < BC__MAX; op++)
2300 build_ins(ctx, (BCOp)op, op, cmov, sse); 2300 build_ins(ctx, (BCOp)op, op, cmov, sse);
2301 2301