Refactor gather-pipe address checking.
The implementation of IsOptimizableGatherPipeWrite is extremely simple now, but it will get a bit more complicated with dynamic-bat.
This commit is contained in:
parent
18ada7a0f5
commit
917a900ccb
|
@ -120,7 +120,7 @@ void JitArm::SafeStoreFromReg(s32 dest, u32 value, s32 regOffset, int accessSize
|
|||
|
||||
if (is_immediate)
|
||||
{
|
||||
if ((imm_addr & 0xFFFFF000) == 0xCC008000 && jit->jo.optimizeGatherPipe)
|
||||
if (jit->jo.optimizeGatherPipe && PowerPC::IsOptimizableGatherPipeWrite(imm_addr))
|
||||
{
|
||||
MOVI2R(R14, (u32)&GPFifo::m_gatherPipeCount);
|
||||
MOVI2R(R10, (u32)GPFifo::m_gatherPipe);
|
||||
|
|
|
@ -350,7 +350,7 @@ void JitArm::stfXX(UGeckoInstruction inst)
|
|||
|
||||
if (is_immediate)
|
||||
{
|
||||
if ((imm_addr & 0xFFFFF000) == 0xCC008000 && jit->jo.optimizeGatherPipe)
|
||||
if (jit->jo.optimizeGatherPipe && PowerPC::IsOptimizableGatherPipeWrite(imm_addr))
|
||||
{
|
||||
int accessSize;
|
||||
if (flags & BackPatchInfo::FLAG_SIZE_F64)
|
||||
|
|
|
@ -371,7 +371,7 @@ void JitArm64::stfXX(UGeckoInstruction inst)
|
|||
|
||||
if (is_immediate)
|
||||
{
|
||||
if ((imm_addr & 0xFFFFF000) == 0xCC008000 && jit->jo.optimizeGatherPipe)
|
||||
if (jit->jo.optimizeGatherPipe && PowerPC::IsOptimizableGatherPipeWrite(imm_addr))
|
||||
{
|
||||
int accessSize;
|
||||
if (flags & BackPatchInfo::FLAG_SIZE_F64)
|
||||
|
|
|
@ -477,7 +477,7 @@ bool EmuCodeBlock::WriteToConstAddress(int accessSize, OpArg arg, u32 address, B
|
|||
|
||||
// If we already know the address through constant folding, we can do some
|
||||
// fun tricks...
|
||||
if ((address & 0xFFFFF000) == 0xCC008000 && jit->jo.optimizeGatherPipe)
|
||||
if (jit->jo.optimizeGatherPipe && PowerPC::IsOptimizableGatherPipeWrite(address))
|
||||
{
|
||||
if (!arg.IsSimpleReg() || arg.GetSimpleReg() != RSCRATCH)
|
||||
MOV(accessSize, R(RSCRATCH), arg);
|
||||
|
|
|
@ -763,6 +763,14 @@ u32 IsOptimizableMMIOAccess(u32 address, u32 accessSize)
|
|||
return translated;
|
||||
}
|
||||
|
||||
bool IsOptimizableGatherPipeWrite(u32 address)
|
||||
{
|
||||
if (!UReg_MSR(MSR).DR)
|
||||
return false;
|
||||
|
||||
return address == 0xCC008000;
|
||||
}
|
||||
|
||||
// *********************************************************************************
|
||||
// Warning: Test Area
|
||||
//
|
||||
|
|
|
@ -270,6 +270,7 @@ void InvalidateTLBEntry(u32 address);
|
|||
// memory access. Does not consider page tables.
|
||||
bool IsOptimizableRAMAddress(const u32 address);
|
||||
u32 IsOptimizableMMIOAccess(u32 address, u32 accessSize);
|
||||
bool IsOptimizableGatherPipeWrite(u32 address);
|
||||
|
||||
} // namespace
|
||||
|
||||
|
|
Loading…
Reference in New Issue