Jit: Remove unsafe MOV optimization

This optimization broke arithXex in rare cases by
emitting XOR where MOV was expected.
This commit is contained in:
hthh 2016-06-30 21:58:23 +10:00
parent f8bf839e36
commit e57333ac5e

View File

@ -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);