From 05fbdf565c700365d22e38f11478101a0d92a23e Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 10 Sep 2017 14:05:30 +0200 Subject: [PATCH] x64/LJ_GC64: Fix type-check-only variant of SLOAD. Thanks to 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 55c02d242e..af54dc7f11 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h @@ -1759,7 +1759,7 @@ static void asm_sload(ASMState *as, IRIns *ir) emit_i8(as, irt_toitype(t)); emit_rr(as, XO_ARITHi8, XOg_CMP, tmp); emit_shifti(as, XOg_SAR|REX_64, tmp, 47); - emit_rmro(as, XO_MOV, tmp|REX_64, base, ofs+4); + emit_rmro(as, XO_MOV, tmp|REX_64, base, ofs); #else } else { emit_i8(as, irt_toitype(t));