summaryrefslogtreecommitdiff
path: root/Source/Core/Common/x64Emitter.cpp
diff options
context:
space:
mode:
authorSintendo <bram.speeckaert@gmail.com>2018-09-16 23:34:27 +0200
committerSintendo <bram.speeckaert@gmail.com>2018-09-29 09:52:54 +0200
commitd8953dbe57faeb25fe6a9da42fa5cfec0373ac69 (patch)
tree35449ad1d7fd82a137deb72a1d6f834a779909d4 /Source/Core/Common/x64Emitter.cpp
parentef94fca5040ecc1e80efba34e343a2ea953f0b17 (diff)
x64Emitter: nit, use helper method in CMP_or_TEST
Diffstat (limited to 'Source/Core/Common/x64Emitter.cpp')
-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);
}