]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Merge branch 'master' into v2.1
authorMike Pall <mike>
Tue, 14 Nov 2023 21:56:09 +0000 (22:56 +0100)
committerMike Pall <mike>
Tue, 14 Nov 2023 21:56:09 +0000 (22:56 +0100)
1  2 
src/lj_asm_x86.h

index 955a54a424e728a5f6f701dba07dcb2da033ef46,ddbe9c5548ca849e3dd012cab1f4468a98aeb054..9fa411a0e1fc85dd7e0eb540d306347207b20d31
@@@ -131,10 -117,10 +133,10 @@@ static IRRef asm_fuseabase(ASMState *as
    as->mrm.ofs = 0;
    if (irb->o == IR_FLOAD) {
      IRIns *ira = IR(irb->op1);
 -    lua_assert(irb->op2 == IRFL_TAB_ARRAY);
 +    lj_assertA(irb->op2 == IRFL_TAB_ARRAY, "expected FLOAD TAB_ARRAY");
      /* We can avoid the FLOAD of t->array for colocated arrays. */
      if (ira->o == IR_TNEW && ira->op1 <= LJ_MAX_COLOSIZE &&
-       !neverfuse(as) && noconflict(as, irb->op1, IR_NEWREF, 1)) {
+       !neverfuse(as) && noconflict(as, irb->op1, IR_NEWREF, 0)) {
        as->mrm.ofs = (int32_t)sizeof(GCtab);  /* Ofs to colocated array. */
        return irb->op1;  /* Table obj. */
      }
@@@ -456,11 -339,9 +458,11 @@@ static Reg asm_fuseload(ASMState *as, I
      RegSet xallow = (allow & RSET_GPR) ? allow : RSET_GPR;
      if (ir->o == IR_SLOAD) {
        if (!(ir->op2 & (IRSLOAD_PARENT|IRSLOAD_CONVERT)) &&
-         noconflict(as, ref, IR_RETF, 0) &&
 -        noconflict(as, ref, IR_RETF, 2)) {
++        noconflict(as, ref, IR_RETF, 2) &&
 +        !(LJ_GC64 && irt_isaddr(ir->t))) {
        as->mrm.base = (uint8_t)ra_alloc1(as, REF_BASE, xallow);
 -      as->mrm.ofs = 8*((int32_t)ir->op1-1) + ((ir->op2&IRSLOAD_FRAME)?4:0);
 +      as->mrm.ofs = 8*((int32_t)ir->op1-1-LJ_FR2) +
 +                    (!LJ_FR2 && (ir->op2 & IRSLOAD_FRAME) ? 4 : 0);
        as->mrm.idx = RID_NONE;
        return RID_MRM;
        }
        return RID_MRM;
        }
      } else if (ir->o == IR_ALOAD || ir->o == IR_HLOAD || ir->o == IR_ULOAD) {
-       if (noconflict(as, ref, ir->o + IRDELTA_L2S, 0) &&
-         noconflict(as, ref, IR_CALLS, 1) &&  /* Don't cross table.clear. */
 -      if (noconflict(as, ref, ir->o + IRDELTA_L2S, 2+(ir->o != IR_ULOAD))) {
++      if (noconflict(as, ref, ir->o + IRDELTA_L2S, 2+(ir->o != IR_ULOAD)) &&
 +        !(LJ_GC64 && irt_isaddr(ir->t))) {
        asm_fuseahuref(as, ir->op1, xallow);
        return RID_MRM;
        }