Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Jit64: really fix fmrx regression
This is more tricky than I thought!
  • Loading branch information
Tilka committed Nov 21, 2013
1 parent 011fe86 commit ff91789
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp
Expand Up @@ -224,15 +224,26 @@ void Jit64::fmrx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITFloatingPointOff)
if (inst.Rc) {
if (inst.Rc)
{
Default(inst); return;
}
int d = inst.FD;
int b = inst.FB;
if (d != b) {
if (d != b)
{
fpr.Lock(b, d);
fpr.BindToRegister(d);
MOVSD(fpr.RX(d), fpr.R(b));

// we don't need to load d, but if it already is, it must be marked as dirty
if (fpr.IsBound(d))
{
fpr.BindToRegister(d);
}
fpr.BindToRegister(b, true, false);

// caveat: the order of ModRM:r/m, ModRM:reg is deliberate!
// "MOVSD reg, mem" zeros out the upper half of the destination register
MOVSD(fpr.R(d), fpr.RX(b));
fpr.UnlockAll();
}
}
Expand Down

0 comments on commit ff91789

Please sign in to comment.