From 221216b5b2bfb576d961d9ecd53aa99ac6698bd1 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 27 Mar 2014 22:24:56 +0100 Subject: [PATCH] Bugfix in x64 emitter, thanks magumagu --- Common/x64Emitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/x64Emitter.cpp b/Common/x64Emitter.cpp index f053ae6e3e..b4b87a356a 100644 --- a/Common/x64Emitter.cpp +++ b/Common/x64Emitter.cpp @@ -147,7 +147,7 @@ void OpArg::WriteRex(XEmitter *emit, int opBits, int bits, int customOp) const if (indexReg & 8) op |= 2; if (offsetOrBaseReg & 8) op |= 1; //TODO investigate if this is dangerous if (op != 0x40 || - (bits == 8 && (offsetOrBaseReg & 0x10c) == 4) || + (scale == SCALE_NONE && bits == 8 && (offsetOrBaseReg & 0x10c) == 4) || (opBits == 8 && (customOp & 0x10c) == 4)) { emit->Write8(op); _dbg_assert_(JIT, (offsetOrBaseReg & 0x100) == 0 || bits != 8);