Jit64: fix fmrx regression

Revision ddaf29e039 introduced a register
corruption bug (#6825). Since fmrx/MOVSD only modifies ps0 but we save
both ps0 and ps1 in one xmm register, not loading the previous value
when binding to a x64 register trashed ps1.

But hey, a good opportunity to shave off one more instruction ;)
This commit is contained in:
Tillmann Karras 2013-11-20 21:30:49 +01:00
parent 4f13f6ecaa
commit bcefa880e4

View file

@ -229,11 +229,12 @@ void Jit64::fmrx(UGeckoInstruction inst)
}
int d = inst.FD;
int b = inst.FB;
fpr.Lock(b, d);
fpr.BindToRegister(d, d == b, true);
MOVSD(XMM0, fpr.R(b));
MOVSD(fpr.R(d), XMM0);
fpr.UnlockAll();
if (d != b) {
fpr.Lock(b, d);
fpr.BindToRegister(d);
MOVSD(fpr.RX(d), fpr.R(b));
fpr.UnlockAll();
}
}
void Jit64::fcmpx(UGeckoInstruction inst)