mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
JitArm64: Improve register handling for MMIO loadstores
Because of the previous commit, `regs_in_use` must not include `dest_reg` when calling MMIOLoadToReg. There are also some other registers we can skip including in regs_in_use just for efficiency's sake. The `addr_reg_set = false` statements that I've added in this commit are technically redundant – if `mmio_address` is non-zero then `addr_reg_set` is already false – but it's just a coincidence that that's the case.
This commit is contained in:
parent
0660f12da4
commit
431ee1c48a
@ -141,8 +141,12 @@ void JitArm64::SafeLoadToReg(u32 dest, s32 addr, s32 offsetReg, u32 flags, s32 o
|
||||
}
|
||||
else if (mmio_address)
|
||||
{
|
||||
regs_in_use[DecodeReg(ARM64Reg::W0)] = 0;
|
||||
regs_in_use[DecodeReg(ARM64Reg::W30)] = 0;
|
||||
regs_in_use[DecodeReg(dest_reg)] = 0;
|
||||
MMIOLoadToReg(Memory::mmio_mapping.get(), this, &m_float_emit, regs_in_use, fprs_in_use,
|
||||
dest_reg, mmio_address, flags);
|
||||
addr_reg_set = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -308,8 +312,13 @@ void JitArm64::SafeStoreFromReg(s32 dest, u32 value, s32 regOffset, u32 flags, s
|
||||
}
|
||||
else if (mmio_address)
|
||||
{
|
||||
regs_in_use[DecodeReg(ARM64Reg::W0)] = 0;
|
||||
regs_in_use[DecodeReg(ARM64Reg::W1)] = 0;
|
||||
regs_in_use[DecodeReg(ARM64Reg::W30)] = 0;
|
||||
regs_in_use[DecodeReg(RS)] = 0;
|
||||
MMIOWriteRegToAddr(Memory::mmio_mapping.get(), this, &m_float_emit, regs_in_use, fprs_in_use,
|
||||
RS, mmio_address, flags);
|
||||
addr_reg_set = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user