Skip to content
Permalink
Browse files

x64Emitter: Prefer MOVAPS to MOVSD

* The high half of regOp is immediately overwritten so the value in it is irrelevant.
* MOVSD produces an unnecessary dependency on the high half of regOp.
* MOVAPS is implemented as a register rename on modern microarchitectures.
  • Loading branch information...
MerryMage committed Apr 27, 2019
1 parent 2d4dd8c commit 1baa8ee970c726da1aeb6a1c01f955fe28f79e57
Showing with 7 additions and 1 deletion.
  1. +7 −1 Source/Core/Common/x64Emitter.cpp
@@ -2429,8 +2429,14 @@ void XEmitter::MOVDDUP(X64Reg regOp, const OpArg& arg)
}
else
{
if (!arg.IsSimpleReg(regOp))
if (!arg.IsSimpleReg())
{
MOVSD(regOp, arg);
}
else if (regOp != arg.GetSimpleReg())
{
MOVAPD(regOp, arg);
}
UNPCKLPD(regOp, R(regOp));
}
}

0 comments on commit 1baa8ee

Please sign in to comment.
You can’t perform that action at this time.