aboutsummaryrefslogtreecommitdiff
path: root/src/ARMJIT_A64
diff options
context:
space:
mode:
authorRSDuck <RSDuck@users.noreply.github.com>2021-07-24 17:07:08 +0200
committerRSDuck <RSDuck@users.noreply.github.com>2021-07-24 17:07:08 +0200
commit9ee2017443a159abfb93c31f5f2884cb4f264a45 (patch)
treec6d0b3a7bb47eb0872861a8f97f643b4bbcbf6ae /src/ARMJIT_A64
parent6944fdbe781cd30da109eb47dea86158ec1f8ebf (diff)
don't add constant cycles if they're 0
Diffstat (limited to 'src/ARMJIT_A64')
-rw-r--r--src/ARMJIT_A64/ARMJIT_Compiler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ARMJIT_A64/ARMJIT_Compiler.cpp b/src/ARMJIT_A64/ARMJIT_Compiler.cpp
index 094f324..5941656 100644
--- a/src/ARMJIT_A64/ARMJIT_Compiler.cpp
+++ b/src/ARMJIT_A64/ARMJIT_Compiler.cpp
@@ -681,7 +681,8 @@ void Compiler::Comp_BranchSpecialBehaviour(bool taken)
{
RegCache.PrepareExit();
- ADD(RCycles, RCycles, ConstantCycles);
+ if (ConstantCycles)
+ ADD(RCycles, RCycles, ConstantCycles);
QuickTailCall(X0, ARM_Ret);
}
}
@@ -832,7 +833,8 @@ JitBlockEntry Compiler::CompileBlock(ARM* cpu, bool thumb, FetchedInstr instrs[]
RegCache.Flush();
- ADD(RCycles, RCycles, ConstantCycles);
+ if (ConstantCycles)
+ ADD(RCycles, RCycles, ConstantCycles);
QuickTailCall(X0, ARM_Ret);
FlushIcache();