Jit64: Inline GP fast check in Cleanup.
This commit is contained in:
parent
36ad887a19
commit
6ad63c1b35
|
@ -53,6 +53,7 @@ void DoState(PointerWrap& p)
|
||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
ResetGatherPipe();
|
ResetGatherPipe();
|
||||||
|
PowerPC::ppcState.gather_pipe_base_ptr = s_gather_pipe;
|
||||||
memset(s_gather_pipe, 0, sizeof(s_gather_pipe));
|
memset(s_gather_pipe, 0, sizeof(s_gather_pipe));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ void ResetGatherPipe()
|
||||||
SetGatherPipeCount(0);
|
SetGatherPipeCount(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UpdateGatherPipe()
|
void UpdateGatherPipe()
|
||||||
{
|
{
|
||||||
size_t pipe_count = GetGatherPipeCount();
|
size_t pipe_count = GetGatherPipeCount();
|
||||||
size_t processed;
|
size_t processed;
|
||||||
|
|
|
@ -21,6 +21,7 @@ void DoState(PointerWrap& p);
|
||||||
|
|
||||||
// ResetGatherPipe
|
// ResetGatherPipe
|
||||||
void ResetGatherPipe();
|
void ResetGatherPipe();
|
||||||
|
void UpdateGatherPipe();
|
||||||
void CheckGatherPipe();
|
void CheckGatherPipe();
|
||||||
void FastCheckGatherPipe();
|
void FastCheckGatherPipe();
|
||||||
|
|
||||||
|
|
|
@ -355,9 +355,14 @@ bool Jit64::Cleanup()
|
||||||
|
|
||||||
if (jo.optimizeGatherPipe && js.fifoBytesSinceCheck > 0)
|
if (jo.optimizeGatherPipe && js.fifoBytesSinceCheck > 0)
|
||||||
{
|
{
|
||||||
|
MOV(64, R(RSCRATCH), PPCSTATE(gather_pipe_ptr));
|
||||||
|
SUB(64, R(RSCRATCH), PPCSTATE(gather_pipe_base_ptr));
|
||||||
|
CMP(64, R(RSCRATCH), Imm32(GPFifo::GATHER_PIPE_SIZE));
|
||||||
|
FixupBranch exit = J_CC(CC_L);
|
||||||
ABI_PushRegistersAndAdjustStack({}, 0);
|
ABI_PushRegistersAndAdjustStack({}, 0);
|
||||||
ABI_CallFunction(GPFifo::FastCheckGatherPipe);
|
ABI_CallFunction(GPFifo::UpdateGatherPipe);
|
||||||
ABI_PopRegistersAndAdjustStack({}, 0);
|
ABI_PopRegistersAndAdjustStack({}, 0);
|
||||||
|
SetJumpTarget(exit);
|
||||||
did_something = true;
|
did_something = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,7 @@ struct PowerPCState
|
||||||
|
|
||||||
// gather pipe pointer for JIT access
|
// gather pipe pointer for JIT access
|
||||||
u8* gather_pipe_ptr;
|
u8* gather_pipe_ptr;
|
||||||
|
u8* gather_pipe_base_ptr;
|
||||||
|
|
||||||
#if _M_X86_64
|
#if _M_X86_64
|
||||||
// This member exists for the purpose of an assertion in x86 JitBase.cpp
|
// This member exists for the purpose of an assertion in x86 JitBase.cpp
|
||||||
|
|
Loading…
Reference in New Issue