Fixes ARMv7 FP loadstores using fastmem when not enabled.

This commit is contained in:
Ryan Houdek 2014-11-16 21:12:11 -06:00
parent aa2fc1f66b
commit f9208dcc13

View File

@ -135,8 +135,10 @@ void JitArm::lfXX(UGeckoInstruction inst)
MOV(RA, rB); MOV(RA, rB);
// This branch gets changed to a NOP when the fastpath fails // This branch gets changed to a NOP when the fastpath fails
FixupBranch fast_path = B(); FixupBranch fast_path;
FixupBranch slow_out; if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem)
fast_path = B();
{ {
PUSH(4, R0, R1, R2, R3); PUSH(4, R0, R1, R2, R3);
MOV(R0, rB); MOV(R0, rB);
@ -160,8 +162,10 @@ void JitArm::lfXX(UGeckoInstruction inst)
#endif #endif
} }
POP(4, R0, R1, R2, R3); POP(4, R0, R1, R2, R3);
slow_out = B();
} }
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem)
{
FixupBranch slow_out = B();
SetJumpTarget(fast_path); SetJumpTarget(fast_path);
{ {
Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK) Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK)
@ -185,8 +189,8 @@ void JitArm::lfXX(UGeckoInstruction inst)
} }
gpr.Unlock(rC); gpr.Unlock(rC);
} }
SetJumpTarget(slow_out); SetJumpTarget(slow_out);
}
gpr.Unlock(rA, rB); gpr.Unlock(rA, rB);
SetJumpTarget(DoNotLoad); SetJumpTarget(DoNotLoad);
@ -309,8 +313,10 @@ void JitArm::stfXX(UGeckoInstruction inst)
} }
// This branch gets changed to a NOP when the fastpath fails // This branch gets changed to a NOP when the fastpath fails
FixupBranch fast_path = B(); FixupBranch fast_path;
FixupBranch slow_out; if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem)
fast_path = B();
{ {
PUSH(4, R0, R1, R2, R3); PUSH(4, R0, R1, R2, R3);
if (single) if (single)
@ -334,8 +340,11 @@ void JitArm::stfXX(UGeckoInstruction inst)
BL(rA); BL(rA);
} }
POP(4, R0, R1, R2, R3); POP(4, R0, R1, R2, R3);
slow_out = B();
} }
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem)
{
FixupBranch slow_out = B();
SetJumpTarget(fast_path); SetJumpTarget(fast_path);
{ {
Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK) Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK)
@ -358,8 +367,8 @@ void JitArm::stfXX(UGeckoInstruction inst)
} }
gpr.Unlock(rC); gpr.Unlock(rC);
} }
SetJumpTarget(slow_out); SetJumpTarget(slow_out);
}
gpr.Unlock(rA, rB); gpr.Unlock(rA, rB);
} }