Skip to content
Permalink
Browse files

x64Emitter: Prefer MOVAPS to MOVAPD

There is no reason to use MOVAPD over MOVAPS, for two reasons:
* There has never been a microarchitecture with separate single and double domains.
* MOVAPD is one byte longer than MOVAPS
  • Loading branch information...
MerryMage committed Apr 27, 2019
1 parent 2abe333 commit 2d4dd8cdc11ec54639691fe762562e4e7f44a232
Showing with 6 additions and 2 deletions.
  1. +6 −2 Source/Core/Common/x64Emitter.cpp
@@ -2180,15 +2180,19 @@ void XEmitter::MOVAPS(X64Reg regOp, const OpArg& arg)
}
void XEmitter::MOVAPD(X64Reg regOp, const OpArg& arg)
{
WriteSSEOp(0x66, sseMOVAPfromRM, regOp, arg);
// Prefer MOVAPS to MOVAPD as there is no reason to use MOVAPD over MOVAPS:
// - They have equivalent functionality.
// - There has never been a microarchitecture with separate single and double domains.
// - MOVAPD is one byte longer than MOVAPS.
MOVAPS(regOp, arg);
}
void XEmitter::MOVAPS(const OpArg& arg, X64Reg regOp)
{
WriteSSEOp(0x00, sseMOVAPtoRM, regOp, arg);
}
void XEmitter::MOVAPD(const OpArg& arg, X64Reg regOp)
{
WriteSSEOp(0x66, sseMOVAPtoRM, regOp, arg);
MOVAPS(arg, regOp);
}

void XEmitter::MOVUPS(X64Reg regOp, const OpArg& arg)

0 comments on commit 2d4dd8c

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