Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Jit64: fix fmrx regression
Revision ddaf29e 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 ;)
  • Loading branch information
Tilka committed Nov 20, 2013
1 parent 4f13f6e commit bcefa88
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit bcefa88

Please sign in to comment.