LJ_GC64: Ensure all IR slot fields are initialized.

This commit is contained in:
Mike Pall 2016-06-03 06:53:37 +02:00
parent 58ca165737
commit cc05e79181
2 changed files with 5 additions and 0 deletions

View File

@ -2970,6 +2970,7 @@ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci)
static void asm_setup_target(ASMState *as) static void asm_setup_target(ASMState *as)
{ {
asm_exitstub_setup(as, as->T->nsnap); asm_exitstub_setup(as, as->T->nsnap);
as->mrm.base = 0;
} }
/* -- Trace patching ------------------------------------------------------ */ /* -- Trace patching ------------------------------------------------------ */

View File

@ -224,6 +224,7 @@ TRef lj_ir_k64(jit_State *J, IROp op, uint64_t u64)
ir[1].tv.u64 = u64; ir[1].tv.u64 = u64;
ir->t.irt = t; ir->t.irt = t;
ir->o = op; ir->o = op;
ir->op12 = 0;
ir->prev = J->chain[op]; ir->prev = J->chain[op];
J->chain[op] = (IRRef1)ref; J->chain[op] = (IRRef1)ref;
found: found:
@ -281,6 +282,7 @@ TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t)
ref = ir_nextkgc(J); ref = ir_nextkgc(J);
ir = IR(ref); ir = IR(ref);
/* NOBARRIER: Current trace is a GC root. */ /* NOBARRIER: Current trace is a GC root. */
ir->op12 = 0;
setgcref(ir[LJ_GC64].gcr, o); setgcref(ir[LJ_GC64].gcr, o);
ir->t.irt = (uint8_t)t; ir->t.irt = (uint8_t)t;
ir->o = IR_KGC; ir->o = IR_KGC;
@ -298,6 +300,7 @@ TRef lj_ir_ktrace(jit_State *J)
lua_assert(irt_toitype_(IRT_P64) == LJ_TTRACE); lua_assert(irt_toitype_(IRT_P64) == LJ_TTRACE);
ir->t.irt = IRT_P64; ir->t.irt = IRT_P64;
ir->o = LJ_GC64 ? IR_KNUM : IR_KNULL; /* Not IR_KGC yet, but same size. */ ir->o = LJ_GC64 ? IR_KNUM : IR_KNULL; /* Not IR_KGC yet, but same size. */
ir->op12 = 0;
ir->prev = 0; ir->prev = 0;
return TREF(ref, IRT_P64); return TREF(ref, IRT_P64);
} }
@ -319,6 +322,7 @@ TRef lj_ir_kptr_(jit_State *J, IROp op, void *ptr)
ref = ir_nextk(J); ref = ir_nextk(J);
#endif #endif
ir = IR(ref); ir = IR(ref);
ir->op12 = 0;
setmref(ir[LJ_GC64].ptr, ptr); setmref(ir[LJ_GC64].ptr, ptr);
ir->t.irt = IRT_PGC; ir->t.irt = IRT_PGC;
ir->o = op; ir->o = op;