aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.dep2
-rw-r--r--src/buildvm_arm.dasc73
-rw-r--r--src/buildvm_arm.h1299
-rw-r--r--src/lib_math.c5
-rw-r--r--src/lj_vm.h12
5 files changed, 739 insertions, 652 deletions
diff --git a/src/Makefile.dep b/src/Makefile.dep
index 8bc891ad..d3dec2be 100644
--- a/src/Makefile.dep
+++ b/src/Makefile.dep
@@ -34,7 +34,7 @@ lib_jit.o: lib_jit.c lua.h luaconf.h lauxlib.h lualib.h lj_arch.h \
34 lj_jit.h lj_ircall.h lj_iropt.h lj_target.h lj_target_*.h \ 34 lj_jit.h lj_ircall.h lj_iropt.h lj_target.h lj_target_*.h \
35 lj_dispatch.h lj_vm.h lj_vmevent.h lj_lib.h luajit.h lj_libdef.h 35 lj_dispatch.h lj_vm.h lj_vmevent.h lj_lib.h luajit.h lj_libdef.h
36lib_math.o: lib_math.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ 36lib_math.o: lib_math.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \
37 lj_def.h lj_arch.h lj_lib.h lj_libdef.h 37 lj_def.h lj_arch.h lj_lib.h lj_vm.h lj_libdef.h
38lib_os.o: lib_os.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ 38lib_os.o: lib_os.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \
39 lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lj_libdef.h 39 lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lj_libdef.h
40lib_package.o: lib_package.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ 40lib_package.o: lib_package.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \
diff --git a/src/buildvm_arm.dasc b/src/buildvm_arm.dasc
index 2e87acdd..4d3ba5b7 100644
--- a/src/buildvm_arm.dasc
+++ b/src/buildvm_arm.dasc
@@ -1308,10 +1308,7 @@ static void build_subroutines(BuildCtx *ctx)
1308 | movmi CARG1, #0x80000000 1308 | movmi CARG1, #0x80000000
1309 | bmi <1 1309 | bmi <1
1310 |4: 1310 |4:
1311 | // NYI: Use internal implementation. 1311 | bl ->vm_..func
1312 | IOS mov RA, BASE
1313 | bl extern func
1314 | IOS mov BASE, RA
1315 | b ->fff_restv 1312 | b ->fff_restv
1316 |.endmacro 1313 |.endmacro
1317 | 1314 |
@@ -2010,23 +2007,76 @@ static void build_subroutines(BuildCtx *ctx)
2010 |// double lj_vm_floor/ceil/trunc(double x); 2007 |// double lj_vm_floor/ceil/trunc(double x);
2011 |.macro vm_round, func 2008 |.macro vm_round, func
2012 |->vm_ .. func: 2009 |->vm_ .. func:
2013 | // NYI: Use internal implementation. 2010 | lsl CARG3, CARG2, #1
2014 | b extern func 2011 | adds RB, CARG3, #0x00200000
2012 | bpl >2 // |x| < 1?
2013 | mvn CARG4, #0x3cc
2014 | subs RB, CARG4, RB, asr #21 // 2^0: RB = 51, 2^51: RB = 0.
2015 | bxlo lr // |x| >= 2^52: done.
2016 | mvn CARG4, #1
2017 | bic CARG3, CARG1, CARG4, lsl RB // ztest = lo & ~lomask
2018 | and CARG1, CARG1, CARG4, lsl RB // lo &= lomask
2019 | subs RB, RB, #32
2020 | bicpl CARG4, CARG2, CARG4, lsl RB // |x| <= 2^20: ztest |= hi & ~himask
2021 | orrpl CARG3, CARG3, CARG4
2022 | mvnpl CARG4, #1
2023 | andpl CARG2, CARG2, CARG4, lsl RB // |x| <= 2^20: hi &= himask
2024 |.if "func" == "floor"
2025 | tst CARG3, CARG2, asr #31 // iszero = ((ztest & signmask) == 0)
2026 |.else
2027 | bics CARG3, CARG3, CARG2, asr #31 // iszero = ((ztest & ~signmask) == 0)
2028 |.endif
2029 | bxeq lr // iszero: done.
2030 | mvn CARG4, #1
2031 | cmp RB, #0
2032 | lslpl CARG3, CARG4, RB
2033 | mvnmi CARG3, #0
2034 | add RB, RB, #32
2035 | subs CARG1, CARG1, CARG4, lsl RB // lo = lo-lomask
2036 | sbc CARG2, CARG2, CARG3 // hi = hi-himask+carry
2037 | bx lr
2038 |
2039 |2: // |x| < 1:
2040 | orr CARG3, CARG3, CARG1 // ztest = (2*hi) | lo
2041 |.if "func" == "floor"
2042 | tst CARG3, CARG2, asr #31 // iszero = ((ztest & signmask) == 0)
2043 |.else
2044 | bics CARG3, CARG3, CARG2, asr #31 // iszero = ((ztest & ~signmask) == 0)
2045 |.endif
2046 | mov CARG1, #0 // lo = 0
2047 | and CARG2, CARG2, #0x80000000
2048 | ldrne CARG4, <9 // hi = sign(x) | (iszero ? 0.0 : 1.0)
2049 | orrne CARG2, CARG2, CARG4
2050 | bx lr
2015 |.endmacro 2051 |.endmacro
2016 | 2052 |
2053 |9:
2054 | .long 0x3ff00000 // hiword(1.0)
2017 | vm_round floor 2055 | vm_round floor
2018 | vm_round ceil 2056 | vm_round ceil
2019#if LJ_HASJIT 2057 |
2020 | vm_round trunc
2021#else
2022 |->vm_trunc: 2058 |->vm_trunc:
2059#if LJ_HASJIT
2060 | lsl CARG3, CARG2, #1
2061 | adds RB, CARG3, #0x00200000
2062 | andpl CARG2, CARG2, #0x80000000 // |x| < 1? hi = sign(x), lo = 0.
2063 | movpl CARG1, #0
2064 | bxpl lr
2065 | mvn CARG4, #0x3cc
2066 | subs RB, CARG4, RB, asr #21 // 2^0: RB = 51, 2^51: RB = 0.
2067 | bxlo lr // |x| >= 2^52: already done.
2068 | mvn CARG4, #1
2069 | and CARG1, CARG1, CARG4, lsl RB // lo &= lomask
2070 | subs RB, RB, #32
2071 | andpl CARG2, CARG2, CARG4, lsl RB // |x| <= 2^20: hi &= himask
2072 | bx lr
2023#endif 2073#endif
2024 | 2074 |
2025 | // double lj_vm_mod(double dividend, double divisor); 2075 | // double lj_vm_mod(double dividend, double divisor);
2026 |->vm_mod: 2076 |->vm_mod:
2027 | push {r0, r1, r2, r3, r4, lr} 2077 | push {r0, r1, r2, r3, r4, lr}
2028 | bl extern __aeabi_ddiv 2078 | bl extern __aeabi_ddiv
2029 | bl extern floor // NYI: Use internal implementation of floor. 2079 | bl ->vm_floor
2030 | ldrd CARG34, [sp, #8] 2080 | ldrd CARG34, [sp, #8]
2031 | bl extern __aeabi_dmul 2081 | bl extern __aeabi_dmul
2032 | ldrd CARG34, [sp] 2082 | ldrd CARG34, [sp]
@@ -2586,9 +2636,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
2586 |5: // FP variant. 2636 |5: // FP variant.
2587 | ins_arithfallback ins_arithcheck_num 2637 | ins_arithfallback ins_arithcheck_num
2588 |.if "intins" == "vm_modi" 2638 |.if "intins" == "vm_modi"
2589 | IOS mov RC, BASE
2590 | bl fpcall 2639 | bl fpcall
2591 | IOS mov BASE, RC // NYI: remove once we use internal impl. of floor.
2592 |.else 2640 |.else
2593 | bl fpcall 2641 | bl fpcall
2594 | ins_next1 2642 | ins_next1
@@ -3966,7 +4014,6 @@ static void emit_asm_debug(BuildCtx *ctx)
3966 fprintf(ctx->fp, 4014 fprintf(ctx->fp,
3967 "\t.align 2\n" 4015 "\t.align 2\n"
3968 ".LEFDE0:\n\n"); 4016 ".LEFDE0:\n\n");
3969 /* NYI: emit ARM.exidx. */
3970 break; 4017 break;
3971 default: 4018 default:
3972 break; 4019 break;
diff --git a/src/buildvm_arm.h b/src/buildvm_arm.h
index 0d106bdb..26c2674a 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[5615] = { 15static const unsigned int build_actionlist[5675] = {
160x00010001, 160x00010001,
170x00060014, 170x00060014,
180xe3160000, 180xe3160000,
@@ -1425,16 +1425,11 @@ static const unsigned int build_actionlist[5615] = {
14250x0005000b, 14250x0005000b,
14260x0006000e, 14260x0006000e,
14270x00000000, 14270x00000000,
14280xe1a0a009,
14290x00000000,
14300xeb000000, 14280xeb000000,
14310x0003000f, 14290x00050058,
14320x00000000,
14330xe1a0900a,
14340x00000000,
14350xea000000, 14300xea000000,
14360x00050047, 14310x00050047,
14370x00060058, 14320x00060059,
14380xe1c900d0, 14330xe1c900d0,
14390xe35b0008, 14340xe35b0008,
14400x3a000000, 14350x3a000000,
@@ -1491,13 +1486,8 @@ static const unsigned int build_actionlist[5615] = {
14910x4a000000, 14860x4a000000,
14920x0005000b, 14870x0005000b,
14930x0006000e, 14880x0006000e,
14940x00000000,
14950xe1a0a009,
14960x00000000,
14970xeb000000, 14890xeb000000,
14980x00030010, 14900x0005005a,
14990x00000000,
15000xe1a0900a,
15010x00000000, 14910x00000000,
15020xea000000, 14920xea000000,
15030x00050047, 14930x00050047,
@@ -1506,7 +1496,7 @@ static const unsigned int build_actionlist[5615] = {
15060x00020000, 14960x00020000,
15070x00000000, 14970x00000000,
15080x41e00000, 14980x41e00000,
15090x00060059, 14990x0006005b,
15100xe1c900d0, 15000xe1c900d0,
15110xe35b0008, 15010xe35b0008,
15120x3a000000, 15020x3a000000,
@@ -1525,7 +1515,7 @@ static const unsigned int build_actionlist[5615] = {
15250x00060047, 15150x00060047,
15260xe5196004, 15160xe5196004,
15270xe14900f8, 15170xe14900f8,
15280x0006005a, 15180x0006005c,
15290xe3a0b000, 15190xe3a0b000,
15300x000a0000, 15200x000a0000,
15310x00060045, 15210x00060045,
@@ -1557,7 +1547,7 @@ static const unsigned int build_actionlist[5615] = {
15570xe5010004, 15470xe5010004,
15580xea000000, 15480xea000000,
15590x0005000f, 15490x0005000f,
15600x0006005b, 15500x0006005d,
15610xe1c900d0, 15510xe1c900d0,
15620xe35b0008, 15520xe35b0008,
15630x3a000000, 15530x3a000000,
@@ -1571,13 +1561,13 @@ static const unsigned int build_actionlist[5615] = {
15710xe1a0a009, 15610xe1a0a009,
15720x00000000, 15620x00000000,
15730xeb000000, 15630xeb000000,
15740x00030011, 15640x0003000f,
15750x00000000, 15650x00000000,
15760xe1a0900a, 15660xe1a0900a,
15770x00000000, 15670x00000000,
15780xea000000, 15680xea000000,
15790x00050047, 15690x00050047,
15800x0006005c, 15700x0006005e,
15810xe1c900d0, 15710xe1c900d0,
15820xe35b0008, 15720xe35b0008,
15830x3a000000, 15730x3a000000,
@@ -1590,13 +1580,13 @@ static const unsigned int build_actionlist[5615] = {
15900xe1a0a009, 15800xe1a0a009,
15910x00000000, 15810x00000000,
15920xeb000000, 15820xeb000000,
15930x00030012, 15830x00030010,
15940x00000000, 15840x00000000,
15950xe1a0900a, 15850xe1a0900a,
15960x00000000, 15860x00000000,
15970xea000000, 15870xea000000,
15980x00050047, 15880x00050047,
15990x0006005d, 15890x0006005f,
16000xe1c900d0, 15900xe1c900d0,
16010xe35b0008, 15910xe35b0008,
16020x3a000000, 15920x3a000000,
@@ -1609,13 +1599,13 @@ static const unsigned int build_actionlist[5615] = {
16090xe1a0a009, 15990xe1a0a009,
16100x00000000, 16000x00000000,
16110xeb000000, 16010xeb000000,
16120x00030013, 16020x00030011,
16130x00000000, 16030x00000000,
16140xe1a0900a, 16040xe1a0900a,
16150x00000000, 16050x00000000,
16160xea000000, 16060xea000000,
16170x00050047, 16070x00050047,
16180x0006005e, 16080x00060060,
16190xe1c900d0, 16090xe1c900d0,
16200xe35b0008, 16100xe35b0008,
16210x3a000000, 16110x3a000000,
@@ -1628,13 +1618,13 @@ static const unsigned int build_actionlist[5615] = {
16280xe1a0a009, 16180xe1a0a009,
16290x00000000, 16190x00000000,
16300xeb000000, 16200xeb000000,
16310x00030014, 16210x00030012,
16320x00000000, 16220x00000000,
16330xe1a0900a, 16230xe1a0900a,
16340x00000000, 16240x00000000,
16350xea000000, 16250xea000000,
16360x00050047, 16260x00050047,
16370x0006005f, 16270x00060061,
16380xe1c900d0, 16280xe1c900d0,
16390xe35b0008, 16290xe35b0008,
16400x3a000000, 16300x3a000000,
@@ -1647,13 +1637,13 @@ static const unsigned int build_actionlist[5615] = {
16470xe1a0a009, 16370xe1a0a009,
16480x00000000, 16380x00000000,
16490xeb000000, 16390xeb000000,
16500x00030015, 16400x00030013,
16510x00000000, 16410x00000000,
16520xe1a0900a, 16420xe1a0900a,
16530x00000000, 16430x00000000,
16540xea000000, 16440xea000000,
16550x00050047, 16450x00050047,
16560x00060060, 16460x00060062,
16570xe1c900d0, 16470xe1c900d0,
16580xe35b0008, 16480xe35b0008,
16590x3a000000, 16490x3a000000,
@@ -1666,13 +1656,13 @@ static const unsigned int build_actionlist[5615] = {
16660xe1a0a009, 16560xe1a0a009,
16670x00000000, 16570x00000000,
16680xeb000000, 16580xeb000000,
16690x00030016, 16590x00030014,
16700x00000000, 16600x00000000,
16710xe1a0900a, 16610xe1a0900a,
16720x00000000, 16620x00000000,
16730xea000000, 16630xea000000,
16740x00050047, 16640x00050047,
16750x00060061, 16650x00060063,
16760xe1c900d0, 16660xe1c900d0,
16770xe35b0008, 16670xe35b0008,
16780x3a000000, 16680x3a000000,
@@ -1685,13 +1675,13 @@ static const unsigned int build_actionlist[5615] = {
16850xe1a0a009, 16750xe1a0a009,
16860x00000000, 16760x00000000,
16870xeb000000, 16770xeb000000,
16880x00030017, 16780x00030015,
16890x00000000, 16790x00000000,
16900xe1a0900a, 16800xe1a0900a,
16910x00000000, 16810x00000000,
16920xea000000, 16820xea000000,
16930x00050047, 16830x00050047,
16940x00060062, 16840x00060064,
16950xe1c900d0, 16850xe1c900d0,
16960xe35b0008, 16860xe35b0008,
16970x3a000000, 16870x3a000000,
@@ -1704,13 +1694,13 @@ static const unsigned int build_actionlist[5615] = {
17040xe1a0a009, 16940xe1a0a009,
17050x00000000, 16950x00000000,
17060xeb000000, 16960xeb000000,
17070x00030018, 16970x00030016,
17080x00000000, 16980x00000000,
17090xe1a0900a, 16990xe1a0900a,
17100x00000000, 17000x00000000,
17110xea000000, 17010xea000000,
17120x00050047, 17020x00050047,
17130x00060063, 17030x00060065,
17140xe1c900d0, 17040xe1c900d0,
17150xe35b0008, 17050xe35b0008,
17160x3a000000, 17060x3a000000,
@@ -1723,13 +1713,13 @@ static const unsigned int build_actionlist[5615] = {
17230xe1a0a009, 17130xe1a0a009,
17240x00000000, 17140x00000000,
17250xeb000000, 17150xeb000000,
17260x00030019, 17160x00030017,
17270x00000000, 17170x00000000,
17280xe1a0900a, 17180xe1a0900a,
17290x00000000, 17190x00000000,
17300xea000000, 17200xea000000,
17310x00050047, 17210x00050047,
17320x00060064, 17220x00060066,
17330xe1c900d0, 17230xe1c900d0,
17340xe35b0008, 17240xe35b0008,
17350x3a000000, 17250x3a000000,
@@ -1742,13 +1732,13 @@ static const unsigned int build_actionlist[5615] = {
17420xe1a0a009, 17320xe1a0a009,
17430x00000000, 17330x00000000,
17440xeb000000, 17340xeb000000,
17450x0003001a, 17350x00030018,
17460x00000000, 17360x00000000,
17470xe1a0900a, 17370xe1a0900a,
17480x00000000, 17380x00000000,
17490xea000000, 17390xea000000,
17500x00050047, 17400x00050047,
17510x00060065, 17410x00060067,
17520xe1c900d0, 17420xe1c900d0,
17530xe35b0008, 17430xe35b0008,
17540x3a000000, 17440x3a000000,
@@ -1761,13 +1751,13 @@ static const unsigned int build_actionlist[5615] = {
17610xe1a0a009, 17510xe1a0a009,
17620x00000000, 17520x00000000,
17630xeb000000, 17530xeb000000,
17640x0003001b, 17540x00030019,
17650x00000000, 17550x00000000,
17660xe1a0900a, 17560xe1a0900a,
17670x00000000, 17570x00000000,
17680xea000000, 17580xea000000,
17690x00050047, 17590x00050047,
17700x00060066, 17600x00060068,
17710xe1c900d0, 17610xe1c900d0,
17720xe35b0008, 17620xe35b0008,
17730x3a000000, 17630x3a000000,
@@ -1780,13 +1770,13 @@ static const unsigned int build_actionlist[5615] = {
17800xe1a0a009, 17700xe1a0a009,
17810x00000000, 17710x00000000,
17820xeb000000, 17720xeb000000,
17830x0003001c, 17730x0003001a,
17840x00000000, 17740x00000000,
17850xe1a0900a, 17750xe1a0900a,
17860x00000000, 17760x00000000,
17870xea000000, 17770xea000000,
17880x00050047, 17780x00050047,
17890x00060067, 17790x00060069,
17900xe1c900d0, 17800xe1c900d0,
17910xe35b0008, 17810xe35b0008,
17920x3a000000, 17820x3a000000,
@@ -1799,13 +1789,13 @@ static const unsigned int build_actionlist[5615] = {
17990xe1a0a009, 17890xe1a0a009,
18000x00000000, 17900x00000000,
18010xeb000000, 17910xeb000000,
18020x0003001d, 17920x0003001b,
18030x00000000, 17930x00000000,
18040xe1a0900a, 17940xe1a0900a,
18050x00000000, 17950x00000000,
18060xea000000, 17960xea000000,
18070x00050047, 17970x00050047,
18080x00060068, 17980x0006006a,
18090xe1c900d0, 17990xe1c900d0,
18100xe1c920d8, 18000xe1c920d8,
18110xe35b0010, 18010xe35b0010,
@@ -1821,13 +1811,13 @@ static const unsigned int build_actionlist[5615] = {
18210xe1a0a009, 18110xe1a0a009,
18220x00000000, 18120x00000000,
18230xeb000000, 18130xeb000000,
18240x0003001e, 18140x0003001c,
18250x00000000, 18150x00000000,
18260xe1a0900a, 18160xe1a0900a,
18270x00000000, 18170x00000000,
18280xea000000, 18180xea000000,
18290x00050047, 18190x00050047,
18300x00060069, 18200x0006006b,
18310xe1c900d0, 18210xe1c900d0,
18320xe1c920d8, 18220xe1c920d8,
18330xe35b0010, 18230xe35b0010,
@@ -1843,13 +1833,13 @@ static const unsigned int build_actionlist[5615] = {
18430xe1a0a009, 18330xe1a0a009,
18440x00000000, 18340x00000000,
18450xeb000000, 18350xeb000000,
18460x0003001f, 18360x0003001d,
18470x00000000, 18370x00000000,
18480xe1a0900a, 18380xe1a0900a,
18490x00000000, 18390x00000000,
18500xea000000, 18400xea000000,
18510x00050047, 18410x00050047,
18520x0006006a, 18420x0006006c,
18530xe1c900d0, 18430xe1c900d0,
18540xe1c920d8, 18440xe1c920d8,
18550xe35b0010, 18450xe35b0010,
@@ -1865,14 +1855,14 @@ static const unsigned int build_actionlist[5615] = {
18650xe1a0a009, 18550xe1a0a009,
18660x00000000, 18560x00000000,
18670xeb000000, 18570xeb000000,
18680x00030020, 18580x0003001e,
18690x00000000, 18590x00000000,
18700xe1a0900a, 18600xe1a0900a,
18710x00000000, 18610x00000000,
18720xea000000, 18620xea000000,
18730x00050047, 18630x00050047,
18740x0006006b, 18640x0006006d,
18750x0006006c, 18650x0006006e,
18760xe1c900d0, 18660xe1c900d0,
18770xe35b0008, 18670xe35b0008,
18780x3a000000, 18680x3a000000,
@@ -1884,10 +1874,10 @@ static const unsigned int build_actionlist[5615] = {
18840xe14220d0, 18740xe14220d0,
18850x000c8100, 18750x000c8100,
18860xeb000000, 18760xeb000000,
18870x00030021, 18770x0003001f,
18880xea000000, 18780xea000000,
18890x00050047, 18790x00050047,
18900x0006006d, 18800x0006006f,
18910xe1c900d0, 18810xe1c900d0,
18920xe1c920d8, 18820xe1c920d8,
18930xe35b0010, 18830xe35b0010,
@@ -1905,13 +1895,13 @@ static const unsigned int build_actionlist[5615] = {
19050xe1a0a009, 18950xe1a0a009,
19060x00000000, 18960x00000000,
19070xeb000000, 18970xeb000000,
19080x00030022, 18980x00030020,
19090x00000000, 18990x00000000,
19100xe1a0900a, 19000xe1a0900a,
19110x00000000, 19010x00000000,
19120xea000000, 19020xea000000,
19130x00050047, 19030x00050047,
19140x0006006e, 19040x00060070,
19150xe1c900d0, 19050xe1c900d0,
19160xe35b0008, 19060xe35b0008,
19170x3a000000, 19070x3a000000,
@@ -1925,7 +1915,7 @@ static const unsigned int build_actionlist[5615] = {
19250xe1a0a009, 19150xe1a0a009,
19260x00000000, 19160x00000000,
19270xeb000000, 19170xeb000000,
19280x00030023, 19180x00030021,
19290x00000000, 19190x00000000,
19300xe1a0900a, 19200xe1a0900a,
19310x00000000, 19210x00000000,
@@ -1939,7 +1929,7 @@ static const unsigned int build_actionlist[5615] = {
19390xe1c920f0, 19290xe1c920f0,
19400xea000000, 19300xea000000,
19410x00050045, 19310x00050045,
19420x0006006f, 19320x00060071,
19430xe1c900d0, 19330xe1c900d0,
19440xe35b0008, 19340xe35b0008,
19450x3a000000, 19350x3a000000,
@@ -1954,7 +1944,7 @@ static const unsigned int build_actionlist[5615] = {
19540xe1a0a009, 19440xe1a0a009,
19550x00000000, 19450x00000000,
19560xeb000000, 19460xeb000000,
19570x00030024, 19470x00030022,
19580x00000000, 19480x00000000,
19590xe1a0900a, 19490xe1a0900a,
19600x00000000, 19500x00000000,
@@ -1963,7 +1953,7 @@ static const unsigned int build_actionlist[5615] = {
19630xe1c900f0, 19530xe1c900f0,
19640xea000000, 19540xea000000,
19650x00050045, 19550x00050045,
19660x00060070, 19560x00060072,
19670xe1c900d0, 19570xe1c900d0,
19680xe35b0008, 19580xe35b0008,
19690x3a000000, 19590x3a000000,
@@ -1991,7 +1981,7 @@ static const unsigned int build_actionlist[5615] = {
19910x8a000000, 19810x8a000000,
19920x00050044, 19820x00050044,
19930xeb000000, 19830xeb000000,
19940x00030025, 19840x00030023,
19950xe18920da, 19850xe18920da,
19960xea000000, 19860xea000000,
19970x00050006, 19870x00050006,
@@ -2010,7 +2000,7 @@ static const unsigned int build_actionlist[5615] = {
20100x00060010, 20000x00060010,
20110x00000000, 20010x00000000,
20120xeb000000, 20020xeb000000,
20130x00030026, 20030x00030024,
20140xe28aa008, 20040xe28aa008,
20150x81a00002, 20050x81a00002,
20160x81a01003, 20060x81a01003,
@@ -2022,11 +2012,11 @@ static const unsigned int build_actionlist[5615] = {
20220xe1cd00f0, 20120xe1cd00f0,
20230xe1a00002, 20130xe1a00002,
20240xeb000000, 20140xeb000000,
20250x00030025, 20150x00030023,
20260xe1cd20d0, 20160xe1cd20d0,
20270xea000000, 20170xea000000,
20280x00050010, 20180x00050010,
20290x00060071, 20190x00060073,
20300xe1c900d0, 20200xe1c900d0,
20310xe35b0008, 20210xe35b0008,
20320x3a000000, 20220x3a000000,
@@ -2054,7 +2044,7 @@ static const unsigned int build_actionlist[5615] = {
20540x8a000000, 20440x8a000000,
20550x00050044, 20450x00050044,
20560xeb000000, 20460xeb000000,
20570x00030025, 20470x00030023,
20580xe18920da, 20480xe18920da,
20590xea000000, 20490xea000000,
20600x00050006, 20500x00050006,
@@ -2073,7 +2063,7 @@ static const unsigned int build_actionlist[5615] = {
20730x00050007, 20630x00050007,
20740x00060010, 20640x00060010,
20750xeb000000, 20650xeb000000,
20760x00030026, 20660x00030024,
20770xe28aa008, 20670xe28aa008,
20780x31a00002, 20680x31a00002,
20790x31a01003, 20690x31a01003,
@@ -2085,11 +2075,11 @@ static const unsigned int build_actionlist[5615] = {
20850xe1cd00f0, 20750xe1cd00f0,
20860xe1a00002, 20760xe1a00002,
20870xeb000000, 20770xeb000000,
20880x00030025, 20780x00030023,
20890xe1cd20d0, 20790xe1cd20d0,
20900xea000000, 20800xea000000,
20910x00050010, 20810x00050010,
20920x00060072, 20820x00060074,
20930xe1c900d0, 20830xe1c900d0,
20940xe35b0008, 20840xe35b0008,
20950x3a000000, 20850x3a000000,
@@ -2104,7 +2094,7 @@ static const unsigned int build_actionlist[5615] = {
21040x000a0000, 20940x000a0000,
21050xea000000, 20950xea000000,
21060x00050047, 20960x00050047,
21070x00060073, 20970x00060075,
21080xe1c900d0, 20980xe1c900d0,
21090xe5196004, 20990xe5196004,
21100xe35b0008, 21000xe35b0008,
@@ -2127,7 +2117,7 @@ static const unsigned int build_actionlist[5615] = {
21270xe14900f8, 21170xe14900f8,
21280xea000000, 21180xea000000,
21290x00050045, 21190x00050045,
21300x00060074, 21200x00060076,
21310xe5170000, 21210xe5170000,
21320x000d8180, 21220x000d8180,
21330xe5171000, 21230xe5171000,
@@ -2146,20 +2136,20 @@ static const unsigned int build_actionlist[5615] = {
21460x00050044, 21360x00050044,
21470xe58d0000, 21370xe58d0000,
21480xe1a0100d, 21380xe1a0100d,
21490x00060075, 21390x00060077,
21500xe5089000, 21400xe5089000,
21510x000d8180, 21410x000d8180,
21520xe1a00008, 21420xe1a00008,
21530xe58d6008, 21430xe58d6008,
21540xeb000000, 21440xeb000000,
21550x00030027, 21450x00030025,
21560xe5189000, 21460xe5189000,
21570x000d8180, 21470x000d8180,
21580xe3e01000, 21480xe3e01000,
21590x000a0000, 21490x000a0000,
21600xea000000, 21500xea000000,
21610x00050047, 21510x00050047,
21620x00060076, 21520x00060078,
21630xe5170000, 21530xe5170000,
21640x000d8180, 21540x000d8180,
21650xe5171000, 21550xe5171000,
@@ -2207,15 +2197,15 @@ static const unsigned int build_actionlist[5615] = {
22070xe05c2002, 21970xe05c2002,
22080xe2822001, 21980xe2822001,
22090xaa000000, 21990xaa000000,
22100x00050075, 22000x00050077,
22110x00060077, 22010x00060079,
22120xe2470000, 22020xe2470000,
22130x000a0000, 22030x000a0000,
22140xe3e01000, 22040xe3e01000,
22150x000a0000, 22050x000a0000,
22160xea000000, 22060xea000000,
22170x00050047, 22070x00050047,
22180x00060078, 22080x0006007a,
22190xe5170000, 22090xe5170000,
22200x000d8180, 22100x000d8180,
22210xe5171000, 22110xe5171000,
@@ -2239,10 +2229,10 @@ static const unsigned int build_actionlist[5615] = {
22390x000d8180, 22290x000d8180,
22400x00000000, 22300x00000000,
22410xba000000, 22310xba000000,
22420x00050077, 22320x00050079,
22430xe3510001, 22330xe3510001,
22440x3a000000, 22340x3a000000,
22450x00050077, 22350x00050079,
22460x1a000000, 22360x1a000000,
22470x00050044, 22370x00050044,
22480xe517c000, 22380xe517c000,
@@ -2260,8 +2250,8 @@ static const unsigned int build_actionlist[5615] = {
22600xaa000000, 22500xaa000000,
22610x0005000b, 22510x0005000b,
22620xea000000, 22520xea000000,
22630x00050075, 22530x00050077,
22640x00060079, 22540x0006007b,
22650xe5170000, 22550xe5170000,
22660x000d8180, 22560x000d8180,
22670xe5171000, 22570xe5171000,
@@ -2294,11 +2284,11 @@ static const unsigned int build_actionlist[5615] = {
22940xe4d0c001, 22840xe4d0c001,
22950xe2533001, 22850xe2533001,
22960xba000000, 22860xba000000,
22970x00050075, 22870x00050077,
22980xe7c1c003, 22880xe7c1c003,
22990xea000000, 22890xea000000,
23000x0005000b, 22900x0005000b,
23010x0006007a, 22910x0006007c,
23020xe5170000, 22920xe5170000,
23030x000d8180, 22930x000d8180,
23040xe5171000, 22940xe5171000,
@@ -2330,7 +2320,7 @@ static const unsigned int build_actionlist[5615] = {
23300xe7d0c003, 23200xe7d0c003,
23310xe1530002, 23210xe1530002,
23320x2a000000, 23220x2a000000,
23330x00050075, 23230x00050077,
23340xe24cb041, 23240xe24cb041,
23350xe35b001a, 23250xe35b001a,
23360x322cc020, 23260x322cc020,
@@ -2338,7 +2328,7 @@ static const unsigned int build_actionlist[5615] = {
23380xe2833001, 23280xe2833001,
23390xea000000, 23290xea000000,
23400x0005000b, 23300x0005000b,
23410x0006007b, 23310x0006007d,
23420xe5170000, 23320xe5170000,
23430x000d8180, 23330x000d8180,
23440xe5171000, 23340xe5171000,
@@ -2371,7 +2361,7 @@ static const unsigned int build_actionlist[5615] = {
23710xe7d0c003, 23610xe7d0c003,
23720xe1530002, 23620xe1530002,
23730x2a000000, 23630x2a000000,
23740x00050075, 23640x00050077,
23750xe24cb061, 23650xe24cb061,
23760xe35b001a, 23660xe35b001a,
23770x322cc020, 23670x322cc020,
@@ -2379,7 +2369,7 @@ static const unsigned int build_actionlist[5615] = {
23790xe2833001, 23690xe2833001,
23800xea000000, 23700xea000000,
23810x0005000b, 23710x0005000b,
23820x0006007c, 23720x0006007e,
23830xe1c900d0, 23730xe1c900d0,
23840xe35b0008, 23740xe35b0008,
23850x3a000000, 23750x3a000000,
@@ -2392,7 +2382,7 @@ static const unsigned int build_actionlist[5615] = {
23920xe1a0a009, 23820xe1a0a009,
23930x00000000, 23830x00000000,
23940xeb000000, 23840xeb000000,
23950x00030028, 23850x00030026,
23960x00000000, 23860x00000000,
23970xe1a0900a, 23870xe1a0900a,
23980x00000000, 23880x00000000,
@@ -2400,10 +2390,10 @@ static const unsigned int build_actionlist[5615] = {
24000x000a0000, 23900x000a0000,
24010xea000000, 23910xea000000,
24020x00050047, 23920x00050047,
24030x0006007d, 23930x0006007f,
24040x8a000000, 23940x8a000000,
24050x00050044, 23950x00050044,
24060x0006007e, 23960x00060080,
24070xe1a0c081, 23970xe1a0c081,
24080xe29cc980, 23980xe29cc980,
24090x53a00000, 23990x53a00000,
@@ -2428,7 +2418,7 @@ static const unsigned int build_actionlist[5615] = {
24280xe1830c10, 24180xe1830c10,
24290xb2600000, 24190xb2600000,
24300xe12fff1e, 24200xe12fff1e,
24310x0006007f, 24210x00060081,
24320xe1c900d0, 24220xe1c900d0,
24330xe35b0008, 24230xe35b0008,
24340x3a000000, 24240x3a000000,
@@ -2436,12 +2426,12 @@ static const unsigned int build_actionlist[5615] = {
24360xe3710000, 24260xe3710000,
24370x000a0000, 24270x000a0000,
24380x1b000000, 24280x1b000000,
24390x0005007d, 24290x0005007f,
24400xe3e01000, 24300xe3e01000,
24410x000a0000, 24310x000a0000,
24420xea000000, 24320xea000000,
24430x00050047, 24330x00050047,
24440x00060080, 24340x00060082,
24450xe1c900d0, 24350xe1c900d0,
24460xe35b0008, 24360xe35b0008,
24470x3a000000, 24370x3a000000,
@@ -2449,7 +2439,7 @@ static const unsigned int build_actionlist[5615] = {
24490xe3710000, 24390xe3710000,
24500x000a0000, 24400x000a0000,
24510x1b000000, 24410x1b000000,
24520x0005007d, 24420x0005007f,
24530xe1a02000, 24430xe1a02000,
24540xe3a0a008, 24440xe3a0a008,
24550x0006000b, 24450x0006000b,
@@ -2461,11 +2451,11 @@ static const unsigned int build_actionlist[5615] = {
24610xe3710000, 24510xe3710000,
24620x000a0000, 24520x000a0000,
24630x1b000000, 24530x1b000000,
24640x0005007d, 24540x0005007f,
24650xe0022000, 24550xe0022000,
24660xea000000, 24560xea000000,
24670x0005000b, 24570x0005000b,
24680x00060081, 24580x00060083,
24690x00000000, 24590x00000000,
24700xe1c900d0, 24600xe1c900d0,
24710xe35b0008, 24610xe35b0008,
@@ -2474,7 +2464,7 @@ static const unsigned int build_actionlist[5615] = {
24740xe3710000, 24640xe3710000,
24750x000a0000, 24650x000a0000,
24760x1b000000, 24660x1b000000,
24770x0005007d, 24670x0005007f,
24780xe1a02000, 24680xe1a02000,
24790xe3a0a008, 24690xe3a0a008,
24800x0006000b, 24700x0006000b,
@@ -2486,11 +2476,11 @@ static const unsigned int build_actionlist[5615] = {
24860xe3710000, 24760xe3710000,
24870x000a0000, 24770x000a0000,
24880x1b000000, 24780x1b000000,
24890x0005007d, 24790x0005007f,
24900xe1822000, 24800xe1822000,
24910xea000000, 24810xea000000,
24920x0005000b, 24820x0005000b,
24930x00060082, 24830x00060084,
24940xe1c900d0, 24840xe1c900d0,
24950xe35b0008, 24850xe35b0008,
24960x3a000000, 24860x3a000000,
@@ -2498,7 +2488,7 @@ static const unsigned int build_actionlist[5615] = {
24980xe3710000, 24880xe3710000,
24990x000a0000, 24890x000a0000,
25000x1b000000, 24900x1b000000,
25010x0005007d, 24910x0005007f,
25020xe1a02000, 24920xe1a02000,
25030xe3a0a008, 24930xe3a0a008,
25040x0006000b, 24940x0006000b,
@@ -2510,7 +2500,7 @@ static const unsigned int build_actionlist[5615] = {
25100xe3710000, 25000xe3710000,
25110x000a0000, 25010x000a0000,
25120x1b000000, 25020x1b000000,
25130x0005007d, 25030x0005007f,
25140xe0222000, 25040xe0222000,
25150xea000000, 25050xea000000,
25160x0005000b, 25060x0005000b,
@@ -2520,8 +2510,8 @@ static const unsigned int build_actionlist[5615] = {
25200xe5196004, 25100xe5196004,
25210xe14920f8, 25110xe14920f8,
25220xea000000, 25120xea000000,
25230x0005005a, 25130x0005005c,
25240x00060083, 25140x00060085,
25250xe1c900d0, 25150xe1c900d0,
25260xe35b0008, 25160xe35b0008,
25270x3a000000, 25170x3a000000,
@@ -2530,7 +2520,7 @@ static const unsigned int build_actionlist[5615] = {
25300xe3710000, 25200xe3710000,
25310x000a0000, 25210x000a0000,
25320x1b000000, 25220x1b000000,
25330x0005007d, 25230x0005007f,
25340xe0202860, 25240xe0202860,
25350xe3c228ff, 25250xe3c228ff,
25360xe1a00460, 25260xe1a00460,
@@ -2539,7 +2529,7 @@ static const unsigned int build_actionlist[5615] = {
25390xe0200422, 25290xe0200422,
25400xea000000, 25300xea000000,
25410x00050047, 25310x00050047,
25420x00060084, 25320x00060086,
25430xe1c900d0, 25330xe1c900d0,
25440xe35b0008, 25340xe35b0008,
25450x3a000000, 25350x3a000000,
@@ -2547,13 +2537,13 @@ static const unsigned int build_actionlist[5615] = {
25470xe3710000, 25370xe3710000,
25480x000a0000, 25380x000a0000,
25490x1b000000, 25390x1b000000,
25500x0005007d, 25400x0005007f,
25510xe1e00000, 25410xe1e00000,
25520xe3e01000, 25420xe3e01000,
25530x000a0000, 25430x000a0000,
25540xea000000, 25440xea000000,
25550x00050047, 25450x00050047,
25560x00060085, 25460x00060087,
25570xe1c900d8, 25470xe1c900d8,
25580xe35b0010, 25480xe35b0010,
25590x3a000000, 25490x3a000000,
@@ -2561,19 +2551,19 @@ static const unsigned int build_actionlist[5615] = {
25610xe3710000, 25510xe3710000,
25620x000a0000, 25520x000a0000,
25630x1b000000, 25530x1b000000,
25640x0005007d, 25540x0005007f,
25650xe200a01f, 25550xe200a01f,
25660xe1c900d0, 25560xe1c900d0,
25670xe3710000, 25570xe3710000,
25680x000a0000, 25580x000a0000,
25690x1b000000, 25590x1b000000,
25700x0005007d, 25600x0005007f,
25710xe1a00a10, 25610xe1a00a10,
25720xe3e01000, 25620xe3e01000,
25730x000a0000, 25630x000a0000,
25740xea000000, 25640xea000000,
25750x00050047, 25650x00050047,
25760x00060086, 25660x00060088,
25770xe1c900d8, 25670xe1c900d8,
25780xe35b0010, 25680xe35b0010,
25790x3a000000, 25690x3a000000,
@@ -2581,20 +2571,20 @@ static const unsigned int build_actionlist[5615] = {
25810xe3710000, 25710xe3710000,
25820x000a0000, 25720x000a0000,
25830x1b000000, 25730x1b000000,
25840x0005007d, 25740x0005007f,
25850x00000000, 25750x00000000,
25860xe200a01f, 25760xe200a01f,
25870xe1c900d0, 25770xe1c900d0,
25880xe3710000, 25780xe3710000,
25890x000a0000, 25790x000a0000,
25900x1b000000, 25800x1b000000,
25910x0005007d, 25810x0005007f,
25920xe1a00a30, 25820xe1a00a30,
25930xe3e01000, 25830xe3e01000,
25940x000a0000, 25840x000a0000,
25950xea000000, 25850xea000000,
25960x00050047, 25860x00050047,
25970x00060087, 25870x00060089,
25980xe1c900d8, 25880xe1c900d8,
25990xe35b0010, 25890xe35b0010,
26000x3a000000, 25900x3a000000,
@@ -2602,19 +2592,19 @@ static const unsigned int build_actionlist[5615] = {
26020xe3710000, 25920xe3710000,
26030x000a0000, 25930x000a0000,
26040x1b000000, 25940x1b000000,
26050x0005007d, 25950x0005007f,
26060xe200a01f, 25960xe200a01f,
26070xe1c900d0, 25970xe1c900d0,
26080xe3710000, 25980xe3710000,
26090x000a0000, 25990x000a0000,
26100x1b000000, 26000x1b000000,
26110x0005007d, 26010x0005007f,
26120xe1a00a50, 26020xe1a00a50,
26130xe3e01000, 26030xe3e01000,
26140x000a0000, 26040x000a0000,
26150xea000000, 26050xea000000,
26160x00050047, 26060x00050047,
26170x00060088, 26070x0006008a,
26180xe1c900d8, 26080xe1c900d8,
26190xe35b0010, 26090xe35b0010,
26200x3a000000, 26100x3a000000,
@@ -2622,19 +2612,19 @@ static const unsigned int build_actionlist[5615] = {
26220xe3710000, 26120xe3710000,
26230x000a0000, 26130x000a0000,
26240x1b000000, 26140x1b000000,
26250x0005007d, 26150x0005007f,
26260xe260a000, 26160xe260a000,
26270xe1c900d0, 26170xe1c900d0,
26280xe3710000, 26180xe3710000,
26290x000a0000, 26190x000a0000,
26300x1b000000, 26200x1b000000,
26310x0005007d, 26210x0005007f,
26320xe1a00a70, 26220xe1a00a70,
26330xe3e01000, 26230xe3e01000,
26340x000a0000, 26240x000a0000,
26350xea000000, 26250xea000000,
26360x00050047, 26260x00050047,
26370x00060089, 26270x0006008b,
26380xe1c900d8, 26280xe1c900d8,
26390xe35b0010, 26290xe35b0010,
26400x3a000000, 26300x3a000000,
@@ -2643,13 +2633,13 @@ static const unsigned int build_actionlist[5615] = {
26430xe3710000, 26330xe3710000,
26440x000a0000, 26340x000a0000,
26450x1b000000, 26350x1b000000,
26460x0005007d, 26360x0005007f,
26470xe200a01f, 26370xe200a01f,
26480xe1c900d0, 26380xe1c900d0,
26490xe3710000, 26390xe3710000,
26500x000a0000, 26400x000a0000,
26510x1b000000, 26410x1b000000,
26520x0005007d, 26420x0005007f,
26530xe1a00a70, 26430xe1a00a70,
26540xe3e01000, 26440xe3e01000,
26550x000a0000, 26450x000a0000,
@@ -2729,13 +2719,13 @@ static const unsigned int build_actionlist[5615] = {
27290x000d8180, 27190x000d8180,
27300xe1a00008, 27200xe1a00008,
27310xeb000000, 27210xeb000000,
27320x00030029, 27220x00030027,
27330xe5189000, 27230xe5189000,
27340x000d8180, 27240x000d8180,
27350xe1a0e00a, 27250xe1a0e00a,
27360xe5192008, 27260xe5192008,
27370xe12fff1e, 27270xe12fff1e,
27380x0006008a, 27280x0006008c,
27390x00000000, 27290x00000000,
27400xe5570000, 27300xe5570000,
27410x000d8180, 27310x000d8180,
@@ -2757,7 +2747,7 @@ static const unsigned int build_actionlist[5615] = {
27570xea000000, 27470xea000000,
27580x00050001, 27480x00050001,
27590x00000000, 27490x00000000,
27600x0006008b, 27500x0006008d,
27610xe5570000, 27510xe5570000,
27620x000d8180, 27520x000d8180,
27630xe3100000, 27530xe3100000,
@@ -2769,7 +2759,7 @@ static const unsigned int build_actionlist[5615] = {
27690xe087c10c, 27590xe087c10c,
27700xe51cf000, 27600xe51cf000,
27710x000d8180, 27610x000d8180,
27720x0006008c, 27620x0006008e,
27730xe5570000, 27630xe5570000,
27740x000d8180, 27640x000d8180,
27750xe5171000, 27650xe5171000,
@@ -2797,7 +2787,7 @@ static const unsigned int build_actionlist[5615] = {
27970x000d8180, 27870x000d8180,
27980xe1a01006, 27880xe1a01006,
27990xeb000000, 27890xeb000000,
28000x0003002a, 27900x00030028,
28010x0006000d, 27910x0006000d,
28020xe5189000, 27920xe5189000,
28030x000d8180, 27930x000d8180,
@@ -2811,13 +2801,13 @@ static const unsigned int build_actionlist[5615] = {
28110xe004a2ae, 28010xe004a2ae,
28120xe1a0b82e, 28020xe1a0b82e,
28130xe12fff1c, 28030xe12fff1c,
28140x0006008d, 28040x0006008f,
28150xe5130018, 28050xe5130018,
28160xe2866004, 28060xe2866004,
28170xe58d0004, 28070xe58d0004,
28180xea000000, 28080xea000000,
28190x0005000e, 28090x0005000e,
28200x0006008e, 28100x00060090,
28210x00000000, 28110x00000000,
28220xe5192008, 28120xe5192008,
28230xe2470000, 28130xe2470000,
@@ -2836,17 +2826,17 @@ static const unsigned int build_actionlist[5615] = {
28360xe5082000, 28260xe5082000,
28370x000d8180, 28270x000d8180,
28380xeb000000, 28280xeb000000,
28390x0003002b, 28290x00030029,
28400xea000000, 28300xea000000,
28410x0005000d, 28310x0005000d,
28420x00000000, 28320x00000000,
28430x0006008f, 28330x00060091,
28440xe1a01006, 28340xe1a01006,
28450x00000000, 28350x00000000,
28460xea000000, 28360xea000000,
28470x00050001, 28370x00050001,
28480x00000000, 28380x00000000,
28490x00060090, 28390x00060092,
28500x00000000, 28400x00000000,
28510xe3861001, 28410xe3861001,
28520x0006000b, 28420x0006000b,
@@ -2860,7 +2850,7 @@ static const unsigned int build_actionlist[5615] = {
28600xe5083000, 28500xe5083000,
28610x000d8180, 28510x000d8180,
28620xeb000000, 28520xeb000000,
28630x0003002c, 28530x0003002a,
28640xe5189000, 28540xe5189000,
28650x000d8180, 28550x000d8180,
28660xe5183000, 28560xe5183000,
@@ -2872,7 +2862,7 @@ static const unsigned int build_actionlist[5615] = {
28720xe5192008, 28620xe5192008,
28730xe516e004, 28630xe516e004,
28740xe12fff10, 28640xe12fff10,
28750x00060091, 28650x00060093,
28760x00000000, 28660x00000000,
28770xe24dd00c, 28670xe24dd00c,
28780xe92d1fff, 28680xe92d1fff,
@@ -2909,7 +2899,7 @@ static const unsigned int build_actionlist[5615] = {
29090x000a0000, 28990x000a0000,
29100xe1a0100d, 29000xe1a0100d,
29110xeb000000, 29010xeb000000,
29120x0003002d, 29020x0003002b,
29130xe5181000, 29030xe5181000,
29140x000d8180, 29040x000d8180,
29150xe5189000, 29050xe5189000,
@@ -2922,7 +2912,7 @@ static const unsigned int build_actionlist[5615] = {
29220xea000000, 29120xea000000,
29230x00050001, 29130x00050001,
29240x00000000, 29140x00000000,
29250x00060092, 29150x00060094,
29260x00000000, 29160x00000000,
29270xe59d800c, 29170xe59d800c,
29280x0006000b, 29180x0006000b,
@@ -2959,34 +2949,109 @@ static const unsigned int build_actionlist[5615] = {
29590xe2601000, 29490xe2601000,
29600xe1a00008, 29500xe1a00008,
29610xeb000000, 29510xeb000000,
29620x0003002e, 29520x0003002c,
29630x00000000,
29640x00060093,
29650xea000000,
29660x0003000f,
29670x00060094,
29680xea000000,
29690x00030010,
29700x00000000, 29530x00000000,
29540x00060013,
29550x3ff00000,
29560x00060058,
29570xe1a02081,
29580xe292c980,
29590x5a000000,
29600x00050002,
29610xe3e03ff3,
29620xe053cacc,
29630x312fff1e,
29640xe3e03001,
29650xe1c02c13,
29660xe0000c13,
29670xe25cc020,
29680x51c13c13,
29690x51822003,
29700x53e03001,
29710x50011c13,
29720xe1120fc1,
29730x012fff1e,
29740xe3e03001,
29750xe35c0000,
29760x51a02c13,
29770x43e02000,
29780xe28cc020,
29790xe0500c13,
29800xe0c11002,
29810xe12fff1e,
29820x0006000c,
29830xe1822000,
29840xe1120fc1,
29850xe3a00000,
29860xe2011480,
29870x151f3000,
29880x00050813,
29890x11811003,
29900xe12fff1e,
29910x0006005a,
29920xe1a02081,
29930xe292c980,
29940x5a000000,
29950x00050002,
29960xe3e03ff3,
29970xe053cacc,
29980x312fff1e,
29990xe3e03001,
30000xe1c02c13,
30010xe0000c13,
30020xe25cc020,
30030x51c13c13,
30040x51822003,
30050x53e03001,
30060x50011c13,
30070xe1d22fc1,
30080x012fff1e,
30090xe3e03001,
30100xe35c0000,
30110x51a02c13,
30120x43e02000,
30130xe28cc020,
30140xe0500c13,
30150xe0c11002,
30160xe12fff1e,
30170x0006000c,
30180xe1822000,
30190xe1d22fc1,
30200xe3a00000,
30210xe2011480,
30220x151f3000,
30230x00050813,
30240x11811003,
30250xe12fff1e,
29710x00060095, 30260x00060095,
29720xea000000,
29730x0003002f,
29740x00000000, 30270x00000000,
29750x00060095, 30280xe1a02081,
30290xe292c980,
30300x52011480,
30310x53a00000,
30320x512fff1e,
30330xe3e03ff3,
30340xe053cacc,
30350x312fff1e,
30360xe3e03001,
30370xe0000c13,
30380xe25cc020,
30390x50011c13,
30400xe12fff1e,
29760x00000000, 30410x00000000,
29770x00060096, 30420x00060096,
29780xe92d401f, 30430xe92d401f,
29790xeb000000, 30440xeb000000,
29800x00030030, 30450x0003002d,
29810xeb000000, 30460xeb000000,
29820x0003000f, 30470x00050058,
29830xe1cd20d8, 30480xe1cd20d8,
29840xeb000000, 30490xeb000000,
29850x00030021, 30500x0003001f,
29860xe1cd20d0, 30510xe1cd20d0,
29870xe2211480, 30520xe2211480,
29880xeb000000, 30530xeb000000,
29890x00030031, 30540x0003002e,
29900xe28dd014, 30550xe28dd014,
29910xe8bd8000, 30560xe8bd8000,
29920x00060097, 30570x00060097,
@@ -3026,19 +3091,19 @@ static const unsigned int build_actionlist[5615] = {
30260xe59dc000, 30910xe59dc000,
30270xe35c0001, 30920xe35c0001,
30280x3a000000, 30930x3a000000,
30290x00030031, 30940x0003002e,
30300x0a000000, 30950x0a000000,
30310x00030032, 30960x0003002f,
30320xe35c0003, 30970xe35c0003,
30330x3a000000, 30980x3a000000,
30340x00030021, 30990x0003001f,
30350x0a000000, 31000x0a000000,
30360x00030030, 31010x0003002d,
30370xe35c0005, 31020xe35c0005,
30380x3a000000, 31030x3a000000,
30390x00050096, 31040x00050096,
30400x0a000000, 31050x0a000000,
30410x0003001e, 31060x0003001c,
30420xe35c0007, 31070xe35c0007,
30430x32211480, 31080x32211480,
30440x03c11480, 31090x03c11480,
@@ -3046,7 +3111,7 @@ static const unsigned int build_actionlist[5615] = {
30460x00000000, 31110x00000000,
30470xe35c0009, 31120xe35c0009,
30480x3a000000, 31130x3a000000,
30490x0003001f, 31140x0003001d,
30500x0a000000, 31150x0a000000,
30510x00050009, 31160x00050009,
30520xe35c000b, 31170xe35c000b,
@@ -3056,7 +3121,7 @@ static const unsigned int build_actionlist[5615] = {
30560x0a000000, 31210x0a000000,
30570x00050001, 31220x00050001,
30580xeb000000, 31230xeb000000,
30590x00030026, 31240x00030024,
30600x81a00002, 31250x81a00002,
30610x81a01003, 31260x81a01003,
30620xe8bd8010, 31270xe8bd8010,
@@ -3064,7 +3129,7 @@ static const unsigned int build_actionlist[5615] = {
30640xe7f001f0, 31290xe7f001f0,
30650x0006000b, 31300x0006000b,
30660xeb000000, 31310xeb000000,
30670x00030026, 31320x00030024,
30680x31a00002, 31330x31a00002,
30690x31a01003, 31340x31a01003,
30700xe8bd8010, 31350xe8bd8010,
@@ -3156,7 +3221,7 @@ static const unsigned int build_actionlist[5615] = {
31560xe1a0b00a, 32210xe1a0b00a,
31570xe1a0a00c, 32220xe1a0a00c,
31580xeb000000, 32230xeb000000,
31590x00030025, 32240x00030023,
31600xe1a02000, 32250xe1a02000,
31610xe1a03001, 32260xe1a03001,
31620xe1cb00d0, 32270xe1cb00d0,
@@ -3167,11 +3232,11 @@ static const unsigned int build_actionlist[5615] = {
31670x00050034, 32320x00050034,
31680xe1a0a00c, 32330xe1a0a00c,
31690xeb000000, 32340xeb000000,
31700x00030025, 32350x00030023,
31710xe1cb20d0, 32360xe1cb20d0,
31720x0006000f, 32370x0006000f,
31730xeb000000, 32380xeb000000,
31740x00030026, 32390x00030024,
31750x00000000, 32400x00000000,
31760x324a6b80, 32410x324a6b80,
31770x00000000, 32420x00000000,
@@ -3364,11 +3429,11 @@ static const unsigned int build_actionlist[5615] = {
33640x0006000e, 34290x0006000e,
33650xe1a0a00c, 34300xe1a0a00c,
33660xeb000000, 34310xeb000000,
33670x00030025, 34320x00030023,
33680xe1cb20d0, 34330xe1cb20d0,
33690x0006000f, 34340x0006000f,
33700xeb000000, 34350xeb000000,
33710x00030033, 34360x00030030,
33720x00000000, 34370x00000000,
33730x024a6b80, 34380x024a6b80,
33740x00000000, 34390x00000000,
@@ -3512,7 +3577,7 @@ static const unsigned int build_actionlist[5615] = {
35120xe1a0b009, 35770xe1a0b009,
35130x00000000, 35780x00000000,
35140xeb000000, 35790xeb000000,
35150x00030028, 35800x00030026,
35160x00000000, 35810x00000000,
35170xe1a0900b, 35820xe1a0900b,
35180x00000000, 35830x00000000,
@@ -3605,7 +3670,7 @@ static const unsigned int build_actionlist[5615] = {
36050x0005003e, 36700x0005003e,
36060x00000000, 36710x00000000,
36070xeb000000, 36720xeb000000,
36080x00030031, 36730x0003002e,
36090xe5d6c000, 36740xe5d6c000,
36100xea000000, 36750xea000000,
36110x0005000e, 36760x0005000e,
@@ -3696,7 +3761,7 @@ static const unsigned int build_actionlist[5615] = {
36960x0005003e, 37610x0005003e,
36970x00000000, 37620x00000000,
36980xeb000000, 37630xeb000000,
36990x00030032, 37640x0003002f,
37000xe5d6c000, 37650xe5d6c000,
37010xea000000, 37660xea000000,
37020x0005000e, 37670x0005000e,
@@ -3788,7 +3853,7 @@ static const unsigned int build_actionlist[5615] = {
37880x0005003e, 38530x0005003e,
37890x00000000, 38540x00000000,
37900xeb000000, 38550xeb000000,
37910x00030021, 38560x0003001f,
37920xe5d6c000, 38570xe5d6c000,
37930xea000000, 38580xea000000,
37940x0005000e, 38590x0005000e,
@@ -3845,7 +3910,7 @@ static const unsigned int build_actionlist[5615] = {
38450x0005003e, 39100x0005003e,
38460x00000000, 39110x00000000,
38470xeb000000, 39120xeb000000,
38480x00030030, 39130x0003002d,
38490xe5d6c000, 39140xe5d6c000,
38500xe496e004, 39150xe496e004,
38510xe18900fa, 39160xe18900fa,
@@ -3942,13 +4007,8 @@ static const unsigned int build_actionlist[5615] = {
39420x2a000000, 40070x2a000000,
39430x0005003e, 40080x0005003e,
39440x00000000, 40090x00000000,
39450xe1a0b009,
39460x00000000,
39470xeb000000, 40100xeb000000,
39480x00050096, 40110x00050096,
39490x00000000,
39500xe1a0900b,
39510x00000000,
39520xea000000, 40120xea000000,
39530x0005000e, 40130x0005000e,
39540x00000000, 40140x00000000,
@@ -4006,7 +4066,7 @@ static const unsigned int build_actionlist[5615] = {
40060xe1a0b009, 40660xe1a0b009,
40070x00000000, 40670x00000000,
40080xeb000000, 40680xeb000000,
40090x0003001e, 40690x0003001c,
40100x00000000, 40700x00000000,
40110xe1a0900b, 40710xe1a0900b,
40120x00000000, 40720x00000000,
@@ -4029,7 +4089,7 @@ static const unsigned int build_actionlist[5615] = {
40290xe58d6008, 40890xe58d6008,
40300xe1a021a2, 40900xe1a021a2,
40310xeb000000, 40910xeb000000,
40320x00030034, 40920x00030031,
40330xe5189000, 40930xe5189000,
40340x000d8180, 40940x000d8180,
40350xe3500000, 40950xe3500000,
@@ -4178,11 +4238,11 @@ static const unsigned int build_actionlist[5615] = {
41780x0005000b, 42380x0005000b,
41790xe1a0b009, 42390xe1a0b009,
41800xeb000000, 42400xeb000000,
41810x00030035, 42410x00030032,
41820xe1a0900b, 42420xe1a0900b,
41830x00000000, 42430x00000000,
41840x1b000000, 42440x1b000000,
41850x00030035, 42450x00030032,
41860x00000000, 42460x00000000,
41870xea000000, 42470xea000000,
41880x0005000b, 42480x0005000b,
@@ -4227,11 +4287,11 @@ static const unsigned int build_actionlist[5615] = {
42270x0005000b, 42870x0005000b,
42280xe1a0b009, 42880xe1a0b009,
42290xeb000000, 42890xeb000000,
42300x00030035, 42900x00030032,
42310xe1a0900b, 42910xe1a0900b,
42320x00000000, 42920x00000000,
42330x1b000000, 42930x1b000000,
42340x00030035, 42940x00030032,
42350x00000000, 42950x00000000,
42360xea000000, 42960xea000000,
42370x0005000b, 42970x0005000b,
@@ -4281,7 +4341,7 @@ static const unsigned int build_actionlist[5615] = {
42810xe1a00008, 43410xe1a00008,
42820xe089100a, 43420xe089100a,
42830xeb000000, 43430xeb000000,
42840x00030036, 43440x00030033,
42850xe5189000, 43450xe5189000,
42860x000d8180, 43460x000d8180,
42870x0006000b, 43470x0006000b,
@@ -4300,7 +4360,7 @@ static const unsigned int build_actionlist[5615] = {
43000xe5192008, 43600xe5192008,
43010xe1a00008, 43610xe1a00008,
43020xeb000000, 43620xeb000000,
43030x00030037, 43630x00030034,
43040xe5189000, 43640xe5189000,
43050x000d8180, 43650x000d8180,
43060xe3e01000, 43660xe3e01000,
@@ -4335,11 +4395,11 @@ static const unsigned int build_actionlist[5615] = {
43350xe37b0001, 43950xe37b0001,
43360x02811002, 43960x02811002,
43370xeb000000, 43970xeb000000,
43380x00030038, 43980x00030035,
43390x00000000, 43990x00000000,
43400xe795110b, 44000xe795110b,
43410xeb000000, 44010xeb000000,
43420x00030039, 44020x00030036,
43430x00000000, 44030x00000000,
43440xe5189000, 44040xe5189000,
43450x000d8180, 44050x000d8180,
@@ -4354,7 +4414,7 @@ static const unsigned int build_actionlist[5615] = {
43540xe12fff1c, 44140xe12fff1c,
43550x0006000f, 44150x0006000f,
43560xeb000000, 44160xeb000000,
43570x0003003a, 44170x00030037,
43580xe1a00008, 44180xe1a00008,
43590xea000000, 44190xea000000,
43600x0005000b, 44200x0005000b,
@@ -4717,7 +4777,7 @@ static const unsigned int build_actionlist[5615] = {
47170xe1a0100c, 47770xe1a0100c,
47180xe58d3004, 47780xe58d3004,
47190xeb000000, 47790xeb000000,
47200x0003003b, 47800x00030038,
47210xe5189000, 47810xe5189000,
47220x000d8180, 47820x000d8180,
47230xe18920da, 47830xe18920da,
@@ -4849,7 +4909,7 @@ static const unsigned int build_actionlist[5615] = {
48490xe1a00008, 49090xe1a00008,
48500xe58d6008, 49100xe58d6008,
48510xeb000000, 49110xeb000000,
48520x0003003c, 49120x00030039,
48530x00000000, 49130x00000000,
48540xe5189000, 49140xe5189000,
48550x000d8180, 49150x000d8180,
@@ -5297,7 +5357,7 @@ static const unsigned int build_actionlist[5615] = {
52970xe2511001, 53570xe2511001,
52980xe18710b0, 53580xe18710b0,
52990x0a000000, 53590x0a000000,
53000x0005008e, 53600x00050090,
53010x00000000, 53610x00000000,
53020xe1aa00d9, 53620xe1aa00d9,
53030x00000000, 53630x00000000,
@@ -5389,14 +5449,14 @@ static const unsigned int build_actionlist[5615] = {
53890xba000000, 54490xba000000,
53900x00050008, 54500x00050008,
53910xeb000000, 54510xeb000000,
53920x00030031, 54520x0003002e,
53930xe1ca00f0, 54530xe1ca00f0,
53940xe1ca20d8, 54540xe1ca20d8,
53950xe1ca01f8, 54550xe1ca01f8,
53960x00000000, 54560x00000000,
53970x00060010, 54570x00060010,
53980xeb000000, 54580xeb000000,
53990x00030026, 54590x00030024,
54000x00000000, 54600x00000000,
54010x824b6b80, 54610x824b6b80,
54020x00000000, 54620x00000000,
@@ -5417,7 +5477,7 @@ static const unsigned int build_actionlist[5615] = {
54170x00060012, 54770x00060012,
54180x00000000, 54780x00000000,
54190xeb000000, 54790xeb000000,
54200x00030031, 54800x0003002e,
54210xe1ca00f0, 54810xe1ca00f0,
54220xe1ca01f8, 54820xe1ca01f8,
54230x00000000, 54830x00000000,
@@ -5435,7 +5495,7 @@ static const unsigned int build_actionlist[5615] = {
54350xe2511001, 54950xe2511001,
54360xe18710b0, 54960xe18710b0,
54370x0a000000, 54970x0a000000,
54380x0005008e, 54980x00050090,
54390x00000000, 54990x00000000,
54400xe1aa00d9, 55000xe1aa00d9,
54410x00000000, 55010x00000000,
@@ -5466,7 +5526,7 @@ static const unsigned int build_actionlist[5615] = {
54660xe2511001, 55260xe2511001,
54670xe18710b0, 55270xe18710b0,
54680x0a000000, 55280x0a000000,
54690x0005008e, 55290x00050090,
54700x00000000, 55300x00000000,
54710xe5d6c000, 55310xe5d6c000,
54720xe496e004, 55320xe496e004,
@@ -5506,7 +5566,7 @@ static const unsigned int build_actionlist[5615] = {
55060xe2511001, 55660xe2511001,
55070xe18710b0, 55670xe18710b0,
55080x0a000000, 55680x0a000000,
55090x00050090, 55690x00050092,
55100x00000000, 55700x00000000,
55110xe5180000, 55710xe5180000,
55120x000d8180, 55720x000d8180,
@@ -5699,7 +5759,9 @@ enum {
5699 GLOB_ff_coroutine_wrap_aux, 5759 GLOB_ff_coroutine_wrap_aux,
5700 GLOB_ff_coroutine_yield, 5760 GLOB_ff_coroutine_yield,
5701 GLOB_ff_math_floor, 5761 GLOB_ff_math_floor,
5762 GLOB_vm_floor,
5702 GLOB_ff_math_ceil, 5763 GLOB_ff_math_ceil,
5764 GLOB_vm_ceil,
5703 GLOB_ff_math_abs, 5765 GLOB_ff_math_abs,
5704 GLOB_fff_res1, 5766 GLOB_fff_res1,
5705 GLOB_ff_math_sqrt, 5767 GLOB_ff_math_sqrt,
@@ -5758,8 +5820,6 @@ enum {
5758 GLOB_vm_hotcall, 5820 GLOB_vm_hotcall,
5759 GLOB_vm_exit_handler, 5821 GLOB_vm_exit_handler,
5760 GLOB_vm_exit_interp, 5822 GLOB_vm_exit_interp,
5761 GLOB_vm_floor,
5762 GLOB_vm_ceil,
5763 GLOB_vm_trunc, 5823 GLOB_vm_trunc,
5764 GLOB_vm_mod, 5824 GLOB_vm_mod,
5765 GLOB_vm_modi, 5825 GLOB_vm_modi,
@@ -5845,7 +5905,9 @@ static const char *const globnames[] = {
5845 "ff_coroutine_wrap_aux", 5905 "ff_coroutine_wrap_aux",
5846 "ff_coroutine_yield", 5906 "ff_coroutine_yield",
5847 "ff_math_floor", 5907 "ff_math_floor",
5908 "vm_floor",
5848 "ff_math_ceil", 5909 "ff_math_ceil",
5910 "vm_ceil",
5849 "ff_math_abs", 5911 "ff_math_abs",
5850 "fff_res1", 5912 "fff_res1",
5851 "ff_math_sqrt", 5913 "ff_math_sqrt",
@@ -5904,8 +5966,6 @@ static const char *const globnames[] = {
5904 "vm_hotcall", 5966 "vm_hotcall",
5905 "vm_exit_handler", 5967 "vm_exit_handler",
5906 "vm_exit_interp", 5968 "vm_exit_interp",
5907 "vm_floor",
5908 "vm_ceil",
5909 "vm_trunc", 5969 "vm_trunc",
5910 "vm_mod", 5970 "vm_mod",
5911 "vm_modi", 5971 "vm_modi",
@@ -5938,8 +5998,6 @@ static const char *const extnames[] = {
5938 "lj_tab_next", 5998 "lj_tab_next",
5939 "lj_tab_getinth", 5999 "lj_tab_getinth",
5940 "lj_ffh_coroutine_wrap_err", 6000 "lj_ffh_coroutine_wrap_err",
5941 "floor",
5942 "ceil",
5943 "sqrt", 6001 "sqrt",
5944 "log", 6002 "log",
5945 "log10", 6003 "log10",
@@ -5970,7 +6028,6 @@ static const char *const extnames[] = {
5970 "lj_dispatch_call", 6028 "lj_dispatch_call",
5971 "lj_trace_exit", 6029 "lj_trace_exit",
5972 "lj_err_throw", 6030 "lj_err_throw",
5973 "trunc",
5974 "__aeabi_ddiv", 6031 "__aeabi_ddiv",
5975 "__aeabi_dadd", 6032 "__aeabi_dadd",
5976 "__aeabi_dsub", 6033 "__aeabi_dsub",
@@ -6116,242 +6173,226 @@ static void build_subroutines(BuildCtx *ctx)
6116 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); 6173 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);
6117 dasm_put(Dst, 1287, Dt1(->base), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, Dt1(->cframe), Dt1(->base), CFRAME_RESUME, Dt1(->top)); 6174 dasm_put(Dst, 1287, Dt1(->base), Dt1(->maxstack), Dt1(->top), FRAME_TYPE, Dt1(->cframe), Dt1(->base), CFRAME_RESUME, Dt1(->top));
6118 dasm_put(Dst, 1346, LUA_YIELD, Dt1(->cframe), Dt1(->status), -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM); 6175 dasm_put(Dst, 1346, LUA_YIELD, Dt1(->cframe), Dt1(->status), -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM);
6176 dasm_put(Dst, 1412, -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM);
6177 dasm_put(Dst, 1476, -LJ_TISNUM, (1+1)*8, FRAME_TYPE, ~LJ_TNIL);
6178 dasm_put(Dst, 1540, -LJ_TISNUM);
6119 if (LJ_TARGET_OSX) { 6179 if (LJ_TARGET_OSX) {
6120 dasm_put(Dst, 1412); 6180 dasm_put(Dst, 1545);
6121 }
6122 dasm_put(Dst, 1414);
6123 if (LJ_TARGET_OSX) {
6124 dasm_put(Dst, 1417);
6125 }
6126 dasm_put(Dst, 1419, -LJ_TISNUM, ~LJ_TISNUM, ~LJ_TISNUM);
6127 if (LJ_TARGET_OSX) {
6128 dasm_put(Dst, 1479);
6129 }
6130 dasm_put(Dst, 1481);
6131 if (LJ_TARGET_OSX) {
6132 dasm_put(Dst, 1484);
6133 }
6134 dasm_put(Dst, 1486, -LJ_TISNUM, (1+1)*8, FRAME_TYPE, ~LJ_TNIL);
6135 dasm_put(Dst, 1550, -LJ_TISNUM);
6136 if (LJ_TARGET_OSX) {
6137 dasm_put(Dst, 1555);
6138 } 6181 }
6139 dasm_put(Dst, 1557); 6182 dasm_put(Dst, 1547);
6140 if (LJ_TARGET_OSX) { 6183 if (LJ_TARGET_OSX) {
6141 dasm_put(Dst, 1560); 6184 dasm_put(Dst, 1550);
6142 } 6185 }
6143 dasm_put(Dst, 1562, -LJ_TISNUM); 6186 dasm_put(Dst, 1552, -LJ_TISNUM);
6144 if (LJ_TARGET_OSX) { 6187 if (LJ_TARGET_OSX) {
6145 dasm_put(Dst, 1574); 6188 dasm_put(Dst, 1564);
6146 } 6189 }
6147 dasm_put(Dst, 1576); 6190 dasm_put(Dst, 1566);
6148 if (LJ_TARGET_OSX) { 6191 if (LJ_TARGET_OSX) {
6149 dasm_put(Dst, 1579); 6192 dasm_put(Dst, 1569);
6150 } 6193 }
6151 dasm_put(Dst, 1581, -LJ_TISNUM); 6194 dasm_put(Dst, 1571, -LJ_TISNUM);
6152 if (LJ_TARGET_OSX) { 6195 if (LJ_TARGET_OSX) {
6153 dasm_put(Dst, 1593); 6196 dasm_put(Dst, 1583);
6154 } 6197 }
6155 dasm_put(Dst, 1595); 6198 dasm_put(Dst, 1585);
6156 if (LJ_TARGET_OSX) { 6199 if (LJ_TARGET_OSX) {
6157 dasm_put(Dst, 1598); 6200 dasm_put(Dst, 1588);
6158 } 6201 }
6159 dasm_put(Dst, 1600, -LJ_TISNUM); 6202 dasm_put(Dst, 1590, -LJ_TISNUM);
6160 if (LJ_TARGET_OSX) { 6203 if (LJ_TARGET_OSX) {
6161 dasm_put(Dst, 1612); 6204 dasm_put(Dst, 1602);
6162 } 6205 }
6163 dasm_put(Dst, 1614); 6206 dasm_put(Dst, 1604);
6164 if (LJ_TARGET_OSX) { 6207 if (LJ_TARGET_OSX) {
6165 dasm_put(Dst, 1617); 6208 dasm_put(Dst, 1607);
6166 } 6209 }
6167 dasm_put(Dst, 1619, -LJ_TISNUM); 6210 dasm_put(Dst, 1609, -LJ_TISNUM);
6168 if (LJ_TARGET_OSX) { 6211 if (LJ_TARGET_OSX) {
6169 dasm_put(Dst, 1631); 6212 dasm_put(Dst, 1621);
6170 } 6213 }
6171 dasm_put(Dst, 1633); 6214 dasm_put(Dst, 1623);
6172 if (LJ_TARGET_OSX) { 6215 if (LJ_TARGET_OSX) {
6173 dasm_put(Dst, 1636); 6216 dasm_put(Dst, 1626);
6174 } 6217 }
6175 dasm_put(Dst, 1638, -LJ_TISNUM); 6218 dasm_put(Dst, 1628, -LJ_TISNUM);
6176 if (LJ_TARGET_OSX) { 6219 if (LJ_TARGET_OSX) {
6177 dasm_put(Dst, 1650); 6220 dasm_put(Dst, 1640);
6178 } 6221 }
6179 dasm_put(Dst, 1652); 6222 dasm_put(Dst, 1642);
6180 if (LJ_TARGET_OSX) { 6223 if (LJ_TARGET_OSX) {
6181 dasm_put(Dst, 1655); 6224 dasm_put(Dst, 1645);
6182 } 6225 }
6183 dasm_put(Dst, 1657, -LJ_TISNUM); 6226 dasm_put(Dst, 1647, -LJ_TISNUM);
6184 if (LJ_TARGET_OSX) { 6227 if (LJ_TARGET_OSX) {
6185 dasm_put(Dst, 1669); 6228 dasm_put(Dst, 1659);
6186 } 6229 }
6187 dasm_put(Dst, 1671); 6230 dasm_put(Dst, 1661);
6188 if (LJ_TARGET_OSX) { 6231 if (LJ_TARGET_OSX) {
6189 dasm_put(Dst, 1674); 6232 dasm_put(Dst, 1664);
6190 } 6233 }
6191 dasm_put(Dst, 1676, -LJ_TISNUM); 6234 dasm_put(Dst, 1666, -LJ_TISNUM);
6192 if (LJ_TARGET_OSX) { 6235 if (LJ_TARGET_OSX) {
6193 dasm_put(Dst, 1688); 6236 dasm_put(Dst, 1678);
6194 } 6237 }
6195 dasm_put(Dst, 1690); 6238 dasm_put(Dst, 1680);
6196 if (LJ_TARGET_OSX) { 6239 if (LJ_TARGET_OSX) {
6197 dasm_put(Dst, 1693); 6240 dasm_put(Dst, 1683);
6198 } 6241 }
6199 dasm_put(Dst, 1695, -LJ_TISNUM); 6242 dasm_put(Dst, 1685, -LJ_TISNUM);
6200 if (LJ_TARGET_OSX) { 6243 if (LJ_TARGET_OSX) {
6201 dasm_put(Dst, 1707); 6244 dasm_put(Dst, 1697);
6202 } 6245 }
6203 dasm_put(Dst, 1709); 6246 dasm_put(Dst, 1699);
6204 if (LJ_TARGET_OSX) { 6247 if (LJ_TARGET_OSX) {
6205 dasm_put(Dst, 1712); 6248 dasm_put(Dst, 1702);
6206 } 6249 }
6207 dasm_put(Dst, 1714, -LJ_TISNUM); 6250 dasm_put(Dst, 1704, -LJ_TISNUM);
6208 if (LJ_TARGET_OSX) { 6251 if (LJ_TARGET_OSX) {
6209 dasm_put(Dst, 1726); 6252 dasm_put(Dst, 1716);
6210 } 6253 }
6211 dasm_put(Dst, 1728); 6254 dasm_put(Dst, 1718);
6212 if (LJ_TARGET_OSX) { 6255 if (LJ_TARGET_OSX) {
6213 dasm_put(Dst, 1731); 6256 dasm_put(Dst, 1721);
6214 } 6257 }
6215 dasm_put(Dst, 1733, -LJ_TISNUM); 6258 dasm_put(Dst, 1723, -LJ_TISNUM);
6216 if (LJ_TARGET_OSX) { 6259 if (LJ_TARGET_OSX) {
6217 dasm_put(Dst, 1745); 6260 dasm_put(Dst, 1735);
6218 } 6261 }
6219 dasm_put(Dst, 1747); 6262 dasm_put(Dst, 1737);
6220 if (LJ_TARGET_OSX) { 6263 if (LJ_TARGET_OSX) {
6221 dasm_put(Dst, 1750); 6264 dasm_put(Dst, 1740);
6222 } 6265 }
6223 dasm_put(Dst, 1752, -LJ_TISNUM); 6266 dasm_put(Dst, 1742, -LJ_TISNUM);
6224 if (LJ_TARGET_OSX) { 6267 if (LJ_TARGET_OSX) {
6225 dasm_put(Dst, 1764); 6268 dasm_put(Dst, 1754);
6226 } 6269 }
6227 dasm_put(Dst, 1766); 6270 dasm_put(Dst, 1756);
6228 if (LJ_TARGET_OSX) { 6271 if (LJ_TARGET_OSX) {
6229 dasm_put(Dst, 1769); 6272 dasm_put(Dst, 1759);
6230 } 6273 }
6231 dasm_put(Dst, 1771, -LJ_TISNUM); 6274 dasm_put(Dst, 1761, -LJ_TISNUM);
6232 if (LJ_TARGET_OSX) { 6275 if (LJ_TARGET_OSX) {
6233 dasm_put(Dst, 1783); 6276 dasm_put(Dst, 1773);
6234 } 6277 }
6235 dasm_put(Dst, 1785); 6278 dasm_put(Dst, 1775);
6236 if (LJ_TARGET_OSX) { 6279 if (LJ_TARGET_OSX) {
6237 dasm_put(Dst, 1788); 6280 dasm_put(Dst, 1778);
6238 } 6281 }
6239 dasm_put(Dst, 1790, -LJ_TISNUM, -LJ_TISNUM); 6282 dasm_put(Dst, 1780, -LJ_TISNUM, -LJ_TISNUM);
6240 if (LJ_TARGET_OSX) { 6283 if (LJ_TARGET_OSX) {
6241 dasm_put(Dst, 1805); 6284 dasm_put(Dst, 1795);
6242 } 6285 }
6243 dasm_put(Dst, 1807); 6286 dasm_put(Dst, 1797);
6244 if (LJ_TARGET_OSX) { 6287 if (LJ_TARGET_OSX) {
6245 dasm_put(Dst, 1810); 6288 dasm_put(Dst, 1800);
6246 } 6289 }
6247 dasm_put(Dst, 1812, -LJ_TISNUM, -LJ_TISNUM); 6290 dasm_put(Dst, 1802, -LJ_TISNUM, -LJ_TISNUM);
6248 if (LJ_TARGET_OSX) { 6291 if (LJ_TARGET_OSX) {
6249 dasm_put(Dst, 1827); 6292 dasm_put(Dst, 1817);
6250 } 6293 }
6251 dasm_put(Dst, 1829); 6294 dasm_put(Dst, 1819);
6252 if (LJ_TARGET_OSX) { 6295 if (LJ_TARGET_OSX) {
6253 dasm_put(Dst, 1832); 6296 dasm_put(Dst, 1822);
6254 } 6297 }
6255 dasm_put(Dst, 1834, -LJ_TISNUM, -LJ_TISNUM); 6298 dasm_put(Dst, 1824, -LJ_TISNUM, -LJ_TISNUM);
6256 if (LJ_TARGET_OSX) { 6299 if (LJ_TARGET_OSX) {
6257 dasm_put(Dst, 1849); 6300 dasm_put(Dst, 1839);
6258 } 6301 }
6259 dasm_put(Dst, 1851); 6302 dasm_put(Dst, 1841);
6260 if (LJ_TARGET_OSX) { 6303 if (LJ_TARGET_OSX) {
6261 dasm_put(Dst, 1854); 6304 dasm_put(Dst, 1844);
6262 } 6305 }
6263 dasm_put(Dst, 1856, -LJ_TISNUM, Dt8(->upvalue[0]), -LJ_TISNUM, -LJ_TISNUM); 6306 dasm_put(Dst, 1846, -LJ_TISNUM, Dt8(->upvalue[0]), -LJ_TISNUM, -LJ_TISNUM);
6264 if (LJ_TARGET_OSX) { 6307 if (LJ_TARGET_OSX) {
6265 dasm_put(Dst, 1889); 6308 dasm_put(Dst, 1879);
6266 } 6309 }
6267 dasm_put(Dst, 1891); 6310 dasm_put(Dst, 1881);
6268 if (LJ_TARGET_OSX) { 6311 if (LJ_TARGET_OSX) {
6269 dasm_put(Dst, 1894); 6312 dasm_put(Dst, 1884);
6270 } 6313 }
6271 dasm_put(Dst, 1896, -LJ_TISNUM); 6314 dasm_put(Dst, 1886, -LJ_TISNUM);
6272 if (LJ_TARGET_OSX) { 6315 if (LJ_TARGET_OSX) {
6273 dasm_put(Dst, 1909); 6316 dasm_put(Dst, 1899);
6274 } 6317 }
6275 dasm_put(Dst, 1911); 6318 dasm_put(Dst, 1901);
6276 if (LJ_TARGET_OSX) { 6319 if (LJ_TARGET_OSX) {
6277 dasm_put(Dst, 1914); 6320 dasm_put(Dst, 1904);
6278 } 6321 }
6279 dasm_put(Dst, 1916, ~LJ_TISNUM, (2+1)*8, -LJ_TISNUM); 6322 dasm_put(Dst, 1906, ~LJ_TISNUM, (2+1)*8, -LJ_TISNUM);
6280 if (LJ_TARGET_OSX) { 6323 if (LJ_TARGET_OSX) {
6281 dasm_put(Dst, 1938); 6324 dasm_put(Dst, 1928);
6282 } 6325 }
6283 dasm_put(Dst, 1940); 6326 dasm_put(Dst, 1930);
6284 if (LJ_TARGET_OSX) { 6327 if (LJ_TARGET_OSX) {
6285 dasm_put(Dst, 1943); 6328 dasm_put(Dst, 1933);
6286 } 6329 }
6287 dasm_put(Dst, 1945, (2+1)*8, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); 6330 dasm_put(Dst, 1935, (2+1)*8, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM);
6288 dasm_put(Dst, 1996, -LJ_TISNUM, -LJ_TISNUM); 6331 dasm_put(Dst, 1986, -LJ_TISNUM, -LJ_TISNUM);
6289 dasm_put(Dst, 2050, -LJ_TISNUM, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TSTR, Dt5(->len), Dt5([1])); 6332 dasm_put(Dst, 2040, -LJ_TISNUM, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TSTR, Dt5(->len), Dt5([1]));
6290 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)); 6333 dasm_put(Dst, 2094, ~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));
6291 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)); 6334 dasm_put(Dst, 2153, -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));
6292 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)); 6335 dasm_put(Dst, 2215, 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));
6293 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)); 6336 dasm_put(Dst, 2268, 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));
6294 dasm_put(Dst, 2338, -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr), -LJ_TTAB); 6337 dasm_put(Dst, 2328, -LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), DISPATCH_GL(tmpbuf.buf), sizeof(GCstr), -LJ_TTAB);
6295 if (LJ_TARGET_OSX) { 6338 if (LJ_TARGET_OSX) {
6296 dasm_put(Dst, 2376); 6339 dasm_put(Dst, 2366);
6297 } 6340 }
6298 dasm_put(Dst, 2378); 6341 dasm_put(Dst, 2368);
6299 if (LJ_TARGET_OSX) { 6342 if (LJ_TARGET_OSX) {
6300 dasm_put(Dst, 2381); 6343 dasm_put(Dst, 2371);
6301 } 6344 }
6302 dasm_put(Dst, 2383, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); 6345 dasm_put(Dst, 2373, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM);
6303 dasm_put(Dst, 2454, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM); 6346 dasm_put(Dst, 2444, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM);
6304 dasm_put(Dst, 2514, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM); 6347 dasm_put(Dst, 2504, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM);
6305 dasm_put(Dst, 2570, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM); 6348 dasm_put(Dst, 2560, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM);
6306 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); 6349 dasm_put(Dst, 2617, -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);
6307 dasm_put(Dst, 2690, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base)); 6350 dasm_put(Dst, 2680, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base));
6308#if LJ_HASJIT 6351#if LJ_HASJIT
6309 dasm_put(Dst, 2724, DISPATCH_GL(hookmask), HOOK_VMEVENT, DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); 6352 dasm_put(Dst, 2714, DISPATCH_GL(hookmask), HOOK_VMEVENT, DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount));
6310#endif 6353#endif
6311 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)); 6354 dasm_put(Dst, 2734, 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));
6312 dasm_put(Dst, 2790, GG_DISP2STATIC); 6355 dasm_put(Dst, 2780, GG_DISP2STATIC);
6313#if LJ_HASJIT 6356#if LJ_HASJIT
6314 dasm_put(Dst, 2806, -GG_DISP2J, Dt7(->field_pc), DISPATCH_J(L), PC2PROTO(framesize), Dt1(->base), Dt1(->top)); 6357 dasm_put(Dst, 2796, -GG_DISP2J, Dt7(->field_pc), DISPATCH_J(L), PC2PROTO(framesize), Dt1(->base), Dt1(->top));
6315#endif 6358#endif
6316 dasm_put(Dst, 2827); 6359 dasm_put(Dst, 2817);
6317#if LJ_HASJIT 6360#if LJ_HASJIT
6318 dasm_put(Dst, 2830); 6361 dasm_put(Dst, 2820);
6319#endif 6362#endif
6320 dasm_put(Dst, 2833); 6363 dasm_put(Dst, 2823);
6321#if LJ_HASJIT 6364#if LJ_HASJIT
6322 dasm_put(Dst, 2835); 6365 dasm_put(Dst, 2825);
6323#endif 6366#endif
6324 dasm_put(Dst, 2838, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); 6367 dasm_put(Dst, 2828, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
6325#if LJ_HASJIT 6368#if LJ_HASJIT
6326 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); 6369 dasm_put(Dst, 2851, 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);
6327#endif 6370#endif
6328 dasm_put(Dst, 2909); 6371 dasm_put(Dst, 2899);
6329#if LJ_HASJIT 6372#if LJ_HASJIT
6330 dasm_put(Dst, 2911, Dt7(->field_pc), DISPATCH_GL(jit_L), LJ_VMST_INTERP, PC2PROTO(k), DISPATCH_GL(vmstate), BC_FUNCF); 6373 dasm_put(Dst, 2901, Dt7(->field_pc), DISPATCH_GL(jit_L), LJ_VMST_INTERP, PC2PROTO(k), DISPATCH_GL(vmstate), BC_FUNCF);
6331#endif 6374#endif
6332 dasm_put(Dst, 2948); 6375 dasm_put(Dst, 2938);
6333#if LJ_HASJIT 6376#if LJ_HASJIT
6334 dasm_put(Dst, 2955); 6377 dasm_put(Dst, 3012);
6335#else
6336 dasm_put(Dst, 2959);
6337#endif 6378#endif
6338 dasm_put(Dst, 2961); 6379 dasm_put(Dst, 3026);
6339 { 6380 {
6340 int i; 6381 int i;
6341 for (i = 31; i >= 0; i--) { 6382 for (i = 31; i >= 0; i--) {
6342 dasm_put(Dst, 2997, i, i); 6383 dasm_put(Dst, 3062, i, i);
6343 } 6384 }
6344 } 6385 }
6345 dasm_put(Dst, 3002); 6386 dasm_put(Dst, 3067);
6346#if LJ_HASJIT 6387#if LJ_HASJIT
6347 dasm_put(Dst, 3031); 6388 dasm_put(Dst, 3096);
6348#else 6389#else
6349 dasm_put(Dst, 3056); 6390 dasm_put(Dst, 3121);
6350#endif 6391#endif
6351 dasm_put(Dst, 3058); 6392 dasm_put(Dst, 3123);
6352#if LJ_HASFFI 6393#if LJ_HASFFI
6353#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) 6394#define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V)
6354 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])); 6395 dasm_put(Dst, 3125, 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]));
6355#endif 6396#endif
6356} 6397}
6357 6398
@@ -6359,7 +6400,7 @@ static void build_subroutines(BuildCtx *ctx)
6359static void build_ins(BuildCtx *ctx, BCOp op, int defop) 6400static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6360{ 6401{
6361 int vk = 0; 6402 int vk = 0;
6362 dasm_put(Dst, 3098, defop); 6403 dasm_put(Dst, 3163, defop);
6363 6404
6364 switch (op) { 6405 switch (op) {
6365 6406
@@ -6368,578 +6409,571 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6368 /* Remember: all ops branch for a true comparison, fall through otherwise. */ 6409 /* Remember: all ops branch for a true comparison, fall through otherwise. */
6369 6410
6370 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: 6411 case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT:
6371 dasm_put(Dst, 3100, -LJ_TISNUM, -LJ_TISNUM); 6412 dasm_put(Dst, 3165, -LJ_TISNUM, -LJ_TISNUM);
6372 if (op == BC_ISLT) { 6413 if (op == BC_ISLT) {
6373 dasm_put(Dst, 3116); 6414 dasm_put(Dst, 3181);
6374 } else if (op == BC_ISGE) { 6415 } else if (op == BC_ISGE) {
6375 dasm_put(Dst, 3118); 6416 dasm_put(Dst, 3183);
6376 } else if (op == BC_ISLE) { 6417 } else if (op == BC_ISLE) {
6377 dasm_put(Dst, 3120); 6418 dasm_put(Dst, 3185);
6378 } else { 6419 } else {
6379 dasm_put(Dst, 3122); 6420 dasm_put(Dst, 3187);
6380 } 6421 }
6381 dasm_put(Dst, 3124, -LJ_TISNUM); 6422 dasm_put(Dst, 3189, -LJ_TISNUM);
6382 if (op == BC_ISLT) { 6423 if (op == BC_ISLT) {
6383 dasm_put(Dst, 3160); 6424 dasm_put(Dst, 3225);
6384 } else if (op == BC_ISGE) { 6425 } else if (op == BC_ISGE) {
6385 dasm_put(Dst, 3162); 6426 dasm_put(Dst, 3227);
6386 } else if (op == BC_ISLE) { 6427 } else if (op == BC_ISLE) {
6387 dasm_put(Dst, 3164); 6428 dasm_put(Dst, 3229);
6388 } else { 6429 } else {
6389 dasm_put(Dst, 3166); 6430 dasm_put(Dst, 3231);
6390 } 6431 }
6391 dasm_put(Dst, 3168); 6432 dasm_put(Dst, 3233);
6392 break; 6433 break;
6393 6434
6394 case BC_ISEQV: case BC_ISNEV: 6435 case BC_ISEQV: case BC_ISNEV:
6395 vk = op == BC_ISEQV; 6436 vk = op == BC_ISEQV;
6396 dasm_put(Dst, 3171, -LJ_TISNUM, -LJ_TISNUM); 6437 dasm_put(Dst, 3236, -LJ_TISNUM, -LJ_TISNUM);
6397 if (vk) { 6438 if (vk) {
6398 dasm_put(Dst, 3182); 6439 dasm_put(Dst, 3247);
6399 } else { 6440 } else {
6400 dasm_put(Dst, 3185); 6441 dasm_put(Dst, 3250);
6401 } 6442 }
6402 if (LJ_HASFFI) { 6443 if (LJ_HASFFI) {
6403 dasm_put(Dst, 3188, -LJ_TCDATA, -LJ_TCDATA); 6444 dasm_put(Dst, 3253, -LJ_TCDATA, -LJ_TCDATA);
6404 } 6445 }
6405 dasm_put(Dst, 3195, -LJ_TISPRI); 6446 dasm_put(Dst, 3260, -LJ_TISPRI);
6406 if (vk) { 6447 if (vk) {
6407 dasm_put(Dst, 3204, -LJ_TISTABUD); 6448 dasm_put(Dst, 3269, -LJ_TISTABUD);
6408 } else { 6449 } else {
6409 dasm_put(Dst, 3221, -LJ_TISTABUD); 6450 dasm_put(Dst, 3286, -LJ_TISTABUD);
6410 } 6451 }
6411 dasm_put(Dst, 3228, Dt6(->metatable)); 6452 dasm_put(Dst, 3293, Dt6(->metatable));
6412 if (vk) { 6453 if (vk) {
6413 dasm_put(Dst, 3232); 6454 dasm_put(Dst, 3297);
6414 } else { 6455 } else {
6415 dasm_put(Dst, 3235); 6456 dasm_put(Dst, 3300);
6416 } 6457 }
6417 dasm_put(Dst, 3238, Dt6(->nomm), 1-vk, 1<<MM_eq); 6458 dasm_put(Dst, 3303, Dt6(->nomm), 1-vk, 1<<MM_eq);
6418 if (vk) { 6459 if (vk) {
6419 dasm_put(Dst, 3248); 6460 dasm_put(Dst, 3313);
6420 } else { 6461 } else {
6421 dasm_put(Dst, 3251); 6462 dasm_put(Dst, 3316);
6422 } 6463 }
6423 break; 6464 break;
6424 6465
6425 case BC_ISEQS: case BC_ISNES: 6466 case BC_ISEQS: case BC_ISNES:
6426 vk = op == BC_ISEQS; 6467 vk = op == BC_ISEQS;
6427 dasm_put(Dst, 3261, -LJ_TSTR); 6468 dasm_put(Dst, 3326, -LJ_TSTR);
6428 if (LJ_HASFFI) { 6469 if (LJ_HASFFI) {
6429 dasm_put(Dst, 3270); 6470 dasm_put(Dst, 3335);
6430 } else { 6471 } else {
6431 dasm_put(Dst, 3274); 6472 dasm_put(Dst, 3339);
6432 } 6473 }
6433 if (vk) { 6474 if (vk) {
6434 dasm_put(Dst, 3276); 6475 dasm_put(Dst, 3341);
6435 } else { 6476 } else {
6436 dasm_put(Dst, 3279); 6477 dasm_put(Dst, 3344);
6437 } 6478 }
6438 dasm_put(Dst, 3282); 6479 dasm_put(Dst, 3347);
6439 if (LJ_HASFFI) { 6480 if (LJ_HASFFI) {
6440 dasm_put(Dst, 3289, -LJ_TCDATA); 6481 dasm_put(Dst, 3354, -LJ_TCDATA);
6441 } 6482 }
6442 break; 6483 break;
6443 6484
6444 case BC_ISEQN: case BC_ISNEN: 6485 case BC_ISEQN: case BC_ISNEN:
6445 vk = op == BC_ISEQN; 6486 vk = op == BC_ISEQN;
6446 dasm_put(Dst, 3297); 6487 dasm_put(Dst, 3362);
6447 if (vk) { 6488 if (vk) {
6448 dasm_put(Dst, 3304); 6489 dasm_put(Dst, 3369);
6449 } else { 6490 } else {
6450 dasm_put(Dst, 3306); 6491 dasm_put(Dst, 3371);
6451 } 6492 }
6452 dasm_put(Dst, 3308, -LJ_TISNUM, -LJ_TISNUM); 6493 dasm_put(Dst, 3373, -LJ_TISNUM, -LJ_TISNUM);
6453 if (vk) { 6494 if (vk) {
6454 dasm_put(Dst, 3318); 6495 dasm_put(Dst, 3383);
6455 } else { 6496 } else {
6456 dasm_put(Dst, 3321); 6497 dasm_put(Dst, 3386);
6457 } 6498 }
6458 dasm_put(Dst, 3324); 6499 dasm_put(Dst, 3389);
6459 if (LJ_HASFFI) { 6500 if (LJ_HASFFI) {
6460 dasm_put(Dst, 3333); 6501 dasm_put(Dst, 3398);
6461 } else { 6502 } else {
6462 if (!vk) { 6503 if (!vk) {
6463 dasm_put(Dst, 3336); 6504 dasm_put(Dst, 3401);
6464 } 6505 }
6465 dasm_put(Dst, 3338); 6506 dasm_put(Dst, 3403);
6466 } 6507 }
6467 dasm_put(Dst, 3341, -LJ_TISNUM); 6508 dasm_put(Dst, 3406, -LJ_TISNUM);
6468 if (vk) { 6509 if (vk) {
6469 dasm_put(Dst, 3357); 6510 dasm_put(Dst, 3422);
6470 } else { 6511 } else {
6471 dasm_put(Dst, 3359); 6512 dasm_put(Dst, 3424);
6472 } 6513 }
6473 dasm_put(Dst, 3361); 6514 dasm_put(Dst, 3426);
6474 if (LJ_HASFFI) { 6515 if (LJ_HASFFI) {
6475 dasm_put(Dst, 3364, -LJ_TCDATA); 6516 dasm_put(Dst, 3429, -LJ_TCDATA);
6476 } 6517 }
6477 break; 6518 break;
6478 6519
6479 case BC_ISEQP: case BC_ISNEP: 6520 case BC_ISEQP: case BC_ISNEP:
6480 vk = op == BC_ISEQP; 6521 vk = op == BC_ISEQP;
6481 dasm_put(Dst, 3372); 6522 dasm_put(Dst, 3437);
6482 if (LJ_HASFFI) { 6523 if (LJ_HASFFI) {
6483 dasm_put(Dst, 3378, -LJ_TCDATA); 6524 dasm_put(Dst, 3443, -LJ_TCDATA);
6484 } 6525 }
6485 dasm_put(Dst, 3383); 6526 dasm_put(Dst, 3448);
6486 if (vk) { 6527 if (vk) {
6487 dasm_put(Dst, 3385); 6528 dasm_put(Dst, 3450);
6488 } else { 6529 } else {
6489 dasm_put(Dst, 3387); 6530 dasm_put(Dst, 3452);
6490 } 6531 }
6491 dasm_put(Dst, 3389); 6532 dasm_put(Dst, 3454);
6492 break; 6533 break;
6493 6534
6494 /* -- Unary test and copy ops ------------------------------------------- */ 6535 /* -- Unary test and copy ops ------------------------------------------- */
6495 6536
6496 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: 6537 case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF:
6497 dasm_put(Dst, 3396, -LJ_TTRUE); 6538 dasm_put(Dst, 3461, -LJ_TTRUE);
6498 if (op == BC_ISTC || op == BC_IST) { 6539 if (op == BC_ISTC || op == BC_IST) {
6499 dasm_put(Dst, 3404); 6540 dasm_put(Dst, 3469);
6500 if (op == BC_ISTC) { 6541 if (op == BC_ISTC) {
6501 dasm_put(Dst, 3406); 6542 dasm_put(Dst, 3471);
6502 } 6543 }
6503 } else { 6544 } else {
6504 dasm_put(Dst, 3408); 6545 dasm_put(Dst, 3473);
6505 if (op == BC_ISFC) { 6546 if (op == BC_ISFC) {
6506 dasm_put(Dst, 3410); 6547 dasm_put(Dst, 3475);
6507 } 6548 }
6508 } 6549 }
6509 dasm_put(Dst, 3412); 6550 dasm_put(Dst, 3477);
6510 break; 6551 break;
6511 6552
6512 /* -- Unary ops --------------------------------------------------------- */ 6553 /* -- Unary ops --------------------------------------------------------- */
6513 6554
6514 case BC_MOV: 6555 case BC_MOV:
6515 dasm_put(Dst, 3419); 6556 dasm_put(Dst, 3484);
6516 break; 6557 break;
6517 case BC_NOT: 6558 case BC_NOT:
6518 dasm_put(Dst, 3429, -LJ_TTRUE, ~LJ_TFALSE, ~LJ_TTRUE); 6559 dasm_put(Dst, 3494, -LJ_TTRUE, ~LJ_TFALSE, ~LJ_TTRUE);
6519 break; 6560 break;
6520 case BC_UNM: 6561 case BC_UNM:
6521 dasm_put(Dst, 3446, -LJ_TISNUM); 6562 dasm_put(Dst, 3511, -LJ_TISNUM);
6522 break; 6563 break;
6523 case BC_LEN: 6564 case BC_LEN:
6524 dasm_put(Dst, 3472, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TTAB); 6565 dasm_put(Dst, 3537, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TTAB);
6525 if (LJ_TARGET_OSX) { 6566 if (LJ_TARGET_OSX) {
6526 dasm_put(Dst, 3496); 6567 dasm_put(Dst, 3561);
6527 } 6568 }
6528 dasm_put(Dst, 3498); 6569 dasm_put(Dst, 3563);
6529 if (LJ_TARGET_OSX) { 6570 if (LJ_TARGET_OSX) {
6530 dasm_put(Dst, 3501); 6571 dasm_put(Dst, 3566);
6531 } 6572 }
6532 dasm_put(Dst, 3503); 6573 dasm_put(Dst, 3568);
6533 break; 6574 break;
6534 6575
6535 /* -- Binary ops -------------------------------------------------------- */ 6576 /* -- Binary ops -------------------------------------------------------- */
6536 6577
6537 6578
6538 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: 6579 case BC_ADDVN: case BC_ADDNV: case BC_ADDVV:
6539 dasm_put(Dst, 3506); 6580 dasm_put(Dst, 3571);
6540 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6581 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6541 switch (vk) { 6582 switch (vk) {
6542 case 0: 6583 case 0:
6543 dasm_put(Dst, 3509); 6584 dasm_put(Dst, 3574);
6544 break; 6585 break;
6545 case 1: 6586 case 1:
6546 dasm_put(Dst, 3512); 6587 dasm_put(Dst, 3577);
6547 break; 6588 break;
6548 default: 6589 default:
6549 dasm_put(Dst, 3515); 6590 dasm_put(Dst, 3580);
6550 break; 6591 break;
6551 } 6592 }
6552 dasm_put(Dst, 3518); 6593 dasm_put(Dst, 3583);
6553 if (vk == 1) { 6594 if (vk == 1) {
6554 dasm_put(Dst, 3520, -LJ_TISNUM, -LJ_TISNUM); 6595 dasm_put(Dst, 3585, -LJ_TISNUM, -LJ_TISNUM);
6555 } else { 6596 } else {
6556 dasm_put(Dst, 3525, -LJ_TISNUM, -LJ_TISNUM); 6597 dasm_put(Dst, 3590, -LJ_TISNUM, -LJ_TISNUM);
6557 } 6598 }
6558 dasm_put(Dst, 3530); 6599 dasm_put(Dst, 3595);
6559 switch (vk) { 6600 switch (vk) {
6560 case 0: 6601 case 0:
6561 dasm_put(Dst, 3534); 6602 dasm_put(Dst, 3599);
6562 break; 6603 break;
6563 case 1: 6604 case 1:
6564 dasm_put(Dst, 3537); 6605 dasm_put(Dst, 3602);
6565 break; 6606 break;
6566 default: 6607 default:
6567 dasm_put(Dst, 3540); 6608 dasm_put(Dst, 3605);
6568 break; 6609 break;
6569 } 6610 }
6570 dasm_put(Dst, 3543); 6611 dasm_put(Dst, 3608);
6571 switch (vk) { 6612 switch (vk) {
6572 case 0: 6613 case 0:
6573 if (vk == 1) { 6614 if (vk == 1) {
6574 dasm_put(Dst, 3552, -LJ_TISNUM, -LJ_TISNUM); 6615 dasm_put(Dst, 3617, -LJ_TISNUM, -LJ_TISNUM);
6575 } else { 6616 } else {
6576 dasm_put(Dst, 3557, -LJ_TISNUM, -LJ_TISNUM); 6617 dasm_put(Dst, 3622, -LJ_TISNUM, -LJ_TISNUM);
6577 } 6618 }
6578 dasm_put(Dst, 3562); 6619 dasm_put(Dst, 3627);
6579 break; 6620 break;
6580 case 1: 6621 case 1:
6581 if (vk == 1) { 6622 if (vk == 1) {
6582 dasm_put(Dst, 3565, -LJ_TISNUM, -LJ_TISNUM); 6623 dasm_put(Dst, 3630, -LJ_TISNUM, -LJ_TISNUM);
6583 } else { 6624 } else {
6584 dasm_put(Dst, 3570, -LJ_TISNUM, -LJ_TISNUM); 6625 dasm_put(Dst, 3635, -LJ_TISNUM, -LJ_TISNUM);
6585 } 6626 }
6586 dasm_put(Dst, 3575); 6627 dasm_put(Dst, 3640);
6587 break; 6628 break;
6588 default: 6629 default:
6589 if (vk == 1) { 6630 if (vk == 1) {
6590 dasm_put(Dst, 3578, -LJ_TISNUM, -LJ_TISNUM); 6631 dasm_put(Dst, 3643, -LJ_TISNUM, -LJ_TISNUM);
6591 } else { 6632 } else {
6592 dasm_put(Dst, 3583, -LJ_TISNUM, -LJ_TISNUM); 6633 dasm_put(Dst, 3648, -LJ_TISNUM, -LJ_TISNUM);
6593 } 6634 }
6594 dasm_put(Dst, 3588); 6635 dasm_put(Dst, 3653);
6595 break; 6636 break;
6596 } 6637 }
6597 dasm_put(Dst, 3591); 6638 dasm_put(Dst, 3656);
6598 break; 6639 break;
6599 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: 6640 case BC_SUBVN: case BC_SUBNV: case BC_SUBVV:
6600 dasm_put(Dst, 3597); 6641 dasm_put(Dst, 3662);
6601 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6642 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6602 switch (vk) { 6643 switch (vk) {
6603 case 0: 6644 case 0:
6604 dasm_put(Dst, 3600); 6645 dasm_put(Dst, 3665);
6605 break; 6646 break;
6606 case 1: 6647 case 1:
6607 dasm_put(Dst, 3603); 6648 dasm_put(Dst, 3668);
6608 break; 6649 break;
6609 default: 6650 default:
6610 dasm_put(Dst, 3606); 6651 dasm_put(Dst, 3671);
6611 break; 6652 break;
6612 } 6653 }
6613 dasm_put(Dst, 3609); 6654 dasm_put(Dst, 3674);
6614 if (vk == 1) { 6655 if (vk == 1) {
6615 dasm_put(Dst, 3611, -LJ_TISNUM, -LJ_TISNUM); 6656 dasm_put(Dst, 3676, -LJ_TISNUM, -LJ_TISNUM);
6616 } else { 6657 } else {
6617 dasm_put(Dst, 3616, -LJ_TISNUM, -LJ_TISNUM); 6658 dasm_put(Dst, 3681, -LJ_TISNUM, -LJ_TISNUM);
6618 } 6659 }
6619 dasm_put(Dst, 3621); 6660 dasm_put(Dst, 3686);
6620 switch (vk) { 6661 switch (vk) {
6621 case 0: 6662 case 0:
6622 dasm_put(Dst, 3625); 6663 dasm_put(Dst, 3690);
6623 break; 6664 break;
6624 case 1: 6665 case 1:
6625 dasm_put(Dst, 3628); 6666 dasm_put(Dst, 3693);
6626 break; 6667 break;
6627 default: 6668 default:
6628 dasm_put(Dst, 3631); 6669 dasm_put(Dst, 3696);
6629 break; 6670 break;
6630 } 6671 }
6631 dasm_put(Dst, 3634); 6672 dasm_put(Dst, 3699);
6632 switch (vk) { 6673 switch (vk) {
6633 case 0: 6674 case 0:
6634 if (vk == 1) { 6675 if (vk == 1) {
6635 dasm_put(Dst, 3643, -LJ_TISNUM, -LJ_TISNUM); 6676 dasm_put(Dst, 3708, -LJ_TISNUM, -LJ_TISNUM);
6636 } else { 6677 } else {
6637 dasm_put(Dst, 3648, -LJ_TISNUM, -LJ_TISNUM); 6678 dasm_put(Dst, 3713, -LJ_TISNUM, -LJ_TISNUM);
6638 } 6679 }
6639 dasm_put(Dst, 3653); 6680 dasm_put(Dst, 3718);
6640 break; 6681 break;
6641 case 1: 6682 case 1:
6642 if (vk == 1) { 6683 if (vk == 1) {
6643 dasm_put(Dst, 3656, -LJ_TISNUM, -LJ_TISNUM); 6684 dasm_put(Dst, 3721, -LJ_TISNUM, -LJ_TISNUM);
6644 } else { 6685 } else {
6645 dasm_put(Dst, 3661, -LJ_TISNUM, -LJ_TISNUM); 6686 dasm_put(Dst, 3726, -LJ_TISNUM, -LJ_TISNUM);
6646 } 6687 }
6647 dasm_put(Dst, 3666); 6688 dasm_put(Dst, 3731);
6648 break; 6689 break;
6649 default: 6690 default:
6650 if (vk == 1) { 6691 if (vk == 1) {
6651 dasm_put(Dst, 3669, -LJ_TISNUM, -LJ_TISNUM); 6692 dasm_put(Dst, 3734, -LJ_TISNUM, -LJ_TISNUM);
6652 } else { 6693 } else {
6653 dasm_put(Dst, 3674, -LJ_TISNUM, -LJ_TISNUM); 6694 dasm_put(Dst, 3739, -LJ_TISNUM, -LJ_TISNUM);
6654 } 6695 }
6655 dasm_put(Dst, 3679); 6696 dasm_put(Dst, 3744);
6656 break; 6697 break;
6657 } 6698 }
6658 dasm_put(Dst, 3682); 6699 dasm_put(Dst, 3747);
6659 break; 6700 break;
6660 case BC_MULVN: case BC_MULNV: case BC_MULVV: 6701 case BC_MULVN: case BC_MULNV: case BC_MULVV:
6661 dasm_put(Dst, 3688); 6702 dasm_put(Dst, 3753);
6662 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6703 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6663 switch (vk) { 6704 switch (vk) {
6664 case 0: 6705 case 0:
6665 dasm_put(Dst, 3691); 6706 dasm_put(Dst, 3756);
6666 break; 6707 break;
6667 case 1: 6708 case 1:
6668 dasm_put(Dst, 3694); 6709 dasm_put(Dst, 3759);
6669 break; 6710 break;
6670 default: 6711 default:
6671 dasm_put(Dst, 3697); 6712 dasm_put(Dst, 3762);
6672 break; 6713 break;
6673 } 6714 }
6674 dasm_put(Dst, 3700); 6715 dasm_put(Dst, 3765);
6675 if (vk == 1) { 6716 if (vk == 1) {
6676 dasm_put(Dst, 3702, -LJ_TISNUM, -LJ_TISNUM); 6717 dasm_put(Dst, 3767, -LJ_TISNUM, -LJ_TISNUM);
6677 } else { 6718 } else {
6678 dasm_put(Dst, 3707, -LJ_TISNUM, -LJ_TISNUM); 6719 dasm_put(Dst, 3772, -LJ_TISNUM, -LJ_TISNUM);
6679 } 6720 }
6680 dasm_put(Dst, 3712); 6721 dasm_put(Dst, 3777);
6681 switch (vk) { 6722 switch (vk) {
6682 case 0: 6723 case 0:
6683 dasm_put(Dst, 3717); 6724 dasm_put(Dst, 3782);
6684 break; 6725 break;
6685 case 1: 6726 case 1:
6686 dasm_put(Dst, 3720); 6727 dasm_put(Dst, 3785);
6687 break; 6728 break;
6688 default: 6729 default:
6689 dasm_put(Dst, 3723); 6730 dasm_put(Dst, 3788);
6690 break; 6731 break;
6691 } 6732 }
6692 dasm_put(Dst, 3726); 6733 dasm_put(Dst, 3791);
6693 switch (vk) { 6734 switch (vk) {
6694 case 0: 6735 case 0:
6695 if (vk == 1) { 6736 if (vk == 1) {
6696 dasm_put(Dst, 3735, -LJ_TISNUM, -LJ_TISNUM); 6737 dasm_put(Dst, 3800, -LJ_TISNUM, -LJ_TISNUM);
6697 } else { 6738 } else {
6698 dasm_put(Dst, 3740, -LJ_TISNUM, -LJ_TISNUM); 6739 dasm_put(Dst, 3805, -LJ_TISNUM, -LJ_TISNUM);
6699 } 6740 }
6700 dasm_put(Dst, 3745); 6741 dasm_put(Dst, 3810);
6701 break; 6742 break;
6702 case 1: 6743 case 1:
6703 if (vk == 1) { 6744 if (vk == 1) {
6704 dasm_put(Dst, 3748, -LJ_TISNUM, -LJ_TISNUM); 6745 dasm_put(Dst, 3813, -LJ_TISNUM, -LJ_TISNUM);
6705 } else { 6746 } else {
6706 dasm_put(Dst, 3753, -LJ_TISNUM, -LJ_TISNUM); 6747 dasm_put(Dst, 3818, -LJ_TISNUM, -LJ_TISNUM);
6707 } 6748 }
6708 dasm_put(Dst, 3758); 6749 dasm_put(Dst, 3823);
6709 break; 6750 break;
6710 default: 6751 default:
6711 if (vk == 1) { 6752 if (vk == 1) {
6712 dasm_put(Dst, 3761, -LJ_TISNUM, -LJ_TISNUM); 6753 dasm_put(Dst, 3826, -LJ_TISNUM, -LJ_TISNUM);
6713 } else { 6754 } else {
6714 dasm_put(Dst, 3766, -LJ_TISNUM, -LJ_TISNUM); 6755 dasm_put(Dst, 3831, -LJ_TISNUM, -LJ_TISNUM);
6715 } 6756 }
6716 dasm_put(Dst, 3771); 6757 dasm_put(Dst, 3836);
6717 break; 6758 break;
6718 } 6759 }
6719 dasm_put(Dst, 3774); 6760 dasm_put(Dst, 3839);
6720 break; 6761 break;
6721 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: 6762 case BC_DIVVN: case BC_DIVNV: case BC_DIVVV:
6722 dasm_put(Dst, 3780); 6763 dasm_put(Dst, 3845);
6723 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6764 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6724 switch (vk) { 6765 switch (vk) {
6725 case 0: 6766 case 0:
6726 dasm_put(Dst, 3783); 6767 dasm_put(Dst, 3848);
6727 break; 6768 break;
6728 case 1: 6769 case 1:
6729 dasm_put(Dst, 3786); 6770 dasm_put(Dst, 3851);
6730 break; 6771 break;
6731 default: 6772 default:
6732 dasm_put(Dst, 3789); 6773 dasm_put(Dst, 3854);
6733 break; 6774 break;
6734 } 6775 }
6735 switch (vk) { 6776 switch (vk) {
6736 case 0: 6777 case 0:
6737 if (vk == 1) { 6778 if (vk == 1) {
6738 dasm_put(Dst, 3792, -LJ_TISNUM, -LJ_TISNUM); 6779 dasm_put(Dst, 3857, -LJ_TISNUM, -LJ_TISNUM);
6739 } else { 6780 } else {
6740 dasm_put(Dst, 3797, -LJ_TISNUM, -LJ_TISNUM); 6781 dasm_put(Dst, 3862, -LJ_TISNUM, -LJ_TISNUM);
6741 } 6782 }
6742 dasm_put(Dst, 3802); 6783 dasm_put(Dst, 3867);
6743 break; 6784 break;
6744 case 1: 6785 case 1:
6745 if (vk == 1) { 6786 if (vk == 1) {
6746 dasm_put(Dst, 3805, -LJ_TISNUM, -LJ_TISNUM); 6787 dasm_put(Dst, 3870, -LJ_TISNUM, -LJ_TISNUM);
6747 } else { 6788 } else {
6748 dasm_put(Dst, 3810, -LJ_TISNUM, -LJ_TISNUM); 6789 dasm_put(Dst, 3875, -LJ_TISNUM, -LJ_TISNUM);
6749 } 6790 }
6750 dasm_put(Dst, 3815); 6791 dasm_put(Dst, 3880);
6751 break; 6792 break;
6752 default: 6793 default:
6753 if (vk == 1) { 6794 if (vk == 1) {
6754 dasm_put(Dst, 3818, -LJ_TISNUM, -LJ_TISNUM); 6795 dasm_put(Dst, 3883, -LJ_TISNUM, -LJ_TISNUM);
6755 } else { 6796 } else {
6756 dasm_put(Dst, 3823, -LJ_TISNUM, -LJ_TISNUM); 6797 dasm_put(Dst, 3888, -LJ_TISNUM, -LJ_TISNUM);
6757 } 6798 }
6758 dasm_put(Dst, 3828); 6799 dasm_put(Dst, 3893);
6759 break; 6800 break;
6760 } 6801 }
6761 dasm_put(Dst, 3831); 6802 dasm_put(Dst, 3896);
6762 break; 6803 break;
6763 case BC_MODVN: case BC_MODNV: case BC_MODVV: 6804 case BC_MODVN: case BC_MODNV: case BC_MODVV:
6764 dasm_put(Dst, 3841); 6805 dasm_put(Dst, 3906);
6765 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6806 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6766 switch (vk) { 6807 switch (vk) {
6767 case 0: 6808 case 0:
6768 dasm_put(Dst, 3844); 6809 dasm_put(Dst, 3909);
6769 break; 6810 break;
6770 case 1: 6811 case 1:
6771 dasm_put(Dst, 3847); 6812 dasm_put(Dst, 3912);
6772 break; 6813 break;
6773 default: 6814 default:
6774 dasm_put(Dst, 3850); 6815 dasm_put(Dst, 3915);
6775 break; 6816 break;
6776 } 6817 }
6777 if (vk == 1) { 6818 if (vk == 1) {
6778 dasm_put(Dst, 3853, -LJ_TISNUM, -LJ_TISNUM); 6819 dasm_put(Dst, 3918, -LJ_TISNUM, -LJ_TISNUM);
6779 } else { 6820 } else {
6780 dasm_put(Dst, 3858, -LJ_TISNUM, -LJ_TISNUM); 6821 dasm_put(Dst, 3923, -LJ_TISNUM, -LJ_TISNUM);
6781 } 6822 }
6782 dasm_put(Dst, 3863); 6823 dasm_put(Dst, 3928);
6783 switch (vk) { 6824 switch (vk) {
6784 case 0: 6825 case 0:
6785 dasm_put(Dst, 3867); 6826 dasm_put(Dst, 3932);
6786 break; 6827 break;
6787 case 1: 6828 case 1:
6788 dasm_put(Dst, 3870); 6829 dasm_put(Dst, 3935);
6789 break; 6830 break;
6790 default: 6831 default:
6791 dasm_put(Dst, 3873); 6832 dasm_put(Dst, 3938);
6792 break; 6833 break;
6793 } 6834 }
6794 dasm_put(Dst, 3876, ~LJ_TISNUM); 6835 dasm_put(Dst, 3941, ~LJ_TISNUM);
6795 switch (vk) { 6836 switch (vk) {
6796 case 0: 6837 case 0:
6797 if (vk == 1) { 6838 if (vk == 1) {
6798 dasm_put(Dst, 3890, -LJ_TISNUM, -LJ_TISNUM); 6839 dasm_put(Dst, 3955, -LJ_TISNUM, -LJ_TISNUM);
6799 } else { 6840 } else {
6800 dasm_put(Dst, 3895, -LJ_TISNUM, -LJ_TISNUM); 6841 dasm_put(Dst, 3960, -LJ_TISNUM, -LJ_TISNUM);
6801 } 6842 }
6802 dasm_put(Dst, 3900); 6843 dasm_put(Dst, 3965);
6803 break; 6844 break;
6804 case 1: 6845 case 1:
6805 if (vk == 1) { 6846 if (vk == 1) {
6806 dasm_put(Dst, 3903, -LJ_TISNUM, -LJ_TISNUM); 6847 dasm_put(Dst, 3968, -LJ_TISNUM, -LJ_TISNUM);
6807 } else { 6848 } else {
6808 dasm_put(Dst, 3908, -LJ_TISNUM, -LJ_TISNUM); 6849 dasm_put(Dst, 3973, -LJ_TISNUM, -LJ_TISNUM);
6809 } 6850 }
6810 dasm_put(Dst, 3913); 6851 dasm_put(Dst, 3978);
6811 break; 6852 break;
6812 default: 6853 default:
6813 if (vk == 1) { 6854 if (vk == 1) {
6814 dasm_put(Dst, 3916, -LJ_TISNUM, -LJ_TISNUM); 6855 dasm_put(Dst, 3981, -LJ_TISNUM, -LJ_TISNUM);
6815 } else { 6856 } else {
6816 dasm_put(Dst, 3921, -LJ_TISNUM, -LJ_TISNUM); 6857 dasm_put(Dst, 3986, -LJ_TISNUM, -LJ_TISNUM);
6817 } 6858 }
6818 dasm_put(Dst, 3926); 6859 dasm_put(Dst, 3991);
6819 break; 6860 break;
6820 } 6861 }
6821 if (LJ_TARGET_OSX) { 6862 dasm_put(Dst, 3994);
6822 dasm_put(Dst, 3929);
6823 }
6824 dasm_put(Dst, 3931);
6825 if (LJ_TARGET_OSX) {
6826 dasm_put(Dst, 3934);
6827 }
6828 dasm_put(Dst, 3936);
6829 break; 6863 break;
6830 case BC_POW: 6864 case BC_POW:
6831 dasm_put(Dst, 3939); 6865 dasm_put(Dst, 3999);
6832 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); 6866 vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN);
6833 switch (vk) { 6867 switch (vk) {
6834 case 0: 6868 case 0:
6835 dasm_put(Dst, 3942); 6869 dasm_put(Dst, 4002);
6836 break; 6870 break;
6837 case 1: 6871 case 1:
6838 dasm_put(Dst, 3945); 6872 dasm_put(Dst, 4005);
6839 break; 6873 break;
6840 default: 6874 default:
6841 dasm_put(Dst, 3948); 6875 dasm_put(Dst, 4008);
6842 break; 6876 break;
6843 } 6877 }
6844 switch (vk) { 6878 switch (vk) {
6845 case 0: 6879 case 0:
6846 if (vk == 1) { 6880 if (vk == 1) {
6847 dasm_put(Dst, 3951, -LJ_TISNUM, -LJ_TISNUM); 6881 dasm_put(Dst, 4011, -LJ_TISNUM, -LJ_TISNUM);
6848 } else { 6882 } else {
6849 dasm_put(Dst, 3956, -LJ_TISNUM, -LJ_TISNUM); 6883 dasm_put(Dst, 4016, -LJ_TISNUM, -LJ_TISNUM);
6850 } 6884 }
6851 dasm_put(Dst, 3961); 6885 dasm_put(Dst, 4021);
6852 break; 6886 break;
6853 case 1: 6887 case 1:
6854 if (vk == 1) { 6888 if (vk == 1) {
6855 dasm_put(Dst, 3964, -LJ_TISNUM, -LJ_TISNUM); 6889 dasm_put(Dst, 4024, -LJ_TISNUM, -LJ_TISNUM);
6856 } else { 6890 } else {
6857 dasm_put(Dst, 3969, -LJ_TISNUM, -LJ_TISNUM); 6891 dasm_put(Dst, 4029, -LJ_TISNUM, -LJ_TISNUM);
6858 } 6892 }
6859 dasm_put(Dst, 3974); 6893 dasm_put(Dst, 4034);
6860 break; 6894 break;
6861 default: 6895 default:
6862 if (vk == 1) { 6896 if (vk == 1) {
6863 dasm_put(Dst, 3977, -LJ_TISNUM, -LJ_TISNUM); 6897 dasm_put(Dst, 4037, -LJ_TISNUM, -LJ_TISNUM);
6864 } else { 6898 } else {
6865 dasm_put(Dst, 3982, -LJ_TISNUM, -LJ_TISNUM); 6899 dasm_put(Dst, 4042, -LJ_TISNUM, -LJ_TISNUM);
6866 } 6900 }
6867 dasm_put(Dst, 3987); 6901 dasm_put(Dst, 4047);
6868 break; 6902 break;
6869 } 6903 }
6870 if (LJ_TARGET_OSX) { 6904 if (LJ_TARGET_OSX) {
6871 dasm_put(Dst, 3990); 6905 dasm_put(Dst, 4050);
6872 } 6906 }
6873 dasm_put(Dst, 3992); 6907 dasm_put(Dst, 4052);
6874 if (LJ_TARGET_OSX) { 6908 if (LJ_TARGET_OSX) {
6875 dasm_put(Dst, 3995); 6909 dasm_put(Dst, 4055);
6876 } 6910 }
6877 dasm_put(Dst, 3997); 6911 dasm_put(Dst, 4057);
6878 break; 6912 break;
6879 6913
6880 case BC_CAT: 6914 case BC_CAT:
6881 dasm_put(Dst, 4005, Dt1(->base), Dt1(->base)); 6915 dasm_put(Dst, 4065, Dt1(->base), Dt1(->base));
6882 break; 6916 break;
6883 6917
6884 /* -- Constant ops ------------------------------------------------------ */ 6918 /* -- Constant ops ------------------------------------------------------ */
6885 6919
6886 case BC_KSTR: 6920 case BC_KSTR:
6887 dasm_put(Dst, 4031, ~LJ_TSTR); 6921 dasm_put(Dst, 4091, ~LJ_TSTR);
6888 break; 6922 break;
6889 case BC_KCDATA: 6923 case BC_KCDATA:
6890#if LJ_HASFFI 6924#if LJ_HASFFI
6891 dasm_put(Dst, 4043, ~LJ_TCDATA); 6925 dasm_put(Dst, 4103, ~LJ_TCDATA);
6892#endif 6926#endif
6893 break; 6927 break;
6894 case BC_KSHORT: 6928 case BC_KSHORT:
6895 dasm_put(Dst, 4055, ~LJ_TISNUM); 6929 dasm_put(Dst, 4115, ~LJ_TISNUM);
6896 break; 6930 break;
6897 case BC_KNUM: 6931 case BC_KNUM:
6898 dasm_put(Dst, 4066); 6932 dasm_put(Dst, 4126);
6899 break; 6933 break;
6900 case BC_KPRI: 6934 case BC_KPRI:
6901 dasm_put(Dst, 4076); 6935 dasm_put(Dst, 4136);
6902 break; 6936 break;
6903 case BC_KNIL: 6937 case BC_KNIL:
6904 dasm_put(Dst, 4086, ~LJ_TNIL); 6938 dasm_put(Dst, 4146, ~LJ_TNIL);
6905 break; 6939 break;
6906 6940
6907 /* -- Upvalue and function ops ------------------------------------------ */ 6941 /* -- Upvalue and function ops ------------------------------------------ */
6908 6942
6909 case BC_UGET: 6943 case BC_UGET:
6910 dasm_put(Dst, 4105, offsetof(GCfuncL, uvptr), DtA(->v)); 6944 dasm_put(Dst, 4165, offsetof(GCfuncL, uvptr), DtA(->v));
6911 break; 6945 break;
6912 case BC_USETV: 6946 case BC_USETV:
6913 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); 6947 dasm_put(Dst, 4181, 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);
6914 if (LJ_TARGET_OSX) { 6948 if (LJ_TARGET_OSX) {
6915 dasm_put(Dst, 4161); 6949 dasm_put(Dst, 4221);
6916 } else { 6950 } else {
6917 dasm_put(Dst, 4168); 6951 dasm_put(Dst, 4228);
6918 } 6952 }
6919 dasm_put(Dst, 4171); 6953 dasm_put(Dst, 4231);
6920 break; 6954 break;
6921 case BC_USETS: 6955 case BC_USETS:
6922 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); 6956 dasm_put(Dst, 4234, offsetof(GCfuncL, uvptr), ~LJ_TSTR, DtA(->marked), DtA(->v), DtA(->closed), LJ_GC_BLACK, Dt5(->marked), LJ_GC_WHITES, -GG_DISP2G);
6923 if (LJ_TARGET_OSX) { 6957 if (LJ_TARGET_OSX) {
6924 dasm_put(Dst, 4210); 6958 dasm_put(Dst, 4270);
6925 } else { 6959 } else {
6926 dasm_put(Dst, 4217); 6960 dasm_put(Dst, 4277);
6927 } 6961 }
6928 dasm_put(Dst, 4220); 6962 dasm_put(Dst, 4280);
6929 break; 6963 break;
6930 case BC_USETN: 6964 case BC_USETN:
6931 dasm_put(Dst, 4223, offsetof(GCfuncL, uvptr), DtA(->v)); 6965 dasm_put(Dst, 4283, offsetof(GCfuncL, uvptr), DtA(->v));
6932 break; 6966 break;
6933 case BC_USETP: 6967 case BC_USETP:
6934 dasm_put(Dst, 4240, offsetof(GCfuncL, uvptr), DtA(->v)); 6968 dasm_put(Dst, 4300, offsetof(GCfuncL, uvptr), DtA(->v));
6935 break; 6969 break;
6936 6970
6937 case BC_UCLO: 6971 case BC_UCLO:
6938 dasm_put(Dst, 4256, Dt1(->openupval), Dt1(->base), Dt1(->base)); 6972 dasm_put(Dst, 4316, Dt1(->openupval), Dt1(->base), Dt1(->base));
6939 break; 6973 break;
6940 6974
6941 case BC_FNEW: 6975 case BC_FNEW:
6942 dasm_put(Dst, 4279, Dt1(->base), Dt1(->base), ~LJ_TFUNC); 6976 dasm_put(Dst, 4339, Dt1(->base), Dt1(->base), ~LJ_TFUNC);
6943 break; 6977 break;
6944 6978
6945 /* -- Table ops --------------------------------------------------------- */ 6979 /* -- Table ops --------------------------------------------------------- */
@@ -6947,115 +6981,115 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
6947 case BC_TNEW: 6981 case BC_TNEW:
6948 case BC_TDUP: 6982 case BC_TDUP:
6949 if (op == BC_TDUP) { 6983 if (op == BC_TDUP) {
6950 dasm_put(Dst, 4300); 6984 dasm_put(Dst, 4360);
6951 } 6985 }
6952 dasm_put(Dst, 4302, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); 6986 dasm_put(Dst, 4362, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base));
6953 if (op == BC_TNEW) { 6987 if (op == BC_TNEW) {
6954 dasm_put(Dst, 4315); 6988 dasm_put(Dst, 4375);
6955 } else { 6989 } else {
6956 dasm_put(Dst, 4324); 6990 dasm_put(Dst, 4384);
6957 } 6991 }
6958 dasm_put(Dst, 4328, Dt1(->base), ~LJ_TTAB); 6992 dasm_put(Dst, 4388, Dt1(->base), ~LJ_TTAB);
6959 break; 6993 break;
6960 6994
6961 case BC_GGET: 6995 case BC_GGET:
6962 case BC_GSET: 6996 case BC_GSET:
6963 dasm_put(Dst, 4346, Dt7(->env)); 6997 dasm_put(Dst, 4406, Dt7(->env));
6964 if (op == BC_GGET) { 6998 if (op == BC_GGET) {
6965 dasm_put(Dst, 4352); 6999 dasm_put(Dst, 4412);
6966 } else { 7000 } else {
6967 dasm_put(Dst, 4355); 7001 dasm_put(Dst, 4415);
6968 } 7002 }
6969 break; 7003 break;
6970 7004
6971 case BC_TGETV: 7005 case BC_TGETV:
6972 dasm_put(Dst, 4358, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, -LJ_TSTR); 7006 dasm_put(Dst, 4418, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, -LJ_TSTR);
6973 break; 7007 break;
6974 case BC_TGETS: 7008 case BC_TGETS:
6975 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)); 7009 dasm_put(Dst, 4475, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), DtB(->key), DtB(->val), DtB(->next), -LJ_TSTR, -LJ_TNIL, Dt6(->metatable), ~LJ_TNIL, Dt6(->nomm));
6976 dasm_put(Dst, 4475, 1<<MM_index); 7010 dasm_put(Dst, 4535, 1<<MM_index);
6977 break; 7011 break;
6978 case BC_TGETB: 7012 case BC_TGETB:
6979 dasm_put(Dst, 4482, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 7013 dasm_put(Dst, 4542, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
6980 break; 7014 break;
6981 7015
6982 case BC_TSETV: 7016 case BC_TSETV:
6983 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); 7017 dasm_put(Dst, 4585, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex);
6984 dasm_put(Dst, 4585, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TSTR); 7018 dasm_put(Dst, 4645, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TSTR);
6985 break; 7019 break;
6986 case BC_TSETS: 7020 case BC_TSETS:
6987 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)); 7021 dasm_put(Dst, 4666, -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));
6988 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); 7022 dasm_put(Dst, 4724, 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);
6989 dasm_put(Dst, 4717, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 7023 dasm_put(Dst, 4777, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
6990 break; 7024 break;
6991 case BC_TSETB: 7025 case BC_TSETB:
6992 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); 7026 dasm_put(Dst, 4786, -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);
6993 dasm_put(Dst, 4784, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 7027 dasm_put(Dst, 4844, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
6994 break; 7028 break;
6995 7029
6996 case BC_TSETM: 7030 case BC_TSETM:
6997 dasm_put(Dst, 4793, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt1(->base)); 7031 dasm_put(Dst, 4853, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt1(->base));
6998 if (LJ_TARGET_OSX) { 7032 if (LJ_TARGET_OSX) {
6999 dasm_put(Dst, 4838, Dt1(->base)); 7033 dasm_put(Dst, 4898, Dt1(->base));
7000 } 7034 }
7001 dasm_put(Dst, 4841, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 7035 dasm_put(Dst, 4901, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
7002 break; 7036 break;
7003 7037
7004 /* -- Calls and vararg handling ----------------------------------------- */ 7038 /* -- Calls and vararg handling ----------------------------------------- */
7005 7039
7006 case BC_CALLM: 7040 case BC_CALLM:
7007 dasm_put(Dst, 4857); 7041 dasm_put(Dst, 4917);
7008 break; 7042 break;
7009 case BC_CALL: 7043 case BC_CALL:
7010 dasm_put(Dst, 4863, -LJ_TFUNC, Dt7(->field_pc)); 7044 dasm_put(Dst, 4923, -LJ_TFUNC, Dt7(->field_pc));
7011 break; 7045 break;
7012 7046
7013 case BC_CALLMT: 7047 case BC_CALLMT:
7014 dasm_put(Dst, 4883); 7048 dasm_put(Dst, 4943);
7015 break; 7049 break;
7016 case BC_CALLT: 7050 case BC_CALLT:
7017 dasm_put(Dst, 4888, -LJ_TFUNC, Dt7(->ffid), FRAME_TYPE, Dt7(->field_pc), Dt7(->field_pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP); 7051 dasm_put(Dst, 4948, -LJ_TFUNC, Dt7(->ffid), FRAME_TYPE, Dt7(->field_pc), Dt7(->field_pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP);
7018 dasm_put(Dst, 4949, FRAME_TYPE); 7052 dasm_put(Dst, 5009, FRAME_TYPE);
7019 break; 7053 break;
7020 7054
7021 case BC_ITERC: 7055 case BC_ITERC:
7022 dasm_put(Dst, 4960, -LJ_TFUNC, Dt7(->field_pc)); 7056 dasm_put(Dst, 5020, -LJ_TFUNC, Dt7(->field_pc));
7023 break; 7057 break;
7024 7058
7025 case BC_ITERN: 7059 case BC_ITERN:
7026#if LJ_HASJIT 7060#if LJ_HASJIT
7027#endif 7061#endif
7028 dasm_put(Dst, 4984, Dt6(->asize), Dt6(->array), -LJ_TNIL, ~LJ_TISNUM, Dt6(->hmask), Dt6(->node), DtB(->val), -LJ_TNIL, DtB(->key)); 7062 dasm_put(Dst, 5044, Dt6(->asize), Dt6(->array), -LJ_TNIL, ~LJ_TISNUM, Dt6(->hmask), Dt6(->node), DtB(->val), -LJ_TNIL, DtB(->key));
7029 break; 7063 break;
7030 7064
7031 case BC_ISNEXT: 7065 case BC_ISNEXT:
7032 dasm_put(Dst, 5049, -LJ_TFUNC, Dt8(->ffid), -LJ_TTAB, -LJ_TNIL, FF_next_N, BC_JMP, BC_ITERC); 7066 dasm_put(Dst, 5109, -LJ_TFUNC, Dt8(->ffid), -LJ_TTAB, -LJ_TNIL, FF_next_N, BC_JMP, BC_ITERC);
7033 break; 7067 break;
7034 7068
7035 case BC_VARG: 7069 case BC_VARG:
7036 dasm_put(Dst, 5088, FRAME_VARG, ~LJ_TNIL, Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->base)); 7070 dasm_put(Dst, 5148, FRAME_VARG, ~LJ_TNIL, Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->base));
7037 break; 7071 break;
7038 7072
7039 /* -- Returns ----------------------------------------------------------- */ 7073 /* -- Returns ----------------------------------------------------------- */
7040 7074
7041 case BC_RETM: 7075 case BC_RETM:
7042 dasm_put(Dst, 5160); 7076 dasm_put(Dst, 5220);
7043 break; 7077 break;
7044 7078
7045 case BC_RET: 7079 case BC_RET:
7046 dasm_put(Dst, 5167, FRAME_TYPE, FRAME_VARG, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL, FRAME_TYPEP); 7080 dasm_put(Dst, 5227, FRAME_TYPE, FRAME_VARG, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL, FRAME_TYPEP);
7047 break; 7081 break;
7048 7082
7049 case BC_RET0: case BC_RET1: 7083 case BC_RET0: case BC_RET1:
7050 dasm_put(Dst, 5232, FRAME_TYPE, FRAME_VARG); 7084 dasm_put(Dst, 5292, FRAME_TYPE, FRAME_VARG);
7051 if (op == BC_RET1) { 7085 if (op == BC_RET1) {
7052 dasm_put(Dst, 5243); 7086 dasm_put(Dst, 5303);
7053 } 7087 }
7054 dasm_put(Dst, 5245); 7088 dasm_put(Dst, 5305);
7055 if (op == BC_RET1) { 7089 if (op == BC_RET1) {
7056 dasm_put(Dst, 5248); 7090 dasm_put(Dst, 5308);
7057 } 7091 }
7058 dasm_put(Dst, 5250, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL); 7092 dasm_put(Dst, 5310, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL);
7059 break; 7093 break;
7060 7094
7061 /* -- Loops and branches ------------------------------------------------ */ 7095 /* -- Loops and branches ------------------------------------------------ */
@@ -7063,7 +7097,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
7063 7097
7064 case BC_FORL: 7098 case BC_FORL:
7065#if LJ_HASJIT 7099#if LJ_HASJIT
7066 dasm_put(Dst, 5276, -GG_DISP2HOT); 7100 dasm_put(Dst, 5336, -GG_DISP2HOT);
7067#endif 7101#endif
7068 break; 7102 break;
7069 7103
@@ -7075,68 +7109,68 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
7075 case BC_FORI: 7109 case BC_FORI:
7076 case BC_IFORL: 7110 case BC_IFORL:
7077 vk = (op == BC_IFORL || op == BC_JFORL); 7111 vk = (op == BC_IFORL || op == BC_JFORL);
7078 dasm_put(Dst, 5286); 7112 dasm_put(Dst, 5346);
7079 if (op != BC_JFORL) { 7113 if (op != BC_JFORL) {
7080 dasm_put(Dst, 5288); 7114 dasm_put(Dst, 5348);
7081 } 7115 }
7082 if (!vk) { 7116 if (!vk) {
7083 dasm_put(Dst, 5290, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); 7117 dasm_put(Dst, 5350, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM);
7084 } else { 7118 } else {
7085 dasm_put(Dst, 5308, -LJ_TISNUM); 7119 dasm_put(Dst, 5368, -LJ_TISNUM);
7086 if (op == BC_IFORL) { 7120 if (op == BC_IFORL) {
7087 dasm_put(Dst, 5316); 7121 dasm_put(Dst, 5376);
7088 } else { 7122 } else {
7089 dasm_put(Dst, 5318); 7123 dasm_put(Dst, 5378);
7090 } 7124 }
7091 dasm_put(Dst, 5321); 7125 dasm_put(Dst, 5381);
7092 } 7126 }
7093 dasm_put(Dst, 5326); 7127 dasm_put(Dst, 5386);
7094 if (op == BC_FORI) { 7128 if (op == BC_FORI) {
7095 dasm_put(Dst, 5328); 7129 dasm_put(Dst, 5388);
7096 } else if (op == BC_JFORI) { 7130 } else if (op == BC_JFORI) {
7097 dasm_put(Dst, 5330); 7131 dasm_put(Dst, 5390);
7098 } else if (op == BC_IFORL) { 7132 } else if (op == BC_IFORL) {
7099 dasm_put(Dst, 5333); 7133 dasm_put(Dst, 5393);
7100 } 7134 }
7101 if (vk) { 7135 if (vk) {
7102 dasm_put(Dst, 5335); 7136 dasm_put(Dst, 5395);
7103 } 7137 }
7104 dasm_put(Dst, 5337); 7138 dasm_put(Dst, 5397);
7105 if (op == BC_JFORI || op == BC_JFORL) { 7139 if (op == BC_JFORI || op == BC_JFORL) {
7106 dasm_put(Dst, 5342, BC_JLOOP); 7140 dasm_put(Dst, 5402, BC_JLOOP);
7107 } 7141 }
7108 dasm_put(Dst, 5345); 7142 dasm_put(Dst, 5405);
7109 if (!vk) { 7143 if (!vk) {
7110 dasm_put(Dst, 5352); 7144 dasm_put(Dst, 5412);
7111 } else { 7145 } else {
7112 dasm_put(Dst, 5354); 7146 dasm_put(Dst, 5414);
7113 } 7147 }
7114 dasm_put(Dst, 5356); 7148 dasm_put(Dst, 5416);
7115 if (!vk) { 7149 if (!vk) {
7116 dasm_put(Dst, 5360, -LJ_TISNUM, -LJ_TISNUM); 7150 dasm_put(Dst, 5420, -LJ_TISNUM, -LJ_TISNUM);
7117 } else { 7151 } else {
7118 dasm_put(Dst, 5372); 7152 dasm_put(Dst, 5432);
7119 } 7153 }
7120 dasm_put(Dst, 5381); 7154 dasm_put(Dst, 5441);
7121 if (op == BC_FORI) { 7155 if (op == BC_FORI) {
7122 dasm_put(Dst, 5385); 7156 dasm_put(Dst, 5445);
7123 } else if (op == BC_JFORI) { 7157 } else if (op == BC_JFORI) {
7124 dasm_put(Dst, 5387, BC_JLOOP); 7158 dasm_put(Dst, 5447, BC_JLOOP);
7125 } else if (op == BC_IFORL) { 7159 } else if (op == BC_IFORL) {
7126 dasm_put(Dst, 5392); 7160 dasm_put(Dst, 5452);
7127 } else { 7161 } else {
7128 dasm_put(Dst, 5394, BC_JLOOP); 7162 dasm_put(Dst, 5454, BC_JLOOP);
7129 } 7163 }
7130 dasm_put(Dst, 5397); 7164 dasm_put(Dst, 5457);
7131 if (vk) { 7165 if (vk) {
7132 dasm_put(Dst, 5403); 7166 dasm_put(Dst, 5463);
7133 } 7167 }
7134 dasm_put(Dst, 5408); 7168 dasm_put(Dst, 5468);
7135 break; 7169 break;
7136 7170
7137 case BC_ITERL: 7171 case BC_ITERL:
7138#if LJ_HASJIT 7172#if LJ_HASJIT
7139 dasm_put(Dst, 5414, -GG_DISP2HOT); 7173 dasm_put(Dst, 5474, -GG_DISP2HOT);
7140#endif 7174#endif
7141 break; 7175 break;
7142 7176
@@ -7145,40 +7179,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
7145 break; 7179 break;
7146#endif 7180#endif
7147 case BC_IITERL: 7181 case BC_IITERL:
7148 dasm_put(Dst, 5424); 7182 dasm_put(Dst, 5484);
7149 if (op == BC_JITERL) { 7183 if (op == BC_JITERL) {
7150 dasm_put(Dst, 5426, -LJ_TNIL, BC_JLOOP); 7184 dasm_put(Dst, 5486, -LJ_TNIL, BC_JLOOP);
7151 } else { 7185 } else {
7152 dasm_put(Dst, 5432, -LJ_TNIL); 7186 dasm_put(Dst, 5492, -LJ_TNIL);
7153 } 7187 }
7154 dasm_put(Dst, 5438); 7188 dasm_put(Dst, 5498);
7155 break; 7189 break;
7156 7190
7157 case BC_LOOP: 7191 case BC_LOOP:
7158#if LJ_HASJIT 7192#if LJ_HASJIT
7159 dasm_put(Dst, 5445, -GG_DISP2HOT); 7193 dasm_put(Dst, 5505, -GG_DISP2HOT);
7160#endif 7194#endif
7161 break; 7195 break;
7162 7196
7163 case BC_ILOOP: 7197 case BC_ILOOP:
7164 dasm_put(Dst, 5455); 7198 dasm_put(Dst, 5515);
7165 break; 7199 break;
7166 7200
7167 case BC_JLOOP: 7201 case BC_JLOOP:
7168#if LJ_HASJIT 7202#if LJ_HASJIT
7169 dasm_put(Dst, 5462, DISPATCH_J(trace), DISPATCH_GL(vmstate), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); 7203 dasm_put(Dst, 5522, DISPATCH_J(trace), DISPATCH_GL(vmstate), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
7170#endif 7204#endif
7171 break; 7205 break;
7172 7206
7173 case BC_JMP: 7207 case BC_JMP:
7174 dasm_put(Dst, 5476); 7208 dasm_put(Dst, 5536);
7175 break; 7209 break;
7176 7210
7177 /* -- Function headers -------------------------------------------------- */ 7211 /* -- Function headers -------------------------------------------------- */
7178 7212
7179 case BC_FUNCF: 7213 case BC_FUNCF:
7180#if LJ_HASJIT 7214#if LJ_HASJIT
7181 dasm_put(Dst, 5485, -GG_DISP2HOT); 7215 dasm_put(Dst, 5545, -GG_DISP2HOT);
7182#endif 7216#endif
7183 case BC_FUNCV: /* NYI: compiled vararg functions. */ 7217 case BC_FUNCV: /* NYI: compiled vararg functions. */
7184 break; 7218 break;
@@ -7188,42 +7222,42 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
7188 break; 7222 break;
7189#endif 7223#endif
7190 case BC_IFUNCF: 7224 case BC_IFUNCF:
7191 dasm_put(Dst, 5495, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k)); 7225 dasm_put(Dst, 5555, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k));
7192 if (op != BC_JFUNCF) { 7226 if (op != BC_JFUNCF) {
7193 dasm_put(Dst, 5505); 7227 dasm_put(Dst, 5565);
7194 } 7228 }
7195 dasm_put(Dst, 5508, ~LJ_TNIL); 7229 dasm_put(Dst, 5568, ~LJ_TNIL);
7196 if (op == BC_JFUNCF) { 7230 if (op == BC_JFUNCF) {
7197 dasm_put(Dst, 5515, BC_JLOOP); 7231 dasm_put(Dst, 5575, BC_JLOOP);
7198 } else { 7232 } else {
7199 dasm_put(Dst, 5519); 7233 dasm_put(Dst, 5579);
7200 } 7234 }
7201 dasm_put(Dst, 5524); 7235 dasm_put(Dst, 5584);
7202 break; 7236 break;
7203 7237
7204 case BC_JFUNCV: 7238 case BC_JFUNCV:
7205#if !LJ_HASJIT 7239#if !LJ_HASJIT
7206 break; 7240 break;
7207#endif 7241#endif
7208 dasm_put(Dst, 5530); 7242 dasm_put(Dst, 5590);
7209 break; /* NYI: compiled vararg functions. */ 7243 break; /* NYI: compiled vararg functions. */
7210 7244
7211 case BC_IFUNCV: 7245 case BC_IFUNCV:
7212 dasm_put(Dst, 5532, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), ~LJ_TNIL); 7246 dasm_put(Dst, 5592, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), ~LJ_TNIL);
7213 break; 7247 break;
7214 7248
7215 case BC_FUNCC: 7249 case BC_FUNCC:
7216 case BC_FUNCCW: 7250 case BC_FUNCCW:
7217 if (op == BC_FUNCC) { 7251 if (op == BC_FUNCC) {
7218 dasm_put(Dst, 5573, Dt8(->f)); 7252 dasm_put(Dst, 5633, Dt8(->f));
7219 } else { 7253 } else {
7220 dasm_put(Dst, 5576, DISPATCH_GL(wrapf)); 7254 dasm_put(Dst, 5636, DISPATCH_GL(wrapf));
7221 } 7255 }
7222 dasm_put(Dst, 5579, Dt1(->maxstack), Dt1(->base), Dt1(->top)); 7256 dasm_put(Dst, 5639, Dt1(->maxstack), Dt1(->base), Dt1(->top));
7223 if (op == BC_FUNCCW) { 7257 if (op == BC_FUNCCW) {
7224 dasm_put(Dst, 5589, Dt8(->f)); 7258 dasm_put(Dst, 5649, Dt8(->f));
7225 } 7259 }
7226 dasm_put(Dst, 5592, LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate)); 7260 dasm_put(Dst, 5652, LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate));
7227 break; 7261 break;
7228 7262
7229 /* ---------------------------------------------------------------------- */ 7263 /* ---------------------------------------------------------------------- */
@@ -7243,7 +7277,7 @@ static int build_backend(BuildCtx *ctx)
7243 7277
7244 build_subroutines(ctx); 7278 build_subroutines(ctx);
7245 7279
7246 dasm_put(Dst, 5614); 7280 dasm_put(Dst, 5674);
7247 for (op = 0; op < BC__MAX; op++) 7281 for (op = 0; op < BC__MAX; op++)
7248 build_ins(ctx, (BCOp)op, op); 7282 build_ins(ctx, (BCOp)op, op);
7249 7283
@@ -7285,7 +7319,6 @@ static void emit_asm_debug(BuildCtx *ctx)
7285 fprintf(ctx->fp, 7319 fprintf(ctx->fp,
7286 "\t.align 2\n" 7320 "\t.align 2\n"
7287 ".LEFDE0:\n\n"); 7321 ".LEFDE0:\n\n");
7288 /* NYI: emit ARM.exidx. */
7289 break; 7322 break;
7290 default: 7323 default:
7291 break; 7324 break;
diff --git a/src/lib_math.c b/src/lib_math.c
index 917b5e7b..599f948e 100644
--- a/src/lib_math.c
+++ b/src/lib_math.c
@@ -14,6 +14,7 @@
14 14
15#include "lj_obj.h" 15#include "lj_obj.h"
16#include "lj_lib.h" 16#include "lj_lib.h"
17#include "lj_vm.h"
17 18
18/* ------------------------------------------------------------------------ */ 19/* ------------------------------------------------------------------------ */
19 20
@@ -162,7 +163,7 @@ LJLIB_CF(math_random) LJLIB_REC(.)
162 double r1 = lj_lib_checknum(L, 1); 163 double r1 = lj_lib_checknum(L, 1);
163#endif 164#endif
164 if (n == 1) { 165 if (n == 1) {
165 d = floor(d*r1) + 1.0; /* d is an int in range [1, r1] */ 166 d = lj_vm_floor(d*r1) + 1.0; /* d is an int in range [1, r1] */
166 } else { 167 } else {
167#if LJ_DUALNUM 168#if LJ_DUALNUM
168 double r2; 169 double r2;
@@ -176,7 +177,7 @@ LJLIB_CF(math_random) LJLIB_REC(.)
176#else 177#else
177 double r2 = lj_lib_checknum(L, 2); 178 double r2 = lj_lib_checknum(L, 2);
178#endif 179#endif
179 d = floor(d*(r2-r1+1.0)) + r1; /* d is an int in range [r1, r2] */ 180 d = lj_vm_floor(d*(r2-r1+1.0)) + r1; /* d is an int in range [r1, r2] */
180 } 181 }
181#if LJ_DUALNUM 182#if LJ_DUALNUM
182 if (isint) { 183 if (isint) {
diff --git a/src/lj_vm.h b/src/lj_vm.h
index ba624dad..3f6777ad 100644
--- a/src/lj_vm.h
+++ b/src/lj_vm.h
@@ -45,7 +45,15 @@ LJ_ASMF void lj_vm_callhook(void);
45LJ_ASMF void lj_vm_exit_handler(void); 45LJ_ASMF void lj_vm_exit_handler(void);
46LJ_ASMF void lj_vm_exit_interp(void); 46LJ_ASMF void lj_vm_exit_interp(void);
47 47
48/* Handlers callable from compiled code. */ 48/* Internal math helper functions. */
49#if LJ_TARGET_X86ORX64
50#define lj_vm_floor(x) floor(x)
51#define lj_vm_ceil(x) ceil(x)
52#else
53LJ_ASMF double lj_vm_floor(double);
54LJ_ASMF double lj_vm_ceil(double);
55#endif
56
49#if LJ_HASJIT 57#if LJ_HASJIT
50#if LJ_TARGET_X86ORX64 58#if LJ_TARGET_X86ORX64
51LJ_ASMF void lj_vm_floor_sse(void); 59LJ_ASMF void lj_vm_floor_sse(void);
@@ -56,8 +64,6 @@ LJ_ASMF void lj_vm_exp2_x87(void);
56LJ_ASMF void lj_vm_pow_sse(void); 64LJ_ASMF void lj_vm_pow_sse(void);
57LJ_ASMF void lj_vm_powi_sse(void); 65LJ_ASMF void lj_vm_powi_sse(void);
58#else 66#else
59LJ_ASMF double lj_vm_floor(double);
60LJ_ASMF double lj_vm_ceil(double);
61LJ_ASMF double lj_vm_trunc(double); 67LJ_ASMF double lj_vm_trunc(double);
62LJ_ASMF double lj_vm_powi(double, int32_t); 68LJ_ASMF double lj_vm_powi(double, int32_t);
63#if defined(__ANDROID__) || defined(__symbian__) 69#if defined(__ANDROID__) || defined(__symbian__)