summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2018-10-05 23:44:25 +0100
committerGitHub <noreply@github.com>2018-10-05 23:44:25 +0100
commitb480db9392800aadc8cb60f53d5c4725fd232100 (patch)
tree9c51006046d044d55ad1e24f1a7ec15d15ffec9d /Source/Core/Common
parent781b707af879e85d9b3207b5262f0b3c07872d02 (diff)
parentd8953dbe57faeb25fe6a9da42fa5cfec0373ac69 (diff)
Merge pull request #7419 from Sintendo/miscopts
Miscellaneous x64 micro-optimizations
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/x64Emitter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/Common/x64Emitter.cpp b/Source/Core/Common/x64Emitter.cpp
index d419f32af5..cc243810c1 100644
--- a/Source/Core/Common/x64Emitter.cpp
+++ b/Source/Core/Common/x64Emitter.cpp
@@ -1602,8 +1602,7 @@ void XEmitter::XCHG(int bits, const OpArg& a1, const OpArg& a2)
void XEmitter::CMP_or_TEST(int bits, const OpArg& a1, const OpArg& a2)
{
CheckFlags();
- if (a1.IsSimpleReg() && a2.IsImm() &&
- a2.offset == 0) // turn 'CMP reg, 0' into shorter 'TEST reg, reg'
+ if (a1.IsSimpleReg() && a2.IsZero()) // turn 'CMP reg, 0' into shorter 'TEST reg, reg'
{
WriteNormalOp(bits, NormalOp::TEST, a1, a1);
}