From 9ee2017443a159abfb93c31f5f2884cb4f264a45 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Sat, 24 Jul 2021 17:07:08 +0200 Subject: don't add constant cycles if they're 0 --- src/ARMJIT_A64/ARMJIT_Compiler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ARMJIT_A64') 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(); -- cgit v1.2.3