mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid overhead calling __KernelIdle().
~1.8% improvement in Zettai Hero Project.
This commit is contained in:
parent
51e5cfab40
commit
2758634a0f
2 changed files with 23 additions and 11 deletions
|
@ -18,6 +18,7 @@
|
|||
#include "Core/Reporting.h"
|
||||
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/HLETables.h"
|
||||
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
|
@ -421,9 +422,15 @@ void Jit::Comp_Syscall(u32 op)
|
|||
WriteDownCount(offset);
|
||||
js.downcountAmount = -offset;
|
||||
|
||||
MOVI2R(R0, op);
|
||||
SaveDowncount();
|
||||
QuickCallFunction(R1, (void *)&CallSyscall);
|
||||
// Skip the CallSyscall overhead for __KernelIdle, which is called a lot.
|
||||
if (op == GetSyscallOp("FakeSysCalls", NID_IDLE))
|
||||
QuickCallFunction(R1, (void *)GetFunc("FakeSysCalls", NID_IDLE)->func);
|
||||
else
|
||||
{
|
||||
MOVI2R(R0, op);
|
||||
QuickCallFunction(R1, (void *)&CallSyscall);
|
||||
}
|
||||
RestoreDowncount();
|
||||
|
||||
WriteSyscallExit();
|
||||
|
|
|
@ -17,16 +17,17 @@
|
|||
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
#include "../../HLE/HLE.h"
|
||||
#include "../../Host.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/HLETables.h"
|
||||
#include "Core/Host.h"
|
||||
|
||||
#include "../MIPS.h"
|
||||
#include "../MIPSCodeUtils.h"
|
||||
#include "../MIPSAnalyst.h"
|
||||
#include "../MIPSTables.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
#include "Core/MIPS/MIPSAnalyst.h"
|
||||
#include "Core/MIPS/MIPSTables.h"
|
||||
|
||||
#include "Jit.h"
|
||||
#include "RegCache.h"
|
||||
#include "Core/MIPS/x86/Jit.h"
|
||||
#include "Core/MIPS/x86/RegCache.h"
|
||||
#include "Core/MIPS/JitCommon/JitBlockCache.h"
|
||||
|
||||
#define _RS ((op>>21) & 0x1F)
|
||||
|
@ -513,7 +514,11 @@ void Jit::Comp_Syscall(u32 op)
|
|||
WriteDowncount(offset);
|
||||
js.downcountAmount = -offset;
|
||||
|
||||
ABI_CallFunctionC((void *)&CallSyscall, op);
|
||||
// Skip the CallSyscall overhead for __KernelIdle, which is called a lot.
|
||||
if (op == GetSyscallOp("FakeSysCalls", NID_IDLE))
|
||||
ABI_CallFunction((void *)GetFunc("FakeSysCalls", NID_IDLE)->func);
|
||||
else
|
||||
ABI_CallFunctionC((void *)&CallSyscall, op);
|
||||
|
||||
WriteSyscallExit();
|
||||
js.compiling = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue