aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r--src/lj_asm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index 9f784cc8..5dd7ca3a 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -1893,7 +1893,7 @@ static BCReg asm_baseslot(ASMState *as, SnapShot *snap, int *gotframe)
1893 SnapEntry sn = map[n-1]; 1893 SnapEntry sn = map[n-1];
1894 if ((sn & SNAP_FRAME)) { 1894 if ((sn & SNAP_FRAME)) {
1895 *gotframe = 1; 1895 *gotframe = 1;
1896 return snap_slot(sn); 1896 return snap_slot(sn) - LJ_FR2;
1897 } 1897 }
1898 } 1898 }
1899 return 0; 1899 return 0;
@@ -1913,7 +1913,7 @@ static void asm_tail_link(ASMState *as)
1913 1913
1914 if (as->T->link == 0) { 1914 if (as->T->link == 0) {
1915 /* Setup fixed registers for exit to interpreter. */ 1915 /* Setup fixed registers for exit to interpreter. */
1916 const BCIns *pc = snap_pc(as->T->snapmap[snap->mapofs + snap->nent]); 1916 const BCIns *pc = snap_pc(&as->T->snapmap[snap->mapofs + snap->nent]);
1917 int32_t mres; 1917 int32_t mres;
1918 if (bc_op(*pc) == BC_JLOOP) { /* NYI: find a better way to do this. */ 1918 if (bc_op(*pc) == BC_JLOOP) { /* NYI: find a better way to do this. */
1919 BCIns *retpc = &traceref(as->J, bc_d(*pc))->startins; 1919 BCIns *retpc = &traceref(as->J, bc_d(*pc))->startins;
@@ -1922,7 +1922,7 @@ static void asm_tail_link(ASMState *as)
1922 } 1922 }
1923 ra_allockreg(as, i32ptr(J2GG(as->J)->dispatch), RID_DISPATCH); 1923 ra_allockreg(as, i32ptr(J2GG(as->J)->dispatch), RID_DISPATCH);
1924 ra_allockreg(as, i32ptr(pc), RID_LPC); 1924 ra_allockreg(as, i32ptr(pc), RID_LPC);
1925 mres = (int32_t)(snap->nslots - baseslot); 1925 mres = (int32_t)(snap->nslots - baseslot - LJ_FR2);
1926 switch (bc_op(*pc)) { 1926 switch (bc_op(*pc)) {
1927 case BC_CALLM: case BC_CALLMT: 1927 case BC_CALLM: case BC_CALLMT:
1928 mres -= (int32_t)(1 + LJ_FR2 + bc_a(*pc) + bc_c(*pc)); break; 1928 mres -= (int32_t)(1 + LJ_FR2 + bc_a(*pc) + bc_c(*pc)); break;