mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
JitArm64: Make FlushRegisters unlock condition more robust
To find out whether a host register needs to be unlocked, FlushRegisters checks if the guest register is known to be a zero immediate. This works right now, but it will stop working correctly once we gain the ability to have a guest register be a known immediate and be in a host register at the same time, because a register that's known to be a zero immediate may have had a host register allocated prior to the call to FlushRegisters. Instead, we should check whether the register is RegType::Register after we're done calling BindForRead.
This commit is contained in:
parent
7065b93ba5
commit
502b48a690
@ -272,10 +272,10 @@ void Arm64GPRCache::FlushRegisters(BitSet32 regs, FlushMode mode, ARM64Reg tmp_r
|
|||||||
m_emit->STP(IndexType::Signed, RX1, RX2, PPC_REG, u32(ppc_offset));
|
m_emit->STP(IndexType::Signed, RX1, RX2, PPC_REG, u32(ppc_offset));
|
||||||
if (flush_all)
|
if (flush_all)
|
||||||
{
|
{
|
||||||
if (!reg1_zero)
|
if (reg1.GetType() == RegType::Register)
|
||||||
UnlockRegister(EncodeRegTo32(RX1));
|
UnlockRegister(reg1.GetReg());
|
||||||
if (!reg2_zero)
|
if (reg2.GetType() == RegType::Register)
|
||||||
UnlockRegister(EncodeRegTo32(RX2));
|
UnlockRegister(reg2.GetReg());
|
||||||
reg1.Flush();
|
reg1.Flush();
|
||||||
reg2.Flush();
|
reg2.Flush();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user