Merge pull request #11094 from Sintendo/arm64bind2regimm

JitArm64: Skip redundant imm to register writes
This commit is contained in:
Admiral H. Curtiss 2022-09-25 21:45:46 +02:00 committed by GitHub
commit 9ca1c0f533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -362,6 +362,16 @@ void Arm64GPRCache::BindToRegister(const GuestRegInfo& guest_reg, bool do_load,
m_emit->LDR(IndexType::Unsigned, host_reg, PPC_REG, u32(guest_reg.ppc_offset));
}
}
else if (reg_type == RegType::Immediate)
{
const ARM64Reg host_reg = bitsize != 64 ? GetReg() : EncodeRegTo64(GetReg());
if (do_load)
{
m_emit->MOVI2R(host_reg, reg.GetImm());
}
reg.Load(host_reg);
reg.SetDirty(set_dirty);
}
else if (set_dirty)
{
reg.SetDirty(true);