aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2016-10-12 17:36:45 +0200
committerMike Pall <mike>2016-10-12 17:36:45 +0200
commit54b78e7c66bff326a0223aac1fd5373515ca3014 (patch)
treefc5232dc41e9c7edaa5a8ec3d26ad559a374aaa1 /src
parent63465fe71d2605499ce5f3355db3629fb8283cb2 (diff)
downloadluajit-54b78e7c66bff326a0223aac1fd5373515ca3014.tar.gz
luajit-54b78e7c66bff326a0223aac1fd5373515ca3014.tar.bz2
luajit-54b78e7c66bff326a0223aac1fd5373515ca3014.zip
LJ_GC64: Various fixes.
Contributed by Peter Cawley.
Diffstat (limited to 'src')
-rw-r--r--src/lj_record.c2
-rw-r--r--src/lj_target_x86.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index 76699a9f..48018f42 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -1765,6 +1765,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
1765 int32_t numparams = J->pt->numparams; 1765 int32_t numparams = J->pt->numparams;
1766 ptrdiff_t nvararg = frame_delta(J->L->base-1) - numparams - 1 - LJ_FR2; 1766 ptrdiff_t nvararg = frame_delta(J->L->base-1) - numparams - 1 - LJ_FR2;
1767 lua_assert(frame_isvarg(J->L->base-1)); 1767 lua_assert(frame_isvarg(J->L->base-1));
1768 if (LJ_FR2 && dst > J->maxslot)
1769 J->base[dst-1] = 0; /* Prevent resurrection of unrelated slot. */
1768 if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */ 1770 if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */
1769 ptrdiff_t i; 1771 ptrdiff_t i;
1770 if (nvararg < 0) nvararg = 0; 1772 if (nvararg < 0) nvararg = 0;
diff --git a/src/lj_target_x86.h b/src/lj_target_x86.h
index d5429597..c7be59ad 100644
--- a/src/lj_target_x86.h
+++ b/src/lj_target_x86.h
@@ -31,7 +31,7 @@ enum {
31 FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */ 31 FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */
32 RID_MAX, 32 RID_MAX,
33 RID_MRM = RID_MAX, /* Pseudo-id for ModRM operand. */ 33 RID_MRM = RID_MAX, /* Pseudo-id for ModRM operand. */
34 RID_RIP = RID_MAX+1, /* Pseudo-id for RIP (x64 only). */ 34 RID_RIP = RID_MAX+5, /* Pseudo-id for RIP (x64 only), rm bits = 5. */
35 35
36 /* Calling conventions. */ 36 /* Calling conventions. */
37 RID_SP = RID_ESP, 37 RID_SP = RID_ESP,