瀏覽代碼

x64: Fix 64 bit shift code generation.

Reported by Philipp Kutin.
Fix contributed by Peter Cawley.
Mike Pall 5 年之前
父節點
當前提交
03a7ebca4f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/lj_asm_x86.h

+ 1 - 1
src/lj_asm_x86.h

@@ -2300,7 +2300,7 @@ static void asm_bitshift(ASMState *as, IRIns *ir, x86Shift xs, x86Op xv)
     dest = ra_dest(as, ir, rset_exclude(RSET_GPR, RID_ECX));
     if (dest == RID_ECX) {
       dest = ra_scratch(as, rset_exclude(RSET_GPR, RID_ECX));
-      emit_rr(as, XO_MOV, RID_ECX, dest);
+      emit_rr(as, XO_MOV, REX_64IR(ir, RID_ECX), dest);
     }
     right = irr->r;
     if (ra_noreg(right))