JitArm64: Optimize gather pipe writes.
This commit is contained in:
parent
6ad63c1b35
commit
6c9bb67ca0
|
@ -229,7 +229,6 @@ void JitArm64::SafeStoreFromReg(s32 dest, u32 value, s32 regOffset, u32 flags, s
|
|||
|
||||
if (is_immediate && jo.optimizeGatherPipe && PowerPC::IsOptimizableGatherPipeWrite(imm_addr))
|
||||
{
|
||||
ARM64Reg WA = INVALID_REG;
|
||||
int accessSize;
|
||||
if (flags & BackPatchInfo::FLAG_SIZE_32)
|
||||
accessSize = 32;
|
||||
|
@ -238,30 +237,23 @@ void JitArm64::SafeStoreFromReg(s32 dest, u32 value, s32 regOffset, u32 flags, s
|
|||
else
|
||||
accessSize = 8;
|
||||
|
||||
if (accessSize != 8)
|
||||
WA = gpr.GetReg();
|
||||
|
||||
MOVP2R(X1, &PowerPC::ppcState.gather_pipe_ptr);
|
||||
LDR(INDEX_UNSIGNED, X0, X1, 0);
|
||||
LDR(INDEX_UNSIGNED, X0, PPC_REG, PPCSTATE_OFF(gather_pipe_ptr));
|
||||
if (accessSize == 32)
|
||||
{
|
||||
REV32(WA, RS);
|
||||
STR(INDEX_POST, WA, X0, 4);
|
||||
REV32(W1, RS);
|
||||
STR(INDEX_POST, W1, X0, 4);
|
||||
}
|
||||
else if (accessSize == 16)
|
||||
{
|
||||
REV16(WA, RS);
|
||||
STRH(INDEX_POST, WA, X0, 2);
|
||||
REV16(W1, RS);
|
||||
STRH(INDEX_POST, W1, X0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
STRB(INDEX_POST, RS, X0, 1);
|
||||
}
|
||||
STR(INDEX_UNSIGNED, X0, X1, 0);
|
||||
STR(INDEX_UNSIGNED, X0, PPC_REG, PPCSTATE_OFF(gather_pipe_ptr));
|
||||
js.fifoBytesSinceCheck += accessSize >> 3;
|
||||
|
||||
if (accessSize != 8)
|
||||
gpr.Unlock(WA);
|
||||
}
|
||||
else if (is_immediate && PowerPC::IsOptimizableRAMAddress(imm_addr))
|
||||
{
|
||||
|
|
|
@ -356,8 +356,7 @@ void JitArm64::stfXX(UGeckoInstruction inst)
|
|||
else
|
||||
accessSize = 32;
|
||||
|
||||
MOVP2R(X1, &PowerPC::ppcState.gather_pipe_ptr);
|
||||
LDR(INDEX_UNSIGNED, X0, X1, 0);
|
||||
LDR(INDEX_UNSIGNED, X0, PPC_REG, PPCSTATE_OFF(gather_pipe_ptr));
|
||||
if (flags & BackPatchInfo::FLAG_SIZE_F64)
|
||||
{
|
||||
m_float_emit.REV64(8, Q0, V0);
|
||||
|
@ -374,7 +373,7 @@ void JitArm64::stfXX(UGeckoInstruction inst)
|
|||
|
||||
m_float_emit.STR(accessSize, INDEX_POST, accessSize == 64 ? Q0 : D0, X0, accessSize >> 3);
|
||||
|
||||
STR(INDEX_UNSIGNED, X0, X1, 0);
|
||||
STR(INDEX_UNSIGNED, X0, PPC_REG, PPCSTATE_OFF(gather_pipe_ptr));
|
||||
js.fifoBytesSinceCheck += accessSize >> 3;
|
||||
|
||||
if (update)
|
||||
|
|
Loading…
Reference in New Issue