]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Merge branch 'master' into v2.1
authorMike Pall <mike>
Mon, 12 Oct 2020 13:43:18 +0000 (15:43 +0200)
committerMike Pall <mike>
Mon, 12 Oct 2020 13:43:18 +0000 (15:43 +0200)
1  2 
src/lj_asm.c
src/lj_ir.h
src/lj_opt_mem.c

diff --cc src/lj_asm.c
index cc7841c025fce961a91659122f321268f0a380a3,60be4337d15117329169e49f63a58a0805852887..aae7b5b9731293aa5f6041a3a636c0e22bf6db49
@@@ -2329,20 -1831,9 +2329,20 @@@ void lj_asm_trace(jit_State *J, GCtrac
    ASMState *as = &as_;
    MCode *origtop;
  
 +  /* Remove nops/renames left over from ASM restart due to LJ_TRERR_MCODELM. */
 +  {
 +    IRRef nins = T->nins;
 +    IRIns *ir = &T->ir[nins-1];
 +    if (ir->o == IR_NOP || ir->o == IR_RENAME) {
 +      do { ir--; nins--; } while (ir->o == IR_NOP || ir->o == IR_RENAME);
 +      T->nins = nins;
 +    }
 +  }
 +
    /* Ensure an initialized instruction beyond the last one for HIOP checks. */
 -  J->cur.nins = lj_ir_nextins(J);
 -  lj_ir_nop(&J->cur.ir[J->cur.nins]);
 +  /* This also allows one RENAME to be added without reallocating curfinal. */
 +  as->orignins = lj_ir_nextins(J);
-   J->cur.ir[as->orignins].o = IR_NOP;
++  lj_ir_nop(&J->cur.ir[as->orignins]);
  
    /* Setup initial state. Copy some fields to reduce indirections. */
    as->J = J;
diff --cc src/lj_ir.h
Simple merge
Simple merge