From 03a7ebca4f6819658cdaa12ba3af54a17b8035e9 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Fri, 25 Sep 2020 22:49:23 +0200 Subject: [PATCH] x64: Fix 64 bit shift code generation. Reported by Philipp Kutin. Fix contributed by Peter Cawley. --- src/lj_asm_x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index e40b5e54..146371c1 100644 --- a/src/lj_asm_x86.h +++ b/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))