From e57333ac5eb5771ec34d503cec82556ae6ccb9e0 Mon Sep 17 00:00:00 2001 From: hthh Date: Thu, 30 Jun 2016 21:58:23 +1000 Subject: [PATCH] Jit: Remove unsafe MOV optimization This optimization broke arithXex in rare cases by emitting XOR where MOV was expected. --- Source/Core/Common/x64Emitter.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp index 9a4ca705a0..1baa6b7d9b 100644 --- a/Source/Core/Common/x64Emitter.cpp +++ b/Source/Core/Common/x64Emitter.cpp @@ -1540,13 +1540,6 @@ void XEmitter::XOR(int bits, const OpArg& a1, const OpArg& a2) } void XEmitter::MOV(int bits, const OpArg& a1, const OpArg& a2) { - // Shortcut to zero a register - if (a2.IsZero() && a1.IsSimpleReg() && !flags_locked) - { - XOR(bits, a1, a1); - return; - } - if (a1.IsSimpleReg() && a2.IsSimpleReg() && a1.GetSimpleReg() == a2.GetSimpleReg()) ERROR_LOG(DYNA_REC, "Redundant MOV @ %p - bug in JIT?", code); WriteNormalOp(bits, nrmMOV, a1, a2);