diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index dcdc727a..35f48727 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h @@ -2970,6 +2970,7 @@ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) static void asm_setup_target(ASMState *as) { asm_exitstub_setup(as, as->T->nsnap); + as->mrm.base = 0; } /* -- Trace patching ------------------------------------------------------ */ diff --git a/src/lj_ir.c b/src/lj_ir.c index 0a206ebb..87fd0f4d 100644 --- a/src/lj_ir.c +++ b/src/lj_ir.c @@ -224,6 +224,7 @@ TRef lj_ir_k64(jit_State *J, IROp op, uint64_t u64) ir[1].tv.u64 = u64; ir->t.irt = t; ir->o = op; + ir->op12 = 0; ir->prev = J->chain[op]; J->chain[op] = (IRRef1)ref; found: @@ -281,6 +282,7 @@ TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t) ref = ir_nextkgc(J); ir = IR(ref); /* NOBARRIER: Current trace is a GC root. */ + ir->op12 = 0; setgcref(ir[LJ_GC64].gcr, o); ir->t.irt = (uint8_t)t; ir->o = IR_KGC; @@ -298,6 +300,7 @@ TRef lj_ir_ktrace(jit_State *J) lua_assert(irt_toitype_(IRT_P64) == LJ_TTRACE); ir->t.irt = IRT_P64; ir->o = LJ_GC64 ? IR_KNUM : IR_KNULL; /* Not IR_KGC yet, but same size. */ + ir->op12 = 0; ir->prev = 0; return TREF(ref, IRT_P64); } @@ -319,6 +322,7 @@ TRef lj_ir_kptr_(jit_State *J, IROp op, void *ptr) ref = ir_nextk(J); #endif ir = IR(ref); + ir->op12 = 0; setmref(ir[LJ_GC64].ptr, ptr); ir->t.irt = IRT_PGC; ir->o = op;