aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2011-05-27 02:05:37 +0200
committerMike Pall <mike>2011-05-27 02:06:05 +0200
commit12dc697eae1d396d7c8a789282e2afa17c5b14b7 (patch)
treedb235ce7c140be882cf7207ea1d9aff0f9779660 /src
parent7683f39786ab05f02dc20307a49dfaf1a1972d7d (diff)
downloadluajit-12dc697eae1d396d7c8a789282e2afa17c5b14b7.tar.gz
luajit-12dc697eae1d396d7c8a789282e2afa17c5b14b7.tar.bz2
luajit-12dc697eae1d396d7c8a789282e2afa17c5b14b7.zip
ARM: Interpreter/JIT integration, part #2.
Diffstat (limited to 'src')
-rw-r--r--src/buildvm_arm.dasc119
-rw-r--r--src/buildvm_arm.h1214
2 files changed, 769 insertions, 564 deletions
diff --git a/src/buildvm_arm.dasc b/src/buildvm_arm.dasc
index f2b08ed9..495181a1 100644
--- a/src/buildvm_arm.dasc
+++ b/src/buildvm_arm.dasc
@@ -336,7 +336,8 @@ static void build_subroutines(BuildCtx *ctx)
336 | 336 |
337 |->vm_unwind_ff: // Unwind C stack, return from ff pcall. 337 |->vm_unwind_ff: // Unwind C stack, return from ff pcall.
338 | // (void *cframe) 338 | // (void *cframe)
339 | bic sp, CARG1, #~CFRAME_RAWMASK 339 | bic CARG1, CARG1, #~CFRAME_RAWMASK // Use two steps: bic sp is deprecated.
340 | mov sp, CARG1
340 |->vm_unwind_ff_eh: // Landing pad for external unwinder. 341 |->vm_unwind_ff_eh: // Landing pad for external unwinder.
341 | ldr L, SAVE_L 342 | ldr L, SAVE_L
342 | mov MASKR8, #255 343 | mov MASKR8, #255
@@ -1921,6 +1922,7 @@ static void build_subroutines(BuildCtx *ctx)
1921 | sub NARGS8:RC, CARG4, BASE 1922 | sub NARGS8:RC, CARG4, BASE
1922 | str CARG2, SAVE_PC // Invalidate for subsequent line hook. 1923 | str CARG2, SAVE_PC // Invalidate for subsequent line hook.
1923 | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] 1924 | ldr LFUNC:CARG3, [BASE, FRAME_FUNC]
1925 | ldr INS, [PC, #-4]
1924 | bx CRET1 1926 | bx CRET1
1925 | 1927 |
1926 |//----------------------------------------------------------------------- 1928 |//-----------------------------------------------------------------------
@@ -1929,11 +1931,74 @@ static void build_subroutines(BuildCtx *ctx)
1929 | 1931 |
1930 |->vm_exit_handler: 1932 |->vm_exit_handler:
1931#if LJ_HASJIT 1933#if LJ_HASJIT
1932 | NYI 1934 | sub sp, sp, #12
1935 | push {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12}
1936 | ldr CARG1, [sp, #64] // Load original value of lr.
1937 | ldr DISPATCH, [lr] // Load DISPATCH.
1938 | add CARG3, sp, #64 // Recompute original value of sp.
1939 | mv_vmstate CARG4, EXIT
1940 | str CARG3, [sp, #52] // Store sp in RID_SP
1941 | st_vmstate CARG4
1942 | ldr CARG2, [CARG1, #-4]! // Get exit instruction.
1943 | str CARG1, [sp, #56] // Store exit pc in RID_LR and RID_PC.
1944 | str CARG1, [sp, #60]
1945 | lsl CARG2, CARG2, #8
1946 | add CARG1, CARG1, CARG2, asr #6
1947 | ldr CARG2, [lr, #4] // Load exit stub group offset.
1948 | sub CARG1, CARG1, lr
1949 | ldr L, [DISPATCH, #DISPATCH_GL(jit_L)]
1950 | add CARG1, CARG2, CARG1, lsr #2 // Compute exit number.
1951 | ldr BASE, [DISPATCH, #DISPATCH_GL(jit_base)]
1952 | str CARG1, [DISPATCH, #DISPATCH_J(exitno)]
1953 | mov CARG4, #0
1954 | str L, [DISPATCH, #DISPATCH_J(L)]
1955 | str BASE, L->base
1956 | str CARG4, [DISPATCH, #DISPATCH_GL(jit_L)]
1957 | sub CARG1, DISPATCH, #-GG_DISP2J
1958 | mov CARG2, sp
1959 | bl extern lj_trace_exit // (jit_State *J, ExitState *ex)
1960 | // Returns MULTRES (unscaled) or negated error code.
1961 | ldr CARG2, L->cframe
1962 | ldr BASE, L->base
1963 | bic CARG2, CARG2, #~CFRAME_RAWMASK // Use two steps: bic sp is deprecated.
1964 | mov sp, CARG2
1965 | ldr PC, SAVE_PC // Get SAVE_PC.
1966 | str L, SAVE_L // Set SAVE_L (on-trace resume/yield).
1967 | b >1
1933#endif 1968#endif
1934 |->vm_exit_interp: 1969 |->vm_exit_interp:
1970 | // CARG1 = MULTRES or negated error code, BASE, PC and DISPATCH set.
1935#if LJ_HASJIT 1971#if LJ_HASJIT
1936 | NYI 1972 | ldr L, SAVE_L
1973 |1:
1974 | cmp CARG1, #0
1975 | blt >3 // Check for error from exit.
1976 | lsl RC, CARG1, #3
1977 | ldr LFUNC:CARG2, [BASE, FRAME_FUNC]
1978 | str RC, SAVE_MULTRES
1979 | mov CARG3, #0
1980 | ldr CARG2, LFUNC:CARG2->field_pc
1981 | str CARG3, [DISPATCH, #DISPATCH_GL(jit_L)]
1982 | mv_vmstate CARG4, INTERP
1983 | ldr KBASE, [CARG2, #PC2PROTO(k)]
1984 | // Modified copy of ins_next which handles function header dispatch, too.
1985 | ldrb OP, [PC]
1986 | mov MASKR8, #255
1987 | ldr INS, [PC], #4
1988 | lsl MASKR8, MASKR8, #3 // MASKR8 = 255*8.
1989 | st_vmstate CARG4
1990 | cmp OP, #BC_FUNCF // Function header?
1991 | ldr OP, [DISPATCH, OP, lsl #2]
1992 | decode_RA8 RA, INS
1993 | lsrlo RC, INS, #16 // No: Decode operands A*8 and D.
1994 | subhs RC, RC, #8
1995 | addhs RA, RA, BASE // Yes: RA = BASE+framesize*8, RC = nargs*8
1996 | bx OP
1997 |
1998 |3: // Rethrow error from the right C frame.
1999 | rsb CARG2, CARG1, #0
2000 | mov CARG1, L
2001 | bl extern lj_err_throw // (lua_State *L, int errcode)
1937#endif 2002#endif
1938 | 2003 |
1939 |//----------------------------------------------------------------------- 2004 |//-----------------------------------------------------------------------
@@ -1945,7 +2010,8 @@ static void build_subroutines(BuildCtx *ctx)
1945 |// double lj_vm_floor/ceil/trunc(double x); 2010 |// double lj_vm_floor/ceil/trunc(double x);
1946 |.macro vm_round, func 2011 |.macro vm_round, func
1947 |->vm_ .. func: 2012 |->vm_ .. func:
1948 | NYI 2013 | // NYI: Use internal implementation.
2014 | b extern func
1949 |.endmacro 2015 |.endmacro
1950 | 2016 |
1951 | vm_round floor 2017 | vm_round floor
@@ -2022,7 +2088,30 @@ static void build_subroutines(BuildCtx *ctx)
2022 | eorlo CARG2, CARG2, #0x80000000 2088 | eorlo CARG2, CARG2, #0x80000000
2023 | biceq CARG2, CARG2, #0x80000000 2089 | biceq CARG2, CARG2, #0x80000000
2024 | bxls lr 2090 | bxls lr
2091#if LJ_HASJIT
2092 | cmp OP, #9
2093 | blo extern atan2
2094 | beq >9 // No support needed for IR_LDEXP.
2095 | cmp OP, #11
2096 | bhi >9
2097 | push {r4, lr}
2098 | beq >1
2099 | // IR_MIN
2100 | bl extern __aeabi_cdcmple
2101 | movhi CARG1, CARG3
2102 | movhi CARG2, CARG4
2103 | pop {r4, pc}
2104 |9:
2105 | NYI // Bad op.
2106 |
2107 |1: // IR_MAX
2108 | bl extern __aeabi_cdcmple
2109 | movlo CARG1, CARG3
2110 | movlo CARG2, CARG4
2111 | pop {r4, pc}
2112#else
2025 | NYI // Other operations only needed by JIT compiler. 2113 | NYI // Other operations only needed by JIT compiler.
2114#endif
2026 | 2115 |
2027 |//----------------------------------------------------------------------- 2116 |//-----------------------------------------------------------------------
2028 |//-- Miscellaneous functions -------------------------------------------- 2117 |//-- Miscellaneous functions --------------------------------------------
@@ -3568,13 +3657,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3568 if (op == BC_FORI) { 3657 if (op == BC_FORI) {
3569 | subgt PC, RC, #0x20000 3658 | subgt PC, RC, #0x20000
3570 } else if (op == BC_JFORI) { 3659 } else if (op == BC_JFORI) {
3571 | subgt PC, RC, #0x20000 3660 | sub PC, RC, #0x20000
3572 | decode_RD RC, INS 3661 | ldrhle RC, [PC, #-2]
3573 | ble =>BC_JLOOP
3574 } else if (op == BC_IFORL) { 3662 } else if (op == BC_IFORL) {
3575 | suble PC, RC, #0x20000 3663 | suble PC, RC, #0x20000
3576 } else {
3577 | ble =>BC_JLOOP
3578 } 3664 }
3579 if (vk) { 3665 if (vk) {
3580 | strd CARG12, FOR_IDX 3666 | strd CARG12, FOR_IDX
@@ -3583,6 +3669,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3583 | ins_next1 3669 | ins_next1
3584 | ins_next2 3670 | ins_next2
3585 | strd CARG12, FOR_EXT 3671 | strd CARG12, FOR_EXT
3672 if (op == BC_JFORI || op == BC_JFORL) {
3673 | ble =>BC_JLOOP
3674 }
3586 |3: 3675 |3:
3587 | ins_next3 3676 | ins_next3
3588 | 3677 |
@@ -3616,8 +3705,8 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3616 if (op == BC_FORI) { 3705 if (op == BC_FORI) {
3617 | subhi PC, RC, #0x20000 3706 | subhi PC, RC, #0x20000
3618 } else if (op == BC_JFORI) { 3707 } else if (op == BC_JFORI) {
3619 | subhi PC, RC, #0x20000 3708 | sub PC, RC, #0x20000
3620 | decode_RD RC, INS 3709 | ldrhls RC, [PC, #-2]
3621 | bls =>BC_JLOOP 3710 | bls =>BC_JLOOP
3622 } else if (op == BC_IFORL) { 3711 } else if (op == BC_IFORL) {
3623 | subls PC, RC, #0x20000 3712 | subls PC, RC, #0x20000
@@ -3687,7 +3776,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3687#if LJ_HASJIT 3776#if LJ_HASJIT
3688 | // RA = base (ignored), RC = traceno 3777 | // RA = base (ignored), RC = traceno
3689 | ldr CARG1, [DISPATCH, #DISPATCH_J(trace)] 3778 | ldr CARG1, [DISPATCH, #DISPATCH_J(trace)]
3779 | mov CARG2, #0 // Traces on ARM don't store the trace number, so use 0.
3690 | ldr TRACE:RC, [CARG1, RC, lsl #2] 3780 | ldr TRACE:RC, [CARG1, RC, lsl #2]
3781 | st_vmstate CARG2
3691 | ldr RA, TRACE:RC->mcode 3782 | ldr RA, TRACE:RC->mcode
3692 | str BASE, [DISPATCH, #DISPATCH_GL(jit_base)] 3783 | str BASE, [DISPATCH, #DISPATCH_GL(jit_base)]
3693 | str L, [DISPATCH, #DISPATCH_GL(jit_L)] 3784 | str L, [DISPATCH, #DISPATCH_GL(jit_L)]
@@ -3723,8 +3814,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3723 | ldr KBASE, [PC, #-4+PC2PROTO(k)] 3814 | ldr KBASE, [PC, #-4+PC2PROTO(k)]
3724 | cmp RA, CARG1 3815 | cmp RA, CARG1
3725 | bhi ->vm_growstack_l 3816 | bhi ->vm_growstack_l
3726 | ins_next1 3817 if (op != BC_JFUNCF) {
3727 | ins_next2 3818 | ins_next1
3819 | ins_next2
3820 }
3728 |2: 3821 |2:
3729 | cmp NARGS8:RC, CARG2, lsl #3 // Check for missing parameters. 3822 | cmp NARGS8:RC, CARG2, lsl #3 // Check for missing parameters.
3730 | mvn CARG4, #~LJ_TNIL 3823 | mvn CARG4, #~LJ_TNIL
diff --git a/src/buildvm_arm.h b/src/buildvm_arm.h
index 8189fdb4..f3b38d1d 100644
--- a/src/buildvm_arm.h
+++ b/src/buildvm_arm.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[5505] = { 15static const unsigned int build_actionlist[5614] = {
160x00010001, 160x00010001,
170x00060014, 170x00060014,
180xe3160000, 180xe3160000,
@@ -121,8 +121,9 @@ static const unsigned int build_actionlist[5505] = {
1210x0005001a, 1210x0005001a,
1220x0006001d, 1220x0006001d,
1230x00000000, 1230x00000000,
1240xe3c0d000, 1240xe3c00000,
1250x000a0000, 1250x000a0000,
1260xe1a0d000,
1260x0006001e, 1270x0006001e,
1270xe59d800c, 1280xe59d800c,
1280xe3a040ff, 1290xe3a040ff,
@@ -2869,29 +2870,114 @@ static const unsigned int build_actionlist[5505] = {
28690xe043b009, 28700xe043b009,
28700xe58d1008, 28710xe58d1008,
28710xe5192008, 28720xe5192008,
28730xe516e004,
28720xe12fff10, 28740xe12fff10,
28730x00060091, 28750x00060091,
28740x00000000, 28760x00000000,
28750xe7f001f0, 28770xe24dd00c,
28780xe92d1fff,
28790xe59d0040,
28800xe59e7000,
28810xe28d2040,
28820xe3e03000,
28830x000a0000,
28840xe58d2034,
28850xe5073000,
28860x000d8180,
28870xe5301004,
28880xe58d0038,
28890xe58d003c,
28900xe1a01401,
28910xe0800341,
28920xe59e1004,
28930xe040000e,
28940xe5178000,
28950x000d8180,
28960xe0810120,
28970xe5179000,
28980x000d8180,
28990xe5070000,
29000x000d8180,
29010xe3a03000,
29020xe5078000,
29030x000d8180,
29040xe5089000,
29050x000d8180,
29060xe5073000,
29070x000d8180,
29080xe2470000,
29090x000a0000,
29100xe1a0100d,
29110xeb000000,
29120x0003002d,
29130xe5181000,
29140x000d8180,
29150xe5189000,
29160x000d8180,
29170xe3c11000,
29180x000a0000,
29190xe1a0d001,
29200xe59d6008,
29210xe58d800c,
29220xea000000,
29230x00050001,
28760x00000000, 29240x00000000,
28770x00060092, 29250x00060092,
28780x00000000, 29260x00000000,
28790xe7f001f0, 29270xe59d800c,
29280x0006000b,
29290xe3500000,
29300xba000000,
29310x00050003,
29320xe1a0b180,
29330xe5191008,
29340xe58db004,
29350xe3a02000,
29360xe5111000,
29370x000d8180,
29380xe5072000,
29390x000d8180,
29400xe3e03000,
29410x000a0000,
29420xe5115000,
29430x000d8180,
29440xe5d6c000,
29450xe3a040ff,
29460xe496e004,
29470xe1a04184,
29480xe5073000,
29490x000d8180,
29500xe35c0000,
29510x000a0000,
29520xe797c10c,
29530xe004a2ae,
29540x31a0b82e,
29550x224bb008,
29560x208aa009,
29570xe12fff1c,
29580x0006000d,
29590xe2601000,
29600xe1a00008,
29610xeb000000,
29620x0003002e,
28800x00000000, 29630x00000000,
28810x00060093, 29640x00060093,
28820xe7f001f0, 29650xea000000,
29660x0003000f,
28830x00060094, 29670x00060094,
28840xe7f001f0, 29680xea000000,
29690x00030010,
28850x00000000, 29700x00000000,
28860x00060095, 29710x00060095,
28870xe7f001f0, 29720xea000000,
29730x0003002f,
28880x00000000, 29740x00000000,
28890x00060095, 29750x00060095,
28900x00000000, 29760x00000000,
28910x00060096, 29770x00060096,
28920xe92d401f, 29780xe92d401f,
28930xeb000000, 29790xeb000000,
28940x0003002d, 29800x00030030,
28950xeb000000, 29810xeb000000,
28960x0003000f, 29820x0003000f,
28970xe1cd20d8, 29830xe1cd20d8,
@@ -2900,7 +2986,7 @@ static const unsigned int build_actionlist[5505] = {
29000xe1cd20d0, 29860xe1cd20d0,
29010xe2211480, 29870xe2211480,
29020xeb000000, 29880xeb000000,
29030x0003002e, 29890x00030031,
29040xe28dd014, 29900xe28dd014,
29050xe8bd8000, 29910xe8bd8000,
29060x00060097, 29920x00060097,
@@ -2937,25 +3023,17 @@ static const unsigned int build_actionlist[5505] = {
29370x42600000, 30230x42600000,
29380xe12fff1e, 30240xe12fff1e,
29390x00060098, 30250x00060098,
29400x00000000,
29410xe7f001f0,
29420x00000000,
29430x00060099,
29440x00000000,
29450xe7f001f0,
29460x00000000,
29470x0006009a,
29480xe59dc000, 30260xe59dc000,
29490xe35c0001, 30270xe35c0001,
29500x3a000000, 30280x3a000000,
29510x0003002e, 30290x00030031,
29520x0a000000, 30300x0a000000,
29530x0003002f, 30310x00030032,
29540xe35c0003, 30320xe35c0003,
29550x3a000000, 30330x3a000000,
29560x00030021, 30340x00030021,
29570x0a000000, 30350x0a000000,
29580x0003002d, 30360x00030030,
29590xe35c0005, 30370xe35c0005,
29600x3a000000, 30380x3a000000,
29610x00050096, 30390x00050096,
@@ -2965,8 +3043,35 @@ static const unsigned int build_actionlist[5505] = {
29650x32211480, 30430x32211480,
29660x03c11480, 30440x03c11480,
29670x912fff1e, 30450x912fff1e,
30460x00000000,
30470xe35c0009,
30480x3a000000,
30490x0003001f,
30500x0a000000,
30510x00050009,
30520xe35c000b,
30530x8a000000,
30540x00050009,
30550xe92d4010,
30560x0a000000,
30570x00050001,
30580xeb000000,
30590x00030026,
30600x81a00002,
30610x81a01003,
30620xe8bd8010,
30630x00060013,
29680xe7f001f0, 30640xe7f001f0,
29690x0006009b, 30650x0006000b,
30660xeb000000,
30670x00030026,
30680x31a00002,
30690x31a01003,
30700xe8bd8010,
30710x00000000,
30720xe7f001f0,
30730x00000000,
30740x00060099,
29700x00000000, 30750x00000000,
29710xe92d4830, 30760xe92d4830,
29720xe1a04000, 30770xe1a04000,
@@ -3091,10 +3196,10 @@ static const unsigned int build_actionlist[5505] = {
30910x000a0000, 31960x000a0000,
30920x00000000, 31970x00000000,
30930x9a000000, 31980x9a000000,
30940x0005009c, 31990x0005009a,
30950x00000000, 32000x00000000,
30960x9a000000, 32010x9a000000,
30970x0005009d, 32020x0005009b,
30980x00000000, 32030x00000000,
30990xe3710000, 32040xe3710000,
31000x000a0000, 32050x000a0000,
@@ -3212,9 +3317,9 @@ static const unsigned int build_actionlist[5505] = {
32120xe2866004, 33170xe2866004,
32130xe086c10c, 33180xe086c10c,
32140x00000000, 33190x00000000,
32150x0006009c, 33200x0006009a,
32160x00000000, 33210x00000000,
32170x0006009d, 33220x0006009b,
32180x00000000, 33230x00000000,
32190xe3710000, 33240xe3710000,
32200x000a0000, 33250x000a0000,
@@ -3263,7 +3368,7 @@ static const unsigned int build_actionlist[5505] = {
32630xe1cb20d0, 33680xe1cb20d0,
32640x0006000f, 33690x0006000f,
32650xeb000000, 33700xeb000000,
32660x00030030, 33710x00030033,
32670x00000000, 33720x00000000,
32680x024a6b80, 33730x024a6b80,
32690x00000000, 33740x00000000,
@@ -3500,7 +3605,7 @@ static const unsigned int build_actionlist[5505] = {
35000x0005003e, 36050x0005003e,
35010x00000000, 36060x00000000,
35020xeb000000, 36070xeb000000,
35030x0003002e, 36080x00030031,
35040xe5d6c000, 36090xe5d6c000,
35050xea000000, 36100xea000000,
35060x0005000e, 36110x0005000e,
@@ -3591,7 +3696,7 @@ static const unsigned int build_actionlist[5505] = {
35910x0005003e, 36960x0005003e,
35920x00000000, 36970x00000000,
35930xeb000000, 36980xeb000000,
35940x0003002f, 36990x00030032,
35950xe5d6c000, 37000xe5d6c000,
35960xea000000, 37010xea000000,
35970x0005000e, 37020x0005000e,
@@ -3740,7 +3845,7 @@ static const unsigned int build_actionlist[5505] = {
37400x0005003e, 38450x0005003e,
37410x00000000, 38460x00000000,
37420xeb000000, 38470xeb000000,
37430x0003002d, 38480x00030030,
37440xe5d6c000, 38490xe5d6c000,
37450xe496e004, 38500xe496e004,
37460xe18900fa, 38510xe18900fa,
@@ -3924,7 +4029,7 @@ static const unsigned int build_actionlist[5505] = {
39240xe58d6008, 40290xe58d6008,
39250xe1a021a2, 40300xe1a021a2,
39260xeb000000, 40310xeb000000,
39270x00030031, 40320x00030034,
39280xe5189000, 40330xe5189000,
39290x000d8180, 40340x000d8180,
39300xe3500000, 40350xe3500000,
@@ -4073,11 +4178,11 @@ static const unsigned int build_actionlist[5505] = {
40730x0005000b, 41780x0005000b,
40740xe1a0b009, 41790xe1a0b009,
40750xeb000000, 41800xeb000000,
40760x00030032, 41810x00030035,
40770xe1a0900b, 41820xe1a0900b,
40780x00000000, 41830x00000000,
40790x1b000000, 41840x1b000000,
40800x00030032, 41850x00030035,
40810x00000000, 41860x00000000,
40820xea000000, 41870xea000000,
40830x0005000b, 41880x0005000b,
@@ -4122,11 +4227,11 @@ static const unsigned int build_actionlist[5505] = {
41220x0005000b, 42270x0005000b,
41230xe1a0b009, 42280xe1a0b009,
41240xeb000000, 42290xeb000000,
41250x00030032, 42300x00030035,
41260xe1a0900b, 42310xe1a0900b,
41270x00000000, 42320x00000000,
41280x1b000000, 42330x1b000000,
41290x00030032, 42340x00030035,
41300x00000000, 42350x00000000,
41310xea000000, 42360xea000000,
41320x0005000b, 42370x0005000b,
@@ -4176,7 +4281,7 @@ static const unsigned int build_actionlist[5505] = {
41760xe1a00008, 42810xe1a00008,
41770xe089100a, 42820xe089100a,
41780xeb000000, 42830xeb000000,
41790x00030033, 42840x00030036,
41800xe5189000, 42850xe5189000,
41810x000d8180, 42860x000d8180,
41820x0006000b, 42870x0006000b,
@@ -4195,7 +4300,7 @@ static const unsigned int build_actionlist[5505] = {
41950xe5192008, 43000xe5192008,
41960xe1a00008, 43010xe1a00008,
41970xeb000000, 43020xeb000000,
41980x00030034, 43030x00030037,
41990xe5189000, 43040xe5189000,
42000x000d8180, 43050x000d8180,
42010xe3e01000, 43060xe3e01000,
@@ -4230,11 +4335,11 @@ static const unsigned int build_actionlist[5505] = {
42300xe37b0001, 43350xe37b0001,
42310x02811002, 43360x02811002,
42320xeb000000, 43370xeb000000,
42330x00030035, 43380x00030038,
42340x00000000, 43390x00000000,
42350xe795110b, 43400xe795110b,
42360xeb000000, 43410xeb000000,
42370x00030036, 43420x00030039,
42380x00000000, 43430x00000000,
42390xe5189000, 43440xe5189000,
42400x000d8180, 43450x000d8180,
@@ -4249,7 +4354,7 @@ static const unsigned int build_actionlist[5505] = {
42490xe12fff1c, 43540xe12fff1c,
42500x0006000f, 43550x0006000f,
42510xeb000000, 43560xeb000000,
42520x00030037, 43570x0003003a,
42530xe1a00008, 43580xe1a00008,
42540xea000000, 43590xea000000,
42550x0005000b, 43600x0005000b,
@@ -4261,10 +4366,10 @@ static const unsigned int build_actionlist[5505] = {
42610xe795b10b, 43660xe795b10b,
42620x00000000, 43670x00000000,
42630xea000000, 43680xea000000,
42640x0005009e, 43690x0005009c,
42650x00000000, 43700x00000000,
42660xea000000, 43710xea000000,
42670x0005009f, 43720x0005009d,
42680x00000000, 43730x00000000,
42690xe004caae, 43740xe004caae,
42700xe004b6ae, 43750xe004b6ae,
@@ -4319,7 +4424,7 @@ static const unsigned int build_actionlist[5505] = {
43190x000a0000, 44240x000a0000,
43200x01a0b002, 44250x01a0b002,
43210x0a000000, 44260x0a000000,
43220x0005009e, 44270x0005009c,
43230xea000000, 44280xea000000,
43240x0005002f, 44290x0005002f,
43250x00000000, 44300x00000000,
@@ -4332,7 +4437,7 @@ static const unsigned int build_actionlist[5505] = {
43320x000a0000, 44370x000a0000,
43330x1a000000, 44380x1a000000,
43340x0005002c, 44390x0005002c,
43350x0006009e, 44400x0006009c,
43360xe5102000, 44410xe5102000,
43370x000d8180, 44420x000d8180,
43380xe51b3000, 44430xe51b3000,
@@ -4510,7 +4615,7 @@ static const unsigned int build_actionlist[5505] = {
45100x000a0000, 46150x000a0000,
45110x01a0b002, 46160x01a0b002,
45120x0a000000, 46170x0a000000,
45130x0005009f, 46180x0005009d,
45140xea000000, 46190xea000000,
45150x00050033, 46200x00050033,
45160x00000000, 46210x00000000,
@@ -4523,7 +4628,7 @@ static const unsigned int build_actionlist[5505] = {
45230x000a0000, 46280x000a0000,
45240x1a000000, 46290x1a000000,
45250x00050030, 46300x00050030,
45260x0006009f, 46310x0006009d,
45270xe5102000, 46320xe5102000,
45280x000d8180, 46330x000d8180,
45290xe51b3000, 46340xe51b3000,
@@ -4612,7 +4717,7 @@ static const unsigned int build_actionlist[5505] = {
46120xe1a0100c, 47170xe1a0100c,
46130xe58d3004, 47180xe58d3004,
46140xeb000000, 47190xeb000000,
46150x00030038, 47200x0003003b,
46160xe5189000, 47210xe5189000,
46170x000d8180, 47220x000d8180,
46180xe18920da, 47230xe18920da,
@@ -4743,7 +4848,7 @@ static const unsigned int build_actionlist[5505] = {
47430xe1a00008, 48480xe1a00008,
47440xe58d6008, 48490xe58d6008,
47450xeb000000, 48500xeb000000,
47460x00030039, 48510x0003003c,
47470x00000000, 48520x00000000,
47480xe5189000, 48530xe5189000,
47490x000d8180, 48540x000d8180,
@@ -4768,10 +4873,10 @@ static const unsigned int build_actionlist[5505] = {
47680xe004b6ae, 48730xe004b6ae,
47690xe08bb000, 48740xe08bb000,
47700xea000000, 48750xea000000,
47710x000500a0, 48760x0005009e,
47720x00000000, 48770x00000000,
47730xe004b6ae, 48780xe004b6ae,
47740x000600a0, 48790x0006009e,
47750xe1a0c009, 48800xe1a0c009,
47760xe1a920da, 48810xe1a920da,
47770xe24bb008, 48820xe24bb008,
@@ -4793,10 +4898,10 @@ static const unsigned int build_actionlist[5505] = {
47930xe59d0004, 48980xe59d0004,
47940xe080b18b, 48990xe080b18b,
47950xea000000, 49000xea000000,
47960x000500a1, 49010x0005009f,
47970x00000000, 49020x00000000,
47980xe1a0b18b, 49030xe1a0b18b,
47990x000600a1, 49040x0006009f,
48000xe1aa20d9, 49050xe1aa20d9,
48010xe24bb008, 49060xe24bb008,
48020xe28aa008, 49070xe28aa008,
@@ -5072,12 +5177,12 @@ static const unsigned int build_actionlist[5505] = {
50720xe089a00a, 51770xe089a00a,
50730xe080b18b, 51780xe080b18b,
50740xea000000, 51790xea000000,
50750x000500a2, 51800x000500a0,
50760x00000000, 51810x00000000,
50770xe5196004, 51820xe5196004,
50780xe1a0b18b, 51830xe1a0b18b,
50790xe089a00a, 51840xe089a00a,
50800x000600a2, 51850x000600a0,
50810xe58db004, 51860xe58db004,
50820x0006000b, 51870x0006000b,
50830xe2160000, 51880xe2160000,
@@ -5085,7 +5190,7 @@ static const unsigned int build_actionlist[5505] = {
50850xe2261000, 51900xe2261000,
50860x000a0000, 51910x000a0000,
50870x1a000000, 51920x1a000000,
50880x000500a3, 51930x000500a1,
50890x00060017, 51940x00060017,
50900xe516e004, 51950xe516e004,
50910xe25b3008, 51960xe25b3008,
@@ -5127,9 +5232,9 @@ static const unsigned int build_actionlist[5505] = {
51270xe509100c, 52320xe509100c,
51280xea000000, 52330xea000000,
51290x0005000f, 52340x0005000f,
51300x000600a4, 52350x000600a2,
51310xe089a00a, 52360xe089a00a,
51320x000600a3, 52370x000600a1,
51330xe3110000, 52380xe3110000,
51340x000a0000, 52390x000a0000,
51350x1a000000, 52400x1a000000,
@@ -5148,7 +5253,7 @@ static const unsigned int build_actionlist[5505] = {
51480x000a0000, 52530x000a0000,
51490x0516e004, 52540x0516e004,
51500x1a000000, 52550x1a000000,
51510x000500a4, 52560x000500a2,
51520x00000000, 52570x00000000,
51530xe18900da, 52580xe18900da,
51540x00000000, 52590x00000000,
@@ -5237,22 +5342,21 @@ static const unsigned int build_actionlist[5505] = {
52370x00000000, 53420x00000000,
52380xc24b6b80, 53430xc24b6b80,
52390x00000000, 53440x00000000,
52400xc24b6b80, 53450xe24b6b80,
52410xe1a0b82e, 53460xd156b0b2,
52420xda000000,
52430x00070000,
52440x00000000, 53470x00000000,
52450xd24b6b80, 53480xd24b6b80,
52460x00000000, 53490x00000000,
52470xda000000,
52480x00070000,
52490x00000000,
52500xe1ca00f0, 53500xe1ca00f0,
52510x00000000, 53510x00000000,
52520x0006000c, 53520x0006000c,
52530xe5d6c000, 53530xe5d6c000,
52540xe496e004, 53540xe496e004,
52550xe1ca01f8, 53550xe1ca01f8,
53560x00000000,
53570xda000000,
53580x00070000,
53590x00000000,
52560x0006000d, 53600x0006000d,
52570xe797c10c, 53610xe797c10c,
52580xe004a2ae, 53620xe004a2ae,
@@ -5284,7 +5388,7 @@ static const unsigned int build_actionlist[5505] = {
52840xba000000, 53880xba000000,
52850x00050008, 53890x00050008,
52860xeb000000, 53900xeb000000,
52870x0003002e, 53910x00030031,
52880xe1ca00f0, 53920xe1ca00f0,
52890xe1ca20d8, 53930xe1ca20d8,
52900xe1ca01f8, 53940xe1ca01f8,
@@ -5295,8 +5399,8 @@ static const unsigned int build_actionlist[5505] = {
52950x00000000, 53990x00000000,
52960x824b6b80, 54000x824b6b80,
52970x00000000, 54010x00000000,
52980x824b6b80, 54020xe24b6b80,
52990xe1a0b82e, 54030x9156b0b2,
53000x9a000000, 54040x9a000000,
53010x00070000, 54050x00070000,
53020x00000000, 54060x00000000,
@@ -5312,7 +5416,7 @@ static const unsigned int build_actionlist[5505] = {
53120x00060012, 54160x00060012,
53130x00000000, 54170x00000000,
53140xeb000000, 54180xeb000000,
53150x0003002e, 54190x00030031,
53160xe1ca00f0, 54200xe1ca00f0,
53170xe1ca01f8, 54210xe1ca01f8,
53180x00000000, 54220x00000000,
@@ -5372,7 +5476,10 @@ static const unsigned int build_actionlist[5505] = {
53720x00000000, 54760x00000000,
53730xe5170000, 54770xe5170000,
53740x000d8180, 54780x000d8180,
54790xe3a01000,
53750xe790b10b, 54800xe790b10b,
54810xe5071000,
54820x000d8180,
53760xe51ba000, 54830xe51ba000,
53770x000d8180, 54840x000d8180,
53780xe5079000, 54850xe5079000,
@@ -5409,8 +5516,10 @@ static const unsigned int build_actionlist[5505] = {
54090xe15a0000, 55160xe15a0000,
54100x8a000000, 55170x8a000000,
54110x00050020, 55180x00050020,
55190x00000000,
54120xe5d6c000, 55200xe5d6c000,
54130xe496e004, 55210xe496e004,
55220x00000000,
54140x0006000c, 55230x0006000c,
54150xe15b0181, 55240xe15b0181,
54160xe3e03000, 55250xe3e03000,
@@ -5653,8 +5762,6 @@ enum {
5653 GLOB_vm_trunc, 5762 GLOB_vm_trunc,
5654 GLOB_vm_mod, 5763 GLOB_vm_mod,
5655 GLOB_vm_modi, 5764 GLOB_vm_modi,
5656 GLOB_vm_powi,
5657 GLOB_vm_foldfpm,
5658 GLOB_vm_foldarith, 5765 GLOB_vm_foldarith,
5659 GLOB_vm_ffi_call, 5766 GLOB_vm_ffi_call,
5660 GLOB_BC_ISEQN_Z, 5767 GLOB_BC_ISEQN_Z,
@@ -5801,8 +5908,6 @@ static const char *const globnames[] = {
5801 "vm_trunc", 5908 "vm_trunc",
5802 "vm_mod", 5909 "vm_mod",
5803 "vm_modi", 5910 "vm_modi",
5804 "vm_powi",
5805 "vm_foldfpm",
5806 "vm_foldarith", 5911 "vm_foldarith",
5807 "vm_ffi_call", 5912 "vm_ffi_call",
5808 "BC_ISEQN_Z", 5913 "BC_ISEQN_Z",
@@ -5862,6 +5967,9 @@ static const char *const extnames[] = {
5862 "lj_dispatch_ins", 5967 "lj_dispatch_ins",
5863 "lj_trace_hot", 5968 "lj_trace_hot",
5864 "lj_dispatch_call", 5969 "lj_dispatch_call",
5970 "lj_trace_exit",
5971 "lj_err_throw",
5972 "trunc",
5865 "__aeabi_ddiv", 5973 "__aeabi_ddiv",
5866 "__aeabi_dadd", 5974 "__aeabi_dadd",
5867 "__aeabi_dsub", 5975 "__aeabi_dsub",
@@ -5907,344 +6015,342 @@ static void build_subroutines(BuildCtx *ctx)
5907 dasm_put(Dst, 1, FRAME_P, ~LJ_TTRUE, FRAME_TYPE, FRAME_TYPEP, FRAME_C, Dt1(->base), LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->top)); 6015 dasm_put(Dst, 1, FRAME_P, ~LJ_TTRUE, FRAME_TYPE, FRAME_TYPEP, FRAME_C, Dt1(->base), LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->top));
5908 dasm_put(Dst, 54, Dt1(->cframe), Dt1(->maxstack), ~LJ_TNIL, Dt1(->top), Dt1(->top), LJ_VMST_C, Dt1(->glref), Dt2(->vmstate)); 6016 dasm_put(Dst, 54, Dt1(->cframe), Dt1(->maxstack), ~LJ_TNIL, Dt1(->top), Dt1(->top), LJ_VMST_C, Dt1(->glref), Dt2(->vmstate));
5909 dasm_put(Dst, 108, ~CFRAME_RAWMASK, Dt1(->base), Dt1(->glref), ~LJ_TFALSE, GG_G2DISP, LJ_VMST_INTERP, DISPATCH_GL(vmstate), LUA_MINSTACK, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top), Dt7(->field_pc), Dt1(->glref)); 6017 dasm_put(Dst, 108, ~CFRAME_RAWMASK, Dt1(->base), Dt1(->glref), ~LJ_TFALSE, GG_G2DISP, LJ_VMST_INTERP, DISPATCH_GL(vmstate), LUA_MINSTACK, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top), Dt7(->field_pc), Dt1(->glref));
5910 dasm_put(Dst, 172, GG_G2DISP, FRAME_CP, CFRAME_RESUME, Dt1(->status), Dt1(->cframe), Dt1(->base), Dt1(->top), Dt1(->status), LJ_VMST_INTERP, FRAME_TYPE, DISPATCH_GL(vmstate), FRAME_CP, FRAME_C, Dt1(->cframe), Dt1(->cframe)); 6018 dasm_put(Dst, 173, GG_G2DISP, FRAME_CP, CFRAME_RESUME, Dt1(->status), Dt1(->cframe), Dt1(->base), Dt1(->top), Dt1(->status), LJ_VMST_INTERP, FRAME_TYPE, DISPATCH_GL(vmstate), FRAME_CP, FRAME_C, Dt1(->cframe), Dt1(->cframe));
5911 dasm_put(Dst, 237, Dt1(->glref), GG_G2DISP, Dt1(->base), Dt1(->top), LJ_VMST_INTERP, DISPATCH_GL(vmstate), -LJ_TFUNC, Dt7(->field_pc), Dt1(->stack), Dt1(->top), Dt1(->cframe), Dt1(->cframe), Dt1(->glref), FRAME_CP, GG_G2DISP); 6019 dasm_put(Dst, 238, Dt1(->glref), GG_G2DISP, Dt1(->base), Dt1(->top), LJ_VMST_INTERP, DISPATCH_GL(vmstate), -LJ_TFUNC, Dt7(->field_pc), Dt1(->stack), Dt1(->top), Dt1(->cframe), Dt1(->cframe), Dt1(->glref), FRAME_CP, GG_G2DISP);
5912 dasm_put(Dst, 306, Dt7(->field_pc), ~LJ_TNIL, PC2PROTO(k), Dt1(->base), -DISPATCH_GL(tmptv), ~LJ_TTAB, ~LJ_TSTR, ~LJ_TISNUM); 6020 dasm_put(Dst, 307, Dt7(->field_pc), ~LJ_TNIL, PC2PROTO(k), Dt1(->base), -DISPATCH_GL(tmptv), ~LJ_TTAB, ~LJ_TSTR, ~LJ_TISNUM);
5913 dasm_put(Dst, 377, Dt1(->base)); 6021 dasm_put(Dst, 378, Dt1(->base));
5914 if (LJ_TARGET_OSX) { 6022 if (LJ_TARGET_OSX) {
5915 dasm_put(Dst, 387, Dt1(->base)); 6023 dasm_put(Dst, 388, Dt1(->base));
5916 } 6024 }
5917 dasm_put(Dst, 390, FRAME_CONT, Dt1(->top), -DISPATCH_GL(tmptv), ~LJ_TTAB, ~LJ_TSTR, ~LJ_TISNUM, Dt1(->base)); 6025 dasm_put(Dst, 391, FRAME_CONT, Dt1(->top), -DISPATCH_GL(tmptv), ~LJ_TTAB, ~LJ_TSTR, ~LJ_TISNUM, Dt1(->base));
5918 if (LJ_TARGET_OSX) { 6026 if (LJ_TARGET_OSX) {
5919 dasm_put(Dst, 452, Dt1(->base)); 6027 dasm_put(Dst, 453, Dt1(->base));
5920 } 6028 }
5921 dasm_put(Dst, 455, FRAME_CONT, Dt1(->top), Dt1(->base)); 6029 dasm_put(Dst, 456, FRAME_CONT, Dt1(->top), Dt1(->base));
5922 if (LJ_TARGET_OSX) { 6030 if (LJ_TARGET_OSX) {
5923 dasm_put(Dst, 491, Dt1(->base)); 6031 dasm_put(Dst, 492, Dt1(->base));
5924 } 6032 }
5925 dasm_put(Dst, 494, ~LJ_TTRUE, -LJ_TFALSE, Dt1(->base)); 6033 dasm_put(Dst, 495, ~LJ_TTRUE, -LJ_TFALSE, Dt1(->base));
5926#if LJ_HASFFI 6034#if LJ_HASFFI
5927 dasm_put(Dst, 541, Dt1(->base)); 6035 dasm_put(Dst, 542, Dt1(->base));
5928#endif 6036#endif
5929 dasm_put(Dst, 552, Dt1(->base)); 6037 dasm_put(Dst, 553, Dt1(->base));
5930 if (LJ_TARGET_OSX) { 6038 if (LJ_TARGET_OSX) {
5931 dasm_put(Dst, 589, Dt1(->base)); 6039 dasm_put(Dst, 590, Dt1(->base));
5932 } 6040 }
5933 dasm_put(Dst, 592, FRAME_CONT, Dt1(->base)); 6041 dasm_put(Dst, 593, FRAME_CONT, Dt1(->base));
5934 if (LJ_TARGET_OSX) { 6042 if (LJ_TARGET_OSX) {
5935 dasm_put(Dst, 613, Dt1(->base)); 6043 dasm_put(Dst, 614, Dt1(->base));
5936 } 6044 }
5937 dasm_put(Dst, 616, Dt1(->base)); 6045 dasm_put(Dst, 617, Dt1(->base));
5938 if (LJ_TARGET_OSX) { 6046 if (LJ_TARGET_OSX) {
5939 dasm_put(Dst, 626); 6047 dasm_put(Dst, 627);
5940 } 6048 }
5941 dasm_put(Dst, 628); 6049 dasm_put(Dst, 629);
5942 if (LJ_TARGET_OSX) { 6050 if (LJ_TARGET_OSX) {
5943 dasm_put(Dst, 631); 6051 dasm_put(Dst, 632);
5944 } 6052 }
5945 dasm_put(Dst, 633, Dt7(->field_pc), Dt1(->base)); 6053 dasm_put(Dst, 634, Dt7(->field_pc), Dt1(->base));
5946 if (LJ_TARGET_OSX) { 6054 if (LJ_TARGET_OSX) {
5947 dasm_put(Dst, 654, Dt1(->base)); 6055 dasm_put(Dst, 655, Dt1(->base));
5948 } 6056 }
5949 dasm_put(Dst, 657, Dt1(->base)); 6057 dasm_put(Dst, 658, Dt1(->base));
5950 if (LJ_TARGET_OSX) { 6058 if (LJ_TARGET_OSX) {
5951 dasm_put(Dst, 671, Dt1(->base)); 6059 dasm_put(Dst, 672, Dt1(->base));
5952 } 6060 }
5953#if LJ_HASJIT 6061#if LJ_HASJIT
5954 dasm_put(Dst, 674); 6062 dasm_put(Dst, 675);
5955#endif 6063#endif
5956 dasm_put(Dst, 676); 6064 dasm_put(Dst, 677);
5957#if LJ_HASJIT 6065#if LJ_HASJIT
5958 dasm_put(Dst, 678, BC_JFORI); 6066 dasm_put(Dst, 679, BC_JFORI);
5959#endif 6067#endif
5960 dasm_put(Dst, 681); 6068 dasm_put(Dst, 682);
5961#if LJ_HASJIT 6069#if LJ_HASJIT
5962 dasm_put(Dst, 684, BC_JFORI); 6070 dasm_put(Dst, 685, BC_JFORI);
5963#endif 6071#endif
5964 dasm_put(Dst, 687, BC_FORI, -LJ_TTRUE, -LJ_TISNUM, ~LJ_TISNUM, (int)(offsetof(GCfuncC, upvalue)>>3)-1, -LJ_TTAB, -LJ_TUDATA, Dt6(->metatable)); 6072 dasm_put(Dst, 688, BC_FORI, -LJ_TTRUE, -LJ_TISNUM, ~LJ_TISNUM, (int)(offsetof(GCfuncC, upvalue)>>3)-1, -LJ_TTAB, -LJ_TUDATA, Dt6(->metatable));
5965 dasm_put(Dst, 744, ~LJ_TNIL, DISPATCH_GL(gcroot[GCROOT_MMNAME+MM_metatable]), Dt6(->hmask), Dt5(->hash), Dt6(->node), DtB(->key), DtB(->val), DtB(->next), -LJ_TSTR, ~LJ_TTAB, -LJ_TNIL, -LJ_TISNUM); 6073 dasm_put(Dst, 745, ~LJ_TNIL, DISPATCH_GL(gcroot[GCROOT_MMNAME+MM_metatable]), Dt6(->hmask), Dt5(->hash), Dt6(->node), DtB(->key), DtB(->val), DtB(->next), -LJ_TSTR, ~LJ_TTAB, -LJ_TNIL, -LJ_TISNUM);
5966 dasm_put(Dst, 792, ~LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT]), -LJ_TTAB, Dt6(->metatable), -LJ_TTAB, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TTAB); 6074 dasm_put(Dst, 793, ~LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT]), -LJ_TTAB, Dt6(->metatable), -LJ_TTAB, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TTAB);
5967 dasm_put(Dst, 844); 6075 dasm_put(Dst, 845);
5968 if (LJ_TARGET_OSX) { 6076 if (LJ_TARGET_OSX) {
5969 dasm_put(Dst, 849); 6077 dasm_put(Dst, 850);
5970 } 6078 }
5971 dasm_put(Dst, 851); 6079 dasm_put(Dst, 852);
5972 if (LJ_TARGET_OSX) { 6080 if (LJ_TARGET_OSX) {
5973 dasm_put(Dst, 854); 6081 dasm_put(Dst, 855);
5974 } 6082 }
5975 dasm_put(Dst, 856, -LJ_TISNUM, -LJ_TSTR, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), Dt1(->base), -LJ_TISNUM, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), ~LJ_TSTR); 6083 dasm_put(Dst, 857, -LJ_TISNUM, -LJ_TSTR, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM]), Dt1(->base), -LJ_TISNUM, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), ~LJ_TSTR);
5976 dasm_put(Dst, 908, ~LJ_TNIL, -LJ_TTAB, Dt1(->base), Dt1(->top)); 6084 dasm_put(Dst, 909, ~LJ_TNIL, -LJ_TTAB, Dt1(->base), Dt1(->top));
5977 if (LJ_TARGET_OSX) { 6085 if (LJ_TARGET_OSX) {
5978 dasm_put(Dst, 931, Dt1(->base)); 6086 dasm_put(Dst, 932, Dt1(->base));
5979 } 6087 }
5980 dasm_put(Dst, 934, ~LJ_TNIL, (2+1)*8, -LJ_TTAB); 6088 dasm_put(Dst, 935, ~LJ_TNIL, (2+1)*8, -LJ_TTAB);
5981#ifdef LUAJIT_ENABLE_LUA52COMPAT 6089#ifdef LUAJIT_ENABLE_LUA52COMPAT
5982 dasm_put(Dst, 957, Dt6(->metatable)); 6090 dasm_put(Dst, 958, Dt6(->metatable));
5983#endif 6091#endif
5984 dasm_put(Dst, 960, Dt8(->upvalue[0])); 6092 dasm_put(Dst, 961, Dt8(->upvalue[0]));
5985#ifdef LUAJIT_ENABLE_LUA52COMPAT 6093#ifdef LUAJIT_ENABLE_LUA52COMPAT
5986 dasm_put(Dst, 964); 6094 dasm_put(Dst, 965);
5987#endif 6095#endif
5988 dasm_put(Dst, 968, ~LJ_TNIL, (3+1)*8, -LJ_TTAB, -LJ_TISNUM, Dt6(->asize), Dt6(->array), (0+1)*8, -LJ_TNIL, (2+1)*8, Dt6(->hmask)); 6096 dasm_put(Dst, 969, ~LJ_TNIL, (3+1)*8, -LJ_TTAB, -LJ_TISNUM, Dt6(->asize), Dt6(->array), (0+1)*8, -LJ_TNIL, (2+1)*8, Dt6(->hmask));
5989 if (LJ_TARGET_OSX) { 6097 if (LJ_TARGET_OSX) {
5990 dasm_put(Dst, 1018); 6098 dasm_put(Dst, 1019);
5991 } 6099 }
5992 dasm_put(Dst, 1020); 6100 dasm_put(Dst, 1021);
5993 if (LJ_TARGET_OSX) { 6101 if (LJ_TARGET_OSX) {
5994 dasm_put(Dst, 1023); 6102 dasm_put(Dst, 1024);
5995 } 6103 }
5996 dasm_put(Dst, 1025, -LJ_TTAB); 6104 dasm_put(Dst, 1026, -LJ_TTAB);
5997#ifdef LUAJIT_ENABLE_LUA52COMPAT 6105#ifdef LUAJIT_ENABLE_LUA52COMPAT
5998 dasm_put(Dst, 1041, Dt6(->metatable)); 6106 dasm_put(Dst, 1042, Dt6(->metatable));
5999#endif 6107#endif
6000 dasm_put(Dst, 1044, Dt8(->upvalue[0])); 6108 dasm_put(Dst, 1045, Dt8(->upvalue[0]));
6001#ifdef LUAJIT_ENABLE_LUA52COMPAT 6109#ifdef LUAJIT_ENABLE_LUA52COMPAT
6002 dasm_put(Dst, 1048); 6110 dasm_put(Dst, 1049);
6003#endif 6111#endif
6004 dasm_put(Dst, 1052, ~LJ_TISNUM, (3+1)*8, DISPATCH_GL(hookmask), HOOK_ACTIVE, 8+FRAME_PCALL, 8+FRAME_PCALLH, DISPATCH_GL(hookmask), -LJ_TFUNC, HOOK_ACTIVE, 16+FRAME_PCALL, 16+FRAME_PCALLH, -LJ_TTHREAD); 6112 dasm_put(Dst, 1053, ~LJ_TISNUM, (3+1)*8, DISPATCH_GL(hookmask), HOOK_ACTIVE, 8+FRAME_PCALL, 8+FRAME_PCALLH, DISPATCH_GL(hookmask), -LJ_TFUNC, HOOK_ACTIVE, 16+FRAME_PCALL, 16+FRAME_PCALLH, -LJ_TTHREAD);
6005 dasm_put(Dst, 1111, Dt1(->base), Dt1(->top), Dt1(->status), Dt1(->base), Dt1(->maxstack), Dt1(->cframe), LUA_YIELD, Dt1(->top), Dt1(->top), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate), LUA_YIELD); 6113 dasm_put(Dst, 1112, Dt1(->base), Dt1(->top), Dt1(->status), Dt1(->base), Dt1(->maxstack), Dt1(->cframe), LUA_YIELD, Dt1(->top), Dt1(->top), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate), LUA_YIELD);
6006 dasm_put(Dst, 1170, Dt1(->base), Dt1(->maxstack), Dt1(->top), ~LJ_TTRUE, FRAME_TYPE, ~LJ_TFALSE, (2+1)*8, Dt1(->top)); 6114 dasm_put(Dst, 1171, Dt1(->base), Dt1(->maxstack), Dt1(->top), ~LJ_TTRUE, FRAME_TYPE, ~LJ_TFALSE, (2+1)*8, Dt1(->top));
6007 dasm_put(Dst, 1230, Dt8(->upvalue[0].gcr), Dt1(->base), Dt1(->top), Dt1(->status), Dt1(->base), Dt1(->maxstack), Dt1(->cframe), LUA_YIELD, Dt1(->top), Dt1(->top), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate), LUA_YIELD); 6115 dasm_put(Dst, 1231, Dt8(->upvalue[0].gcr), Dt1(->base), Dt1(->top), Dt1(->status), Dt1(->base), Dt1(->maxstack), Dt1(->cframe), LUA_YIELD, Dt1(->top), Dt1(->top), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate), LUA_YIELD);
6008 dasm_put(Dst, 1286, Dt1(->base), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, Dt1(->cframe), Dt1(->base), CFRAME_RESUME, Dt1(->top)); 6116 dasm_put(Dst, 1287, Dt1(->base), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, Dt1(->cframe), Dt1(->base), CFRAME_RESUME, Dt1(->top));
6009 dasm_put(Dst, 1345, LUA_YIELD, Dt1(->cframe), Dt1(->status), -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM); 6117 dasm_put(Dst, 1346, LUA_YIELD, Dt1(->cframe), Dt1(->status), -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM);
6010 if (LJ_TARGET_OSX) { 6118 if (LJ_TARGET_OSX) {
6011 dasm_put(Dst, 1411); 6119 dasm_put(Dst, 1412);
6012 } 6120 }
6013 dasm_put(Dst, 1413); 6121 dasm_put(Dst, 1414);
6014 if (LJ_TARGET_OSX) { 6122 if (LJ_TARGET_OSX) {
6015 dasm_put(Dst, 1416); 6123 dasm_put(Dst, 1417);
6016 } 6124 }
6017 dasm_put(Dst, 1418, -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM); 6125 dasm_put(Dst, 1419, -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM);
6018 if (LJ_TARGET_OSX) { 6126 if (LJ_TARGET_OSX) {
6019 dasm_put(Dst, 1478); 6127 dasm_put(Dst, 1479);
6020 } 6128 }
6021 dasm_put(Dst, 1480); 6129 dasm_put(Dst, 1481);
6022 if (LJ_TARGET_OSX) { 6130 if (LJ_TARGET_OSX) {
6023 dasm_put(Dst, 1483); 6131 dasm_put(Dst, 1484);
6024 } 6132 }
6025 dasm_put(Dst, 1485, -LJ_TISNUM, (1+1)*8, FRAME_TYPE, ~LJ_TNIL); 6133 dasm_put(Dst, 1486, -LJ_TISNUM, (1+1)*8, FRAME_TYPE, ~LJ_TNIL);
6026 dasm_put(Dst, 1549, -LJ_TISNUM); 6134 dasm_put(Dst, 1550, -LJ_TISNUM);
6027 if (LJ_TARGET_OSX) { 6135 if (LJ_TARGET_OSX) {
6028 dasm_put(Dst, 1554); 6136 dasm_put(Dst, 1555);
6029 } 6137 }
6030 dasm_put(Dst, 1556); 6138 dasm_put(Dst, 1557);
6031 if (LJ_TARGET_OSX) { 6139 if (LJ_TARGET_OSX) {
6032 dasm_put(Dst, 1559); 6140 dasm_put(Dst, 1560);
6033 } 6141 }
6034 dasm_put(Dst, 1561, -LJ_TISNUM); 6142 dasm_put(Dst, 1562, -LJ_TISNUM);
6035 if (LJ_TARGET_OSX) { 6143 if (LJ_TARGET_OSX) {
6036 dasm_put(Dst, 1573); 6144 dasm_put(Dst, 1574);
6037 } 6145 }
6038 dasm_put(Dst, 1575); 6146 dasm_put(Dst, 1576);
6039 if (LJ_TARGET_OSX) { 6147 if (LJ_TARGET_OSX) {
6040 dasm_put(Dst, 1578); 6148 dasm_put(Dst, 1579);
6041 } 6149 }
6042 dasm_put(Dst, 1580, -LJ_TISNUM); 6150 dasm_put(Dst, 1581, -LJ_TISNUM);
6043 if (LJ_TARGET_OSX) { 6151 if (LJ_TARGET_OSX) {
6044 dasm_put(Dst, 1592); 6152 dasm_put(Dst, 1593);
6045 } 6153 }
6046 dasm_put(Dst, 1594); 6154 dasm_put(Dst, 1595);
6047 if (LJ_TARGET_OSX) { 6155 if (LJ_TARGET_OSX) {
6048 dasm_put(Dst, 1597); 6156 dasm_put(Dst, 1598);
6049 } 6157 }
6050 dasm_put(Dst, 1599, -LJ_TISNUM); 6158 dasm_put(Dst, 1600, -LJ_TISNUM);
6051 if (LJ_TARGET_OSX) { 6159 if (LJ_TARGET_OSX) {
6052 dasm_put(Dst, 1611); 6160 dasm_put(Dst, 1612);
6053 } 6161 }
6054 dasm_put(Dst, 1613); 6162 dasm_put(Dst, 1614);
6055 if (LJ_TARGET_OSX) { 6163 if (LJ_TARGET_OSX) {
6056 dasm_put(Dst, 1616); 6164 dasm_put(Dst, 1617);
6057 } 6165 }
6058 dasm_put(Dst, 1618, -LJ_TISNUM); 6166 dasm_put(Dst, 1619, -LJ_TISNUM);
6059 if (LJ_TARGET_OSX) { 6167 if (LJ_TARGET_OSX) {
6060 dasm_put(Dst, 1630); 6168 dasm_put(Dst, 1631);
6061 } 6169 }
6062 dasm_put(Dst, 1632); 6170 dasm_put(Dst, 1633);
6063 if (LJ_TARGET_OSX) { 6171 if (LJ_TARGET_OSX) {
6064 dasm_put(Dst, 1635); 6172 dasm_put(Dst, 1636);
6065 } 6173 }
6066 dasm_put(Dst, 1637, -LJ_TISNUM); 6174 dasm_put(Dst, 1638, -LJ_TISNUM);
6067 if (LJ_TARGET_OSX) { 6175 if (LJ_TARGET_OSX) {
6068 dasm_put(Dst, 1649); 6176 dasm_put(Dst, 1650);
6069 } 6177 }
6070 dasm_put(Dst, 1651); 6178 dasm_put(Dst, 1652);
6071 if (LJ_TARGET_OSX) { 6179 if (LJ_TARGET_OSX) {
6072 dasm_put(Dst, 1654); 6180 dasm_put(Dst, 1655);
6073 } 6181 }
6074 dasm_put(Dst, 1656, -LJ_TISNUM); 6182 dasm_put(Dst, 1657, -LJ_TISNUM);
6075 if (LJ_TARGET_OSX) { 6183 if (LJ_TARGET_OSX) {
6076 dasm_put(Dst, 1668); 6184 dasm_put(Dst, 1669);
6077 } 6185 }
6078 dasm_put(Dst, 1670); 6186 dasm_put(Dst, 1671);
6079 if (LJ_TARGET_OSX) { 6187 if (LJ_TARGET_OSX) {
6080 dasm_put(Dst, 1673); 6188 dasm_put(Dst, 1674);
6081 } 6189 }
6082 dasm_put(Dst, 1675, -LJ_TISNUM); 6190 dasm_put(Dst, 1676, -LJ_TISNUM);
6083 if (LJ_TARGET_OSX) { 6191 if (LJ_TARGET_OSX) {
6084 dasm_put(Dst, 1687); 6192 dasm_put(Dst, 1688);
6085 } 6193 }
6086 dasm_put(Dst, 1689); 6194 dasm_put(Dst, 1690);
6087 if (LJ_TARGET_OSX) { 6195 if (LJ_TARGET_OSX) {
6088 dasm_put(Dst, 1692); 6196 dasm_put(Dst, 1693);
6089 } 6197 }
6090 dasm_put(Dst, 1694, -LJ_TISNUM); 6198 dasm_put(Dst, 1695, -LJ_TISNUM);
6091 if (LJ_TARGET_OSX) { 6199 if (LJ_TARGET_OSX) {
6092 dasm_put(Dst, 1706); 6200 dasm_put(Dst, 1707);
6093 } 6201 }
6094 dasm_put(Dst, 1708); 6202 dasm_put(Dst, 1709);
6095 if (LJ_TARGET_OSX) { 6203 if (LJ_TARGET_OSX) {
6096 dasm_put(Dst, 1711); 6204 dasm_put(Dst, 1712);
6097 } 6205 }
6098 dasm_put(Dst, 1713, -LJ_TISNUM); 6206 dasm_put(Dst, 1714, -LJ_TISNUM);
6099 if (LJ_TARGET_OSX) { 6207 if (LJ_TARGET_OSX) {
6100 dasm_put(Dst, 1725); 6208 dasm_put(Dst, 1726);
6101 } 6209 }
6102 dasm_put(Dst, 1727); 6210 dasm_put(Dst, 1728);
6103 if (LJ_TARGET_OSX) { 6211 if (LJ_TARGET_OSX) {
6104 dasm_put(Dst, 1730); 6212 dasm_put(Dst, 1731);
6105 } 6213 }
6106 dasm_put(Dst, 1732, -LJ_TISNUM); 6214 dasm_put(Dst, 1733, -LJ_TISNUM);
6107 if (LJ_TARGET_OSX) { 6215 if (LJ_TARGET_OSX) {
6108 dasm_put(Dst, 1744); 6216 dasm_put(Dst, 1745);
6109 } 6217 }
6110 dasm_put(Dst, 1746); 6218 dasm_put(Dst, 1747);
6111 if (LJ_TARGET_OSX) { 6219 if (LJ_TARGET_OSX) {
6112 dasm_put(Dst, 1749); 6220 dasm_put(Dst, 1750);
6113 } 6221 }
6114 dasm_put(Dst, 1751, -LJ_TISNUM); 6222 dasm_put(Dst, 1752, -LJ_TISNUM);
6115 if (LJ_TARGET_OSX) { 6223 if (LJ_TARGET_OSX) {
6116 dasm_put(Dst, 1763); 6224 dasm_put(Dst, 1764);
6117 } 6225 }
6118 dasm_put(Dst, 1765); 6226 dasm_put(Dst, 1766);
6119 if (LJ_TARGET_OSX) { 6227 if (LJ_TARGET_OSX) {
6120 dasm_put(Dst, 1768); 6228 dasm_put(Dst, 1769);
6121 } 6229 }
6122 dasm_put(Dst, 1770, -LJ_TISNUM); 6230 dasm_put(Dst, 1771, -LJ_TISNUM);
6123 if (LJ_TARGET_OSX) { 6231 if (LJ_TARGET_OSX) {
6124 dasm_put(Dst, 1782); 6232 dasm_put(Dst, 1783);
6125 } 6233 }
6126 dasm_put(Dst, 1784); 6234 dasm_put(Dst, 1785);
6127 if (LJ_TARGET_OSX) { 6235 if (LJ_TARGET_OSX) {
6128 dasm_put(Dst, 1787); 6236 dasm_put(Dst, 1788);
6129 } 6237 }
6130 dasm_put(Dst, 1789, -LJ_TISNUM, -LJ_TISNUM); 6238 dasm_put(Dst, 1790, -LJ_TISNUM, -LJ_TISNUM);
6131 if (LJ_TARGET_OSX) { 6239 if (LJ_TARGET_OSX) {
6132 dasm_put(Dst, 1804); 6240 dasm_put(Dst, 1805);
6133 } 6241 }
6134 dasm_put(Dst, 1806); 6242 dasm_put(Dst, 1807);
6135 if (LJ_TARGET_OSX) { 6243 if (LJ_TARGET_OSX) {
6136 dasm_put(Dst, 1809); 6244 dasm_put(Dst, 1810);
6137 } 6245 }
6138 dasm_put(Dst, 1811, -LJ_TISNUM, -LJ_TISNUM); 6246 dasm_put(Dst, 1812, -LJ_TISNUM, -LJ_TISNUM);
6139 if (LJ_TARGET_OSX) { 6247 if (LJ_TARGET_OSX) {
6140 dasm_put(Dst, 1826); 6248 dasm_put(Dst, 1827);
6141 } 6249 }
6142 dasm_put(Dst, 1828); 6250 dasm_put(Dst, 1829);
6143 if (LJ_TARGET_OSX) { 6251 if (LJ_TARGET_OSX) {
6144 dasm_put(Dst, 1831); 6252 dasm_put(Dst, 1832);
6145 } 6253 }
6146 dasm_put(Dst, 1833, -LJ_TISNUM, -LJ_TISNUM); 6254 dasm_put(Dst, 1834, -LJ_TISNUM, -LJ_TISNUM);
6147 if (LJ_TARGET_OSX) { 6255 if (LJ_TARGET_OSX) {
6148 dasm_put(Dst, 1848); 6256 dasm_put(Dst, 1849);
6149 } 6257 }
6150 dasm_put(Dst, 1850); 6258 dasm_put(Dst, 1851);
6151 if (LJ_TARGET_OSX) { 6259 if (LJ_TARGET_OSX) {
6152 dasm_put(Dst, 1853); 6260 dasm_put(Dst, 1854);
6153 } 6261 }
6154 dasm_put(Dst, 1855, -LJ_TISNUM, Dt8(->upvalue[0]), -LJ_TISNUM, -LJ_TISNUM); 6262 dasm_put(Dst, 1856, -LJ_TISNUM, Dt8(->upvalue[0]), -LJ_TISNUM, -LJ_TISNUM);
6155 if (LJ_TARGET_OSX) { 6263 if (LJ_TARGET_OSX) {
6156 dasm_put(Dst, 1888); 6264 dasm_put(Dst, 1889);
6157 } 6265 }
6158 dasm_put(Dst, 1890); 6266 dasm_put(Dst, 1891);
6159 if (LJ_TARGET_OSX) { 6267 if (LJ_TARGET_OSX) {
6160 dasm_put(Dst, 1893); 6268 dasm_put(Dst, 1894);
6161 } 6269 }
6162 dasm_put(Dst, 1895, -LJ_TISNUM); 6270 dasm_put(Dst, 1896, -LJ_TISNUM);
6163 if (LJ_TARGET_OSX) { 6271 if (LJ_TARGET_OSX) {
6164 dasm_put(Dst, 1908); 6272 dasm_put(Dst, 1909);
6165 } 6273 }
6166 dasm_put(Dst, 1910); 6274 dasm_put(Dst, 1911);
6167 if (LJ_TARGET_OSX) { 6275 if (LJ_TARGET_OSX) {
6168 dasm_put(Dst, 1913); 6276 dasm_put(Dst, 1914);
6169 } 6277 }
6170 dasm_put(Dst, 1915, ~LJ_TISNUM, (2+1)*8, -LJ_TISNUM); 6278 dasm_put(Dst, 1916, ~LJ_TISNUM, (2+1)*8, -LJ_TISNUM);
6171 if (LJ_TARGET_OSX) { 6279 if (LJ_TARGET_OSX) {
6172 dasm_put(Dst, 1937); 6280 dasm_put(Dst, 1938);
6173 } 6281 }
6174 dasm_put(Dst, 1939); 6282 dasm_put(Dst, 1940);
6175 if (LJ_TARGET_OSX) { 6283 if (LJ_TARGET_OSX) {
6176 dasm_put(Dst, 1942); 6284 dasm_put(Dst, 1943);
6177 } 6285 }
6178 dasm_put(Dst, 1944, (2+1)*8, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); 6286 dasm_put(Dst, 1945, (2+1)*8, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM);
6179 dasm_put(Dst, 1995, -LJ_TISNUM, -LJ_TISNUM); 6287 dasm_put(Dst, 1996, -LJ_TISNUM, -LJ_TISNUM);
6180 dasm_put(Dst, 2049, -LJ_TISNUM, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TSTR, Dt5(->len), Dt5([1])); 6288 dasm_put(Dst, 2050, -LJ_TISNUM, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TSTR, Dt5(->len), Dt5([1]));
6181 dasm_put(Dst, 2103, ~LJ_TISNUM, (0+1)*8, (1+1)*8, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TISNUM, Dt1(->base), Dt1(->base), ~LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); 6289 dasm_put(Dst, 2104, ~LJ_TISNUM, (0+1)*8, (1+1)*8, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TISNUM, Dt1(->base), Dt1(->base), ~LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold));
6182 dasm_put(Dst, 2162, -LJ_TISNUM, -LJ_TSTR, Dt5(->len), -LJ_TISNUM, sizeof(GCstr)-1, -DISPATCH_GL(strempty), ~LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TSTR, -LJ_TISNUM, Dt5(->len)); 6290 dasm_put(Dst, 2163, -LJ_TISNUM, -LJ_TSTR, Dt5(->len), -LJ_TISNUM, sizeof(GCstr)-1, -DISPATCH_GL(strempty), ~LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TSTR, -LJ_TISNUM, Dt5(->len));
6183 dasm_put(Dst, 2224, DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), Dt5([1]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr)); 6291 dasm_put(Dst, 2225, DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), Dt5([1]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr));
6184 dasm_put(Dst, 2277, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold)); 6292 dasm_put(Dst, 2278, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold));
6185 dasm_put(Dst, 2337, -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr), -LJ_TTAB); 6293 dasm_put(Dst, 2338, -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr), -LJ_TTAB);
6186 if (LJ_TARGET_OSX) { 6294 if (LJ_TARGET_OSX) {
6187 dasm_put(Dst, 2375); 6295 dasm_put(Dst, 2376);
6188 } 6296 }
6189 dasm_put(Dst, 2377); 6297 dasm_put(Dst, 2378);
6190 if (LJ_TARGET_OSX) { 6298 if (LJ_TARGET_OSX) {
6191 dasm_put(Dst, 2380); 6299 dasm_put(Dst, 2381);
6192 } 6300 }
6193 dasm_put(Dst, 2382, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); 6301 dasm_put(Dst, 2383, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM);
6194 dasm_put(Dst, 2453, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM); 6302 dasm_put(Dst, 2454, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM);
6195 dasm_put(Dst, 2513, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM); 6303 dasm_put(Dst, 2514, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM);
6196 dasm_put(Dst, 2569, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM); 6304 dasm_put(Dst, 2570, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM);
6197 dasm_put(Dst, 2626, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, Dt1(->maxstack), Dt1(->top), Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->base), Dt1(->top), Dt7(->field_pc), FRAME_TYPE, FRAME_TYPEP); 6305 dasm_put(Dst, 2627, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, Dt1(->maxstack), Dt1(->top), Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->base), Dt1(->top), Dt7(->field_pc), FRAME_TYPE, FRAME_TYPEP);
6198 dasm_put(Dst, 2689, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base)); 6306 dasm_put(Dst, 2690, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base));
6199#if LJ_HASJIT 6307#if LJ_HASJIT
6200 dasm_put(Dst, 2723, DISPATCH_GL(hookmask), HOOK_VMEVENT, DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); 6308 dasm_put(Dst, 2724, DISPATCH_GL(hookmask), HOOK_VMEVENT, DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount));
6201#endif 6309#endif
6202 dasm_put(Dst, 2743, DISPATCH_GL(hookmask), HOOK_ACTIVE, GG_DISP2STATIC, DISPATCH_GL(hookmask), DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base)); 6310 dasm_put(Dst, 2744, DISPATCH_GL(hookmask), HOOK_ACTIVE, GG_DISP2STATIC, DISPATCH_GL(hookmask), DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base));
6203 dasm_put(Dst, 2789, GG_DISP2STATIC); 6311 dasm_put(Dst, 2790, GG_DISP2STATIC);
6204#if LJ_HASJIT 6312#if LJ_HASJIT
6205 dasm_put(Dst, 2805, -GG_DISP2J, Dt7(->field_pc), DISPATCH_J(L), PC2PROTO(framesize), Dt1(->base), Dt1(->top)); 6313 dasm_put(Dst, 2806, -GG_DISP2J, Dt7(->field_pc), DISPATCH_J(L), PC2PROTO(framesize), Dt1(->base), Dt1(->top));
6206#endif 6314#endif
6207 dasm_put(Dst, 2826); 6315 dasm_put(Dst, 2827);
6208#if LJ_HASJIT 6316#if LJ_HASJIT
6209 dasm_put(Dst, 2829); 6317 dasm_put(Dst, 2830);
6210#endif 6318#endif
6211 dasm_put(Dst, 2832); 6319 dasm_put(Dst, 2833);
6212#if LJ_HASJIT 6320#if LJ_HASJIT
6213 dasm_put(Dst, 2834); 6321 dasm_put(Dst, 2835);
6214#endif 6322#endif
6215 dasm_put(Dst, 2837, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 6323 dasm_put(Dst, 2838, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
6216#if LJ_HASJIT 6324#if LJ_HASJIT
6217 dasm_put(Dst, 2859); 6325 dasm_put(Dst, 2861, LJ_VMST_EXIT, DISPATCH_GL(vmstate), DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(exitno), DISPATCH_J(L), Dt1(->base), DISPATCH_GL(jit_L), -GG_DISP2J, Dt1(->cframe), Dt1(->base), ~CFRAME_RAWMASK);
6218#endif 6326#endif
6219 dasm_put(Dst, 2861); 6327 dasm_put(Dst, 2909);
6220#if LJ_HASJIT 6328#if LJ_HASJIT
6221 dasm_put(Dst, 2863); 6329 dasm_put(Dst, 2911, Dt7(->field_pc), DISPATCH_GL(jit_L), LJ_VMST_INTERP, PC2PROTO(k), DISPATCH_GL(vmstate), BC_FUNCF);
6222#endif 6330#endif
6223 dasm_put(Dst, 2865); 6331 dasm_put(Dst, 2948);
6224#if LJ_HASJIT 6332#if LJ_HASJIT
6225 dasm_put(Dst, 2870); 6333 dasm_put(Dst, 2955);
6226#else 6334#else
6227 dasm_put(Dst, 2873); 6335 dasm_put(Dst, 2959);
6228#endif 6336#endif
6229 dasm_put(Dst, 2875); 6337 dasm_put(Dst, 2961);
6230 { 6338 {
6231 int i; 6339 int i;
6232 for (i = 31; i >= 0; i--) { 6340 for (i = 31; i >= 0; i--) {
6233 dasm_put(Dst, 2911, i, i); 6341 dasm_put(Dst, 2997, i, i);
6234 } 6342 }
6235 } 6343 }
6236 dasm_put(Dst, 2916); 6344 dasm_put(Dst, 3002);
6237#if LJ_HASJIT 6345#if LJ_HASJIT
6238 dasm_put(Dst, 2925); 6346 dasm_put(Dst, 3031);
6239#endif 6347#else
6240 dasm_put(Dst, 2927); 6348 dasm_put(Dst, 3056);
6241#if LJ_HASJIT
6242 dasm_put(Dst, 2929);
6243#endif 6349#endif
6244 dasm_put(Dst, 2931); 6350 dasm_put(Dst, 3058);
6245#if LJ_HASFFI 6351#if LJ_HASFFI
6246#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) 6352#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V)
6247 dasm_put(Dst, 2955, DtE(->spadj), DtE(->nsp), offsetof(CCallState, stack), DtE(->func), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->gpr[0]), DtE(->gpr[1])); 6353 dasm_put(Dst, 3060, DtE(->spadj), DtE(->nsp), offsetof(CCallState, stack), DtE(->func), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->gpr[0]), DtE(->gpr[1]));
6248#endif 6354#endif
6249} 6355}
6250 6356
@@ -6252,7 +6358,7 @@ static void build_subroutines(BuildCtx *ctx)
6252static void build_ins(BuildCtx *ctx, BCOp op, int defop) 6358static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6253{ 6359{
6254 int vk = 0; 6360 int vk = 0;
6255 dasm_put(Dst, 2993, defop); 6361 dasm_put(Dst, 3098, defop);
6256 6362
6257 switch (op) { 6363 switch (op) {
6258 6364
@@ -6261,578 +6367,578 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6261 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 6367 /* Remember: all ops branch for a true comparison, fall through otherwise. */
6262 6368
6263 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 6369 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
6264 dasm_put(Dst, 2995, -LJ_TISNUM, -LJ_TISNUM); 6370 dasm_put(Dst, 3100, -LJ_TISNUM, -LJ_TISNUM);
6265 if (op == BC_ISLT) { 6371 if (op == BC_ISLT) {
6266 dasm_put(Dst, 3011); 6372 dasm_put(Dst, 3116);
6267 } else if (op == BC_ISGE) { 6373 } else if (op == BC_ISGE) {
6268 dasm_put(Dst, 3013); 6374 dasm_put(Dst, 3118);
6269 } else if (op == BC_ISLE) { 6375 } else if (op == BC_ISLE) {
6270 dasm_put(Dst, 3015); 6376 dasm_put(Dst, 3120);
6271 } else { 6377 } else {
6272 dasm_put(Dst, 3017); 6378 dasm_put(Dst, 3122);
6273 } 6379 }
6274 dasm_put(Dst, 3019, -LJ_TISNUM); 6380 dasm_put(Dst, 3124, -LJ_TISNUM);
6275 if (op == BC_ISLT) { 6381 if (op == BC_ISLT) {
6276 dasm_put(Dst, 3055); 6382 dasm_put(Dst, 3160);
6277 } else if (op == BC_ISGE) { 6383 } else if (op == BC_ISGE) {
6278 dasm_put(Dst, 3057); 6384 dasm_put(Dst, 3162);
6279 } else if (op == BC_ISLE) { 6385 } else if (op == BC_ISLE) {
6280 dasm_put(Dst, 3059); 6386 dasm_put(Dst, 3164);
6281 } else { 6387 } else {
6282 dasm_put(Dst, 3061); 6388 dasm_put(Dst, 3166);
6283 } 6389 }
6284 dasm_put(Dst, 3063); 6390 dasm_put(Dst, 3168);
6285 break; 6391 break;
6286 6392
6287 case BC_ISEQV: case BC_ISNEV: 6393 case BC_ISEQV: case BC_ISNEV:
6288 vk = op == BC_ISEQV; 6394 vk = op == BC_ISEQV;
6289 dasm_put(Dst, 3066, -LJ_TISNUM, -LJ_TISNUM); 6395 dasm_put(Dst, 3171, -LJ_TISNUM, -LJ_TISNUM);
6290 if (vk) { 6396 if (vk) {
6291 dasm_put(Dst, 3077); 6397 dasm_put(Dst, 3182);
6292 } else { 6398 } else {
6293 dasm_put(Dst, 3080); 6399 dasm_put(Dst, 3185);
6294 } 6400 }
6295 if (LJ_HASFFI) { 6401 if (LJ_HASFFI) {
6296 dasm_put(Dst, 3083, -LJ_TCDATA, -LJ_TCDATA); 6402 dasm_put(Dst, 3188, -LJ_TCDATA, -LJ_TCDATA);
6297 } 6403 }
6298 dasm_put(Dst, 3090, -LJ_TISPRI); 6404 dasm_put(Dst, 3195, -LJ_TISPRI);
6299 if (vk) { 6405 if (vk) {
6300 dasm_put(Dst, 3099, -LJ_TISTABUD); 6406 dasm_put(Dst, 3204, -LJ_TISTABUD);
6301 } else { 6407 } else {
6302 dasm_put(Dst, 3116, -LJ_TISTABUD); 6408 dasm_put(Dst, 3221, -LJ_TISTABUD);
6303 } 6409 }
6304 dasm_put(Dst, 3123, Dt6(->metatable)); 6410 dasm_put(Dst, 3228, Dt6(->metatable));
6305 if (vk) { 6411 if (vk) {
6306 dasm_put(Dst, 3127); 6412 dasm_put(Dst, 3232);
6307 } else { 6413 } else {
6308 dasm_put(Dst, 3130); 6414 dasm_put(Dst, 3235);
6309 } 6415 }
6310 dasm_put(Dst, 3133, Dt6(->nomm), 1-vk, 1<<MM_eq); 6416 dasm_put(Dst, 3238, Dt6(->nomm), 1-vk, 1<<MM_eq);
6311 if (vk) { 6417 if (vk) {
6312 dasm_put(Dst, 3143); 6418 dasm_put(Dst, 3248);
6313 } else { 6419 } else {
6314 dasm_put(Dst, 3146); 6420 dasm_put(Dst, 3251);
6315 } 6421 }
6316 break; 6422 break;
6317 6423
6318 case BC_ISEQS: case BC_ISNES: 6424 case BC_ISEQS: case BC_ISNES:
6319 vk = op == BC_ISEQS; 6425 vk = op == BC_ISEQS;
6320 dasm_put(Dst, 3156, -LJ_TSTR); 6426 dasm_put(Dst, 3261, -LJ_TSTR);
6321 if (LJ_HASFFI) { 6427 if (LJ_HASFFI) {
6322 dasm_put(Dst, 3165); 6428 dasm_put(Dst, 3270);
6323 } else { 6429 } else {
6324 dasm_put(Dst, 3169); 6430 dasm_put(Dst, 3274);
6325 } 6431 }
6326 if (vk) { 6432 if (vk) {
6327 dasm_put(Dst, 3171); 6433 dasm_put(Dst, 3276);
6328 } else { 6434 } else {
6329 dasm_put(Dst, 3174); 6435 dasm_put(Dst, 3279);
6330 } 6436 }
6331 dasm_put(Dst, 3177); 6437 dasm_put(Dst, 3282);
6332 if (LJ_HASFFI) { 6438 if (LJ_HASFFI) {
6333 dasm_put(Dst, 3184, -LJ_TCDATA); 6439 dasm_put(Dst, 3289, -LJ_TCDATA);
6334 } 6440 }
6335 break; 6441 break;
6336 6442
6337 case BC_ISEQN: case BC_ISNEN: 6443 case BC_ISEQN: case BC_ISNEN:
6338 vk = op == BC_ISEQN; 6444 vk = op == BC_ISEQN;
6339 dasm_put(Dst, 3192); 6445 dasm_put(Dst, 3297);
6340 if (vk) { 6446 if (vk) {
6341 dasm_put(Dst, 3199); 6447 dasm_put(Dst, 3304);
6342 } else { 6448 } else {
6343 dasm_put(Dst, 3201); 6449 dasm_put(Dst, 3306);
6344 } 6450 }
6345 dasm_put(Dst, 3203, -LJ_TISNUM, -LJ_TISNUM); 6451 dasm_put(Dst, 3308, -LJ_TISNUM, -LJ_TISNUM);
6346 if (vk) { 6452 if (vk) {
6347 dasm_put(Dst, 3213); 6453 dasm_put(Dst, 3318);
6348 } else { 6454 } else {
6349 dasm_put(Dst, 3216); 6455 dasm_put(Dst, 3321);
6350 } 6456 }
6351 dasm_put(Dst, 3219); 6457 dasm_put(Dst, 3324);
6352 if (LJ_HASFFI) { 6458 if (LJ_HASFFI) {
6353 dasm_put(Dst, 3228); 6459 dasm_put(Dst, 3333);
6354 } else { 6460 } else {
6355 if (!vk) { 6461 if (!vk) {
6356 dasm_put(Dst, 3231); 6462 dasm_put(Dst, 3336);
6357 } 6463 }
6358 dasm_put(Dst, 3233); 6464 dasm_put(Dst, 3338);
6359 } 6465 }
6360 dasm_put(Dst, 3236, -LJ_TISNUM); 6466 dasm_put(Dst, 3341, -LJ_TISNUM);
6361 if (vk) { 6467 if (vk) {
6362 dasm_put(Dst, 3252); 6468 dasm_put(Dst, 3357);
6363 } else { 6469 } else {
6364 dasm_put(Dst, 3254); 6470 dasm_put(Dst, 3359);
6365 } 6471 }
6366 dasm_put(Dst, 3256); 6472 dasm_put(Dst, 3361);
6367 if (LJ_HASFFI) { 6473 if (LJ_HASFFI) {
6368 dasm_put(Dst, 3259, -LJ_TCDATA); 6474 dasm_put(Dst, 3364, -LJ_TCDATA);
6369 } 6475 }
6370 break; 6476 break;
6371 6477
6372 case BC_ISEQP: case BC_ISNEP: 6478 case BC_ISEQP: case BC_ISNEP:
6373 vk = op == BC_ISEQP; 6479 vk = op == BC_ISEQP;
6374 dasm_put(Dst, 3267); 6480 dasm_put(Dst, 3372);
6375 if (LJ_HASFFI) { 6481 if (LJ_HASFFI) {
6376 dasm_put(Dst, 3273, -LJ_TCDATA); 6482 dasm_put(Dst, 3378, -LJ_TCDATA);
6377 } 6483 }
6378 dasm_put(Dst, 3278); 6484 dasm_put(Dst, 3383);
6379 if (vk) { 6485 if (vk) {
6380 dasm_put(Dst, 3280); 6486 dasm_put(Dst, 3385);
6381 } else { 6487 } else {
6382 dasm_put(Dst, 3282); 6488 dasm_put(Dst, 3387);
6383 } 6489 }
6384 dasm_put(Dst, 3284); 6490 dasm_put(Dst, 3389);
6385 break; 6491 break;
6386 6492
6387 /* -- Unary test and copy ops ------------------------------------------- */ 6493 /* -- Unary test and copy ops ------------------------------------------- */
6388 6494
6389 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 6495 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
6390 dasm_put(Dst, 3291, -LJ_TTRUE); 6496 dasm_put(Dst, 3396, -LJ_TTRUE);
6391 if (op == BC_ISTC || op == BC_IST) { 6497 if (op == BC_ISTC || op == BC_IST) {
6392 dasm_put(Dst, 3299); 6498 dasm_put(Dst, 3404);
6393 if (op == BC_ISTC) { 6499 if (op == BC_ISTC) {
6394 dasm_put(Dst, 3301); 6500 dasm_put(Dst, 3406);
6395 } 6501 }
6396 } else { 6502 } else {
6397 dasm_put(Dst, 3303); 6503 dasm_put(Dst, 3408);
6398 if (op == BC_ISFC) { 6504 if (op == BC_ISFC) {
6399 dasm_put(Dst, 3305); 6505 dasm_put(Dst, 3410);
6400 } 6506 }
6401 } 6507 }
6402 dasm_put(Dst, 3307); 6508 dasm_put(Dst, 3412);
6403 break; 6509 break;
6404 6510
6405 /* -- Unary ops --------------------------------------------------------- */ 6511 /* -- Unary ops --------------------------------------------------------- */
6406 6512
6407 case BC_MOV: 6513 case BC_MOV:
6408 dasm_put(Dst, 3314); 6514 dasm_put(Dst, 3419);
6409 break; 6515 break;
6410 case BC_NOT: 6516 case BC_NOT:
6411 dasm_put(Dst, 3324, -LJ_TTRUE, ~LJ_TFALSE, ~LJ_TTRUE); 6517 dasm_put(Dst, 3429, -LJ_TTRUE, ~LJ_TFALSE, ~LJ_TTRUE);
6412 break; 6518 break;
6413 case BC_UNM: 6519 case BC_UNM:
6414 dasm_put(Dst, 3341, -LJ_TISNUM); 6520 dasm_put(Dst, 3446, -LJ_TISNUM);
6415 break; 6521 break;
6416 case BC_LEN: 6522 case BC_LEN:
6417 dasm_put(Dst, 3367, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TTAB); 6523 dasm_put(Dst, 3472, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TTAB);
6418 if (LJ_TARGET_OSX) { 6524 if (LJ_TARGET_OSX) {
6419 dasm_put(Dst, 3391); 6525 dasm_put(Dst, 3496);
6420 } 6526 }
6421 dasm_put(Dst, 3393); 6527 dasm_put(Dst, 3498);
6422 if (LJ_TARGET_OSX) { 6528 if (LJ_TARGET_OSX) {
6423 dasm_put(Dst, 3396); 6529 dasm_put(Dst, 3501);
6424 } 6530 }
6425 dasm_put(Dst, 3398); 6531 dasm_put(Dst, 3503);
6426 break; 6532 break;
6427 6533
6428 /* -- Binary ops -------------------------------------------------------- */ 6534 /* -- Binary ops -------------------------------------------------------- */
6429 6535
6430 6536
6431 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 6537 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
6432 dasm_put(Dst, 3401); 6538 dasm_put(Dst, 3506);
6433 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6539 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6434 switch (vk) { 6540 switch (vk) {
6435 case 0: 6541 case 0:
6436 dasm_put(Dst, 3404); 6542 dasm_put(Dst, 3509);
6437 break; 6543 break;
6438 case 1: 6544 case 1:
6439 dasm_put(Dst, 3407); 6545 dasm_put(Dst, 3512);
6440 break; 6546 break;
6441 default: 6547 default:
6442 dasm_put(Dst, 3410); 6548 dasm_put(Dst, 3515);
6443 break; 6549 break;
6444 } 6550 }
6445 dasm_put(Dst, 3413); 6551 dasm_put(Dst, 3518);
6446 if (vk == 1) { 6552 if (vk == 1) {
6447 dasm_put(Dst, 3415, -LJ_TISNUM, -LJ_TISNUM); 6553 dasm_put(Dst, 3520, -LJ_TISNUM, -LJ_TISNUM);
6448 } else { 6554 } else {
6449 dasm_put(Dst, 3420, -LJ_TISNUM, -LJ_TISNUM); 6555 dasm_put(Dst, 3525, -LJ_TISNUM, -LJ_TISNUM);
6450 } 6556 }
6451 dasm_put(Dst, 3425); 6557 dasm_put(Dst, 3530);
6452 switch (vk) { 6558 switch (vk) {
6453 case 0: 6559 case 0:
6454 dasm_put(Dst, 3429); 6560 dasm_put(Dst, 3534);
6455 break; 6561 break;
6456 case 1: 6562 case 1:
6457 dasm_put(Dst, 3432); 6563 dasm_put(Dst, 3537);
6458 break; 6564 break;
6459 default: 6565 default:
6460 dasm_put(Dst, 3435); 6566 dasm_put(Dst, 3540);
6461 break; 6567 break;
6462 } 6568 }
6463 dasm_put(Dst, 3438); 6569 dasm_put(Dst, 3543);
6464 switch (vk) { 6570 switch (vk) {
6465 case 0: 6571 case 0:
6466 if (vk == 1) { 6572 if (vk == 1) {
6467 dasm_put(Dst, 3447, -LJ_TISNUM, -LJ_TISNUM); 6573 dasm_put(Dst, 3552, -LJ_TISNUM, -LJ_TISNUM);
6468 } else { 6574 } else {
6469 dasm_put(Dst, 3452, -LJ_TISNUM, -LJ_TISNUM); 6575 dasm_put(Dst, 3557, -LJ_TISNUM, -LJ_TISNUM);
6470 } 6576 }
6471 dasm_put(Dst, 3457); 6577 dasm_put(Dst, 3562);
6472 break; 6578 break;
6473 case 1: 6579 case 1:
6474 if (vk == 1) { 6580 if (vk == 1) {
6475 dasm_put(Dst, 3460, -LJ_TISNUM, -LJ_TISNUM); 6581 dasm_put(Dst, 3565, -LJ_TISNUM, -LJ_TISNUM);
6476 } else { 6582 } else {
6477 dasm_put(Dst, 3465, -LJ_TISNUM, -LJ_TISNUM); 6583 dasm_put(Dst, 3570, -LJ_TISNUM, -LJ_TISNUM);
6478 } 6584 }
6479 dasm_put(Dst, 3470); 6585 dasm_put(Dst, 3575);
6480 break; 6586 break;
6481 default: 6587 default:
6482 if (vk == 1) { 6588 if (vk == 1) {
6483 dasm_put(Dst, 3473, -LJ_TISNUM, -LJ_TISNUM); 6589 dasm_put(Dst, 3578, -LJ_TISNUM, -LJ_TISNUM);
6484 } else { 6590 } else {
6485 dasm_put(Dst, 3478, -LJ_TISNUM, -LJ_TISNUM); 6591 dasm_put(Dst, 3583, -LJ_TISNUM, -LJ_TISNUM);
6486 } 6592 }
6487 dasm_put(Dst, 3483); 6593 dasm_put(Dst, 3588);
6488 break; 6594 break;
6489 } 6595 }
6490 dasm_put(Dst, 3486); 6596 dasm_put(Dst, 3591);
6491 break; 6597 break;
6492 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 6598 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
6493 dasm_put(Dst, 3492); 6599 dasm_put(Dst, 3597);
6494 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6600 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6495 switch (vk) { 6601 switch (vk) {
6496 case 0: 6602 case 0:
6497 dasm_put(Dst, 3495); 6603 dasm_put(Dst, 3600);
6498 break; 6604 break;
6499 case 1: 6605 case 1:
6500 dasm_put(Dst, 3498); 6606 dasm_put(Dst, 3603);
6501 break; 6607 break;
6502 default: 6608 default:
6503 dasm_put(Dst, 3501); 6609 dasm_put(Dst, 3606);
6504 break; 6610 break;
6505 } 6611 }
6506 dasm_put(Dst, 3504); 6612 dasm_put(Dst, 3609);
6507 if (vk == 1) { 6613 if (vk == 1) {
6508 dasm_put(Dst, 3506, -LJ_TISNUM, -LJ_TISNUM); 6614 dasm_put(Dst, 3611, -LJ_TISNUM, -LJ_TISNUM);
6509 } else { 6615 } else {
6510 dasm_put(Dst, 3511, -LJ_TISNUM, -LJ_TISNUM); 6616 dasm_put(Dst, 3616, -LJ_TISNUM, -LJ_TISNUM);
6511 } 6617 }
6512 dasm_put(Dst, 3516); 6618 dasm_put(Dst, 3621);
6513 switch (vk) { 6619 switch (vk) {
6514 case 0: 6620 case 0:
6515 dasm_put(Dst, 3520); 6621 dasm_put(Dst, 3625);
6516 break; 6622 break;
6517 case 1: 6623 case 1:
6518 dasm_put(Dst, 3523); 6624 dasm_put(Dst, 3628);
6519 break; 6625 break;
6520 default: 6626 default:
6521 dasm_put(Dst, 3526); 6627 dasm_put(Dst, 3631);
6522 break; 6628 break;
6523 } 6629 }
6524 dasm_put(Dst, 3529); 6630 dasm_put(Dst, 3634);
6525 switch (vk) { 6631 switch (vk) {
6526 case 0: 6632 case 0:
6527 if (vk == 1) { 6633 if (vk == 1) {
6528 dasm_put(Dst, 3538, -LJ_TISNUM, -LJ_TISNUM); 6634 dasm_put(Dst, 3643, -LJ_TISNUM, -LJ_TISNUM);
6529 } else { 6635 } else {
6530 dasm_put(Dst, 3543, -LJ_TISNUM, -LJ_TISNUM); 6636 dasm_put(Dst, 3648, -LJ_TISNUM, -LJ_TISNUM);
6531 } 6637 }
6532 dasm_put(Dst, 3548); 6638 dasm_put(Dst, 3653);
6533 break; 6639 break;
6534 case 1: 6640 case 1:
6535 if (vk == 1) { 6641 if (vk == 1) {
6536 dasm_put(Dst, 3551, -LJ_TISNUM, -LJ_TISNUM); 6642 dasm_put(Dst, 3656, -LJ_TISNUM, -LJ_TISNUM);
6537 } else { 6643 } else {
6538 dasm_put(Dst, 3556, -LJ_TISNUM, -LJ_TISNUM); 6644 dasm_put(Dst, 3661, -LJ_TISNUM, -LJ_TISNUM);
6539 } 6645 }
6540 dasm_put(Dst, 3561); 6646 dasm_put(Dst, 3666);
6541 break; 6647 break;
6542 default: 6648 default:
6543 if (vk == 1) { 6649 if (vk == 1) {
6544 dasm_put(Dst, 3564, -LJ_TISNUM, -LJ_TISNUM); 6650 dasm_put(Dst, 3669, -LJ_TISNUM, -LJ_TISNUM);
6545 } else { 6651 } else {
6546 dasm_put(Dst, 3569, -LJ_TISNUM, -LJ_TISNUM); 6652 dasm_put(Dst, 3674, -LJ_TISNUM, -LJ_TISNUM);
6547 } 6653 }
6548 dasm_put(Dst, 3574); 6654 dasm_put(Dst, 3679);
6549 break; 6655 break;
6550 } 6656 }
6551 dasm_put(Dst, 3577); 6657 dasm_put(Dst, 3682);
6552 break; 6658 break;
6553 case BC_MULVN: case BC_MULNV: case BC_MULVV: 6659 case BC_MULVN: case BC_MULNV: case BC_MULVV:
6554 dasm_put(Dst, 3583); 6660 dasm_put(Dst, 3688);
6555 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6661 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6556 switch (vk) { 6662 switch (vk) {
6557 case 0: 6663 case 0:
6558 dasm_put(Dst, 3586); 6664 dasm_put(Dst, 3691);
6559 break; 6665 break;
6560 case 1: 6666 case 1:
6561 dasm_put(Dst, 3589); 6667 dasm_put(Dst, 3694);
6562 break; 6668 break;
6563 default: 6669 default:
6564 dasm_put(Dst, 3592); 6670 dasm_put(Dst, 3697);
6565 break; 6671 break;
6566 } 6672 }
6567 dasm_put(Dst, 3595); 6673 dasm_put(Dst, 3700);
6568 if (vk == 1) { 6674 if (vk == 1) {
6569 dasm_put(Dst, 3597, -LJ_TISNUM, -LJ_TISNUM); 6675 dasm_put(Dst, 3702, -LJ_TISNUM, -LJ_TISNUM);
6570 } else { 6676 } else {
6571 dasm_put(Dst, 3602, -LJ_TISNUM, -LJ_TISNUM); 6677 dasm_put(Dst, 3707, -LJ_TISNUM, -LJ_TISNUM);
6572 } 6678 }
6573 dasm_put(Dst, 3607); 6679 dasm_put(Dst, 3712);
6574 switch (vk) { 6680 switch (vk) {
6575 case 0: 6681 case 0:
6576 dasm_put(Dst, 3612); 6682 dasm_put(Dst, 3717);
6577 break; 6683 break;
6578 case 1: 6684 case 1:
6579 dasm_put(Dst, 3615); 6685 dasm_put(Dst, 3720);
6580 break; 6686 break;
6581 default: 6687 default:
6582 dasm_put(Dst, 3618); 6688 dasm_put(Dst, 3723);
6583 break; 6689 break;
6584 } 6690 }
6585 dasm_put(Dst, 3621); 6691 dasm_put(Dst, 3726);
6586 switch (vk) { 6692 switch (vk) {
6587 case 0: 6693 case 0:
6588 if (vk == 1) { 6694 if (vk == 1) {
6589 dasm_put(Dst, 3630, -LJ_TISNUM, -LJ_TISNUM); 6695 dasm_put(Dst, 3735, -LJ_TISNUM, -LJ_TISNUM);
6590 } else { 6696 } else {
6591 dasm_put(Dst, 3635, -LJ_TISNUM, -LJ_TISNUM); 6697 dasm_put(Dst, 3740, -LJ_TISNUM, -LJ_TISNUM);
6592 } 6698 }
6593 dasm_put(Dst, 3640); 6699 dasm_put(Dst, 3745);
6594 break; 6700 break;
6595 case 1: 6701 case 1:
6596 if (vk == 1) { 6702 if (vk == 1) {
6597 dasm_put(Dst, 3643, -LJ_TISNUM, -LJ_TISNUM); 6703 dasm_put(Dst, 3748, -LJ_TISNUM, -LJ_TISNUM);
6598 } else { 6704 } else {
6599 dasm_put(Dst, 3648, -LJ_TISNUM, -LJ_TISNUM); 6705 dasm_put(Dst, 3753, -LJ_TISNUM, -LJ_TISNUM);
6600 } 6706 }
6601 dasm_put(Dst, 3653); 6707 dasm_put(Dst, 3758);
6602 break; 6708 break;
6603 default: 6709 default:
6604 if (vk == 1) { 6710 if (vk == 1) {
6605 dasm_put(Dst, 3656, -LJ_TISNUM, -LJ_TISNUM); 6711 dasm_put(Dst, 3761, -LJ_TISNUM, -LJ_TISNUM);
6606 } else { 6712 } else {
6607 dasm_put(Dst, 3661, -LJ_TISNUM, -LJ_TISNUM); 6713 dasm_put(Dst, 3766, -LJ_TISNUM, -LJ_TISNUM);
6608 } 6714 }
6609 dasm_put(Dst, 3666); 6715 dasm_put(Dst, 3771);
6610 break; 6716 break;
6611 } 6717 }
6612 dasm_put(Dst, 3669); 6718 dasm_put(Dst, 3774);
6613 break; 6719 break;
6614 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 6720 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
6615 dasm_put(Dst, 3675); 6721 dasm_put(Dst, 3780);
6616 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6722 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6617 switch (vk) { 6723 switch (vk) {
6618 case 0: 6724 case 0:
6619 dasm_put(Dst, 3678); 6725 dasm_put(Dst, 3783);
6620 break; 6726 break;
6621 case 1: 6727 case 1:
6622 dasm_put(Dst, 3681); 6728 dasm_put(Dst, 3786);
6623 break; 6729 break;
6624 default: 6730 default:
6625 dasm_put(Dst, 3684); 6731 dasm_put(Dst, 3789);
6626 break; 6732 break;
6627 } 6733 }
6628 switch (vk) { 6734 switch (vk) {
6629 case 0: 6735 case 0:
6630 if (vk == 1) { 6736 if (vk == 1) {
6631 dasm_put(Dst, 3687, -LJ_TISNUM, -LJ_TISNUM); 6737 dasm_put(Dst, 3792, -LJ_TISNUM, -LJ_TISNUM);
6632 } else { 6738 } else {
6633 dasm_put(Dst, 3692, -LJ_TISNUM, -LJ_TISNUM); 6739 dasm_put(Dst, 3797, -LJ_TISNUM, -LJ_TISNUM);
6634 } 6740 }
6635 dasm_put(Dst, 3697); 6741 dasm_put(Dst, 3802);
6636 break; 6742 break;
6637 case 1: 6743 case 1:
6638 if (vk == 1) { 6744 if (vk == 1) {
6639 dasm_put(Dst, 3700, -LJ_TISNUM, -LJ_TISNUM); 6745 dasm_put(Dst, 3805, -LJ_TISNUM, -LJ_TISNUM);
6640 } else { 6746 } else {
6641 dasm_put(Dst, 3705, -LJ_TISNUM, -LJ_TISNUM); 6747 dasm_put(Dst, 3810, -LJ_TISNUM, -LJ_TISNUM);
6642 } 6748 }
6643 dasm_put(Dst, 3710); 6749 dasm_put(Dst, 3815);
6644 break; 6750 break;
6645 default: 6751 default:
6646 if (vk == 1) { 6752 if (vk == 1) {
6647 dasm_put(Dst, 3713, -LJ_TISNUM, -LJ_TISNUM); 6753 dasm_put(Dst, 3818, -LJ_TISNUM, -LJ_TISNUM);
6648 } else { 6754 } else {
6649 dasm_put(Dst, 3718, -LJ_TISNUM, -LJ_TISNUM); 6755 dasm_put(Dst, 3823, -LJ_TISNUM, -LJ_TISNUM);
6650 } 6756 }
6651 dasm_put(Dst, 3723); 6757 dasm_put(Dst, 3828);
6652 break; 6758 break;
6653 } 6759 }
6654 dasm_put(Dst, 3726); 6760 dasm_put(Dst, 3831);
6655 break; 6761 break;
6656 case BC_MODVN: case BC_MODNV: case BC_MODVV: 6762 case BC_MODVN: case BC_MODNV: case BC_MODVV:
6657 dasm_put(Dst, 3736); 6763 dasm_put(Dst, 3841);
6658 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6764 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6659 switch (vk) { 6765 switch (vk) {
6660 case 0: 6766 case 0:
6661 dasm_put(Dst, 3739); 6767 dasm_put(Dst, 3844);
6662 break; 6768 break;
6663 case 1: 6769 case 1:
6664 dasm_put(Dst, 3742); 6770 dasm_put(Dst, 3847);
6665 break; 6771 break;
6666 default: 6772 default:
6667 dasm_put(Dst, 3745); 6773 dasm_put(Dst, 3850);
6668 break; 6774 break;
6669 } 6775 }
6670 if (vk == 1) { 6776 if (vk == 1) {
6671 dasm_put(Dst, 3748, -LJ_TISNUM, -LJ_TISNUM); 6777 dasm_put(Dst, 3853, -LJ_TISNUM, -LJ_TISNUM);
6672 } else { 6778 } else {
6673 dasm_put(Dst, 3753, -LJ_TISNUM, -LJ_TISNUM); 6779 dasm_put(Dst, 3858, -LJ_TISNUM, -LJ_TISNUM);
6674 } 6780 }
6675 dasm_put(Dst, 3758); 6781 dasm_put(Dst, 3863);
6676 switch (vk) { 6782 switch (vk) {
6677 case 0: 6783 case 0:
6678 dasm_put(Dst, 3762); 6784 dasm_put(Dst, 3867);
6679 break; 6785 break;
6680 case 1: 6786 case 1:
6681 dasm_put(Dst, 3765); 6787 dasm_put(Dst, 3870);
6682 break; 6788 break;
6683 default: 6789 default:
6684 dasm_put(Dst, 3768); 6790 dasm_put(Dst, 3873);
6685 break; 6791 break;
6686 } 6792 }
6687 dasm_put(Dst, 3771, ~LJ_TISNUM); 6793 dasm_put(Dst, 3876, ~LJ_TISNUM);
6688 switch (vk) { 6794 switch (vk) {
6689 case 0: 6795 case 0:
6690 if (vk == 1) { 6796 if (vk == 1) {
6691 dasm_put(Dst, 3785, -LJ_TISNUM, -LJ_TISNUM); 6797 dasm_put(Dst, 3890, -LJ_TISNUM, -LJ_TISNUM);
6692 } else { 6798 } else {
6693 dasm_put(Dst, 3790, -LJ_TISNUM, -LJ_TISNUM); 6799 dasm_put(Dst, 3895, -LJ_TISNUM, -LJ_TISNUM);
6694 } 6800 }
6695 dasm_put(Dst, 3795); 6801 dasm_put(Dst, 3900);
6696 break; 6802 break;
6697 case 1: 6803 case 1:
6698 if (vk == 1) { 6804 if (vk == 1) {
6699 dasm_put(Dst, 3798, -LJ_TISNUM, -LJ_TISNUM); 6805 dasm_put(Dst, 3903, -LJ_TISNUM, -LJ_TISNUM);
6700 } else { 6806 } else {
6701 dasm_put(Dst, 3803, -LJ_TISNUM, -LJ_TISNUM); 6807 dasm_put(Dst, 3908, -LJ_TISNUM, -LJ_TISNUM);
6702 } 6808 }
6703 dasm_put(Dst, 3808); 6809 dasm_put(Dst, 3913);
6704 break; 6810 break;
6705 default: 6811 default:
6706 if (vk == 1) { 6812 if (vk == 1) {
6707 dasm_put(Dst, 3811, -LJ_TISNUM, -LJ_TISNUM); 6813 dasm_put(Dst, 3916, -LJ_TISNUM, -LJ_TISNUM);
6708 } else { 6814 } else {
6709 dasm_put(Dst, 3816, -LJ_TISNUM, -LJ_TISNUM); 6815 dasm_put(Dst, 3921, -LJ_TISNUM, -LJ_TISNUM);
6710 } 6816 }
6711 dasm_put(Dst, 3821); 6817 dasm_put(Dst, 3926);
6712 break; 6818 break;
6713 } 6819 }
6714 if (LJ_TARGET_OSX) { 6820 if (LJ_TARGET_OSX) {
6715 dasm_put(Dst, 3824); 6821 dasm_put(Dst, 3929);
6716 } 6822 }
6717 dasm_put(Dst, 3826); 6823 dasm_put(Dst, 3931);
6718 if (LJ_TARGET_OSX) { 6824 if (LJ_TARGET_OSX) {
6719 dasm_put(Dst, 3829); 6825 dasm_put(Dst, 3934);
6720 } 6826 }
6721 dasm_put(Dst, 3831); 6827 dasm_put(Dst, 3936);
6722 break; 6828 break;
6723 case BC_POW: 6829 case BC_POW:
6724 dasm_put(Dst, 3834); 6830 dasm_put(Dst, 3939);
6725 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6831 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6726 switch (vk) { 6832 switch (vk) {
6727 case 0: 6833 case 0:
6728 dasm_put(Dst, 3837); 6834 dasm_put(Dst, 3942);
6729 break; 6835 break;
6730 case 1: 6836 case 1:
6731 dasm_put(Dst, 3840); 6837 dasm_put(Dst, 3945);
6732 break; 6838 break;
6733 default: 6839 default:
6734 dasm_put(Dst, 3843); 6840 dasm_put(Dst, 3948);
6735 break; 6841 break;
6736 } 6842 }
6737 switch (vk) { 6843 switch (vk) {
6738 case 0: 6844 case 0:
6739 if (vk == 1) { 6845 if (vk == 1) {
6740 dasm_put(Dst, 3846, -LJ_TISNUM, -LJ_TISNUM); 6846 dasm_put(Dst, 3951, -LJ_TISNUM, -LJ_TISNUM);
6741 } else { 6847 } else {
6742 dasm_put(Dst, 3851, -LJ_TISNUM, -LJ_TISNUM); 6848 dasm_put(Dst, 3956, -LJ_TISNUM, -LJ_TISNUM);
6743 } 6849 }
6744 dasm_put(Dst, 3856); 6850 dasm_put(Dst, 3961);
6745 break; 6851 break;
6746 case 1: 6852 case 1:
6747 if (vk == 1) { 6853 if (vk == 1) {
6748 dasm_put(Dst, 3859, -LJ_TISNUM, -LJ_TISNUM); 6854 dasm_put(Dst, 3964, -LJ_TISNUM, -LJ_TISNUM);
6749 } else { 6855 } else {
6750 dasm_put(Dst, 3864, -LJ_TISNUM, -LJ_TISNUM); 6856 dasm_put(Dst, 3969, -LJ_TISNUM, -LJ_TISNUM);
6751 } 6857 }
6752 dasm_put(Dst, 3869); 6858 dasm_put(Dst, 3974);
6753 break; 6859 break;
6754 default: 6860 default:
6755 if (vk == 1) { 6861 if (vk == 1) {
6756 dasm_put(Dst, 3872, -LJ_TISNUM, -LJ_TISNUM); 6862 dasm_put(Dst, 3977, -LJ_TISNUM, -LJ_TISNUM);
6757 } else { 6863 } else {
6758 dasm_put(Dst, 3877, -LJ_TISNUM, -LJ_TISNUM); 6864 dasm_put(Dst, 3982, -LJ_TISNUM, -LJ_TISNUM);
6759 } 6865 }
6760 dasm_put(Dst, 3882); 6866 dasm_put(Dst, 3987);
6761 break; 6867 break;
6762 } 6868 }
6763 if (LJ_TARGET_OSX) { 6869 if (LJ_TARGET_OSX) {
6764 dasm_put(Dst, 3885); 6870 dasm_put(Dst, 3990);
6765 } 6871 }
6766 dasm_put(Dst, 3887); 6872 dasm_put(Dst, 3992);
6767 if (LJ_TARGET_OSX) { 6873 if (LJ_TARGET_OSX) {
6768 dasm_put(Dst, 3890); 6874 dasm_put(Dst, 3995);
6769 } 6875 }
6770 dasm_put(Dst, 3892); 6876 dasm_put(Dst, 3997);
6771 break; 6877 break;
6772 6878
6773 case BC_CAT: 6879 case BC_CAT:
6774 dasm_put(Dst, 3900, Dt1(->base), Dt1(->base)); 6880 dasm_put(Dst, 4005, Dt1(->base), Dt1(->base));
6775 break; 6881 break;
6776 6882
6777 /* -- Constant ops ------------------------------------------------------ */ 6883 /* -- Constant ops ------------------------------------------------------ */
6778 6884
6779 case BC_KSTR: 6885 case BC_KSTR:
6780 dasm_put(Dst, 3926, ~LJ_TSTR); 6886 dasm_put(Dst, 4031, ~LJ_TSTR);
6781 break; 6887 break;
6782 case BC_KCDATA: 6888 case BC_KCDATA:
6783#if LJ_HASFFI 6889#if LJ_HASFFI
6784 dasm_put(Dst, 3938, ~LJ_TCDATA); 6890 dasm_put(Dst, 4043, ~LJ_TCDATA);
6785#endif 6891#endif
6786 break; 6892 break;
6787 case BC_KSHORT: 6893 case BC_KSHORT:
6788 dasm_put(Dst, 3950, ~LJ_TISNUM); 6894 dasm_put(Dst, 4055, ~LJ_TISNUM);
6789 break; 6895 break;
6790 case BC_KNUM: 6896 case BC_KNUM:
6791 dasm_put(Dst, 3961); 6897 dasm_put(Dst, 4066);
6792 break; 6898 break;
6793 case BC_KPRI: 6899 case BC_KPRI:
6794 dasm_put(Dst, 3971); 6900 dasm_put(Dst, 4076);
6795 break; 6901 break;
6796 case BC_KNIL: 6902 case BC_KNIL:
6797 dasm_put(Dst, 3981, ~LJ_TNIL); 6903 dasm_put(Dst, 4086, ~LJ_TNIL);
6798 break; 6904 break;
6799 6905
6800 /* -- Upvalue and function ops ------------------------------------------ */ 6906 /* -- Upvalue and function ops ------------------------------------------ */
6801 6907
6802 case BC_UGET: 6908 case BC_UGET:
6803 dasm_put(Dst, 4000, offsetof(GCfuncL, uvptr), DtA(->v)); 6909 dasm_put(Dst, 4105, offsetof(GCfuncL, uvptr), DtA(->v));
6804 break; 6910 break;
6805 case BC_USETV: 6911 case BC_USETV:
6806 dasm_put(Dst, 4016, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->closed), DtA(->v), LJ_GC_BLACK, -LJ_TISGCV, -(LJ_TISNUM - LJ_TISGCV), Dt4(->gch.marked), -GG_DISP2G, LJ_GC_WHITES); 6912 dasm_put(Dst, 4121, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->closed), DtA(->v), LJ_GC_BLACK, -LJ_TISGCV, -(LJ_TISNUM - LJ_TISGCV), Dt4(->gch.marked), -GG_DISP2G, LJ_GC_WHITES);
6807 if (LJ_TARGET_OSX) { 6913 if (LJ_TARGET_OSX) {
6808 dasm_put(Dst, 4056); 6914 dasm_put(Dst, 4161);
6809 } else { 6915 } else {
6810 dasm_put(Dst, 4063); 6916 dasm_put(Dst, 4168);
6811 } 6917 }
6812 dasm_put(Dst, 4066); 6918 dasm_put(Dst, 4171);
6813 break; 6919 break;
6814 case BC_USETS: 6920 case BC_USETS:
6815 dasm_put(Dst, 4069, offsetof(GCfuncL, uvptr), ~LJ_TSTR, DtA(->marked), DtA(->v), DtA(->closed), LJ_GC_BLACK, Dt5(->marked), LJ_GC_WHITES, -GG_DISP2G); 6921 dasm_put(Dst, 4174, offsetof(GCfuncL, uvptr), ~LJ_TSTR, DtA(->marked), DtA(->v), DtA(->closed), LJ_GC_BLACK, Dt5(->marked), LJ_GC_WHITES, -GG_DISP2G);
6816 if (LJ_TARGET_OSX) { 6922 if (LJ_TARGET_OSX) {
6817 dasm_put(Dst, 4105); 6923 dasm_put(Dst, 4210);
6818 } else { 6924 } else {
6819 dasm_put(Dst, 4112); 6925 dasm_put(Dst, 4217);
6820 } 6926 }
6821 dasm_put(Dst, 4115); 6927 dasm_put(Dst, 4220);
6822 break; 6928 break;
6823 case BC_USETN: 6929 case BC_USETN:
6824 dasm_put(Dst, 4118, offsetof(GCfuncL, uvptr), DtA(->v)); 6930 dasm_put(Dst, 4223, offsetof(GCfuncL, uvptr), DtA(->v));
6825 break; 6931 break;
6826 case BC_USETP: 6932 case BC_USETP:
6827 dasm_put(Dst, 4135, offsetof(GCfuncL, uvptr), DtA(->v)); 6933 dasm_put(Dst, 4240, offsetof(GCfuncL, uvptr), DtA(->v));
6828 break; 6934 break;
6829 6935
6830 case BC_UCLO: 6936 case BC_UCLO:
6831 dasm_put(Dst, 4151, Dt1(->openupval), Dt1(->base), Dt1(->base)); 6937 dasm_put(Dst, 4256, Dt1(->openupval), Dt1(->base), Dt1(->base));
6832 break; 6938 break;
6833 6939
6834 case BC_FNEW: 6940 case BC_FNEW:
6835 dasm_put(Dst, 4174, Dt1(->base), Dt1(->base), ~LJ_TFUNC); 6941 dasm_put(Dst, 4279, Dt1(->base), Dt1(->base), ~LJ_TFUNC);
6836 break; 6942 break;
6837 6943
6838 /* -- Table ops --------------------------------------------------------- */ 6944 /* -- Table ops --------------------------------------------------------- */
@@ -6840,115 +6946,115 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6840 case BC_TNEW: 6946 case BC_TNEW:
6841 case BC_TDUP: 6947 case BC_TDUP:
6842 if (op == BC_TDUP) { 6948 if (op == BC_TDUP) {
6843 dasm_put(Dst, 4195); 6949 dasm_put(Dst, 4300);
6844 } 6950 }
6845 dasm_put(Dst, 4197, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); 6951 dasm_put(Dst, 4302, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base));
6846 if (op == BC_TNEW) { 6952 if (op == BC_TNEW) {
6847 dasm_put(Dst, 4210); 6953 dasm_put(Dst, 4315);
6848 } else { 6954 } else {
6849 dasm_put(Dst, 4219); 6955 dasm_put(Dst, 4324);
6850 } 6956 }
6851 dasm_put(Dst, 4223, Dt1(->base), ~LJ_TTAB); 6957 dasm_put(Dst, 4328, Dt1(->base), ~LJ_TTAB);
6852 break; 6958 break;
6853 6959
6854 case BC_GGET: 6960 case BC_GGET:
6855 case BC_GSET: 6961 case BC_GSET:
6856 dasm_put(Dst, 4241, Dt7(->env)); 6962 dasm_put(Dst, 4346, Dt7(->env));
6857 if (op == BC_GGET) { 6963 if (op == BC_GGET) {
6858 dasm_put(Dst, 4247); 6964 dasm_put(Dst, 4352);
6859 } else { 6965 } else {
6860 dasm_put(Dst, 4250); 6966 dasm_put(Dst, 4355);
6861 } 6967 }
6862 break; 6968 break;
6863 6969
6864 case BC_TGETV: 6970 case BC_TGETV:
6865 dasm_put(Dst, 4253, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, -LJ_TSTR); 6971 dasm_put(Dst, 4358, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, -LJ_TSTR);
6866 break; 6972 break;
6867 case BC_TGETS: 6973 case BC_TGETS:
6868 dasm_put(Dst, 4310, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), DtB(->key), DtB(->val), DtB(->next), -LJ_TSTR, -LJ_TNIL, Dt6(->metatable), ~LJ_TNIL, Dt6(->nomm)); 6974 dasm_put(Dst, 4415, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), DtB(->key), DtB(->val), DtB(->next), -LJ_TSTR, -LJ_TNIL, Dt6(->metatable), ~LJ_TNIL, Dt6(->nomm));
6869 dasm_put(Dst, 4370, 1<<MM_index); 6975 dasm_put(Dst, 4475, 1<<MM_index);
6870 break; 6976 break;
6871 case BC_TGETB: 6977 case BC_TGETB:
6872 dasm_put(Dst, 4377, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 6978 dasm_put(Dst, 4482, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
6873 break; 6979 break;
6874 6980
6875 case BC_TSETV: 6981 case BC_TSETV:
6876 dasm_put(Dst, 4420, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); 6982 dasm_put(Dst, 4525, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex);
6877 dasm_put(Dst, 4480, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TSTR); 6983 dasm_put(Dst, 4585, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TSTR);
6878 break; 6984 break;
6879 case BC_TSETS: 6985 case BC_TSETS:
6880 dasm_put(Dst, 4501, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), DtB(->key), DtB(->val.it), DtB(->next), -LJ_TSTR, Dt6(->marked), -LJ_TNIL, LJ_GC_BLACK, DtB(->val)); 6986 dasm_put(Dst, 4606, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), DtB(->key), DtB(->val.it), DtB(->next), -LJ_TSTR, Dt6(->marked), -LJ_TNIL, LJ_GC_BLACK, DtB(->val));
6881 dasm_put(Dst, 4559, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->metatable), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, ~LJ_TSTR, Dt1(->base), DISPATCH_GL(gc.grayagain), LJ_GC_BLACK); 6987 dasm_put(Dst, 4664, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->metatable), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, ~LJ_TSTR, Dt1(->base), DISPATCH_GL(gc.grayagain), LJ_GC_BLACK);
6882 dasm_put(Dst, 4612, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 6988 dasm_put(Dst, 4717, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
6883 break; 6989 break;
6884 case BC_TSETB: 6990 case BC_TSETB:
6885 dasm_put(Dst, 4621, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK); 6991 dasm_put(Dst, 4726, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK);
6886 dasm_put(Dst, 4678, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 6992 dasm_put(Dst, 4783, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
6887 break; 6993 break;
6888 6994
6889 case BC_TSETM: 6995 case BC_TSETM:
6890 dasm_put(Dst, 4687, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt1(->base)); 6996 dasm_put(Dst, 4792, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt1(->base));
6891 if (LJ_TARGET_OSX) { 6997 if (LJ_TARGET_OSX) {
6892 dasm_put(Dst, 4732, Dt1(->base)); 6998 dasm_put(Dst, 4837, Dt1(->base));
6893 } 6999 }
6894 dasm_put(Dst, 4735, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 7000 dasm_put(Dst, 4840, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
6895 break; 7001 break;
6896 7002
6897 /* -- Calls and vararg handling ----------------------------------------- */ 7003 /* -- Calls and vararg handling ----------------------------------------- */
6898 7004
6899 case BC_CALLM: 7005 case BC_CALLM:
6900 dasm_put(Dst, 4751); 7006 dasm_put(Dst, 4856);
6901 break; 7007 break;
6902 case BC_CALL: 7008 case BC_CALL:
6903 dasm_put(Dst, 4757, -LJ_TFUNC, Dt7(->field_pc)); 7009 dasm_put(Dst, 4862, -LJ_TFUNC, Dt7(->field_pc));
6904 break; 7010 break;
6905 7011
6906 case BC_CALLMT: 7012 case BC_CALLMT:
6907 dasm_put(Dst, 4777); 7013 dasm_put(Dst, 4882);
6908 break; 7014 break;
6909 case BC_CALLT: 7015 case BC_CALLT:
6910 dasm_put(Dst, 4782, -LJ_TFUNC, Dt7(->ffid), FRAME_TYPE, Dt7(->field_pc), Dt7(->field_pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP); 7016 dasm_put(Dst, 4887, -LJ_TFUNC, Dt7(->ffid), FRAME_TYPE, Dt7(->field_pc), Dt7(->field_pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP);
6911 dasm_put(Dst, 4843, FRAME_TYPE); 7017 dasm_put(Dst, 4948, FRAME_TYPE);
6912 break; 7018 break;
6913 7019
6914 case BC_ITERC: 7020 case BC_ITERC:
6915 dasm_put(Dst, 4854, -LJ_TFUNC, Dt7(->field_pc)); 7021 dasm_put(Dst, 4959, -LJ_TFUNC, Dt7(->field_pc));
6916 break; 7022 break;
6917 7023
6918 case BC_ITERN: 7024 case BC_ITERN:
6919#if LJ_HASJIT 7025#if LJ_HASJIT
6920#endif 7026#endif
6921 dasm_put(Dst, 4878, Dt6(->asize), Dt6(->array), -LJ_TNIL, ~LJ_TISNUM, Dt6(->hmask), Dt6(->node), DtB(->val), -LJ_TNIL, DtB(->key)); 7027 dasm_put(Dst, 4983, Dt6(->asize), Dt6(->array), -LJ_TNIL, ~LJ_TISNUM, Dt6(->hmask), Dt6(->node), DtB(->val), -LJ_TNIL, DtB(->key));
6922 break; 7028 break;
6923 7029
6924 case BC_ISNEXT: 7030 case BC_ISNEXT:
6925 dasm_put(Dst, 4943, -LJ_TFUNC, Dt8(->ffid), -LJ_TTAB, -LJ_TNIL, FF_next_N, BC_JMP, BC_ITERC); 7031 dasm_put(Dst, 5048, -LJ_TFUNC, Dt8(->ffid), -LJ_TTAB, -LJ_TNIL, FF_next_N, BC_JMP, BC_ITERC);
6926 break; 7032 break;
6927 7033
6928 case BC_VARG: 7034 case BC_VARG:
6929 dasm_put(Dst, 4982, FRAME_VARG, ~LJ_TNIL, Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->base)); 7035 dasm_put(Dst, 5087, FRAME_VARG, ~LJ_TNIL, Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->base));
6930 break; 7036 break;
6931 7037
6932 /* -- Returns ----------------------------------------------------------- */ 7038 /* -- Returns ----------------------------------------------------------- */
6933 7039
6934 case BC_RETM: 7040 case BC_RETM:
6935 dasm_put(Dst, 5054); 7041 dasm_put(Dst, 5159);
6936 break; 7042 break;
6937 7043
6938 case BC_RET: 7044 case BC_RET:
6939 dasm_put(Dst, 5061, FRAME_TYPE, FRAME_VARG, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL, FRAME_TYPEP); 7045 dasm_put(Dst, 5166, FRAME_TYPE, FRAME_VARG, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL, FRAME_TYPEP);
6940 break; 7046 break;
6941 7047
6942 case BC_RET0: case BC_RET1: 7048 case BC_RET0: case BC_RET1:
6943 dasm_put(Dst, 5126, FRAME_TYPE, FRAME_VARG); 7049 dasm_put(Dst, 5231, FRAME_TYPE, FRAME_VARG);
6944 if (op == BC_RET1) { 7050 if (op == BC_RET1) {
6945 dasm_put(Dst, 5137); 7051 dasm_put(Dst, 5242);
6946 } 7052 }
6947 dasm_put(Dst, 5139); 7053 dasm_put(Dst, 5244);
6948 if (op == BC_RET1) { 7054 if (op == BC_RET1) {
6949 dasm_put(Dst, 5142); 7055 dasm_put(Dst, 5247);
6950 } 7056 }
6951 dasm_put(Dst, 5144, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL); 7057 dasm_put(Dst, 5249, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL);
6952 break; 7058 break;
6953 7059
6954 /* -- Loops and branches ------------------------------------------------ */ 7060 /* -- Loops and branches ------------------------------------------------ */
@@ -6956,7 +7062,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6956 7062
6957 case BC_FORL: 7063 case BC_FORL:
6958#if LJ_HASJIT 7064#if LJ_HASJIT
6959 dasm_put(Dst, 5170, -GG_DISP2HOT); 7065 dasm_put(Dst, 5275, -GG_DISP2HOT);
6960#endif 7066#endif
6961 break; 7067 break;
6962 7068
@@ -6968,66 +7074,68 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6968 case BC_FORI: 7074 case BC_FORI:
6969 case BC_IFORL: 7075 case BC_IFORL:
6970 vk = (op == BC_IFORL || op == BC_JFORL); 7076 vk = (op == BC_IFORL || op == BC_JFORL);
6971 dasm_put(Dst, 5180); 7077 dasm_put(Dst, 5285);
6972 if (op != BC_JFORL) { 7078 if (op != BC_JFORL) {
6973 dasm_put(Dst, 5182); 7079 dasm_put(Dst, 5287);
6974 } 7080 }
6975 if (!vk) { 7081 if (!vk) {
6976 dasm_put(Dst, 5184, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); 7082 dasm_put(Dst, 5289, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM);
6977 } else { 7083 } else {
6978 dasm_put(Dst, 5202, -LJ_TISNUM); 7084 dasm_put(Dst, 5307, -LJ_TISNUM);
6979 if (op == BC_IFORL) { 7085 if (op == BC_IFORL) {
6980 dasm_put(Dst, 5210); 7086 dasm_put(Dst, 5315);
6981 } else { 7087 } else {
6982 dasm_put(Dst, 5212); 7088 dasm_put(Dst, 5317);
6983 } 7089 }
6984 dasm_put(Dst, 5215); 7090 dasm_put(Dst, 5320);
6985 } 7091 }
6986 dasm_put(Dst, 5220); 7092 dasm_put(Dst, 5325);
6987 if (op == BC_FORI) { 7093 if (op == BC_FORI) {
6988 dasm_put(Dst, 5222); 7094 dasm_put(Dst, 5327);
6989 } else if (op == BC_JFORI) { 7095 } else if (op == BC_JFORI) {
6990 dasm_put(Dst, 5224, BC_JLOOP); 7096 dasm_put(Dst, 5329);
6991 } else if (op == BC_IFORL) { 7097 } else if (op == BC_IFORL) {
6992 dasm_put(Dst, 5229); 7098 dasm_put(Dst, 5332);
6993 } else {
6994 dasm_put(Dst, 5231, BC_JLOOP);
6995 } 7099 }
6996 if (vk) { 7100 if (vk) {
6997 dasm_put(Dst, 5234); 7101 dasm_put(Dst, 5334);
6998 } 7102 }
6999 dasm_put(Dst, 5236); 7103 dasm_put(Dst, 5336);
7104 if (op == BC_JFORI || op == BC_JFORL) {
7105 dasm_put(Dst, 5341, BC_JLOOP);
7106 }
7107 dasm_put(Dst, 5344);
7000 if (!vk) { 7108 if (!vk) {
7001 dasm_put(Dst, 5247); 7109 dasm_put(Dst, 5351);
7002 } else { 7110 } else {
7003 dasm_put(Dst, 5249); 7111 dasm_put(Dst, 5353);
7004 } 7112 }
7005 dasm_put(Dst, 5251); 7113 dasm_put(Dst, 5355);
7006 if (!vk) { 7114 if (!vk) {
7007 dasm_put(Dst, 5255, -LJ_TISNUM, -LJ_TISNUM); 7115 dasm_put(Dst, 5359, -LJ_TISNUM, -LJ_TISNUM);
7008 } else { 7116 } else {
7009 dasm_put(Dst, 5267); 7117 dasm_put(Dst, 5371);
7010 } 7118 }
7011 dasm_put(Dst, 5276); 7119 dasm_put(Dst, 5380);
7012 if (op == BC_FORI) { 7120 if (op == BC_FORI) {
7013 dasm_put(Dst, 5280); 7121 dasm_put(Dst, 5384);
7014 } else if (op == BC_JFORI) { 7122 } else if (op == BC_JFORI) {
7015 dasm_put(Dst, 5282, BC_JLOOP); 7123 dasm_put(Dst, 5386, BC_JLOOP);
7016 } else if (op == BC_IFORL) { 7124 } else if (op == BC_IFORL) {
7017 dasm_put(Dst, 5287); 7125 dasm_put(Dst, 5391);
7018 } else { 7126 } else {
7019 dasm_put(Dst, 5289, BC_JLOOP); 7127 dasm_put(Dst, 5393, BC_JLOOP);
7020 } 7128 }
7021 dasm_put(Dst, 5292); 7129 dasm_put(Dst, 5396);
7022 if (vk) { 7130 if (vk) {
7023 dasm_put(Dst, 5298); 7131 dasm_put(Dst, 5402);
7024 } 7132 }
7025 dasm_put(Dst, 5303); 7133 dasm_put(Dst, 5407);
7026 break; 7134 break;
7027 7135
7028 case BC_ITERL: 7136 case BC_ITERL:
7029#if LJ_HASJIT 7137#if LJ_HASJIT
7030 dasm_put(Dst, 5309, -GG_DISP2HOT); 7138 dasm_put(Dst, 5413, -GG_DISP2HOT);
7031#endif 7139#endif
7032 break; 7140 break;
7033 7141
@@ -7036,40 +7144,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
7036 break; 7144 break;
7037#endif 7145#endif
7038 case BC_IITERL: 7146 case BC_IITERL:
7039 dasm_put(Dst, 5319); 7147 dasm_put(Dst, 5423);
7040 if (op == BC_JITERL) { 7148 if (op == BC_JITERL) {
7041 dasm_put(Dst, 5321, -LJ_TNIL, BC_JLOOP); 7149 dasm_put(Dst, 5425, -LJ_TNIL, BC_JLOOP);
7042 } else { 7150 } else {
7043 dasm_put(Dst, 5327, -LJ_TNIL); 7151 dasm_put(Dst, 5431, -LJ_TNIL);
7044 } 7152 }
7045 dasm_put(Dst, 5333); 7153 dasm_put(Dst, 5437);
7046 break; 7154 break;
7047 7155
7048 case BC_LOOP: 7156 case BC_LOOP:
7049#if LJ_HASJIT 7157#if LJ_HASJIT
7050 dasm_put(Dst, 5340, -GG_DISP2HOT); 7158 dasm_put(Dst, 5444, -GG_DISP2HOT);
7051#endif 7159#endif
7052 break; 7160 break;
7053 7161
7054 case BC_ILOOP: 7162 case BC_ILOOP:
7055 dasm_put(Dst, 5350); 7163 dasm_put(Dst, 5454);
7056 break; 7164 break;
7057 7165
7058 case BC_JLOOP: 7166 case BC_JLOOP:
7059#if LJ_HASJIT 7167#if LJ_HASJIT
7060 dasm_put(Dst, 5357, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 7168 dasm_put(Dst, 5461, DISPATCH_J(trace), DISPATCH_GL(vmstate), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
7061#endif 7169#endif
7062 break; 7170 break;
7063 7171
7064 case BC_JMP: 7172 case BC_JMP:
7065 dasm_put(Dst, 5368); 7173 dasm_put(Dst, 5475);
7066 break; 7174 break;
7067 7175
7068 /* -- Function headers -------------------------------------------------- */ 7176 /* -- Function headers -------------------------------------------------- */
7069 7177
7070 case BC_FUNCF: 7178 case BC_FUNCF:
7071#if LJ_HASJIT 7179#if LJ_HASJIT
7072 dasm_put(Dst, 5377, -GG_DISP2HOT); 7180 dasm_put(Dst, 5484, -GG_DISP2HOT);
7073#endif 7181#endif
7074 case BC_FUNCV: /* NYI: compiled vararg functions. */ 7182 case BC_FUNCV: /* NYI: compiled vararg functions. */
7075 break; 7183 break;
@@ -7079,38 +7187,42 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
7079 break; 7187 break;
7080#endif 7188#endif
7081 case BC_IFUNCF: 7189 case BC_IFUNCF:
7082 dasm_put(Dst, 5387, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), ~LJ_TNIL); 7190 dasm_put(Dst, 5494, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k));
7191 if (op != BC_JFUNCF) {
7192 dasm_put(Dst, 5504);
7193 }
7194 dasm_put(Dst, 5507, ~LJ_TNIL);
7083 if (op == BC_JFUNCF) { 7195 if (op == BC_JFUNCF) {
7084 dasm_put(Dst, 5405, BC_JLOOP); 7196 dasm_put(Dst, 5514, BC_JLOOP);
7085 } else { 7197 } else {
7086 dasm_put(Dst, 5409); 7198 dasm_put(Dst, 5518);
7087 } 7199 }
7088 dasm_put(Dst, 5414); 7200 dasm_put(Dst, 5523);
7089 break; 7201 break;
7090 7202
7091 case BC_JFUNCV: 7203 case BC_JFUNCV:
7092#if !LJ_HASJIT 7204#if !LJ_HASJIT
7093 break; 7205 break;
7094#endif 7206#endif
7095 dasm_put(Dst, 5420); 7207 dasm_put(Dst, 5529);
7096 break; /* NYI: compiled vararg functions. */ 7208 break; /* NYI: compiled vararg functions. */
7097 7209
7098 case BC_IFUNCV: 7210 case BC_IFUNCV:
7099 dasm_put(Dst, 5422, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), ~LJ_TNIL); 7211 dasm_put(Dst, 5531, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), ~LJ_TNIL);
7100 break; 7212 break;
7101 7213
7102 case BC_FUNCC: 7214 case BC_FUNCC:
7103 case BC_FUNCCW: 7215 case BC_FUNCCW:
7104 if (op == BC_FUNCC) { 7216 if (op == BC_FUNCC) {
7105 dasm_put(Dst, 5463, Dt8(->f)); 7217 dasm_put(Dst, 5572, Dt8(->f));
7106 } else { 7218 } else {
7107 dasm_put(Dst, 5466, DISPATCH_GL(wrapf)); 7219 dasm_put(Dst, 5575, DISPATCH_GL(wrapf));
7108 } 7220 }
7109 dasm_put(Dst, 5469, Dt1(->maxstack), Dt1(->base), Dt1(->top)); 7221 dasm_put(Dst, 5578, Dt1(->maxstack), Dt1(->base), Dt1(->top));
7110 if (op == BC_FUNCCW) { 7222 if (op == BC_FUNCCW) {
7111 dasm_put(Dst, 5479, Dt8(->f)); 7223 dasm_put(Dst, 5588, Dt8(->f));
7112 } 7224 }
7113 dasm_put(Dst, 5482, LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate)); 7225 dasm_put(Dst, 5591, LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate));
7114 break; 7226 break;
7115 7227
7116 /* ---------------------------------------------------------------------- */ 7228 /* ---------------------------------------------------------------------- */
@@ -7130,7 +7242,7 @@ static int build_backend(BuildCtx *ctx)
7130 7242
7131 build_subroutines(ctx); 7243 build_subroutines(ctx);
7132 7244
7133 dasm_put(Dst, 5504); 7245 dasm_put(Dst, 5613);
7134 for (op = 0; op < BC__MAX; op++) 7246 for (op = 0; op < BC__MAX; op++)
7135 build_ins(ctx, (BCOp)op, op); 7247 build_ins(ctx, (BCOp)op, op);
7136 7248