Skip to content

Commit

Permalink
Merge pull request #12471 from mitaclaw/flush-gpr-arm-bug
Browse files Browse the repository at this point in the history
Fix Logic Inefficiency in Arm64GPRCache::FlushRegisters
  • Loading branch information
Tilka committed Dec 31, 2023
2 parents 8ecc478 + 01e534a commit 07df4ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.cpp
Expand Up @@ -243,8 +243,9 @@ void Arm64GPRCache::FlushRegister(size_t index, bool maintain_state, ARM64Reg tm

void Arm64GPRCache::FlushRegisters(BitSet32 regs, bool maintain_state, ARM64Reg tmp_reg)
{
for (int i : regs)
for (auto iter = regs.begin(); iter != regs.end(); ++iter)
{
const int i = *iter;
ASSERT_MSG(DYNA_REC, m_guest_registers[GUEST_GPR_OFFSET + i].GetType() != RegType::Discarded,
"Attempted to flush discarded register");

Expand All @@ -269,7 +270,7 @@ void Arm64GPRCache::FlushRegisters(BitSet32 regs, bool maintain_state, ARM64Reg
reg1.Flush();
reg2.Flush();
}
++i;
++iter;
continue;
}
}
Expand Down

0 comments on commit 07df4ff

Please sign in to comment.