mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 03:24:59 +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
990084c405
commit
b5ad740d55
1 changed files with 4 additions and 4 deletions
|
@ -269,10 +269,10 @@ void Arm64GPRCache::FlushRegisters(BitSet32 regs, FlushMode mode, ARM64Reg tmp_r
|
|||
m_emit->STP(IndexType::Signed, RX1, RX2, PPC_REG, u32(ppc_offset));
|
||||
if (flush_all)
|
||||
{
|
||||
if (!reg1_zero)
|
||||
UnlockRegister(EncodeRegTo32(RX1));
|
||||
if (!reg2_zero)
|
||||
UnlockRegister(EncodeRegTo32(RX2));
|
||||
if (reg1.GetType() == RegType::Register)
|
||||
UnlockRegister(reg1.GetReg());
|
||||
if (reg2.GetType() == RegType::Register)
|
||||
UnlockRegister(reg2.GetReg());
|
||||
reg1.Flush();
|
||||
reg2.Flush();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue