mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-31 14:47:10 +00:00
Merge pull request #7419 from Sintendo/miscopts
Miscellaneous x64 micro-optimizations
This commit is contained in:
commit
b480db9392
4 changed files with 9 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue