mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
don't add constant cycles if they're 0
This commit is contained in:
@ -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();
|
||||
|
@ -680,7 +680,8 @@ void Compiler::Comp_SpecialBranchBehaviour(bool taken)
|
||||
{
|
||||
RegCache.PrepareExit();
|
||||
|
||||
ADD(32, MDisp(RCPU, offsetof(ARM, Cycles)), Imm32(ConstantCycles));
|
||||
if (ConstantCycles)
|
||||
ADD(32, MDisp(RCPU, offsetof(ARM, Cycles)), Imm32(ConstantCycles));
|
||||
JMP((u8*)&ARM_Ret, true);
|
||||
}
|
||||
}
|
||||
@ -841,7 +842,8 @@ JitBlockEntry Compiler::CompileBlock(ARM* cpu, bool thumb, FetchedInstr instrs[]
|
||||
|
||||
RegCache.Flush();
|
||||
|
||||
ADD(32, MDisp(RCPU, offsetof(ARM, Cycles)), Imm32(ConstantCycles));
|
||||
if (ConstantCycles)
|
||||
ADD(32, MDisp(RCPU, offsetof(ARM, Cycles)), Imm32(ConstantCycles));
|
||||
JMP((u8*)ARM_Ret, true);
|
||||
|
||||
#ifdef JIT_PROFILING_ENABLED
|
||||
|
Reference in New Issue
Block a user