JitArm64: Preserve dirty flag when materializing immediate

Before dbf5dca, the dirty flag had no meaning for an immediate value,
so we made sure to always set the dirty flag when switching a register
from Immediate to Register. But after dbf5dca, that is no longer the
case. If an immediate is marked as not dirty, we can keep the register
marked as not dirty after materializing the value. This way we skip
having to write it back to ppcState later.
This commit is contained in:
JosJuice 2023-11-05 09:21:58 +01:00
parent 1b7bd32ac1
commit f9dd13a309

View File

@ -317,7 +317,6 @@ ARM64Reg Arm64GPRCache::R(const GuestRegInfo& guest_reg)
ARM64Reg host_reg = bitsize != 64 ? GetReg() : EncodeRegTo64(GetReg());
m_emit->MOVI2R(host_reg, reg.GetImm());
reg.Load(host_reg);
reg.SetDirty(true);
return host_reg;
}
break;