aboutsummaryrefslogtreecommitdiff
path: root/src/buildvm_ppcspe.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/buildvm_ppcspe.h188
1 files changed, 106 insertions, 82 deletions
diff --git a/src/buildvm_ppcspe.h b/src/buildvm_ppcspe.h
index 0855fda8..8a10c24a 100644
--- a/src/buildvm_ppcspe.h
+++ b/src/buildvm_ppcspe.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[4928] = { 15static const unsigned int build_actionlist[4947] = {
160x00010001, 160x00010001,
170x00060014, 170x00060014,
180x72000000, 180x72000000,
@@ -3372,6 +3372,25 @@ static const unsigned int build_actionlist[4928] = {
33720x7c0903a6, 33720x7c0903a6,
33730x4e800420, 33730x4e800420,
33740x00000000, 33740x00000000,
33750x80f00000,
33760x3a100004,
33770x5588007e,
33780x000900ab,
33790x2108fffc,
33800x7c0f402e,
33810x39200000,
33820x00098200,
33830x1009022d,
33840x100ea320,
33850x54e815ba,
33860x54ea5d78,
33870x54ec9b78,
33880x7c11402e,
33890x54f4dd78,
33900x54eb9d78,
33910x7c0903a6,
33920x4e800420,
33930x00000000,
33750x558800fe, 33940x558800fe,
33760x000900ab, 33950x000900ab,
33770x7d080734, 33960x7d080734,
@@ -5619,158 +5638,163 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
5619 case BC_KSTR: 5638 case BC_KSTR:
5620 dasm_put(Dst, 3342, 32-1); 5639 dasm_put(Dst, 3342, 32-1);
5621 break; 5640 break;
5641 case BC_KCDATA:
5642#if LJ_HASFFI
5643 dasm_put(Dst, 3359, 32-1, LJ_TCDATA);
5644#endif
5645 break;
5622 case BC_KSHORT: 5646 case BC_KSHORT:
5623 dasm_put(Dst, 3359, 32-3); 5647 dasm_put(Dst, 3378, 32-3);
5624 break; 5648 break;
5625 case BC_KNUM: 5649 case BC_KNUM:
5626 dasm_put(Dst, 3375); 5650 dasm_put(Dst, 3394);
5627 break; 5651 break;
5628 case BC_KPRI: 5652 case BC_KPRI:
5629 dasm_put(Dst, 3388, 32-3); 5653 dasm_put(Dst, 3407, 32-3);
5630 break; 5654 break;
5631 case BC_KNIL: 5655 case BC_KNIL:
5632 dasm_put(Dst, 3403); 5656 dasm_put(Dst, 3422);
5633 break; 5657 break;
5634 5658
5635 /* -- Upvalue and function ops ------------------------------------------ */ 5659 /* -- Upvalue and function ops ------------------------------------------ */
5636 5660
5637 case BC_UGET: 5661 case BC_UGET:
5638 dasm_put(Dst, 3422, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); 5662 dasm_put(Dst, 3441, 32-1, offsetof(GCfuncL, uvptr), DtA(->v));
5639 break; 5663 break;
5640 case BC_USETV: 5664 case BC_USETV:
5641 dasm_put(Dst, 3443, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -LJ_TISNUM, LJ_TISGCV - LJ_TISNUM, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); 5665 dasm_put(Dst, 3462, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, DtA(->closed), -LJ_TISNUM, LJ_TISGCV - LJ_TISNUM, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G);
5642 break; 5666 break;
5643 case BC_USETS: 5667 case BC_USETS:
5644 dasm_put(Dst, 3495, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_GC_WHITES, GG_DISP2G); 5668 dasm_put(Dst, 3514, 32-1, 32-1, offsetof(GCfuncL, uvptr), DtA(->marked), DtA(->v), LJ_GC_BLACK, Dt5(->marked), DtA(->closed), LJ_GC_WHITES, GG_DISP2G);
5645 break; 5669 break;
5646 case BC_USETN: 5670 case BC_USETN:
5647 dasm_put(Dst, 3544, 32-1, offsetof(GCfuncL, uvptr), DtA(->v)); 5671 dasm_put(Dst, 3563, 32-1, offsetof(GCfuncL, uvptr), DtA(->v));
5648 break; 5672 break;
5649 case BC_USETP: 5673 case BC_USETP:
5650 dasm_put(Dst, 3565, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v)); 5674 dasm_put(Dst, 3584, 32-1, offsetof(GCfuncL, uvptr), 32-3, DtA(->v));
5651 break; 5675 break;
5652 5676
5653 case BC_UCLO: 5677 case BC_UCLO:
5654 dasm_put(Dst, 3588, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base)); 5678 dasm_put(Dst, 3607, Dt1(->openupval), 32-1, -(BCBIAS_J*4 >> 16), Dt1(->base), Dt1(->base));
5655 break; 5679 break;
5656 5680
5657 case BC_FNEW: 5681 case BC_FNEW:
5658 dasm_put(Dst, 3618, 32-1, Dt1(->base), Dt1(->base)); 5682 dasm_put(Dst, 3637, 32-1, Dt1(->base), Dt1(->base));
5659 break; 5683 break;
5660 5684
5661 /* -- Table ops --------------------------------------------------------- */ 5685 /* -- Table ops --------------------------------------------------------- */
5662 5686
5663 case BC_TNEW: 5687 case BC_TNEW:
5664 case BC_TDUP: 5688 case BC_TDUP:
5665 dasm_put(Dst, 3644, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base)); 5689 dasm_put(Dst, 3663, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base));
5666 if (op == BC_TNEW) { 5690 if (op == BC_TNEW) {
5667 dasm_put(Dst, 3657); 5691 dasm_put(Dst, 3676);
5668 } else { 5692 } else {
5669 dasm_put(Dst, 3665, 32-1); 5693 dasm_put(Dst, 3684, 32-1);
5670 } 5694 }
5671 dasm_put(Dst, 3672, Dt1(->base)); 5695 dasm_put(Dst, 3691, Dt1(->base));
5672 break; 5696 break;
5673 5697
5674 case BC_GGET: 5698 case BC_GGET:
5675 case BC_GSET: 5699 case BC_GSET:
5676 dasm_put(Dst, 3695, 32-1, Dt7(->env)); 5700 dasm_put(Dst, 3714, 32-1, Dt7(->env));
5677 if (op == BC_GGET) { 5701 if (op == BC_GGET) {
5678 dasm_put(Dst, 3703); 5702 dasm_put(Dst, 3722);
5679 } else { 5703 } else {
5680 dasm_put(Dst, 3706); 5704 dasm_put(Dst, 3725);
5681 } 5705 }
5682 break; 5706 break;
5683 5707
5684 case BC_TGETV: 5708 case BC_TGETV:
5685 dasm_put(Dst, 3709, Dt6(->asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 5709 dasm_put(Dst, 3728, Dt6(->asize), Dt6(->array), 31-3, Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
5686 break; 5710 break;
5687 case BC_TGETS: 5711 case BC_TGETS:
5688 dasm_put(Dst, 3767, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 5712 dasm_put(Dst, 3786, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), 31-5, 31-3, DtB(->key), DtB(->val), DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
5689 dasm_put(Dst, 3831); 5713 dasm_put(Dst, 3850);
5690 break; 5714 break;
5691 case BC_TGETB: 5715 case BC_TGETB:
5692 dasm_put(Dst, 3836, 32-3, Dt6(->asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<<MM_index); 5716 dasm_put(Dst, 3855, 32-3, Dt6(->asize), Dt6(->array), Dt6(->metatable), Dt6(->nomm), 1<<MM_index);
5693 break; 5717 break;
5694 5718
5695 case BC_TSETV: 5719 case BC_TSETV:
5696 dasm_put(Dst, 3880, Dt6(->asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex); 5720 dasm_put(Dst, 3899, Dt6(->asize), Dt6(->array), 31-3, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex);
5697 dasm_put(Dst, 3947, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 5721 dasm_put(Dst, 3966, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
5698 break; 5722 break;
5699 case BC_TSETS: 5723 case BC_TSETS:
5700 dasm_put(Dst, 3959, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), DtB(->val), LJ_GC_BLACK, DtB(->val), Dt6(->metatable)); 5724 dasm_put(Dst, 3978, 32-1, Dt6(->hmask), Dt5(->hash), Dt6(->node), Dt6(->nomm), 31-5, 31-3, Dt6(->marked), DtB(->key), DtB(->val), LJ_GC_BLACK, DtB(->val), Dt6(->metatable));
5701 dasm_put(Dst, 4020, Dt6(->nomm), 1<<MM_newindex, DtB(->next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain)); 5725 dasm_put(Dst, 4039, Dt6(->nomm), 1<<MM_newindex, DtB(->next), Dt6(->metatable), DISPATCH_GL(tmptv), Dt1(->base), Dt6(->nomm), 1<<MM_newindex, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain));
5702 dasm_put(Dst, 4071, Dt6(->marked), Dt6(->gclist)); 5726 dasm_put(Dst, 4090, Dt6(->marked), Dt6(->gclist));
5703 break; 5727 break;
5704 case BC_TSETB: 5728 case BC_TSETB:
5705 dasm_put(Dst, 4078, 32-3, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked)); 5729 dasm_put(Dst, 4097, 32-3, Dt6(->asize), Dt6(->array), Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->nomm), 1<<MM_newindex, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked));
5706 dasm_put(Dst, 4138, Dt6(->gclist)); 5730 dasm_put(Dst, 4157, Dt6(->gclist));
5707 break; 5731 break;
5708 5732
5709 case BC_TSETM: 5733 case BC_TSETM:
5710 dasm_put(Dst, 4143, 32-3, Dt6(->asize), 31-3, Dt6(->marked), Dt6(->array), LJ_GC_BLACK, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist)); 5734 dasm_put(Dst, 4162, 32-3, Dt6(->asize), 31-3, Dt6(->marked), Dt6(->array), LJ_GC_BLACK, Dt1(->base), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->marked), Dt6(->gclist));
5711 dasm_put(Dst, 4212); 5735 dasm_put(Dst, 4231);
5712 break; 5736 break;
5713 5737
5714 /* -- Calls and vararg handling ----------------------------------------- */ 5738 /* -- Calls and vararg handling ----------------------------------------- */
5715 5739
5716 case BC_CALLM: 5740 case BC_CALLM:
5717 dasm_put(Dst, 4215); 5741 dasm_put(Dst, 4234);
5718 break; 5742 break;
5719 case BC_CALL: 5743 case BC_CALL:
5720 dasm_put(Dst, 4217, Dt7(->pc)); 5744 dasm_put(Dst, 4236, Dt7(->pc));
5721 break; 5745 break;
5722 5746
5723 case BC_CALLMT: 5747 case BC_CALLMT:
5724 dasm_put(Dst, 4237); 5748 dasm_put(Dst, 4256);
5725 break; 5749 break;
5726 case BC_CALLT: 5750 case BC_CALLT:
5727 dasm_put(Dst, 4239, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); 5751 dasm_put(Dst, 4258, FRAME_TYPE, Dt7(->ffid), FRAME_VARG, Dt7(->pc), -4-8, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP);
5728 dasm_put(Dst, 4304, FRAME_TYPE); 5752 dasm_put(Dst, 4323, FRAME_TYPE);
5729 break; 5753 break;
5730 5754
5731 case BC_ITERC: 5755 case BC_ITERC:
5732 dasm_put(Dst, 4311, Dt7(->pc)); 5756 dasm_put(Dst, 4330, Dt7(->pc));
5733 break; 5757 break;
5734 5758
5735 case BC_ITERN: 5759 case BC_ITERN:
5736#if LJ_HASJIT 5760#if LJ_HASJIT
5737#endif 5761#endif
5738 dasm_put(Dst, 4337, Dt6(->asize), Dt6(->array), 31-3, -(BCBIAS_J*4 >> 16), Dt6(->hmask), Dt6(->node), 31-5, 31-3, DtB(->key), -(BCBIAS_J*4 >> 16)); 5762 dasm_put(Dst, 4356, Dt6(->asize), Dt6(->array), 31-3, -(BCBIAS_J*4 >> 16), Dt6(->hmask), Dt6(->node), 31-5, 31-3, DtB(->key), -(BCBIAS_J*4 >> 16));
5739 dasm_put(Dst, 4416); 5763 dasm_put(Dst, 4435);
5740 break; 5764 break;
5741 5765
5742 case BC_ISNEXT: 5766 case BC_ISNEXT:
5743 dasm_put(Dst, 4420, LJ_TTAB, LJ_TFUNC, LJ_TNIL, Dt8(->ffid), FF_next_N, 32-1, -(BCBIAS_J*4 >> 16), BC_JMP, BC_ITERC, -(BCBIAS_J*4 >> 16)); 5767 dasm_put(Dst, 4439, LJ_TTAB, LJ_TFUNC, LJ_TNIL, Dt8(->ffid), FF_next_N, 32-1, -(BCBIAS_J*4 >> 16), BC_JMP, BC_ITERC, -(BCBIAS_J*4 >> 16));
5744 break; 5768 break;
5745 5769
5746 case BC_VARG: 5770 case BC_VARG:
5747 dasm_put(Dst, 4471, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base)); 5771 dasm_put(Dst, 4490, FRAME_VARG, Dt1(->maxstack), Dt1(->top), Dt1(->base), 32-3, Dt1(->base));
5748 dasm_put(Dst, 4551); 5772 dasm_put(Dst, 4570);
5749 break; 5773 break;
5750 5774
5751 /* -- Returns ----------------------------------------------------------- */ 5775 /* -- Returns ----------------------------------------------------------- */
5752 5776
5753 case BC_RETM: 5777 case BC_RETM:
5754 dasm_put(Dst, 4557); 5778 dasm_put(Dst, 4576);
5755 break; 5779 break;
5756 5780
5757 case BC_RET: 5781 case BC_RET:
5758 dasm_put(Dst, 4559, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP); 5782 dasm_put(Dst, 4578, FRAME_TYPE, FRAME_VARG, Dt7(->pc), PC2PROTO(k), FRAME_TYPEP);
5759 break; 5783 break;
5760 5784
5761 case BC_RET0: case BC_RET1: 5785 case BC_RET0: case BC_RET1:
5762 dasm_put(Dst, 4629, FRAME_TYPE, FRAME_VARG); 5786 dasm_put(Dst, 4648, FRAME_TYPE, FRAME_VARG);
5763 if (op == BC_RET1) { 5787 if (op == BC_RET1) {
5764 dasm_put(Dst, 4642); 5788 dasm_put(Dst, 4661);
5765 } 5789 }
5766 dasm_put(Dst, 4645, Dt7(->pc), PC2PROTO(k)); 5790 dasm_put(Dst, 4664, Dt7(->pc), PC2PROTO(k));
5767 break; 5791 break;
5768 5792
5769 /* -- Loops and branches ------------------------------------------------ */ 5793 /* -- Loops and branches ------------------------------------------------ */
5770 5794
5771 case BC_FORL: 5795 case BC_FORL:
5772#if LJ_HASJIT 5796#if LJ_HASJIT
5773 dasm_put(Dst, 4673); 5797 dasm_put(Dst, 4692);
5774#endif 5798#endif
5775 break; 5799 break;
5776 5800
@@ -5782,35 +5806,35 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
5782 case BC_FORI: 5806 case BC_FORI:
5783 case BC_IFORL: 5807 case BC_IFORL:
5784 vk = (op == BC_IFORL || op == BC_JFORL); 5808 vk = (op == BC_IFORL || op == BC_JFORL);
5785 dasm_put(Dst, 4675, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8); 5809 dasm_put(Dst, 4694, FORL_IDX*8, FORL_STEP*8, FORL_STOP*8);
5786 if (!vk) { 5810 if (!vk) {
5787 dasm_put(Dst, 4683); 5811 dasm_put(Dst, 4702);
5788 } 5812 }
5789 if (vk) { 5813 if (vk) {
5790 dasm_put(Dst, 4691, FORL_IDX*8); 5814 dasm_put(Dst, 4710, FORL_IDX*8);
5791 } 5815 }
5792 dasm_put(Dst, 4695, FORL_EXT*8); 5816 dasm_put(Dst, 4714, FORL_EXT*8);
5793 if (op != BC_JFORL) { 5817 if (op != BC_JFORL) {
5794 dasm_put(Dst, 4703, 32-1); 5818 dasm_put(Dst, 4722, 32-1);
5795 if (op == BC_JFORI) { 5819 if (op == BC_JFORI) {
5796 dasm_put(Dst, 4707, -(BCBIAS_J*4 >> 16)); 5820 dasm_put(Dst, 4726, -(BCBIAS_J*4 >> 16));
5797 } else { 5821 } else {
5798 dasm_put(Dst, 4710, -(BCBIAS_J*4 >> 16)); 5822 dasm_put(Dst, 4729, -(BCBIAS_J*4 >> 16));
5799 } 5823 }
5800 } 5824 }
5801 if (op == BC_FORI) { 5825 if (op == BC_FORI) {
5802 dasm_put(Dst, 4713); 5826 dasm_put(Dst, 4732);
5803 } else if (op == BC_IFORL) { 5827 } else if (op == BC_IFORL) {
5804 dasm_put(Dst, 4715); 5828 dasm_put(Dst, 4734);
5805 } else { 5829 } else {
5806 dasm_put(Dst, 4717, BC_JLOOP); 5830 dasm_put(Dst, 4736, BC_JLOOP);
5807 } 5831 }
5808 dasm_put(Dst, 4720); 5832 dasm_put(Dst, 4739);
5809 break; 5833 break;
5810 5834
5811 case BC_ITERL: 5835 case BC_ITERL:
5812#if LJ_HASJIT 5836#if LJ_HASJIT
5813 dasm_put(Dst, 4735); 5837 dasm_put(Dst, 4754);
5814#endif 5838#endif
5815 break; 5839 break;
5816 5840
@@ -5819,40 +5843,40 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
5819 break; 5843 break;
5820#endif 5844#endif
5821 case BC_IITERL: 5845 case BC_IITERL:
5822 dasm_put(Dst, 4737); 5846 dasm_put(Dst, 4756);
5823 if (op == BC_JITERL) { 5847 if (op == BC_JITERL) {
5824 dasm_put(Dst, 4743); 5848 dasm_put(Dst, 4762);
5825 } else { 5849 } else {
5826 dasm_put(Dst, 4745, 32-1, -(BCBIAS_J*4 >> 16)); 5850 dasm_put(Dst, 4764, 32-1, -(BCBIAS_J*4 >> 16));
5827 } 5851 }
5828 dasm_put(Dst, 4752); 5852 dasm_put(Dst, 4771);
5829 break; 5853 break;
5830 5854
5831 case BC_LOOP: 5855 case BC_LOOP:
5832#if LJ_HASJIT 5856#if LJ_HASJIT
5833 dasm_put(Dst, 4764); 5857 dasm_put(Dst, 4783);
5834#endif 5858#endif
5835 break; 5859 break;
5836 5860
5837 case BC_ILOOP: 5861 case BC_ILOOP:
5838 dasm_put(Dst, 4766); 5862 dasm_put(Dst, 4785);
5839 break; 5863 break;
5840 5864
5841 case BC_JLOOP: 5865 case BC_JLOOP:
5842#if LJ_HASJIT 5866#if LJ_HASJIT
5843 dasm_put(Dst, 4777); 5867 dasm_put(Dst, 4796);
5844#endif 5868#endif
5845 break; 5869 break;
5846 5870
5847 case BC_JMP: 5871 case BC_JMP:
5848 dasm_put(Dst, 4779, 32-1, -(BCBIAS_J*4 >> 16)); 5872 dasm_put(Dst, 4798, 32-1, -(BCBIAS_J*4 >> 16));
5849 break; 5873 break;
5850 5874
5851 /* -- Function headers -------------------------------------------------- */ 5875 /* -- Function headers -------------------------------------------------- */
5852 5876
5853 case BC_FUNCF: 5877 case BC_FUNCF:
5854#if LJ_HASJIT 5878#if LJ_HASJIT
5855 dasm_put(Dst, 4795); 5879 dasm_put(Dst, 4814);
5856#endif 5880#endif
5857 case BC_FUNCV: /* NYI: compiled vararg functions. */ 5881 case BC_FUNCV: /* NYI: compiled vararg functions. */
5858 break; 5882 break;
@@ -5862,38 +5886,38 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
5862 break; 5886 break;
5863#endif 5887#endif
5864 case BC_IFUNCF: 5888 case BC_IFUNCF:
5865 dasm_put(Dst, 4797, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3); 5889 dasm_put(Dst, 4816, Dt1(->maxstack), -4+PC2PROTO(numparams), -4+PC2PROTO(k), 31-3);
5866 if (op == BC_JFUNCF) { 5890 if (op == BC_JFUNCF) {
5867 dasm_put(Dst, 4815); 5891 dasm_put(Dst, 4834);
5868 } else { 5892 } else {
5869 dasm_put(Dst, 4817); 5893 dasm_put(Dst, 4836);
5870 } 5894 }
5871 dasm_put(Dst, 4826); 5895 dasm_put(Dst, 4845);
5872 break; 5896 break;
5873 5897
5874 case BC_JFUNCV: 5898 case BC_JFUNCV:
5875#if !LJ_HASJIT 5899#if !LJ_HASJIT
5876 break; 5900 break;
5877#endif 5901#endif
5878 dasm_put(Dst, 4832); 5902 dasm_put(Dst, 4851);
5879 break; /* NYI: compiled vararg functions. */ 5903 break; /* NYI: compiled vararg functions. */
5880 5904
5881 case BC_IFUNCV: 5905 case BC_IFUNCV:
5882 dasm_put(Dst, 4834, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams)); 5906 dasm_put(Dst, 4853, Dt1(->maxstack), 8+FRAME_VARG, -4+PC2PROTO(k), -4+PC2PROTO(numparams));
5883 break; 5907 break;
5884 5908
5885 case BC_FUNCC: 5909 case BC_FUNCC:
5886 case BC_FUNCCW: 5910 case BC_FUNCCW:
5887 if (op == BC_FUNCC) { 5911 if (op == BC_FUNCC) {
5888 dasm_put(Dst, 4884, Dt8(->f)); 5912 dasm_put(Dst, 4903, Dt8(->f));
5889 } else { 5913 } else {
5890 dasm_put(Dst, 4887, DISPATCH_GL(wrapf)); 5914 dasm_put(Dst, 4906, DISPATCH_GL(wrapf));
5891 } 5915 }
5892 dasm_put(Dst, 4890, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C); 5916 dasm_put(Dst, 4909, Dt1(->maxstack), Dt1(->base), Dt1(->top), ~LJ_VMST_C);
5893 if (op == BC_FUNCCW) { 5917 if (op == BC_FUNCCW) {
5894 dasm_put(Dst, 4903, Dt8(->f)); 5918 dasm_put(Dst, 4922, Dt8(->f));
5895 } 5919 }
5896 dasm_put(Dst, 4906, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate)); 5920 dasm_put(Dst, 4925, DISPATCH_GL(vmstate), Dt1(->top), 31-3, Dt1(->base), ~LJ_VMST_INTERP, DISPATCH_GL(vmstate));
5897 break; 5921 break;
5898 5922
5899 /* ---------------------------------------------------------------------- */ 5923 /* ---------------------------------------------------------------------- */
@@ -5913,7 +5937,7 @@ static int build_backend(BuildCtx *ctx)
5913 5937
5914 build_subroutines(ctx); 5938 build_subroutines(ctx);
5915 5939
5916 dasm_put(Dst, 4927); 5940 dasm_put(Dst, 4946);
5917 for (op = 0; op < BC__MAX; op++) 5941 for (op = 0; op < BC__MAX; op++)
5918 build_ins(ctx, (BCOp)op, op); 5942 build_ins(ctx, (BCOp)op, op);
5919 5943