diff options
| author | Mike Pall <mike> | 2011-05-09 22:41:12 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2011-05-09 22:41:12 +0200 |
| commit | 65d9c7cb5ed98bed14c4f5fe40fef6dfe56717b8 (patch) | |
| tree | bc2716276adbe6122da32cac58c09f472f437d7c | |
| parent | c8308e2a87e36985bf169529c484d1eb8470c907 (diff) | |
| download | luajit-65d9c7cb5ed98bed14c4f5fe40fef6dfe56717b8.tar.gz luajit-65d9c7cb5ed98bed14c4f5fe40fef6dfe56717b8.tar.bz2 luajit-65d9c7cb5ed98bed14c4f5fe40fef6dfe56717b8.zip | |
ARM: Fix table/userdata equality comparisons in interpreter.
| -rw-r--r-- | src/buildvm_arm.dasc | 4 | ||||
| -rw-r--r-- | src/buildvm_arm.h | 818 |
2 files changed, 464 insertions, 358 deletions
diff --git a/src/buildvm_arm.dasc b/src/buildvm_arm.dasc index 1cdfc54b..4d30a95b 100644 --- a/src/buildvm_arm.dasc +++ b/src/buildvm_arm.dasc | |||
| @@ -2205,7 +2205,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 2205 | | mov CARG2, CARG1 | 2205 | | mov CARG2, CARG1 |
| 2206 | | tst RA, #1<<MM_eq | 2206 | | tst RA, #1<<MM_eq |
| 2207 | | beq ->vmeta_equal // 'no __eq' flag not set? | 2207 | | beq ->vmeta_equal // 'no __eq' flag not set? |
| 2208 | if (!vk) { | 2208 | if (vk) { |
| 2209 | | b <2 | ||
| 2210 | } else { | ||
| 2209 | |2: // Branch if different. | 2211 | |2: // Branch if different. |
| 2210 | | sub PC, RB, #0x20000 | 2212 | | sub PC, RB, #0x20000 |
| 2211 | |1: // Same. | 2213 | |1: // Same. |
diff --git a/src/buildvm_arm.h b/src/buildvm_arm.h index 9e0b2a55..8189fdb4 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 |
| 15 | static const unsigned int build_actionlist[5407] = { | 15 | static const unsigned int build_actionlist[5505] = { |
| 16 | 0x00010001, | 16 | 0x00010001, |
| 17 | 0x00060014, | 17 | 0x00060014, |
| 18 | 0xe3160000, | 18 | 0xe3160000, |
| @@ -2736,7 +2736,25 @@ static const unsigned int build_actionlist[5407] = { | |||
| 2736 | 0xe12fff1e, | 2736 | 0xe12fff1e, |
| 2737 | 0x0006008a, | 2737 | 0x0006008a, |
| 2738 | 0x00000000, | 2738 | 0x00000000, |
| 2739 | 0xe7f001f0, | 2739 | 0xe5570000, |
| 2740 | 0x000d8180, | ||
| 2741 | 0xe3100000, | ||
| 2742 | 0x000a0000, | ||
| 2743 | 0x1a000000, | ||
| 2744 | 0x00050005, | ||
| 2745 | 0xe5171000, | ||
| 2746 | 0x000d8180, | ||
| 2747 | 0xe3100000, | ||
| 2748 | 0x000a0000, | ||
| 2749 | 0x1a000000, | ||
| 2750 | 0x00050001, | ||
| 2751 | 0xe2411001, | ||
| 2752 | 0xe3100000, | ||
| 2753 | 0x000a0000, | ||
| 2754 | 0x15071000, | ||
| 2755 | 0x000d8180, | ||
| 2756 | 0xea000000, | ||
| 2757 | 0x00050001, | ||
| 2740 | 0x00000000, | 2758 | 0x00000000, |
| 2741 | 0x0006008b, | 2759 | 0x0006008b, |
| 2742 | 0xe5570000, | 2760 | 0xe5570000, |
| @@ -2800,7 +2818,26 @@ static const unsigned int build_actionlist[5407] = { | |||
| 2800 | 0x0005000e, | 2818 | 0x0005000e, |
| 2801 | 0x0006008e, | 2819 | 0x0006008e, |
| 2802 | 0x00000000, | 2820 | 0x00000000, |
| 2803 | 0xe7f001f0, | 2821 | 0xe5192008, |
| 2822 | 0xe2470000, | ||
| 2823 | 0x000a0000, | ||
| 2824 | 0xe58d6008, | ||
| 2825 | 0xe5122000, | ||
| 2826 | 0x000d8180, | ||
| 2827 | 0xe1a01006, | ||
| 2828 | 0xe5078000, | ||
| 2829 | 0x000d8180, | ||
| 2830 | 0xe5522000, | ||
| 2831 | 0x000d8180, | ||
| 2832 | 0xe5089000, | ||
| 2833 | 0x000d8180, | ||
| 2834 | 0xe0892182, | ||
| 2835 | 0xe5082000, | ||
| 2836 | 0x000d8180, | ||
| 2837 | 0xeb000000, | ||
| 2838 | 0x0003002b, | ||
| 2839 | 0xea000000, | ||
| 2840 | 0x0005000d, | ||
| 2804 | 0x00000000, | 2841 | 0x00000000, |
| 2805 | 0x0006008f, | 2842 | 0x0006008f, |
| 2806 | 0xe1a01006, | 2843 | 0xe1a01006, |
| @@ -2822,7 +2859,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 2822 | 0xe5083000, | 2859 | 0xe5083000, |
| 2823 | 0x000d8180, | 2860 | 0x000d8180, |
| 2824 | 0xeb000000, | 2861 | 0xeb000000, |
| 2825 | 0x0003002b, | 2862 | 0x0003002c, |
| 2826 | 0xe5189000, | 2863 | 0xe5189000, |
| 2827 | 0x000d8180, | 2864 | 0x000d8180, |
| 2828 | 0xe5183000, | 2865 | 0xe5183000, |
| @@ -2854,7 +2891,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 2854 | 0x00060096, | 2891 | 0x00060096, |
| 2855 | 0xe92d401f, | 2892 | 0xe92d401f, |
| 2856 | 0xeb000000, | 2893 | 0xeb000000, |
| 2857 | 0x0003002c, | 2894 | 0x0003002d, |
| 2858 | 0xeb000000, | 2895 | 0xeb000000, |
| 2859 | 0x0003000f, | 2896 | 0x0003000f, |
| 2860 | 0xe1cd20d8, | 2897 | 0xe1cd20d8, |
| @@ -2863,7 +2900,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 2863 | 0xe1cd20d0, | 2900 | 0xe1cd20d0, |
| 2864 | 0xe2211480, | 2901 | 0xe2211480, |
| 2865 | 0xeb000000, | 2902 | 0xeb000000, |
| 2866 | 0x0003002d, | 2903 | 0x0003002e, |
| 2867 | 0xe28dd014, | 2904 | 0xe28dd014, |
| 2868 | 0xe8bd8000, | 2905 | 0xe8bd8000, |
| 2869 | 0x00060097, | 2906 | 0x00060097, |
| @@ -2911,14 +2948,14 @@ static const unsigned int build_actionlist[5407] = { | |||
| 2911 | 0xe59dc000, | 2948 | 0xe59dc000, |
| 2912 | 0xe35c0001, | 2949 | 0xe35c0001, |
| 2913 | 0x3a000000, | 2950 | 0x3a000000, |
| 2914 | 0x0003002d, | ||
| 2915 | 0x0a000000, | ||
| 2916 | 0x0003002e, | 2951 | 0x0003002e, |
| 2952 | 0x0a000000, | ||
| 2953 | 0x0003002f, | ||
| 2917 | 0xe35c0003, | 2954 | 0xe35c0003, |
| 2918 | 0x3a000000, | 2955 | 0x3a000000, |
| 2919 | 0x00030021, | 2956 | 0x00030021, |
| 2920 | 0x0a000000, | 2957 | 0x0a000000, |
| 2921 | 0x0003002c, | 2958 | 0x0003002d, |
| 2922 | 0xe35c0005, | 2959 | 0xe35c0005, |
| 2923 | 0x3a000000, | 2960 | 0x3a000000, |
| 2924 | 0x00050096, | 2961 | 0x00050096, |
| @@ -3119,6 +3156,9 @@ static const unsigned int build_actionlist[5407] = { | |||
| 3119 | 0x0a000000, | 3156 | 0x0a000000, |
| 3120 | 0x00050039, | 3157 | 0x00050039, |
| 3121 | 0x00000000, | 3158 | 0x00000000, |
| 3159 | 0xea000000, | ||
| 3160 | 0x0005000c, | ||
| 3161 | 0x00000000, | ||
| 3122 | 0x0006000c, | 3162 | 0x0006000c, |
| 3123 | 0xe24c6b80, | 3163 | 0xe24c6b80, |
| 3124 | 0x0006000b, | 3164 | 0x0006000b, |
| @@ -3223,7 +3263,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 3223 | 0xe1cb20d0, | 3263 | 0xe1cb20d0, |
| 3224 | 0x0006000f, | 3264 | 0x0006000f, |
| 3225 | 0xeb000000, | 3265 | 0xeb000000, |
| 3226 | 0x0003002f, | 3266 | 0x00030030, |
| 3227 | 0x00000000, | 3267 | 0x00000000, |
| 3228 | 0x024a6b80, | 3268 | 0x024a6b80, |
| 3229 | 0x00000000, | 3269 | 0x00000000, |
| @@ -3460,7 +3500,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 3460 | 0x0005003e, | 3500 | 0x0005003e, |
| 3461 | 0x00000000, | 3501 | 0x00000000, |
| 3462 | 0xeb000000, | 3502 | 0xeb000000, |
| 3463 | 0x0003002d, | 3503 | 0x0003002e, |
| 3464 | 0xe5d6c000, | 3504 | 0xe5d6c000, |
| 3465 | 0xea000000, | 3505 | 0xea000000, |
| 3466 | 0x0005000e, | 3506 | 0x0005000e, |
| @@ -3551,7 +3591,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 3551 | 0x0005003e, | 3591 | 0x0005003e, |
| 3552 | 0x00000000, | 3592 | 0x00000000, |
| 3553 | 0xeb000000, | 3593 | 0xeb000000, |
| 3554 | 0x0003002e, | 3594 | 0x0003002f, |
| 3555 | 0xe5d6c000, | 3595 | 0xe5d6c000, |
| 3556 | 0xea000000, | 3596 | 0xea000000, |
| 3557 | 0x0005000e, | 3597 | 0x0005000e, |
| @@ -3700,7 +3740,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 3700 | 0x0005003e, | 3740 | 0x0005003e, |
| 3701 | 0x00000000, | 3741 | 0x00000000, |
| 3702 | 0xeb000000, | 3742 | 0xeb000000, |
| 3703 | 0x0003002c, | 3743 | 0x0003002d, |
| 3704 | 0xe5d6c000, | 3744 | 0xe5d6c000, |
| 3705 | 0xe496e004, | 3745 | 0xe496e004, |
| 3706 | 0xe18900fa, | 3746 | 0xe18900fa, |
| @@ -3884,7 +3924,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 3884 | 0xe58d6008, | 3924 | 0xe58d6008, |
| 3885 | 0xe1a021a2, | 3925 | 0xe1a021a2, |
| 3886 | 0xeb000000, | 3926 | 0xeb000000, |
| 3887 | 0x00030030, | 3927 | 0x00030031, |
| 3888 | 0xe5189000, | 3928 | 0xe5189000, |
| 3889 | 0x000d8180, | 3929 | 0x000d8180, |
| 3890 | 0xe3500000, | 3930 | 0xe3500000, |
| @@ -4033,11 +4073,11 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4033 | 0x0005000b, | 4073 | 0x0005000b, |
| 4034 | 0xe1a0b009, | 4074 | 0xe1a0b009, |
| 4035 | 0xeb000000, | 4075 | 0xeb000000, |
| 4036 | 0x00030031, | 4076 | 0x00030032, |
| 4037 | 0xe1a0900b, | 4077 | 0xe1a0900b, |
| 4038 | 0x00000000, | 4078 | 0x00000000, |
| 4039 | 0x1b000000, | 4079 | 0x1b000000, |
| 4040 | 0x00030031, | 4080 | 0x00030032, |
| 4041 | 0x00000000, | 4081 | 0x00000000, |
| 4042 | 0xea000000, | 4082 | 0xea000000, |
| 4043 | 0x0005000b, | 4083 | 0x0005000b, |
| @@ -4082,11 +4122,11 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4082 | 0x0005000b, | 4122 | 0x0005000b, |
| 4083 | 0xe1a0b009, | 4123 | 0xe1a0b009, |
| 4084 | 0xeb000000, | 4124 | 0xeb000000, |
| 4085 | 0x00030031, | 4125 | 0x00030032, |
| 4086 | 0xe1a0900b, | 4126 | 0xe1a0900b, |
| 4087 | 0x00000000, | 4127 | 0x00000000, |
| 4088 | 0x1b000000, | 4128 | 0x1b000000, |
| 4089 | 0x00030031, | 4129 | 0x00030032, |
| 4090 | 0x00000000, | 4130 | 0x00000000, |
| 4091 | 0xea000000, | 4131 | 0xea000000, |
| 4092 | 0x0005000b, | 4132 | 0x0005000b, |
| @@ -4136,7 +4176,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4136 | 0xe1a00008, | 4176 | 0xe1a00008, |
| 4137 | 0xe089100a, | 4177 | 0xe089100a, |
| 4138 | 0xeb000000, | 4178 | 0xeb000000, |
| 4139 | 0x00030032, | 4179 | 0x00030033, |
| 4140 | 0xe5189000, | 4180 | 0xe5189000, |
| 4141 | 0x000d8180, | 4181 | 0x000d8180, |
| 4142 | 0x0006000b, | 4182 | 0x0006000b, |
| @@ -4155,7 +4195,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4155 | 0xe5192008, | 4195 | 0xe5192008, |
| 4156 | 0xe1a00008, | 4196 | 0xe1a00008, |
| 4157 | 0xeb000000, | 4197 | 0xeb000000, |
| 4158 | 0x00030033, | 4198 | 0x00030034, |
| 4159 | 0xe5189000, | 4199 | 0xe5189000, |
| 4160 | 0x000d8180, | 4200 | 0x000d8180, |
| 4161 | 0xe3e01000, | 4201 | 0xe3e01000, |
| @@ -4190,11 +4230,11 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4190 | 0xe37b0001, | 4230 | 0xe37b0001, |
| 4191 | 0x02811002, | 4231 | 0x02811002, |
| 4192 | 0xeb000000, | 4232 | 0xeb000000, |
| 4193 | 0x00030034, | 4233 | 0x00030035, |
| 4194 | 0x00000000, | 4234 | 0x00000000, |
| 4195 | 0xe795110b, | 4235 | 0xe795110b, |
| 4196 | 0xeb000000, | 4236 | 0xeb000000, |
| 4197 | 0x00030035, | 4237 | 0x00030036, |
| 4198 | 0x00000000, | 4238 | 0x00000000, |
| 4199 | 0xe5189000, | 4239 | 0xe5189000, |
| 4200 | 0x000d8180, | 4240 | 0x000d8180, |
| @@ -4209,7 +4249,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4209 | 0xe12fff1c, | 4249 | 0xe12fff1c, |
| 4210 | 0x0006000f, | 4250 | 0x0006000f, |
| 4211 | 0xeb000000, | 4251 | 0xeb000000, |
| 4212 | 0x00030036, | 4252 | 0x00030037, |
| 4213 | 0xe1a00008, | 4253 | 0xe1a00008, |
| 4214 | 0xea000000, | 4254 | 0xea000000, |
| 4215 | 0x0005000b, | 4255 | 0x0005000b, |
| @@ -4572,7 +4612,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4572 | 0xe1a0100c, | 4612 | 0xe1a0100c, |
| 4573 | 0xe58d3004, | 4613 | 0xe58d3004, |
| 4574 | 0xeb000000, | 4614 | 0xeb000000, |
| 4575 | 0x00030037, | 4615 | 0x00030038, |
| 4576 | 0xe5189000, | 4616 | 0xe5189000, |
| 4577 | 0x000d8180, | 4617 | 0x000d8180, |
| 4578 | 0xe18920da, | 4618 | 0xe18920da, |
| @@ -4703,7 +4743,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 4703 | 0xe1a00008, | 4743 | 0xe1a00008, |
| 4704 | 0xe58d6008, | 4744 | 0xe58d6008, |
| 4705 | 0xeb000000, | 4745 | 0xeb000000, |
| 4706 | 0x00030038, | 4746 | 0x00030039, |
| 4707 | 0x00000000, | 4747 | 0x00000000, |
| 4708 | 0xe5189000, | 4748 | 0xe5189000, |
| 4709 | 0x000d8180, | 4749 | 0x000d8180, |
| @@ -5143,9 +5183,18 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5143 | 0xea000000, | 5183 | 0xea000000, |
| 5144 | 0x0005000f, | 5184 | 0x0005000f, |
| 5145 | 0x00000000, | 5185 | 0x00000000, |
| 5146 | 0xe7f001f0, | 5186 | 0xe1a000a6, |
| 5187 | 0xe200007e, | ||
| 5188 | 0xe2400000, | ||
| 5189 | 0x000a0000, | ||
| 5190 | 0xe19710b0, | ||
| 5191 | 0xe2511001, | ||
| 5192 | 0xe18710b0, | ||
| 5193 | 0x0a000000, | ||
| 5194 | 0x0005008e, | ||
| 5147 | 0x00000000, | 5195 | 0x00000000, |
| 5148 | 0xe1aa00d9, | 5196 | 0xe1aa00d9, |
| 5197 | 0x00000000, | ||
| 5149 | 0xe086b10b, | 5198 | 0xe086b10b, |
| 5150 | 0x00000000, | 5199 | 0x00000000, |
| 5151 | 0xe1ca20d8, | 5200 | 0xe1ca20d8, |
| @@ -5176,7 +5225,8 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5176 | 0x00000000, | 5225 | 0x00000000, |
| 5177 | 0x6286bb80, | 5226 | 0x6286bb80, |
| 5178 | 0x00000000, | 5227 | 0x00000000, |
| 5179 | 0xe7f001f0, | 5228 | 0x6a000000, |
| 5229 | 0x00050002, | ||
| 5180 | 0x00000000, | 5230 | 0x00000000, |
| 5181 | 0xe3520000, | 5231 | 0xe3520000, |
| 5182 | 0xba000000, | 5232 | 0xba000000, |
| @@ -5187,14 +5237,19 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5187 | 0x00000000, | 5237 | 0x00000000, |
| 5188 | 0xc24b6b80, | 5238 | 0xc24b6b80, |
| 5189 | 0x00000000, | 5239 | 0x00000000, |
| 5190 | 0xe7f001f0, | 5240 | 0xc24b6b80, |
| 5241 | 0xe1a0b82e, | ||
| 5242 | 0xda000000, | ||
| 5243 | 0x00070000, | ||
| 5191 | 0x00000000, | 5244 | 0x00000000, |
| 5192 | 0xd24b6b80, | 5245 | 0xd24b6b80, |
| 5193 | 0x00000000, | 5246 | 0x00000000, |
| 5194 | 0xe7f001f0, | 5247 | 0xda000000, |
| 5248 | 0x00070000, | ||
| 5195 | 0x00000000, | 5249 | 0x00000000, |
| 5196 | 0xe1ca00f0, | 5250 | 0xe1ca00f0, |
| 5197 | 0x00000000, | 5251 | 0x00000000, |
| 5252 | 0x0006000c, | ||
| 5198 | 0xe5d6c000, | 5253 | 0xe5d6c000, |
| 5199 | 0xe496e004, | 5254 | 0xe496e004, |
| 5200 | 0xe1ca01f8, | 5255 | 0xe1ca01f8, |
| @@ -5229,7 +5284,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5229 | 0xba000000, | 5284 | 0xba000000, |
| 5230 | 0x00050008, | 5285 | 0x00050008, |
| 5231 | 0xeb000000, | 5286 | 0xeb000000, |
| 5232 | 0x0003002d, | 5287 | 0x0003002e, |
| 5233 | 0xe1ca00f0, | 5288 | 0xe1ca00f0, |
| 5234 | 0xe1ca20d8, | 5289 | 0xe1ca20d8, |
| 5235 | 0xe1ca01f8, | 5290 | 0xe1ca01f8, |
| @@ -5240,11 +5295,15 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5240 | 0x00000000, | 5295 | 0x00000000, |
| 5241 | 0x824b6b80, | 5296 | 0x824b6b80, |
| 5242 | 0x00000000, | 5297 | 0x00000000, |
| 5243 | 0xe7f001f0, | 5298 | 0x824b6b80, |
| 5299 | 0xe1a0b82e, | ||
| 5300 | 0x9a000000, | ||
| 5301 | 0x00070000, | ||
| 5244 | 0x00000000, | 5302 | 0x00000000, |
| 5245 | 0x924b6b80, | 5303 | 0x924b6b80, |
| 5246 | 0x00000000, | 5304 | 0x00000000, |
| 5247 | 0xe7f001f0, | 5305 | 0x9a000000, |
| 5306 | 0x00070000, | ||
| 5248 | 0x00000000, | 5307 | 0x00000000, |
| 5249 | 0xe5d6c000, | 5308 | 0xe5d6c000, |
| 5250 | 0xe496e004, | 5309 | 0xe496e004, |
| @@ -5253,7 +5312,7 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5253 | 0x00060012, | 5312 | 0x00060012, |
| 5254 | 0x00000000, | 5313 | 0x00000000, |
| 5255 | 0xeb000000, | 5314 | 0xeb000000, |
| 5256 | 0x0003002d, | 5315 | 0x0003002e, |
| 5257 | 0xe1ca00f0, | 5316 | 0xe1ca00f0, |
| 5258 | 0xe1ca01f8, | 5317 | 0xe1ca01f8, |
| 5259 | 0x00000000, | 5318 | 0x00000000, |
| @@ -5263,11 +5322,23 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5263 | 0xea000000, | 5322 | 0xea000000, |
| 5264 | 0x00050010, | 5323 | 0x00050010, |
| 5265 | 0x00000000, | 5324 | 0x00000000, |
| 5266 | 0xe7f001f0, | 5325 | 0xe1a000a6, |
| 5326 | 0xe200007e, | ||
| 5327 | 0xe2400000, | ||
| 5328 | 0x000a0000, | ||
| 5329 | 0xe19710b0, | ||
| 5330 | 0xe2511001, | ||
| 5331 | 0xe18710b0, | ||
| 5332 | 0x0a000000, | ||
| 5333 | 0x0005008e, | ||
| 5267 | 0x00000000, | 5334 | 0x00000000, |
| 5268 | 0xe1aa00d9, | 5335 | 0xe1aa00d9, |
| 5269 | 0x00000000, | 5336 | 0x00000000, |
| 5270 | 0xe7f001f0, | 5337 | 0xe3710000, |
| 5338 | 0x000a0000, | ||
| 5339 | 0x114a00f8, | ||
| 5340 | 0x1a000000, | ||
| 5341 | 0x00070000, | ||
| 5271 | 0x00000000, | 5342 | 0x00000000, |
| 5272 | 0xe086b10b, | 5343 | 0xe086b10b, |
| 5273 | 0xe3710000, | 5344 | 0xe3710000, |
| @@ -5282,7 +5353,15 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5282 | 0xe1a0b82e, | 5353 | 0xe1a0b82e, |
| 5283 | 0xe12fff1c, | 5354 | 0xe12fff1c, |
| 5284 | 0x00000000, | 5355 | 0x00000000, |
| 5285 | 0xe7f001f0, | 5356 | 0xe1a000a6, |
| 5357 | 0xe200007e, | ||
| 5358 | 0xe2400000, | ||
| 5359 | 0x000a0000, | ||
| 5360 | 0xe19710b0, | ||
| 5361 | 0xe2511001, | ||
| 5362 | 0xe18710b0, | ||
| 5363 | 0x0a000000, | ||
| 5364 | 0x0005008e, | ||
| 5286 | 0x00000000, | 5365 | 0x00000000, |
| 5287 | 0xe5d6c000, | 5366 | 0xe5d6c000, |
| 5288 | 0xe496e004, | 5367 | 0xe496e004, |
| @@ -5291,7 +5370,16 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5291 | 0xe1a0b82e, | 5370 | 0xe1a0b82e, |
| 5292 | 0xe12fff1c, | 5371 | 0xe12fff1c, |
| 5293 | 0x00000000, | 5372 | 0x00000000, |
| 5294 | 0xe7f001f0, | 5373 | 0xe5170000, |
| 5374 | 0x000d8180, | ||
| 5375 | 0xe790b10b, | ||
| 5376 | 0xe51ba000, | ||
| 5377 | 0x000d8180, | ||
| 5378 | 0xe5079000, | ||
| 5379 | 0x000d8180, | ||
| 5380 | 0xe5078000, | ||
| 5381 | 0x000d8180, | ||
| 5382 | 0xe12fff1a, | ||
| 5295 | 0x00000000, | 5383 | 0x00000000, |
| 5296 | 0xe086b10b, | 5384 | 0xe086b10b, |
| 5297 | 0xe24b6b80, | 5385 | 0xe24b6b80, |
| @@ -5302,7 +5390,15 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5302 | 0xe1a0b82e, | 5390 | 0xe1a0b82e, |
| 5303 | 0xe12fff1c, | 5391 | 0xe12fff1c, |
| 5304 | 0x00000000, | 5392 | 0x00000000, |
| 5305 | 0xe7f001f0, | 5393 | 0xe1a000a6, |
| 5394 | 0xe200007e, | ||
| 5395 | 0xe2400000, | ||
| 5396 | 0x000a0000, | ||
| 5397 | 0xe19710b0, | ||
| 5398 | 0xe2511001, | ||
| 5399 | 0xe18710b0, | ||
| 5400 | 0x0a000000, | ||
| 5401 | 0x00050090, | ||
| 5306 | 0x00000000, | 5402 | 0x00000000, |
| 5307 | 0xe5180000, | 5403 | 0xe5180000, |
| 5308 | 0x000d8180, | 5404 | 0x000d8180, |
| @@ -5322,7 +5418,9 @@ static const unsigned int build_actionlist[5407] = { | |||
| 5322 | 0xda000000, | 5418 | 0xda000000, |
| 5323 | 0x00050003, | 5419 | 0x00050003, |
| 5324 | 0x00000000, | 5420 | 0x00000000, |
| 5325 | 0xe7f001f0, | 5421 | 0xe1a0b82e, |
| 5422 | 0xea000000, | ||
| 5423 | 0x00070000, | ||
| 5326 | 0x00000000, | 5424 | 0x00000000, |
| 5327 | 0xe797c10c, | 5425 | 0xe797c10c, |
| 5328 | 0xe004a2ae, | 5426 | 0xe004a2ae, |
| @@ -5762,6 +5860,7 @@ static const char *const extnames[] = { | |||
| 5762 | "lj_tab_len", | 5860 | "lj_tab_len", |
| 5763 | "lj_gc_step", | 5861 | "lj_gc_step", |
| 5764 | "lj_dispatch_ins", | 5862 | "lj_dispatch_ins", |
| 5863 | "lj_trace_hot", | ||
| 5765 | "lj_dispatch_call", | 5864 | "lj_dispatch_call", |
| 5766 | "__aeabi_ddiv", | 5865 | "__aeabi_ddiv", |
| 5767 | "__aeabi_dadd", | 5866 | "__aeabi_dadd", |
| @@ -6098,54 +6197,54 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 6098 | dasm_put(Dst, 2626, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, Dt1(->maxstack), Dt1(->top), Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->base), Dt1(->top), Dt7(->field_pc), FRAME_TYPE, FRAME_TYPEP); | 6197 | dasm_put(Dst, 2626, -LJ_TISNUM, -LJ_TISNUM, ~LJ_TISNUM, Dt1(->maxstack), Dt1(->top), Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->base), Dt1(->top), Dt7(->field_pc), FRAME_TYPE, FRAME_TYPEP); |
| 6099 | dasm_put(Dst, 2689, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base)); | 6198 | dasm_put(Dst, 2689, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base)); |
| 6100 | #if LJ_HASJIT | 6199 | #if LJ_HASJIT |
| 6101 | dasm_put(Dst, 2723); | 6200 | dasm_put(Dst, 2723, DISPATCH_GL(hookmask), HOOK_VMEVENT, DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); |
| 6102 | #endif | 6201 | #endif |
| 6103 | dasm_put(Dst, 2725, 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)); | 6202 | dasm_put(Dst, 2743, DISPATCH_GL(hookmask), HOOK_ACTIVE, GG_DISP2STATIC, DISPATCH_GL(hookmask), DISPATCH_GL(hookcount), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base)); |
| 6104 | dasm_put(Dst, 2771, GG_DISP2STATIC); | 6203 | dasm_put(Dst, 2789, GG_DISP2STATIC); |
| 6105 | #if LJ_HASJIT | 6204 | #if LJ_HASJIT |
| 6106 | dasm_put(Dst, 2787); | 6205 | dasm_put(Dst, 2805, -GG_DISP2J, Dt7(->field_pc), DISPATCH_J(L), PC2PROTO(framesize), Dt1(->base), Dt1(->top)); |
| 6107 | #endif | 6206 | #endif |
| 6108 | dasm_put(Dst, 2789); | 6207 | dasm_put(Dst, 2826); |
| 6109 | #if LJ_HASJIT | 6208 | #if LJ_HASJIT |
| 6110 | dasm_put(Dst, 2792); | 6209 | dasm_put(Dst, 2829); |
| 6111 | #endif | 6210 | #endif |
| 6112 | dasm_put(Dst, 2795); | 6211 | dasm_put(Dst, 2832); |
| 6113 | #if LJ_HASJIT | 6212 | #if LJ_HASJIT |
| 6114 | dasm_put(Dst, 2797); | 6213 | dasm_put(Dst, 2834); |
| 6115 | #endif | 6214 | #endif |
| 6116 | dasm_put(Dst, 2800, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); | 6215 | dasm_put(Dst, 2837, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); |
| 6117 | #if LJ_HASJIT | 6216 | #if LJ_HASJIT |
| 6118 | dasm_put(Dst, 2822); | 6217 | dasm_put(Dst, 2859); |
| 6119 | #endif | 6218 | #endif |
| 6120 | dasm_put(Dst, 2824); | 6219 | dasm_put(Dst, 2861); |
| 6121 | #if LJ_HASJIT | 6220 | #if LJ_HASJIT |
| 6122 | dasm_put(Dst, 2826); | 6221 | dasm_put(Dst, 2863); |
| 6123 | #endif | 6222 | #endif |
| 6124 | dasm_put(Dst, 2828); | 6223 | dasm_put(Dst, 2865); |
| 6125 | #if LJ_HASJIT | 6224 | #if LJ_HASJIT |
| 6126 | dasm_put(Dst, 2833); | 6225 | dasm_put(Dst, 2870); |
| 6127 | #else | 6226 | #else |
| 6128 | dasm_put(Dst, 2836); | 6227 | dasm_put(Dst, 2873); |
| 6129 | #endif | 6228 | #endif |
| 6130 | dasm_put(Dst, 2838); | 6229 | dasm_put(Dst, 2875); |
| 6131 | { | 6230 | { |
| 6132 | int i; | 6231 | int i; |
| 6133 | for (i = 31; i >= 0; i--) { | 6232 | for (i = 31; i >= 0; i--) { |
| 6134 | dasm_put(Dst, 2874, i, i); | 6233 | dasm_put(Dst, 2911, i, i); |
| 6135 | } | 6234 | } |
| 6136 | } | 6235 | } |
| 6137 | dasm_put(Dst, 2879); | 6236 | dasm_put(Dst, 2916); |
| 6138 | #if LJ_HASJIT | 6237 | #if LJ_HASJIT |
| 6139 | dasm_put(Dst, 2888); | 6238 | dasm_put(Dst, 2925); |
| 6140 | #endif | 6239 | #endif |
| 6141 | dasm_put(Dst, 2890); | 6240 | dasm_put(Dst, 2927); |
| 6142 | #if LJ_HASJIT | 6241 | #if LJ_HASJIT |
| 6143 | dasm_put(Dst, 2892); | 6242 | dasm_put(Dst, 2929); |
| 6144 | #endif | 6243 | #endif |
| 6145 | dasm_put(Dst, 2894); | 6244 | dasm_put(Dst, 2931); |
| 6146 | #if LJ_HASFFI | 6245 | #if LJ_HASFFI |
| 6147 | #define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) | 6246 | #define DtE(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) |
| 6148 | dasm_put(Dst, 2918, 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])); | 6247 | dasm_put(Dst, 2955, DtE(->spadj), DtE(->nsp), offsetof(CCallState, stack), DtE(->func), DtE(->gpr[0]), DtE(->gpr[1]), DtE(->gpr[2]), DtE(->gpr[3]), DtE(->gpr[0]), DtE(->gpr[1])); |
| 6149 | #endif | 6248 | #endif |
| 6150 | } | 6249 | } |
| 6151 | 6250 | ||
| @@ -6153,7 +6252,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
| 6153 | static void build_ins(BuildCtx *ctx, BCOp op, int defop) | 6252 | static void build_ins(BuildCtx *ctx, BCOp op, int defop) |
| 6154 | { | 6253 | { |
| 6155 | int vk = 0; | 6254 | int vk = 0; |
| 6156 | dasm_put(Dst, 2956, defop); | 6255 | dasm_put(Dst, 2993, defop); |
| 6157 | 6256 | ||
| 6158 | switch (op) { | 6257 | switch (op) { |
| 6159 | 6258 | ||
| @@ -6162,576 +6261,578 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 6162 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ | 6261 | /* Remember: all ops branch for a true comparison, fall through otherwise. */ |
| 6163 | 6262 | ||
| 6164 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | 6263 | case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: |
| 6165 | dasm_put(Dst, 2958, -LJ_TISNUM, -LJ_TISNUM); | 6264 | dasm_put(Dst, 2995, -LJ_TISNUM, -LJ_TISNUM); |
| 6166 | if (op == BC_ISLT) { | 6265 | if (op == BC_ISLT) { |
| 6167 | dasm_put(Dst, 2974); | 6266 | dasm_put(Dst, 3011); |
| 6168 | } else if (op == BC_ISGE) { | 6267 | } else if (op == BC_ISGE) { |
| 6169 | dasm_put(Dst, 2976); | 6268 | dasm_put(Dst, 3013); |
| 6170 | } else if (op == BC_ISLE) { | 6269 | } else if (op == BC_ISLE) { |
| 6171 | dasm_put(Dst, 2978); | 6270 | dasm_put(Dst, 3015); |
| 6172 | } else { | 6271 | } else { |
| 6173 | dasm_put(Dst, 2980); | 6272 | dasm_put(Dst, 3017); |
| 6174 | } | 6273 | } |
| 6175 | dasm_put(Dst, 2982, -LJ_TISNUM); | 6274 | dasm_put(Dst, 3019, -LJ_TISNUM); |
| 6176 | if (op == BC_ISLT) { | 6275 | if (op == BC_ISLT) { |
| 6177 | dasm_put(Dst, 3018); | 6276 | dasm_put(Dst, 3055); |
| 6178 | } else if (op == BC_ISGE) { | 6277 | } else if (op == BC_ISGE) { |
| 6179 | dasm_put(Dst, 3020); | 6278 | dasm_put(Dst, 3057); |
| 6180 | } else if (op == BC_ISLE) { | 6279 | } else if (op == BC_ISLE) { |
| 6181 | dasm_put(Dst, 3022); | 6280 | dasm_put(Dst, 3059); |
| 6182 | } else { | 6281 | } else { |
| 6183 | dasm_put(Dst, 3024); | 6282 | dasm_put(Dst, 3061); |
| 6184 | } | 6283 | } |
| 6185 | dasm_put(Dst, 3026); | 6284 | dasm_put(Dst, 3063); |
| 6186 | break; | 6285 | break; |
| 6187 | 6286 | ||
| 6188 | case BC_ISEQV: case BC_ISNEV: | 6287 | case BC_ISEQV: case BC_ISNEV: |
| 6189 | vk = op == BC_ISEQV; | 6288 | vk = op == BC_ISEQV; |
| 6190 | dasm_put(Dst, 3029, -LJ_TISNUM, -LJ_TISNUM); | 6289 | dasm_put(Dst, 3066, -LJ_TISNUM, -LJ_TISNUM); |
| 6191 | if (vk) { | 6290 | if (vk) { |
| 6192 | dasm_put(Dst, 3040); | 6291 | dasm_put(Dst, 3077); |
| 6193 | } else { | 6292 | } else { |
| 6194 | dasm_put(Dst, 3043); | 6293 | dasm_put(Dst, 3080); |
| 6195 | } | 6294 | } |
| 6196 | if (LJ_HASFFI) { | 6295 | if (LJ_HASFFI) { |
| 6197 | dasm_put(Dst, 3046, -LJ_TCDATA, -LJ_TCDATA); | 6296 | dasm_put(Dst, 3083, -LJ_TCDATA, -LJ_TCDATA); |
| 6198 | } | 6297 | } |
| 6199 | dasm_put(Dst, 3053, -LJ_TISPRI); | 6298 | dasm_put(Dst, 3090, -LJ_TISPRI); |
| 6200 | if (vk) { | 6299 | if (vk) { |
| 6201 | dasm_put(Dst, 3062, -LJ_TISTABUD); | 6300 | dasm_put(Dst, 3099, -LJ_TISTABUD); |
| 6202 | } else { | 6301 | } else { |
| 6203 | dasm_put(Dst, 3079, -LJ_TISTABUD); | 6302 | dasm_put(Dst, 3116, -LJ_TISTABUD); |
| 6204 | } | 6303 | } |
| 6205 | dasm_put(Dst, 3086, Dt6(->metatable)); | 6304 | dasm_put(Dst, 3123, Dt6(->metatable)); |
| 6206 | if (vk) { | 6305 | if (vk) { |
| 6207 | dasm_put(Dst, 3090); | 6306 | dasm_put(Dst, 3127); |
| 6208 | } else { | 6307 | } else { |
| 6209 | dasm_put(Dst, 3093); | 6308 | dasm_put(Dst, 3130); |
| 6210 | } | 6309 | } |
| 6211 | dasm_put(Dst, 3096, Dt6(->nomm), 1-vk, 1<<MM_eq); | 6310 | dasm_put(Dst, 3133, Dt6(->nomm), 1-vk, 1<<MM_eq); |
| 6212 | if (!vk) { | 6311 | if (vk) { |
| 6213 | dasm_put(Dst, 3106); | 6312 | dasm_put(Dst, 3143); |
| 6313 | } else { | ||
| 6314 | dasm_put(Dst, 3146); | ||
| 6214 | } | 6315 | } |
| 6215 | break; | 6316 | break; |
| 6216 | 6317 | ||
| 6217 | case BC_ISEQS: case BC_ISNES: | 6318 | case BC_ISEQS: case BC_ISNES: |
| 6218 | vk = op == BC_ISEQS; | 6319 | vk = op == BC_ISEQS; |
| 6219 | dasm_put(Dst, 3116, -LJ_TSTR); | 6320 | dasm_put(Dst, 3156, -LJ_TSTR); |
| 6220 | if (LJ_HASFFI) { | 6321 | if (LJ_HASFFI) { |
| 6221 | dasm_put(Dst, 3125); | 6322 | dasm_put(Dst, 3165); |
| 6222 | } else { | 6323 | } else { |
| 6223 | dasm_put(Dst, 3129); | 6324 | dasm_put(Dst, 3169); |
| 6224 | } | 6325 | } |
| 6225 | if (vk) { | 6326 | if (vk) { |
| 6226 | dasm_put(Dst, 3131); | 6327 | dasm_put(Dst, 3171); |
| 6227 | } else { | 6328 | } else { |
| 6228 | dasm_put(Dst, 3134); | 6329 | dasm_put(Dst, 3174); |
| 6229 | } | 6330 | } |
| 6230 | dasm_put(Dst, 3137); | 6331 | dasm_put(Dst, 3177); |
| 6231 | if (LJ_HASFFI) { | 6332 | if (LJ_HASFFI) { |
| 6232 | dasm_put(Dst, 3144, -LJ_TCDATA); | 6333 | dasm_put(Dst, 3184, -LJ_TCDATA); |
| 6233 | } | 6334 | } |
| 6234 | break; | 6335 | break; |
| 6235 | 6336 | ||
| 6236 | case BC_ISEQN: case BC_ISNEN: | 6337 | case BC_ISEQN: case BC_ISNEN: |
| 6237 | vk = op == BC_ISEQN; | 6338 | vk = op == BC_ISEQN; |
| 6238 | dasm_put(Dst, 3152); | 6339 | dasm_put(Dst, 3192); |
| 6239 | if (vk) { | 6340 | if (vk) { |
| 6240 | dasm_put(Dst, 3159); | 6341 | dasm_put(Dst, 3199); |
| 6241 | } else { | 6342 | } else { |
| 6242 | dasm_put(Dst, 3161); | 6343 | dasm_put(Dst, 3201); |
| 6243 | } | 6344 | } |
| 6244 | dasm_put(Dst, 3163, -LJ_TISNUM, -LJ_TISNUM); | 6345 | dasm_put(Dst, 3203, -LJ_TISNUM, -LJ_TISNUM); |
| 6245 | if (vk) { | 6346 | if (vk) { |
| 6246 | dasm_put(Dst, 3173); | 6347 | dasm_put(Dst, 3213); |
| 6247 | } else { | 6348 | } else { |
| 6248 | dasm_put(Dst, 3176); | 6349 | dasm_put(Dst, 3216); |
| 6249 | } | 6350 | } |
| 6250 | dasm_put(Dst, 3179); | 6351 | dasm_put(Dst, 3219); |
| 6251 | if (LJ_HASFFI) { | 6352 | if (LJ_HASFFI) { |
| 6252 | dasm_put(Dst, 3188); | 6353 | dasm_put(Dst, 3228); |
| 6253 | } else { | 6354 | } else { |
| 6254 | if (!vk) { | 6355 | if (!vk) { |
| 6255 | dasm_put(Dst, 3191); | 6356 | dasm_put(Dst, 3231); |
| 6256 | } | 6357 | } |
| 6257 | dasm_put(Dst, 3193); | 6358 | dasm_put(Dst, 3233); |
| 6258 | } | 6359 | } |
| 6259 | dasm_put(Dst, 3196, -LJ_TISNUM); | 6360 | dasm_put(Dst, 3236, -LJ_TISNUM); |
| 6260 | if (vk) { | 6361 | if (vk) { |
| 6261 | dasm_put(Dst, 3212); | 6362 | dasm_put(Dst, 3252); |
| 6262 | } else { | 6363 | } else { |
| 6263 | dasm_put(Dst, 3214); | 6364 | dasm_put(Dst, 3254); |
| 6264 | } | 6365 | } |
| 6265 | dasm_put(Dst, 3216); | 6366 | dasm_put(Dst, 3256); |
| 6266 | if (LJ_HASFFI) { | 6367 | if (LJ_HASFFI) { |
| 6267 | dasm_put(Dst, 3219, -LJ_TCDATA); | 6368 | dasm_put(Dst, 3259, -LJ_TCDATA); |
| 6268 | } | 6369 | } |
| 6269 | break; | 6370 | break; |
| 6270 | 6371 | ||
| 6271 | case BC_ISEQP: case BC_ISNEP: | 6372 | case BC_ISEQP: case BC_ISNEP: |
| 6272 | vk = op == BC_ISEQP; | 6373 | vk = op == BC_ISEQP; |
| 6273 | dasm_put(Dst, 3227); | 6374 | dasm_put(Dst, 3267); |
| 6274 | if (LJ_HASFFI) { | 6375 | if (LJ_HASFFI) { |
| 6275 | dasm_put(Dst, 3233, -LJ_TCDATA); | 6376 | dasm_put(Dst, 3273, -LJ_TCDATA); |
| 6276 | } | 6377 | } |
| 6277 | dasm_put(Dst, 3238); | 6378 | dasm_put(Dst, 3278); |
| 6278 | if (vk) { | 6379 | if (vk) { |
| 6279 | dasm_put(Dst, 3240); | 6380 | dasm_put(Dst, 3280); |
| 6280 | } else { | 6381 | } else { |
| 6281 | dasm_put(Dst, 3242); | 6382 | dasm_put(Dst, 3282); |
| 6282 | } | 6383 | } |
| 6283 | dasm_put(Dst, 3244); | 6384 | dasm_put(Dst, 3284); |
| 6284 | break; | 6385 | break; |
| 6285 | 6386 | ||
| 6286 | /* -- Unary test and copy ops ------------------------------------------- */ | 6387 | /* -- Unary test and copy ops ------------------------------------------- */ |
| 6287 | 6388 | ||
| 6288 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | 6389 | case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: |
| 6289 | dasm_put(Dst, 3251, -LJ_TTRUE); | 6390 | dasm_put(Dst, 3291, -LJ_TTRUE); |
| 6290 | if (op == BC_ISTC || op == BC_IST) { | 6391 | if (op == BC_ISTC || op == BC_IST) { |
| 6291 | dasm_put(Dst, 3259); | 6392 | dasm_put(Dst, 3299); |
| 6292 | if (op == BC_ISTC) { | 6393 | if (op == BC_ISTC) { |
| 6293 | dasm_put(Dst, 3261); | 6394 | dasm_put(Dst, 3301); |
| 6294 | } | 6395 | } |
| 6295 | } else { | 6396 | } else { |
| 6296 | dasm_put(Dst, 3263); | 6397 | dasm_put(Dst, 3303); |
| 6297 | if (op == BC_ISFC) { | 6398 | if (op == BC_ISFC) { |
| 6298 | dasm_put(Dst, 3265); | 6399 | dasm_put(Dst, 3305); |
| 6299 | } | 6400 | } |
| 6300 | } | 6401 | } |
| 6301 | dasm_put(Dst, 3267); | 6402 | dasm_put(Dst, 3307); |
| 6302 | break; | 6403 | break; |
| 6303 | 6404 | ||
| 6304 | /* -- Unary ops --------------------------------------------------------- */ | 6405 | /* -- Unary ops --------------------------------------------------------- */ |
| 6305 | 6406 | ||
| 6306 | case BC_MOV: | 6407 | case BC_MOV: |
| 6307 | dasm_put(Dst, 3274); | 6408 | dasm_put(Dst, 3314); |
| 6308 | break; | 6409 | break; |
| 6309 | case BC_NOT: | 6410 | case BC_NOT: |
| 6310 | dasm_put(Dst, 3284, -LJ_TTRUE, ~LJ_TFALSE, ~LJ_TTRUE); | 6411 | dasm_put(Dst, 3324, -LJ_TTRUE, ~LJ_TFALSE, ~LJ_TTRUE); |
| 6311 | break; | 6412 | break; |
| 6312 | case BC_UNM: | 6413 | case BC_UNM: |
| 6313 | dasm_put(Dst, 3301, -LJ_TISNUM); | 6414 | dasm_put(Dst, 3341, -LJ_TISNUM); |
| 6314 | break; | 6415 | break; |
| 6315 | case BC_LEN: | 6416 | case BC_LEN: |
| 6316 | dasm_put(Dst, 3327, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TTAB); | 6417 | dasm_put(Dst, 3367, -LJ_TSTR, Dt5(->len), ~LJ_TISNUM, -LJ_TTAB); |
| 6317 | if (LJ_TARGET_OSX) { | 6418 | if (LJ_TARGET_OSX) { |
| 6318 | dasm_put(Dst, 3351); | 6419 | dasm_put(Dst, 3391); |
| 6319 | } | 6420 | } |
| 6320 | dasm_put(Dst, 3353); | 6421 | dasm_put(Dst, 3393); |
| 6321 | if (LJ_TARGET_OSX) { | 6422 | if (LJ_TARGET_OSX) { |
| 6322 | dasm_put(Dst, 3356); | 6423 | dasm_put(Dst, 3396); |
| 6323 | } | 6424 | } |
| 6324 | dasm_put(Dst, 3358); | 6425 | dasm_put(Dst, 3398); |
| 6325 | break; | 6426 | break; |
| 6326 | 6427 | ||
| 6327 | /* -- Binary ops -------------------------------------------------------- */ | 6428 | /* -- Binary ops -------------------------------------------------------- */ |
| 6328 | 6429 | ||
| 6329 | 6430 | ||
| 6330 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | 6431 | case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: |
| 6331 | dasm_put(Dst, 3361); | 6432 | dasm_put(Dst, 3401); |
| 6332 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 6433 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
| 6333 | switch (vk) { | 6434 | switch (vk) { |
| 6334 | case 0: | 6435 | case 0: |
| 6335 | dasm_put(Dst, 3364); | 6436 | dasm_put(Dst, 3404); |
| 6336 | break; | 6437 | break; |
| 6337 | case 1: | 6438 | case 1: |
| 6338 | dasm_put(Dst, 3367); | 6439 | dasm_put(Dst, 3407); |
| 6339 | break; | 6440 | break; |
| 6340 | default: | 6441 | default: |
| 6341 | dasm_put(Dst, 3370); | 6442 | dasm_put(Dst, 3410); |
| 6342 | break; | 6443 | break; |
| 6343 | } | 6444 | } |
| 6344 | dasm_put(Dst, 3373); | 6445 | dasm_put(Dst, 3413); |
| 6345 | if (vk == 1) { | 6446 | if (vk == 1) { |
| 6346 | dasm_put(Dst, 3375, -LJ_TISNUM, -LJ_TISNUM); | 6447 | dasm_put(Dst, 3415, -LJ_TISNUM, -LJ_TISNUM); |
| 6347 | } else { | 6448 | } else { |
| 6348 | dasm_put(Dst, 3380, -LJ_TISNUM, -LJ_TISNUM); | 6449 | dasm_put(Dst, 3420, -LJ_TISNUM, -LJ_TISNUM); |
| 6349 | } | 6450 | } |
| 6350 | dasm_put(Dst, 3385); | 6451 | dasm_put(Dst, 3425); |
| 6351 | switch (vk) { | 6452 | switch (vk) { |
| 6352 | case 0: | 6453 | case 0: |
| 6353 | dasm_put(Dst, 3389); | 6454 | dasm_put(Dst, 3429); |
| 6354 | break; | 6455 | break; |
| 6355 | case 1: | 6456 | case 1: |
| 6356 | dasm_put(Dst, 3392); | 6457 | dasm_put(Dst, 3432); |
| 6357 | break; | 6458 | break; |
| 6358 | default: | 6459 | default: |
| 6359 | dasm_put(Dst, 3395); | 6460 | dasm_put(Dst, 3435); |
| 6360 | break; | 6461 | break; |
| 6361 | } | 6462 | } |
| 6362 | dasm_put(Dst, 3398); | 6463 | dasm_put(Dst, 3438); |
| 6363 | switch (vk) { | 6464 | switch (vk) { |
| 6364 | case 0: | 6465 | case 0: |
| 6365 | if (vk == 1) { | 6466 | if (vk == 1) { |
| 6366 | dasm_put(Dst, 3407, -LJ_TISNUM, -LJ_TISNUM); | 6467 | dasm_put(Dst, 3447, -LJ_TISNUM, -LJ_TISNUM); |
| 6367 | } else { | 6468 | } else { |
| 6368 | dasm_put(Dst, 3412, -LJ_TISNUM, -LJ_TISNUM); | 6469 | dasm_put(Dst, 3452, -LJ_TISNUM, -LJ_TISNUM); |
| 6369 | } | 6470 | } |
| 6370 | dasm_put(Dst, 3417); | 6471 | dasm_put(Dst, 3457); |
| 6371 | break; | 6472 | break; |
| 6372 | case 1: | 6473 | case 1: |
| 6373 | if (vk == 1) { | 6474 | if (vk == 1) { |
| 6374 | dasm_put(Dst, 3420, -LJ_TISNUM, -LJ_TISNUM); | 6475 | dasm_put(Dst, 3460, -LJ_TISNUM, -LJ_TISNUM); |
| 6375 | } else { | 6476 | } else { |
| 6376 | dasm_put(Dst, 3425, -LJ_TISNUM, -LJ_TISNUM); | 6477 | dasm_put(Dst, 3465, -LJ_TISNUM, -LJ_TISNUM); |
| 6377 | } | 6478 | } |
| 6378 | dasm_put(Dst, 3430); | 6479 | dasm_put(Dst, 3470); |
| 6379 | break; | 6480 | break; |
| 6380 | default: | 6481 | default: |
| 6381 | if (vk == 1) { | 6482 | if (vk == 1) { |
| 6382 | dasm_put(Dst, 3433, -LJ_TISNUM, -LJ_TISNUM); | 6483 | dasm_put(Dst, 3473, -LJ_TISNUM, -LJ_TISNUM); |
| 6383 | } else { | 6484 | } else { |
| 6384 | dasm_put(Dst, 3438, -LJ_TISNUM, -LJ_TISNUM); | 6485 | dasm_put(Dst, 3478, -LJ_TISNUM, -LJ_TISNUM); |
| 6385 | } | 6486 | } |
| 6386 | dasm_put(Dst, 3443); | 6487 | dasm_put(Dst, 3483); |
| 6387 | break; | 6488 | break; |
| 6388 | } | 6489 | } |
| 6389 | dasm_put(Dst, 3446); | 6490 | dasm_put(Dst, 3486); |
| 6390 | break; | 6491 | break; |
| 6391 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | 6492 | case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |
| 6392 | dasm_put(Dst, 3452); | 6493 | dasm_put(Dst, 3492); |
| 6393 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 6494 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
| 6394 | switch (vk) { | 6495 | switch (vk) { |
| 6395 | case 0: | 6496 | case 0: |
| 6396 | dasm_put(Dst, 3455); | 6497 | dasm_put(Dst, 3495); |
| 6397 | break; | 6498 | break; |
| 6398 | case 1: | 6499 | case 1: |
| 6399 | dasm_put(Dst, 3458); | 6500 | dasm_put(Dst, 3498); |
| 6400 | break; | 6501 | break; |
| 6401 | default: | 6502 | default: |
| 6402 | dasm_put(Dst, 3461); | 6503 | dasm_put(Dst, 3501); |
| 6403 | break; | 6504 | break; |
| 6404 | } | 6505 | } |
| 6405 | dasm_put(Dst, 3464); | 6506 | dasm_put(Dst, 3504); |
| 6406 | if (vk == 1) { | 6507 | if (vk == 1) { |
| 6407 | dasm_put(Dst, 3466, -LJ_TISNUM, -LJ_TISNUM); | 6508 | dasm_put(Dst, 3506, -LJ_TISNUM, -LJ_TISNUM); |
| 6408 | } else { | 6509 | } else { |
| 6409 | dasm_put(Dst, 3471, -LJ_TISNUM, -LJ_TISNUM); | 6510 | dasm_put(Dst, 3511, -LJ_TISNUM, -LJ_TISNUM); |
| 6410 | } | 6511 | } |
| 6411 | dasm_put(Dst, 3476); | 6512 | dasm_put(Dst, 3516); |
| 6412 | switch (vk) { | 6513 | switch (vk) { |
| 6413 | case 0: | 6514 | case 0: |
| 6414 | dasm_put(Dst, 3480); | 6515 | dasm_put(Dst, 3520); |
| 6415 | break; | 6516 | break; |
| 6416 | case 1: | 6517 | case 1: |
| 6417 | dasm_put(Dst, 3483); | 6518 | dasm_put(Dst, 3523); |
| 6418 | break; | 6519 | break; |
| 6419 | default: | 6520 | default: |
| 6420 | dasm_put(Dst, 3486); | 6521 | dasm_put(Dst, 3526); |
| 6421 | break; | 6522 | break; |
| 6422 | } | 6523 | } |
| 6423 | dasm_put(Dst, 3489); | 6524 | dasm_put(Dst, 3529); |
| 6424 | switch (vk) { | 6525 | switch (vk) { |
| 6425 | case 0: | 6526 | case 0: |
| 6426 | if (vk == 1) { | 6527 | if (vk == 1) { |
| 6427 | dasm_put(Dst, 3498, -LJ_TISNUM, -LJ_TISNUM); | 6528 | dasm_put(Dst, 3538, -LJ_TISNUM, -LJ_TISNUM); |
| 6428 | } else { | 6529 | } else { |
| 6429 | dasm_put(Dst, 3503, -LJ_TISNUM, -LJ_TISNUM); | 6530 | dasm_put(Dst, 3543, -LJ_TISNUM, -LJ_TISNUM); |
| 6430 | } | 6531 | } |
| 6431 | dasm_put(Dst, 3508); | 6532 | dasm_put(Dst, 3548); |
| 6432 | break; | 6533 | break; |
| 6433 | case 1: | 6534 | case 1: |
| 6434 | if (vk == 1) { | 6535 | if (vk == 1) { |
| 6435 | dasm_put(Dst, 3511, -LJ_TISNUM, -LJ_TISNUM); | 6536 | dasm_put(Dst, 3551, -LJ_TISNUM, -LJ_TISNUM); |
| 6436 | } else { | 6537 | } else { |
| 6437 | dasm_put(Dst, 3516, -LJ_TISNUM, -LJ_TISNUM); | 6538 | dasm_put(Dst, 3556, -LJ_TISNUM, -LJ_TISNUM); |
| 6438 | } | 6539 | } |
| 6439 | dasm_put(Dst, 3521); | 6540 | dasm_put(Dst, 3561); |
| 6440 | break; | 6541 | break; |
| 6441 | default: | 6542 | default: |
| 6442 | if (vk == 1) { | 6543 | if (vk == 1) { |
| 6443 | dasm_put(Dst, 3524, -LJ_TISNUM, -LJ_TISNUM); | 6544 | dasm_put(Dst, 3564, -LJ_TISNUM, -LJ_TISNUM); |
| 6444 | } else { | 6545 | } else { |
| 6445 | dasm_put(Dst, 3529, -LJ_TISNUM, -LJ_TISNUM); | 6546 | dasm_put(Dst, 3569, -LJ_TISNUM, -LJ_TISNUM); |
| 6446 | } | 6547 | } |
| 6447 | dasm_put(Dst, 3534); | 6548 | dasm_put(Dst, 3574); |
| 6448 | break; | 6549 | break; |
| 6449 | } | 6550 | } |
| 6450 | dasm_put(Dst, 3537); | 6551 | dasm_put(Dst, 3577); |
| 6451 | break; | 6552 | break; |
| 6452 | case BC_MULVN: case BC_MULNV: case BC_MULVV: | 6553 | case BC_MULVN: case BC_MULNV: case BC_MULVV: |
| 6453 | dasm_put(Dst, 3543); | 6554 | dasm_put(Dst, 3583); |
| 6454 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 6555 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
| 6455 | switch (vk) { | 6556 | switch (vk) { |
| 6456 | case 0: | 6557 | case 0: |
| 6457 | dasm_put(Dst, 3546); | 6558 | dasm_put(Dst, 3586); |
| 6458 | break; | 6559 | break; |
| 6459 | case 1: | 6560 | case 1: |
| 6460 | dasm_put(Dst, 3549); | 6561 | dasm_put(Dst, 3589); |
| 6461 | break; | 6562 | break; |
| 6462 | default: | 6563 | default: |
| 6463 | dasm_put(Dst, 3552); | 6564 | dasm_put(Dst, 3592); |
| 6464 | break; | 6565 | break; |
| 6465 | } | 6566 | } |
| 6466 | dasm_put(Dst, 3555); | 6567 | dasm_put(Dst, 3595); |
| 6467 | if (vk == 1) { | 6568 | if (vk == 1) { |
| 6468 | dasm_put(Dst, 3557, -LJ_TISNUM, -LJ_TISNUM); | 6569 | dasm_put(Dst, 3597, -LJ_TISNUM, -LJ_TISNUM); |
| 6469 | } else { | 6570 | } else { |
| 6470 | dasm_put(Dst, 3562, -LJ_TISNUM, -LJ_TISNUM); | 6571 | dasm_put(Dst, 3602, -LJ_TISNUM, -LJ_TISNUM); |
| 6471 | } | 6572 | } |
| 6472 | dasm_put(Dst, 3567); | 6573 | dasm_put(Dst, 3607); |
| 6473 | switch (vk) { | 6574 | switch (vk) { |
| 6474 | case 0: | 6575 | case 0: |
| 6475 | dasm_put(Dst, 3572); | 6576 | dasm_put(Dst, 3612); |
| 6476 | break; | 6577 | break; |
| 6477 | case 1: | 6578 | case 1: |
| 6478 | dasm_put(Dst, 3575); | 6579 | dasm_put(Dst, 3615); |
| 6479 | break; | 6580 | break; |
| 6480 | default: | 6581 | default: |
| 6481 | dasm_put(Dst, 3578); | 6582 | dasm_put(Dst, 3618); |
| 6482 | break; | 6583 | break; |
| 6483 | } | 6584 | } |
| 6484 | dasm_put(Dst, 3581); | 6585 | dasm_put(Dst, 3621); |
| 6485 | switch (vk) { | 6586 | switch (vk) { |
| 6486 | case 0: | 6587 | case 0: |
| 6487 | if (vk == 1) { | 6588 | if (vk == 1) { |
| 6488 | dasm_put(Dst, 3590, -LJ_TISNUM, -LJ_TISNUM); | 6589 | dasm_put(Dst, 3630, -LJ_TISNUM, -LJ_TISNUM); |
| 6489 | } else { | 6590 | } else { |
| 6490 | dasm_put(Dst, 3595, -LJ_TISNUM, -LJ_TISNUM); | 6591 | dasm_put(Dst, 3635, -LJ_TISNUM, -LJ_TISNUM); |
| 6491 | } | 6592 | } |
| 6492 | dasm_put(Dst, 3600); | 6593 | dasm_put(Dst, 3640); |
| 6493 | break; | 6594 | break; |
| 6494 | case 1: | 6595 | case 1: |
| 6495 | if (vk == 1) { | 6596 | if (vk == 1) { |
| 6496 | dasm_put(Dst, 3603, -LJ_TISNUM, -LJ_TISNUM); | 6597 | dasm_put(Dst, 3643, -LJ_TISNUM, -LJ_TISNUM); |
| 6497 | } else { | 6598 | } else { |
| 6498 | dasm_put(Dst, 3608, -LJ_TISNUM, -LJ_TISNUM); | 6599 | dasm_put(Dst, 3648, -LJ_TISNUM, -LJ_TISNUM); |
| 6499 | } | 6600 | } |
| 6500 | dasm_put(Dst, 3613); | 6601 | dasm_put(Dst, 3653); |
| 6501 | break; | 6602 | break; |
| 6502 | default: | 6603 | default: |
| 6503 | if (vk == 1) { | 6604 | if (vk == 1) { |
| 6504 | dasm_put(Dst, 3616, -LJ_TISNUM, -LJ_TISNUM); | 6605 | dasm_put(Dst, 3656, -LJ_TISNUM, -LJ_TISNUM); |
| 6505 | } else { | 6606 | } else { |
| 6506 | dasm_put(Dst, 3621, -LJ_TISNUM, -LJ_TISNUM); | 6607 | dasm_put(Dst, 3661, -LJ_TISNUM, -LJ_TISNUM); |
| 6507 | } | 6608 | } |
| 6508 | dasm_put(Dst, 3626); | 6609 | dasm_put(Dst, 3666); |
| 6509 | break; | 6610 | break; |
| 6510 | } | 6611 | } |
| 6511 | dasm_put(Dst, 3629); | 6612 | dasm_put(Dst, 3669); |
| 6512 | break; | 6613 | break; |
| 6513 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | 6614 | case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: |
| 6514 | dasm_put(Dst, 3635); | 6615 | dasm_put(Dst, 3675); |
| 6515 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 6616 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
| 6516 | switch (vk) { | 6617 | switch (vk) { |
| 6517 | case 0: | 6618 | case 0: |
| 6518 | dasm_put(Dst, 3638); | 6619 | dasm_put(Dst, 3678); |
| 6519 | break; | 6620 | break; |
| 6520 | case 1: | 6621 | case 1: |
| 6521 | dasm_put(Dst, 3641); | 6622 | dasm_put(Dst, 3681); |
| 6522 | break; | 6623 | break; |
| 6523 | default: | 6624 | default: |
| 6524 | dasm_put(Dst, 3644); | 6625 | dasm_put(Dst, 3684); |
| 6525 | break; | 6626 | break; |
| 6526 | } | 6627 | } |
| 6527 | switch (vk) { | 6628 | switch (vk) { |
| 6528 | case 0: | 6629 | case 0: |
| 6529 | if (vk == 1) { | 6630 | if (vk == 1) { |
| 6530 | dasm_put(Dst, 3647, -LJ_TISNUM, -LJ_TISNUM); | 6631 | dasm_put(Dst, 3687, -LJ_TISNUM, -LJ_TISNUM); |
| 6531 | } else { | 6632 | } else { |
| 6532 | dasm_put(Dst, 3652, -LJ_TISNUM, -LJ_TISNUM); | 6633 | dasm_put(Dst, 3692, -LJ_TISNUM, -LJ_TISNUM); |
| 6533 | } | 6634 | } |
| 6534 | dasm_put(Dst, 3657); | 6635 | dasm_put(Dst, 3697); |
| 6535 | break; | 6636 | break; |
| 6536 | case 1: | 6637 | case 1: |
| 6537 | if (vk == 1) { | 6638 | if (vk == 1) { |
| 6538 | dasm_put(Dst, 3660, -LJ_TISNUM, -LJ_TISNUM); | 6639 | dasm_put(Dst, 3700, -LJ_TISNUM, -LJ_TISNUM); |
| 6539 | } else { | 6640 | } else { |
| 6540 | dasm_put(Dst, 3665, -LJ_TISNUM, -LJ_TISNUM); | 6641 | dasm_put(Dst, 3705, -LJ_TISNUM, -LJ_TISNUM); |
| 6541 | } | 6642 | } |
| 6542 | dasm_put(Dst, 3670); | 6643 | dasm_put(Dst, 3710); |
| 6543 | break; | 6644 | break; |
| 6544 | default: | 6645 | default: |
| 6545 | if (vk == 1) { | 6646 | if (vk == 1) { |
| 6546 | dasm_put(Dst, 3673, -LJ_TISNUM, -LJ_TISNUM); | 6647 | dasm_put(Dst, 3713, -LJ_TISNUM, -LJ_TISNUM); |
| 6547 | } else { | 6648 | } else { |
| 6548 | dasm_put(Dst, 3678, -LJ_TISNUM, -LJ_TISNUM); | 6649 | dasm_put(Dst, 3718, -LJ_TISNUM, -LJ_TISNUM); |
| 6549 | } | 6650 | } |
| 6550 | dasm_put(Dst, 3683); | 6651 | dasm_put(Dst, 3723); |
| 6551 | break; | 6652 | break; |
| 6552 | } | 6653 | } |
| 6553 | dasm_put(Dst, 3686); | 6654 | dasm_put(Dst, 3726); |
| 6554 | break; | 6655 | break; |
| 6555 | case BC_MODVN: case BC_MODNV: case BC_MODVV: | 6656 | case BC_MODVN: case BC_MODNV: case BC_MODVV: |
| 6556 | dasm_put(Dst, 3696); | 6657 | dasm_put(Dst, 3736); |
| 6557 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 6658 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
| 6558 | switch (vk) { | 6659 | switch (vk) { |
| 6559 | case 0: | 6660 | case 0: |
| 6560 | dasm_put(Dst, 3699); | 6661 | dasm_put(Dst, 3739); |
| 6561 | break; | 6662 | break; |
| 6562 | case 1: | 6663 | case 1: |
| 6563 | dasm_put(Dst, 3702); | 6664 | dasm_put(Dst, 3742); |
| 6564 | break; | 6665 | break; |
| 6565 | default: | 6666 | default: |
| 6566 | dasm_put(Dst, 3705); | 6667 | dasm_put(Dst, 3745); |
| 6567 | break; | 6668 | break; |
| 6568 | } | 6669 | } |
| 6569 | if (vk == 1) { | 6670 | if (vk == 1) { |
| 6570 | dasm_put(Dst, 3708, -LJ_TISNUM, -LJ_TISNUM); | 6671 | dasm_put(Dst, 3748, -LJ_TISNUM, -LJ_TISNUM); |
| 6571 | } else { | 6672 | } else { |
| 6572 | dasm_put(Dst, 3713, -LJ_TISNUM, -LJ_TISNUM); | 6673 | dasm_put(Dst, 3753, -LJ_TISNUM, -LJ_TISNUM); |
| 6573 | } | 6674 | } |
| 6574 | dasm_put(Dst, 3718); | 6675 | dasm_put(Dst, 3758); |
| 6575 | switch (vk) { | 6676 | switch (vk) { |
| 6576 | case 0: | 6677 | case 0: |
| 6577 | dasm_put(Dst, 3722); | 6678 | dasm_put(Dst, 3762); |
| 6578 | break; | 6679 | break; |
| 6579 | case 1: | 6680 | case 1: |
| 6580 | dasm_put(Dst, 3725); | 6681 | dasm_put(Dst, 3765); |
| 6581 | break; | 6682 | break; |
| 6582 | default: | 6683 | default: |
| 6583 | dasm_put(Dst, 3728); | 6684 | dasm_put(Dst, 3768); |
| 6584 | break; | 6685 | break; |
| 6585 | } | 6686 | } |
| 6586 | dasm_put(Dst, 3731, ~LJ_TISNUM); | 6687 | dasm_put(Dst, 3771, ~LJ_TISNUM); |
| 6587 | switch (vk) { | 6688 | switch (vk) { |
| 6588 | case 0: | 6689 | case 0: |
| 6589 | if (vk == 1) { | 6690 | if (vk == 1) { |
| 6590 | dasm_put(Dst, 3745, -LJ_TISNUM, -LJ_TISNUM); | 6691 | dasm_put(Dst, 3785, -LJ_TISNUM, -LJ_TISNUM); |
| 6591 | } else { | 6692 | } else { |
| 6592 | dasm_put(Dst, 3750, -LJ_TISNUM, -LJ_TISNUM); | 6693 | dasm_put(Dst, 3790, -LJ_TISNUM, -LJ_TISNUM); |
| 6593 | } | 6694 | } |
| 6594 | dasm_put(Dst, 3755); | 6695 | dasm_put(Dst, 3795); |
| 6595 | break; | 6696 | break; |
| 6596 | case 1: | 6697 | case 1: |
| 6597 | if (vk == 1) { | 6698 | if (vk == 1) { |
| 6598 | dasm_put(Dst, 3758, -LJ_TISNUM, -LJ_TISNUM); | 6699 | dasm_put(Dst, 3798, -LJ_TISNUM, -LJ_TISNUM); |
| 6599 | } else { | 6700 | } else { |
| 6600 | dasm_put(Dst, 3763, -LJ_TISNUM, -LJ_TISNUM); | 6701 | dasm_put(Dst, 3803, -LJ_TISNUM, -LJ_TISNUM); |
| 6601 | } | 6702 | } |
| 6602 | dasm_put(Dst, 3768); | 6703 | dasm_put(Dst, 3808); |
| 6603 | break; | 6704 | break; |
| 6604 | default: | 6705 | default: |
| 6605 | if (vk == 1) { | 6706 | if (vk == 1) { |
| 6606 | dasm_put(Dst, 3771, -LJ_TISNUM, -LJ_TISNUM); | 6707 | dasm_put(Dst, 3811, -LJ_TISNUM, -LJ_TISNUM); |
| 6607 | } else { | 6708 | } else { |
| 6608 | dasm_put(Dst, 3776, -LJ_TISNUM, -LJ_TISNUM); | 6709 | dasm_put(Dst, 3816, -LJ_TISNUM, -LJ_TISNUM); |
| 6609 | } | 6710 | } |
| 6610 | dasm_put(Dst, 3781); | 6711 | dasm_put(Dst, 3821); |
| 6611 | break; | 6712 | break; |
| 6612 | } | 6713 | } |
| 6613 | if (LJ_TARGET_OSX) { | 6714 | if (LJ_TARGET_OSX) { |
| 6614 | dasm_put(Dst, 3784); | 6715 | dasm_put(Dst, 3824); |
| 6615 | } | 6716 | } |
| 6616 | dasm_put(Dst, 3786); | 6717 | dasm_put(Dst, 3826); |
| 6617 | if (LJ_TARGET_OSX) { | 6718 | if (LJ_TARGET_OSX) { |
| 6618 | dasm_put(Dst, 3789); | 6719 | dasm_put(Dst, 3829); |
| 6619 | } | 6720 | } |
| 6620 | dasm_put(Dst, 3791); | 6721 | dasm_put(Dst, 3831); |
| 6621 | break; | 6722 | break; |
| 6622 | case BC_POW: | 6723 | case BC_POW: |
| 6623 | dasm_put(Dst, 3794); | 6724 | dasm_put(Dst, 3834); |
| 6624 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | 6725 | vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); |
| 6625 | switch (vk) { | 6726 | switch (vk) { |
| 6626 | case 0: | 6727 | case 0: |
| 6627 | dasm_put(Dst, 3797); | 6728 | dasm_put(Dst, 3837); |
| 6628 | break; | 6729 | break; |
| 6629 | case 1: | 6730 | case 1: |
| 6630 | dasm_put(Dst, 3800); | 6731 | dasm_put(Dst, 3840); |
| 6631 | break; | 6732 | break; |
| 6632 | default: | 6733 | default: |
| 6633 | dasm_put(Dst, 3803); | 6734 | dasm_put(Dst, 3843); |
| 6634 | break; | 6735 | break; |
| 6635 | } | 6736 | } |
| 6636 | switch (vk) { | 6737 | switch (vk) { |
| 6637 | case 0: | 6738 | case 0: |
| 6638 | if (vk == 1) { | 6739 | if (vk == 1) { |
| 6639 | dasm_put(Dst, 3806, -LJ_TISNUM, -LJ_TISNUM); | 6740 | dasm_put(Dst, 3846, -LJ_TISNUM, -LJ_TISNUM); |
| 6640 | } else { | 6741 | } else { |
| 6641 | dasm_put(Dst, 3811, -LJ_TISNUM, -LJ_TISNUM); | 6742 | dasm_put(Dst, 3851, -LJ_TISNUM, -LJ_TISNUM); |
| 6642 | } | 6743 | } |
| 6643 | dasm_put(Dst, 3816); | 6744 | dasm_put(Dst, 3856); |
| 6644 | break; | 6745 | break; |
| 6645 | case 1: | 6746 | case 1: |
| 6646 | if (vk == 1) { | 6747 | if (vk == 1) { |
| 6647 | dasm_put(Dst, 3819, -LJ_TISNUM, -LJ_TISNUM); | 6748 | dasm_put(Dst, 3859, -LJ_TISNUM, -LJ_TISNUM); |
| 6648 | } else { | 6749 | } else { |
| 6649 | dasm_put(Dst, 3824, -LJ_TISNUM, -LJ_TISNUM); | 6750 | dasm_put(Dst, 3864, -LJ_TISNUM, -LJ_TISNUM); |
| 6650 | } | 6751 | } |
| 6651 | dasm_put(Dst, 3829); | 6752 | dasm_put(Dst, 3869); |
| 6652 | break; | 6753 | break; |
| 6653 | default: | 6754 | default: |
| 6654 | if (vk == 1) { | 6755 | if (vk == 1) { |
| 6655 | dasm_put(Dst, 3832, -LJ_TISNUM, -LJ_TISNUM); | 6756 | dasm_put(Dst, 3872, -LJ_TISNUM, -LJ_TISNUM); |
| 6656 | } else { | 6757 | } else { |
| 6657 | dasm_put(Dst, 3837, -LJ_TISNUM, -LJ_TISNUM); | 6758 | dasm_put(Dst, 3877, -LJ_TISNUM, -LJ_TISNUM); |
| 6658 | } | 6759 | } |
| 6659 | dasm_put(Dst, 3842); | 6760 | dasm_put(Dst, 3882); |
| 6660 | break; | 6761 | break; |
| 6661 | } | 6762 | } |
| 6662 | if (LJ_TARGET_OSX) { | 6763 | if (LJ_TARGET_OSX) { |
| 6663 | dasm_put(Dst, 3845); | 6764 | dasm_put(Dst, 3885); |
| 6664 | } | 6765 | } |
| 6665 | dasm_put(Dst, 3847); | 6766 | dasm_put(Dst, 3887); |
| 6666 | if (LJ_TARGET_OSX) { | 6767 | if (LJ_TARGET_OSX) { |
| 6667 | dasm_put(Dst, 3850); | 6768 | dasm_put(Dst, 3890); |
| 6668 | } | 6769 | } |
| 6669 | dasm_put(Dst, 3852); | 6770 | dasm_put(Dst, 3892); |
| 6670 | break; | 6771 | break; |
| 6671 | 6772 | ||
| 6672 | case BC_CAT: | 6773 | case BC_CAT: |
| 6673 | dasm_put(Dst, 3860, Dt1(->base), Dt1(->base)); | 6774 | dasm_put(Dst, 3900, Dt1(->base), Dt1(->base)); |
| 6674 | break; | 6775 | break; |
| 6675 | 6776 | ||
| 6676 | /* -- Constant ops ------------------------------------------------------ */ | 6777 | /* -- Constant ops ------------------------------------------------------ */ |
| 6677 | 6778 | ||
| 6678 | case BC_KSTR: | 6779 | case BC_KSTR: |
| 6679 | dasm_put(Dst, 3886, ~LJ_TSTR); | 6780 | dasm_put(Dst, 3926, ~LJ_TSTR); |
| 6680 | break; | 6781 | break; |
| 6681 | case BC_KCDATA: | 6782 | case BC_KCDATA: |
| 6682 | #if LJ_HASFFI | 6783 | #if LJ_HASFFI |
| 6683 | dasm_put(Dst, 3898, ~LJ_TCDATA); | 6784 | dasm_put(Dst, 3938, ~LJ_TCDATA); |
| 6684 | #endif | 6785 | #endif |
| 6685 | break; | 6786 | break; |
| 6686 | case BC_KSHORT: | 6787 | case BC_KSHORT: |
| 6687 | dasm_put(Dst, 3910, ~LJ_TISNUM); | 6788 | dasm_put(Dst, 3950, ~LJ_TISNUM); |
| 6688 | break; | 6789 | break; |
| 6689 | case BC_KNUM: | 6790 | case BC_KNUM: |
| 6690 | dasm_put(Dst, 3921); | 6791 | dasm_put(Dst, 3961); |
| 6691 | break; | 6792 | break; |
| 6692 | case BC_KPRI: | 6793 | case BC_KPRI: |
| 6693 | dasm_put(Dst, 3931); | 6794 | dasm_put(Dst, 3971); |
| 6694 | break; | 6795 | break; |
| 6695 | case BC_KNIL: | 6796 | case BC_KNIL: |
| 6696 | dasm_put(Dst, 3941, ~LJ_TNIL); | 6797 | dasm_put(Dst, 3981, ~LJ_TNIL); |
| 6697 | break; | 6798 | break; |
| 6698 | 6799 | ||
| 6699 | /* -- Upvalue and function ops ------------------------------------------ */ | 6800 | /* -- Upvalue and function ops ------------------------------------------ */ |
| 6700 | 6801 | ||
| 6701 | case BC_UGET: | 6802 | case BC_UGET: |
| 6702 | dasm_put(Dst, 3960, offsetof(GCfuncL, uvptr), DtA(->v)); | 6803 | dasm_put(Dst, 4000, offsetof(GCfuncL, uvptr), DtA(->v)); |
| 6703 | break; | 6804 | break; |
| 6704 | case BC_USETV: | 6805 | case BC_USETV: |
| 6705 | dasm_put(Dst, 3976, 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); | 6806 | dasm_put(Dst, 4016, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->closed), DtA(->v), LJ_GC_BLACK, -LJ_TISGCV, -(LJ_TISNUM - LJ_TISGCV), Dt4(->gch.marked), -GG_DISP2G, LJ_GC_WHITES); |
| 6706 | if (LJ_TARGET_OSX) { | 6807 | if (LJ_TARGET_OSX) { |
| 6707 | dasm_put(Dst, 4016); | 6808 | dasm_put(Dst, 4056); |
| 6708 | } else { | 6809 | } else { |
| 6709 | dasm_put(Dst, 4023); | 6810 | dasm_put(Dst, 4063); |
| 6710 | } | 6811 | } |
| 6711 | dasm_put(Dst, 4026); | 6812 | dasm_put(Dst, 4066); |
| 6712 | break; | 6813 | break; |
| 6713 | case BC_USETS: | 6814 | case BC_USETS: |
| 6714 | dasm_put(Dst, 4029, offsetof(GCfuncL, uvptr), ~LJ_TSTR, DtA(->marked), DtA(->v), DtA(->closed), LJ_GC_BLACK, Dt5(->marked), LJ_GC_WHITES, -GG_DISP2G); | 6815 | dasm_put(Dst, 4069, offsetof(GCfuncL, uvptr), ~LJ_TSTR, DtA(->marked), DtA(->v), DtA(->closed), LJ_GC_BLACK, Dt5(->marked), LJ_GC_WHITES, -GG_DISP2G); |
| 6715 | if (LJ_TARGET_OSX) { | 6816 | if (LJ_TARGET_OSX) { |
| 6716 | dasm_put(Dst, 4065); | 6817 | dasm_put(Dst, 4105); |
| 6717 | } else { | 6818 | } else { |
| 6718 | dasm_put(Dst, 4072); | 6819 | dasm_put(Dst, 4112); |
| 6719 | } | 6820 | } |
| 6720 | dasm_put(Dst, 4075); | 6821 | dasm_put(Dst, 4115); |
| 6721 | break; | 6822 | break; |
| 6722 | case BC_USETN: | 6823 | case BC_USETN: |
| 6723 | dasm_put(Dst, 4078, offsetof(GCfuncL, uvptr), DtA(->v)); | 6824 | dasm_put(Dst, 4118, offsetof(GCfuncL, uvptr), DtA(->v)); |
| 6724 | break; | 6825 | break; |
| 6725 | case BC_USETP: | 6826 | case BC_USETP: |
| 6726 | dasm_put(Dst, 4095, offsetof(GCfuncL, uvptr), DtA(->v)); | 6827 | dasm_put(Dst, 4135, offsetof(GCfuncL, uvptr), DtA(->v)); |
| 6727 | break; | 6828 | break; |
| 6728 | 6829 | ||
| 6729 | case BC_UCLO: | 6830 | case BC_UCLO: |
| 6730 | dasm_put(Dst, 4111, Dt1(->openupval), Dt1(->base), Dt1(->base)); | 6831 | dasm_put(Dst, 4151, Dt1(->openupval), Dt1(->base), Dt1(->base)); |
| 6731 | break; | 6832 | break; |
| 6732 | 6833 | ||
| 6733 | case BC_FNEW: | 6834 | case BC_FNEW: |
| 6734 | dasm_put(Dst, 4134, Dt1(->base), Dt1(->base), ~LJ_TFUNC); | 6835 | dasm_put(Dst, 4174, Dt1(->base), Dt1(->base), ~LJ_TFUNC); |
| 6735 | break; | 6836 | break; |
| 6736 | 6837 | ||
| 6737 | /* -- Table ops --------------------------------------------------------- */ | 6838 | /* -- Table ops --------------------------------------------------------- */ |
| @@ -6739,115 +6840,115 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 6739 | case BC_TNEW: | 6840 | case BC_TNEW: |
| 6740 | case BC_TDUP: | 6841 | case BC_TDUP: |
| 6741 | if (op == BC_TDUP) { | 6842 | if (op == BC_TDUP) { |
| 6742 | dasm_put(Dst, 4155); | 6843 | dasm_put(Dst, 4195); |
| 6743 | } | 6844 | } |
| 6744 | dasm_put(Dst, 4157, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); | 6845 | dasm_put(Dst, 4197, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); |
| 6745 | if (op == BC_TNEW) { | 6846 | if (op == BC_TNEW) { |
| 6746 | dasm_put(Dst, 4170); | 6847 | dasm_put(Dst, 4210); |
| 6747 | } else { | 6848 | } else { |
| 6748 | dasm_put(Dst, 4179); | 6849 | dasm_put(Dst, 4219); |
| 6749 | } | 6850 | } |
| 6750 | dasm_put(Dst, 4183, Dt1(->base), ~LJ_TTAB); | 6851 | dasm_put(Dst, 4223, Dt1(->base), ~LJ_TTAB); |
| 6751 | break; | 6852 | break; |
| 6752 | 6853 | ||
| 6753 | case BC_GGET: | 6854 | case BC_GGET: |
| 6754 | case BC_GSET: | 6855 | case BC_GSET: |
| 6755 | dasm_put(Dst, 4201, Dt7(->env)); | 6856 | dasm_put(Dst, 4241, Dt7(->env)); |
| 6756 | if (op == BC_GGET) { | 6857 | if (op == BC_GGET) { |
| 6757 | dasm_put(Dst, 4207); | 6858 | dasm_put(Dst, 4247); |
| 6758 | } else { | 6859 | } else { |
| 6759 | dasm_put(Dst, 4210); | 6860 | dasm_put(Dst, 4250); |
| 6760 | } | 6861 | } |
| 6761 | break; | 6862 | break; |
| 6762 | 6863 | ||
| 6763 | case BC_TGETV: | 6864 | case BC_TGETV: |
| 6764 | dasm_put(Dst, 4213, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, -LJ_TSTR); | 6865 | dasm_put(Dst, 4253, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index, -LJ_TSTR); |
| 6765 | break; | 6866 | break; |
| 6766 | case BC_TGETS: | 6867 | case BC_TGETS: |
| 6767 | dasm_put(Dst, 4270, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), DtB(->key), DtB(->val), DtB(->next), -LJ_TSTR, -LJ_TNIL, Dt6(->metatable), ~LJ_TNIL, Dt6(->nomm)); | 6868 | dasm_put(Dst, 4310, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), DtB(->key), DtB(->val), DtB(->next), -LJ_TSTR, -LJ_TNIL, Dt6(->metatable), ~LJ_TNIL, Dt6(->nomm)); |
| 6768 | dasm_put(Dst, 4330, 1<<MM_index); | 6869 | dasm_put(Dst, 4370, 1<<MM_index); |
| 6769 | break; | 6870 | break; |
| 6770 | case BC_TGETB: | 6871 | case BC_TGETB: |
| 6771 | dasm_put(Dst, 4337, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); | 6872 | dasm_put(Dst, 4377, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); |
| 6772 | break; | 6873 | break; |
| 6773 | 6874 | ||
| 6774 | case BC_TSETV: | 6875 | case BC_TSETV: |
| 6775 | dasm_put(Dst, 4380, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); | 6876 | dasm_put(Dst, 4420, -LJ_TTAB, -LJ_TISNUM, Dt6(->array), Dt6(->asize), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); |
| 6776 | dasm_put(Dst, 4440, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TSTR); | 6877 | dasm_put(Dst, 4480, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist), -LJ_TSTR); |
| 6777 | break; | 6878 | break; |
| 6778 | case BC_TSETS: | 6879 | case BC_TSETS: |
| 6779 | dasm_put(Dst, 4461, -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)); | 6880 | dasm_put(Dst, 4501, -LJ_TTAB, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), DtB(->key), DtB(->val.it), DtB(->next), -LJ_TSTR, Dt6(->marked), -LJ_TNIL, LJ_GC_BLACK, DtB(->val)); |
| 6780 | dasm_put(Dst, 4519, 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); | 6881 | dasm_put(Dst, 4559, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, Dt6(->metatable), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, ~LJ_TSTR, Dt1(->base), DISPATCH_GL(gc.grayagain), LJ_GC_BLACK); |
| 6781 | dasm_put(Dst, 4572, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); | 6882 | dasm_put(Dst, 4612, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); |
| 6782 | break; | 6883 | break; |
| 6783 | case BC_TSETB: | 6884 | case BC_TSETB: |
| 6784 | dasm_put(Dst, 4581, -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); | 6885 | dasm_put(Dst, 4621, -LJ_TTAB, Dt6(->asize), Dt6(->array), -LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK); |
| 6785 | dasm_put(Dst, 4638, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); | 6886 | dasm_put(Dst, 4678, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); |
| 6786 | break; | 6887 | break; |
| 6787 | 6888 | ||
| 6788 | case BC_TSETM: | 6889 | case BC_TSETM: |
| 6789 | dasm_put(Dst, 4647, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt1(->base)); | 6890 | dasm_put(Dst, 4687, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt1(->base)); |
| 6790 | if (LJ_TARGET_OSX) { | 6891 | if (LJ_TARGET_OSX) { |
| 6791 | dasm_put(Dst, 4692, Dt1(->base)); | 6892 | dasm_put(Dst, 4732, Dt1(->base)); |
| 6792 | } | 6893 | } |
| 6793 | dasm_put(Dst, 4695, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); | 6894 | dasm_put(Dst, 4735, DISPATCH_GL(gc.grayagain), LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); |
| 6794 | break; | 6895 | break; |
| 6795 | 6896 | ||
| 6796 | /* -- Calls and vararg handling ----------------------------------------- */ | 6897 | /* -- Calls and vararg handling ----------------------------------------- */ |
| 6797 | 6898 | ||
| 6798 | case BC_CALLM: | 6899 | case BC_CALLM: |
| 6799 | dasm_put(Dst, 4711); | 6900 | dasm_put(Dst, 4751); |
| 6800 | break; | 6901 | break; |
| 6801 | case BC_CALL: | 6902 | case BC_CALL: |
| 6802 | dasm_put(Dst, 4717, -LJ_TFUNC, Dt7(->field_pc)); | 6903 | dasm_put(Dst, 4757, -LJ_TFUNC, Dt7(->field_pc)); |
| 6803 | break; | 6904 | break; |
| 6804 | 6905 | ||
| 6805 | case BC_CALLMT: | 6906 | case BC_CALLMT: |
| 6806 | dasm_put(Dst, 4737); | 6907 | dasm_put(Dst, 4777); |
| 6807 | break; | 6908 | break; |
| 6808 | case BC_CALLT: | 6909 | case BC_CALLT: |
| 6809 | dasm_put(Dst, 4742, -LJ_TFUNC, Dt7(->ffid), FRAME_TYPE, Dt7(->field_pc), Dt7(->field_pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP); | 6910 | dasm_put(Dst, 4782, -LJ_TFUNC, Dt7(->ffid), FRAME_TYPE, Dt7(->field_pc), Dt7(->field_pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP); |
| 6810 | dasm_put(Dst, 4803, FRAME_TYPE); | 6911 | dasm_put(Dst, 4843, FRAME_TYPE); |
| 6811 | break; | 6912 | break; |
| 6812 | 6913 | ||
| 6813 | case BC_ITERC: | 6914 | case BC_ITERC: |
| 6814 | dasm_put(Dst, 4814, -LJ_TFUNC, Dt7(->field_pc)); | 6915 | dasm_put(Dst, 4854, -LJ_TFUNC, Dt7(->field_pc)); |
| 6815 | break; | 6916 | break; |
| 6816 | 6917 | ||
| 6817 | case BC_ITERN: | 6918 | case BC_ITERN: |
| 6818 | #if LJ_HASJIT | 6919 | #if LJ_HASJIT |
| 6819 | #endif | 6920 | #endif |
| 6820 | dasm_put(Dst, 4838, Dt6(->asize), Dt6(->array), -LJ_TNIL, ~LJ_TISNUM, Dt6(->hmask), Dt6(->node), DtB(->val), -LJ_TNIL, DtB(->key)); | 6921 | dasm_put(Dst, 4878, Dt6(->asize), Dt6(->array), -LJ_TNIL, ~LJ_TISNUM, Dt6(->hmask), Dt6(->node), DtB(->val), -LJ_TNIL, DtB(->key)); |
| 6821 | break; | 6922 | break; |
| 6822 | 6923 | ||
| 6823 | case BC_ISNEXT: | 6924 | case BC_ISNEXT: |
| 6824 | dasm_put(Dst, 4903, -LJ_TFUNC, Dt8(->ffid), -LJ_TTAB, -LJ_TNIL, FF_next_N, BC_JMP, BC_ITERC); | 6925 | dasm_put(Dst, 4943, -LJ_TFUNC, Dt8(->ffid), -LJ_TTAB, -LJ_TNIL, FF_next_N, BC_JMP, BC_ITERC); |
| 6825 | break; | 6926 | break; |
| 6826 | 6927 | ||
| 6827 | case BC_VARG: | 6928 | case BC_VARG: |
| 6828 | dasm_put(Dst, 4942, FRAME_VARG, ~LJ_TNIL, Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->base)); | 6929 | dasm_put(Dst, 4982, FRAME_VARG, ~LJ_TNIL, Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->base)); |
| 6829 | break; | 6930 | break; |
| 6830 | 6931 | ||
| 6831 | /* -- Returns ----------------------------------------------------------- */ | 6932 | /* -- Returns ----------------------------------------------------------- */ |
| 6832 | 6933 | ||
| 6833 | case BC_RETM: | 6934 | case BC_RETM: |
| 6834 | dasm_put(Dst, 5014); | 6935 | dasm_put(Dst, 5054); |
| 6835 | break; | 6936 | break; |
| 6836 | 6937 | ||
| 6837 | case BC_RET: | 6938 | case BC_RET: |
| 6838 | dasm_put(Dst, 5021, FRAME_TYPE, FRAME_VARG, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL, FRAME_TYPEP); | 6939 | dasm_put(Dst, 5061, FRAME_TYPE, FRAME_VARG, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL, FRAME_TYPEP); |
| 6839 | break; | 6940 | break; |
| 6840 | 6941 | ||
| 6841 | case BC_RET0: case BC_RET1: | 6942 | case BC_RET0: case BC_RET1: |
| 6842 | dasm_put(Dst, 5086, FRAME_TYPE, FRAME_VARG); | 6943 | dasm_put(Dst, 5126, FRAME_TYPE, FRAME_VARG); |
| 6843 | if (op == BC_RET1) { | 6944 | if (op == BC_RET1) { |
| 6844 | dasm_put(Dst, 5097); | 6945 | dasm_put(Dst, 5137); |
| 6845 | } | 6946 | } |
| 6846 | dasm_put(Dst, 5099); | 6947 | dasm_put(Dst, 5139); |
| 6847 | if (op == BC_RET1) { | 6948 | if (op == BC_RET1) { |
| 6848 | dasm_put(Dst, 5102); | 6949 | dasm_put(Dst, 5142); |
| 6849 | } | 6950 | } |
| 6850 | dasm_put(Dst, 5104, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL); | 6951 | dasm_put(Dst, 5144, Dt7(->field_pc), PC2PROTO(k), ~LJ_TNIL); |
| 6851 | break; | 6952 | break; |
| 6852 | 6953 | ||
| 6853 | /* -- Loops and branches ------------------------------------------------ */ | 6954 | /* -- Loops and branches ------------------------------------------------ */ |
| @@ -6855,7 +6956,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 6855 | 6956 | ||
| 6856 | case BC_FORL: | 6957 | case BC_FORL: |
| 6857 | #if LJ_HASJIT | 6958 | #if LJ_HASJIT |
| 6858 | dasm_put(Dst, 5130); | 6959 | dasm_put(Dst, 5170, -GG_DISP2HOT); |
| 6859 | #endif | 6960 | #endif |
| 6860 | break; | 6961 | break; |
| 6861 | 6962 | ||
| @@ -6867,63 +6968,66 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 6867 | case BC_FORI: | 6968 | case BC_FORI: |
| 6868 | case BC_IFORL: | 6969 | case BC_IFORL: |
| 6869 | vk = (op == BC_IFORL || op == BC_JFORL); | 6970 | vk = (op == BC_IFORL || op == BC_JFORL); |
| 6870 | dasm_put(Dst, 5132); | 6971 | dasm_put(Dst, 5180); |
| 6972 | if (op != BC_JFORL) { | ||
| 6973 | dasm_put(Dst, 5182); | ||
| 6974 | } | ||
| 6871 | if (!vk) { | 6975 | if (!vk) { |
| 6872 | dasm_put(Dst, 5135, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); | 6976 | dasm_put(Dst, 5184, -LJ_TISNUM, -LJ_TISNUM, -LJ_TISNUM); |
| 6873 | } else { | 6977 | } else { |
| 6874 | dasm_put(Dst, 5153, -LJ_TISNUM); | 6978 | dasm_put(Dst, 5202, -LJ_TISNUM); |
| 6875 | if (op == BC_IFORL) { | 6979 | if (op == BC_IFORL) { |
| 6876 | dasm_put(Dst, 5161); | 6980 | dasm_put(Dst, 5210); |
| 6877 | } else { | 6981 | } else { |
| 6878 | dasm_put(Dst, 5163); | 6982 | dasm_put(Dst, 5212); |
| 6879 | } | 6983 | } |
| 6880 | dasm_put(Dst, 5165); | 6984 | dasm_put(Dst, 5215); |
| 6881 | } | 6985 | } |
| 6882 | dasm_put(Dst, 5170); | 6986 | dasm_put(Dst, 5220); |
| 6883 | if (op == BC_FORI) { | 6987 | if (op == BC_FORI) { |
| 6884 | dasm_put(Dst, 5172); | 6988 | dasm_put(Dst, 5222); |
| 6885 | } else if (op == BC_JFORI) { | 6989 | } else if (op == BC_JFORI) { |
| 6886 | dasm_put(Dst, 5174); | 6990 | dasm_put(Dst, 5224, BC_JLOOP); |
| 6887 | } else if (op == BC_IFORL) { | 6991 | } else if (op == BC_IFORL) { |
| 6888 | dasm_put(Dst, 5176); | 6992 | dasm_put(Dst, 5229); |
| 6889 | } else { | 6993 | } else { |
| 6890 | dasm_put(Dst, 5178); | 6994 | dasm_put(Dst, 5231, BC_JLOOP); |
| 6891 | } | 6995 | } |
| 6892 | if (vk) { | 6996 | if (vk) { |
| 6893 | dasm_put(Dst, 5180); | 6997 | dasm_put(Dst, 5234); |
| 6894 | } | 6998 | } |
| 6895 | dasm_put(Dst, 5182); | 6999 | dasm_put(Dst, 5236); |
| 6896 | if (!vk) { | 7000 | if (!vk) { |
| 6897 | dasm_put(Dst, 5192); | 7001 | dasm_put(Dst, 5247); |
| 6898 | } else { | 7002 | } else { |
| 6899 | dasm_put(Dst, 5194); | 7003 | dasm_put(Dst, 5249); |
| 6900 | } | 7004 | } |
| 6901 | dasm_put(Dst, 5196); | 7005 | dasm_put(Dst, 5251); |
| 6902 | if (!vk) { | 7006 | if (!vk) { |
| 6903 | dasm_put(Dst, 5200, -LJ_TISNUM, -LJ_TISNUM); | 7007 | dasm_put(Dst, 5255, -LJ_TISNUM, -LJ_TISNUM); |
| 6904 | } else { | 7008 | } else { |
| 6905 | dasm_put(Dst, 5212); | 7009 | dasm_put(Dst, 5267); |
| 6906 | } | 7010 | } |
| 6907 | dasm_put(Dst, 5221); | 7011 | dasm_put(Dst, 5276); |
| 6908 | if (op == BC_FORI) { | 7012 | if (op == BC_FORI) { |
| 6909 | dasm_put(Dst, 5225); | 7013 | dasm_put(Dst, 5280); |
| 6910 | } else if (op == BC_JFORI) { | 7014 | } else if (op == BC_JFORI) { |
| 6911 | dasm_put(Dst, 5227); | 7015 | dasm_put(Dst, 5282, BC_JLOOP); |
| 6912 | } else if (op == BC_IFORL) { | 7016 | } else if (op == BC_IFORL) { |
| 6913 | dasm_put(Dst, 5229); | 7017 | dasm_put(Dst, 5287); |
| 6914 | } else { | 7018 | } else { |
| 6915 | dasm_put(Dst, 5231); | 7019 | dasm_put(Dst, 5289, BC_JLOOP); |
| 6916 | } | 7020 | } |
| 6917 | dasm_put(Dst, 5233); | 7021 | dasm_put(Dst, 5292); |
| 6918 | if (vk) { | 7022 | if (vk) { |
| 6919 | dasm_put(Dst, 5239); | 7023 | dasm_put(Dst, 5298); |
| 6920 | } | 7024 | } |
| 6921 | dasm_put(Dst, 5244); | 7025 | dasm_put(Dst, 5303); |
| 6922 | break; | 7026 | break; |
| 6923 | 7027 | ||
| 6924 | case BC_ITERL: | 7028 | case BC_ITERL: |
| 6925 | #if LJ_HASJIT | 7029 | #if LJ_HASJIT |
| 6926 | dasm_put(Dst, 5250); | 7030 | dasm_put(Dst, 5309, -GG_DISP2HOT); |
| 6927 | #endif | 7031 | #endif |
| 6928 | break; | 7032 | break; |
| 6929 | 7033 | ||
| @@ -6932,40 +7036,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 6932 | break; | 7036 | break; |
| 6933 | #endif | 7037 | #endif |
| 6934 | case BC_IITERL: | 7038 | case BC_IITERL: |
| 6935 | dasm_put(Dst, 5252); | 7039 | dasm_put(Dst, 5319); |
| 6936 | if (op == BC_JITERL) { | 7040 | if (op == BC_JITERL) { |
| 6937 | dasm_put(Dst, 5254); | 7041 | dasm_put(Dst, 5321, -LJ_TNIL, BC_JLOOP); |
| 6938 | } else { | 7042 | } else { |
| 6939 | dasm_put(Dst, 5256, -LJ_TNIL); | 7043 | dasm_put(Dst, 5327, -LJ_TNIL); |
| 6940 | } | 7044 | } |
| 6941 | dasm_put(Dst, 5262); | 7045 | dasm_put(Dst, 5333); |
| 6942 | break; | 7046 | break; |
| 6943 | 7047 | ||
| 6944 | case BC_LOOP: | 7048 | case BC_LOOP: |
| 6945 | #if LJ_HASJIT | 7049 | #if LJ_HASJIT |
| 6946 | dasm_put(Dst, 5269); | 7050 | dasm_put(Dst, 5340, -GG_DISP2HOT); |
| 6947 | #endif | 7051 | #endif |
| 6948 | break; | 7052 | break; |
| 6949 | 7053 | ||
| 6950 | case BC_ILOOP: | 7054 | case BC_ILOOP: |
| 6951 | dasm_put(Dst, 5271); | 7055 | dasm_put(Dst, 5350); |
| 6952 | break; | 7056 | break; |
| 6953 | 7057 | ||
| 6954 | case BC_JLOOP: | 7058 | case BC_JLOOP: |
| 6955 | #if LJ_HASJIT | 7059 | #if LJ_HASJIT |
| 6956 | dasm_put(Dst, 5278); | 7060 | dasm_put(Dst, 5357, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); |
| 6957 | #endif | 7061 | #endif |
| 6958 | break; | 7062 | break; |
| 6959 | 7063 | ||
| 6960 | case BC_JMP: | 7064 | case BC_JMP: |
| 6961 | dasm_put(Dst, 5280); | 7065 | dasm_put(Dst, 5368); |
| 6962 | break; | 7066 | break; |
| 6963 | 7067 | ||
| 6964 | /* -- Function headers -------------------------------------------------- */ | 7068 | /* -- Function headers -------------------------------------------------- */ |
| 6965 | 7069 | ||
| 6966 | case BC_FUNCF: | 7070 | case BC_FUNCF: |
| 6967 | #if LJ_HASJIT | 7071 | #if LJ_HASJIT |
| 6968 | dasm_put(Dst, 5289); | 7072 | dasm_put(Dst, 5377, -GG_DISP2HOT); |
| 6969 | #endif | 7073 | #endif |
| 6970 | case BC_FUNCV: /* NYI: compiled vararg functions. */ | 7074 | case BC_FUNCV: /* NYI: compiled vararg functions. */ |
| 6971 | break; | 7075 | break; |
| @@ -6975,38 +7079,38 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
| 6975 | break; | 7079 | break; |
| 6976 | #endif | 7080 | #endif |
| 6977 | case BC_IFUNCF: | 7081 | case BC_IFUNCF: |
| 6978 | dasm_put(Dst, 5291, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), ~LJ_TNIL); | 7082 | dasm_put(Dst, 5387, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), ~LJ_TNIL); |
| 6979 | if (op == BC_JFUNCF) { | 7083 | if (op == BC_JFUNCF) { |
| 6980 | dasm_put(Dst, 5309); | 7084 | dasm_put(Dst, 5405, BC_JLOOP); |
| 6981 | } else { | 7085 | } else { |
| 6982 | dasm_put(Dst, 5311); | 7086 | dasm_put(Dst, 5409); |
| 6983 | } | 7087 | } |
| 6984 | dasm_put(Dst, 5316); | 7088 | dasm_put(Dst, 5414); |
| 6985 | break; | 7089 | break; |
| 6986 | 7090 | ||
| 6987 | case BC_JFUNCV: | 7091 | case BC_JFUNCV: |
| 6988 | #if !LJ_HASJIT | 7092 | #if !LJ_HASJIT |
| 6989 | break; | 7093 | break; |
| 6990 | #endif | 7094 | #endif |
| 6991 | dasm_put(Dst, 5322); | 7095 | dasm_put(Dst, 5420); |
| 6992 | break; /* NYI: compiled vararg functions. */ | 7096 | break; /* NYI: compiled vararg functions. */ |
| 6993 | 7097 | ||
| 6994 | case BC_IFUNCV: | 7098 | case BC_IFUNCV: |
| 6995 | dasm_put(Dst, 5324, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), ~LJ_TNIL); | 7099 | dasm_put(Dst, 5422, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams), ~LJ_TNIL); |
| 6996 | break; | 7100 | break; |
| 6997 | 7101 | ||
| 6998 | case BC_FUNCC: | 7102 | case BC_FUNCC: |
| 6999 | case BC_FUNCCW: | 7103 | case BC_FUNCCW: |
| 7000 | if (op == BC_FUNCC) { | 7104 | if (op == BC_FUNCC) { |
| 7001 | dasm_put(Dst, 5365, Dt8(->f)); | 7105 | dasm_put(Dst, 5463, Dt8(->f)); |
| 7002 | } else { | 7106 | } else { |
| 7003 | dasm_put(Dst, 5368, DISPATCH_GL(wrapf)); | 7107 | dasm_put(Dst, 5466, DISPATCH_GL(wrapf)); |
| 7004 | } | 7108 | } |
| 7005 | dasm_put(Dst, 5371, Dt1(->maxstack), Dt1(->base), Dt1(->top)); | 7109 | dasm_put(Dst, 5469, Dt1(->maxstack), Dt1(->base), Dt1(->top)); |
| 7006 | if (op == BC_FUNCCW) { | 7110 | if (op == BC_FUNCCW) { |
| 7007 | dasm_put(Dst, 5381, Dt8(->f)); | 7111 | dasm_put(Dst, 5479, Dt8(->f)); |
| 7008 | } | 7112 | } |
| 7009 | dasm_put(Dst, 5384, LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate)); | 7113 | dasm_put(Dst, 5482, LJ_VMST_C, DISPATCH_GL(vmstate), Dt1(->base), LJ_VMST_INTERP, Dt1(->top), DISPATCH_GL(vmstate)); |
| 7010 | break; | 7114 | break; |
| 7011 | 7115 | ||
| 7012 | /* ---------------------------------------------------------------------- */ | 7116 | /* ---------------------------------------------------------------------- */ |
| @@ -7026,7 +7130,7 @@ static int build_backend(BuildCtx *ctx) | |||
| 7026 | 7130 | ||
| 7027 | build_subroutines(ctx); | 7131 | build_subroutines(ctx); |
| 7028 | 7132 | ||
| 7029 | dasm_put(Dst, 5406); | 7133 | dasm_put(Dst, 5504); |
| 7030 | for (op = 0; op < BC__MAX; op++) | 7134 | for (op = 0; op < BC__MAX; op++) |
| 7031 | build_ins(ctx, (BCOp)op, op); | 7135 | build_ins(ctx, (BCOp)op, op); |
| 7032 | 7136 | ||
