mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 06:29:00 +01:00
Jit64: Implement low DCBZ hack
I was hoping this would improve the performance of Cars 2 by avoiding interpreter fallbacks, but it doesn't seem to have made any measurable impact.
This commit is contained in:
parent
3201944208
commit
76228fa482
@ -290,7 +290,6 @@ void Jit64::dcbz(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStoreOff);
|
||||
FALLBACK_IF(SConfig::GetInstance().bLowDCBZHack);
|
||||
|
||||
int a = inst.RA;
|
||||
int b = inst.RB;
|
||||
@ -304,6 +303,14 @@ void Jit64::dcbz(UGeckoInstruction inst)
|
||||
AND(32, R(RSCRATCH), Imm32(~31));
|
||||
}
|
||||
|
||||
FixupBranch end_dcbz_hack;
|
||||
if (SConfig::GetInstance().bLowDCBZHack)
|
||||
{
|
||||
// HACK: Don't clear any memory in the [0x8000'0000, 0x8000'8000) region.
|
||||
CMP(32, R(RSCRATCH), Imm32(0x8000'8000));
|
||||
end_dcbz_hack = J_CC(CC_L);
|
||||
}
|
||||
|
||||
bool emit_fast_path = MSR.DR && m_jit.jo.fastmem_arena;
|
||||
|
||||
if (emit_fast_path)
|
||||
@ -333,10 +340,13 @@ void Jit64::dcbz(UGeckoInstruction inst)
|
||||
|
||||
if (emit_fast_path)
|
||||
{
|
||||
FixupBranch end = J(true);
|
||||
FixupBranch end_far_code = J(true);
|
||||
SwitchToNearCode();
|
||||
SetJumpTarget(end);
|
||||
SetJumpTarget(end_far_code);
|
||||
}
|
||||
|
||||
if (SConfig::GetInstance().bLowDCBZHack)
|
||||
SetJumpTarget(end_dcbz_hack);
|
||||
}
|
||||
|
||||
void Jit64::stX(UGeckoInstruction inst)
|
||||
|
Loading…
x
Reference in New Issue
Block a user