浏览代码

Don't fuse colocated array offsets without -Ofuse.

Mike Pall 14 年之前
父节点
当前提交
2fcd562582
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/lj_asm_arm.h
  2. 1 1
      src/lj_asm_x86.h

+ 1 - 1
src/lj_asm_arm.h

@@ -119,7 +119,7 @@ static int32_t asm_fuseabase(ASMState *as, IRRef ref)
 {
   IRIns *ir = IR(ref);
   if (ir->o == IR_TNEW && ir->op1 <= LJ_MAX_COLOSIZE &&
-      noconflict(as, ref, IR_NEWREF))
+      !neverfuse(as) && noconflict(as, ref, IR_NEWREF))
     return (int32_t)sizeof(GCtab);
   return 0;
 }

+ 1 - 1
src/lj_asm_x86.h

@@ -118,7 +118,7 @@ static IRRef asm_fuseabase(ASMState *as, IRRef ref)
     lua_assert(irb->op2 == IRFL_TAB_ARRAY);
     /* We can avoid the FLOAD of t->array for colocated arrays. */
     if (ira->o == IR_TNEW && ira->op1 <= LJ_MAX_COLOSIZE &&
-	noconflict(as, irb->op1, IR_NEWREF, 1)) {
+	!neverfuse(as) && noconflict(as, irb->op1, IR_NEWREF, 1)) {
       as->mrm.ofs = (int32_t)sizeof(GCtab);  /* Ofs to colocated array. */
       return irb->op1;  /* Table obj. */
     }