summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2014-06-02 08:53:02 +0200
committerTillmann Karras <tilkax@gmail.com>2014-06-02 08:53:02 +0200
commit2cf27e4de8dd7c816a5c885ab1e13d6dea9052d3 (patch)
treed60c87ec926228432e255d710cc24549a5fa70a2 /Source/Core
parent31eedb2f79318002a4772087f96eb034f94787a1 (diff)
Jit64: revert fmrx revert
The AVX revert was not supposed to touch fmrx. Partially reverts 2fad2a3e88c5fbd76d897fcfed362233d3936d12.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
index b5cd8833a6..0d13c19efe 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
@@ -211,10 +211,21 @@ void Jit64::fmrx(UGeckoInstruction inst)
int d = inst.FD;
int b = inst.FB;
+
+ if (d == b)
+ return;
+
fpr.Lock(b, d);
- fpr.BindToRegister(d, true, true);
- MOVSD(XMM0, fpr.R(b));
- MOVSD(fpr.R(d), XMM0);
+
+ // We don't need to load d, but if it is loaded, we need to mark it as dirty.
+ if (fpr.IsBound(d))
+ fpr.BindToRegister(d);
+
+ // b needs to be in a register because "MOVSD reg, mem" sets the upper bits (64+) to zero and we don't want that.
+ fpr.BindToRegister(b, true, false);
+
+ MOVSD(fpr.R(d), fpr.RX(b));
+
fpr.UnlockAll();
}