Skip to content

Commit

Permalink
LJ_GC64: Various fixes.
Browse files Browse the repository at this point in the history
Contributed by Peter Cawley.
  • Loading branch information
Mike Pall committed Oct 12, 2016
1 parent 63465fe commit 54b78e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lj_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
int32_t numparams = J->pt->numparams;
ptrdiff_t nvararg = frame_delta(J->L->base-1) - numparams - 1 - LJ_FR2;
lua_assert(frame_isvarg(J->L->base-1));
if (LJ_FR2 && dst > J->maxslot)
J->base[dst-1] = 0; /* Prevent resurrection of unrelated slot. */
if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */
ptrdiff_t i;
if (nvararg < 0) nvararg = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/lj_target_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum {
FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */
RID_MAX,
RID_MRM = RID_MAX, /* Pseudo-id for ModRM operand. */
RID_RIP = RID_MAX+1, /* Pseudo-id for RIP (x64 only). */
RID_RIP = RID_MAX+5, /* Pseudo-id for RIP (x64 only), rm bits = 5. */

/* Calling conventions. */
RID_SP = RID_ESP,
Expand Down

0 comments on commit 54b78e7

Please sign in to comment.