Browse Source

x86/x64: Always mark ref for shift count as non-weak.

Mike Pall 12 years ago
parent
commit
2e8e587638
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/lj_asm_x86.h

+ 2 - 3
src/lj_asm_x86.h

@@ -1999,10 +1999,9 @@ static void asm_bitshift(ASMState *as, IRIns *ir, x86Shift xs)
     else if (right != RID_ECX)
     else if (right != RID_ECX)
       ra_scratch(as, RID2RSET(RID_ECX));
       ra_scratch(as, RID2RSET(RID_ECX));
     emit_rr(as, XO_SHIFTcl, REX_64IR(ir, xs), dest);
     emit_rr(as, XO_SHIFTcl, REX_64IR(ir, xs), dest);
-    if (right != RID_ECX) {
-      ra_noweak(as, right);
+    ra_noweak(as, right);
+    if (right != RID_ECX)
       emit_rr(as, XO_MOV, RID_ECX, right);
       emit_rr(as, XO_MOV, RID_ECX, right);
-    }
   }
   }
   ra_left(as, dest, ir->op1);
   ra_left(as, dest, ir->op1);
   /*
   /*