Merge pull request #2090 from magumagu/jit-gatherpipe-address
Refactor gather-pipe address checking.
This commit is contained in:
commit
b9157c5a36
|
@ -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