Permalink
Browse files

x64Emitter: nit, use helper method in CMP_or_TEST

  • Loading branch information...
Sintendo committed Sep 16, 2018
1 parent ef94fca commit d8953dbe57faeb25fe6a9da42fa5cfec0373ac69
Showing with 1 addition and 2 deletions.
  1. +1 −2 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);
}

0 comments on commit d8953db

Please sign in to comment.