Ensure full init of IR_NOP instructions.

This commit is contained in:
Mike Pall
2020-10-12 15:40:28 +02:00
parent e8ec6fe996
commit de6b1a11dd
4 changed files with 15 additions and 25 deletions

View File

@@ -548,4 +548,12 @@ static LJ_AINLINE int ir_sideeff(IRIns *ir)
LJ_STATIC_ASSERT((int)IRT_GUARD == (int)IRM_W);
/* Replace IR instruction with NOP. */
static LJ_AINLINE void lj_ir_nop(IRIns *ir)
{
ir->ot = IRT(IR_NOP, IRT_NIL);
ir->op1 = ir->op2 = 0;
ir->prev = 0;
}
#endif