JitArm64: Move MMIO handler result before popping stack

Otherwise we might throw the result away.
Fixes https://bugs.dolphin-emu.org/issues/13083.
This commit is contained in:
JosJuice 2022-10-29 13:39:02 +02:00
parent b66793194e
commit 0660f12da4
1 changed files with 6 additions and 3 deletions

View File

@ -78,9 +78,11 @@ private:
m_emit->ABI_PushRegisters(m_gprs_in_use);
float_emit.ABI_PushRegisters(m_fprs_in_use, ARM64Reg::X1);
m_emit->MOVI2R(ARM64Reg::W1, m_address);
m_emit->MOV(ARM64Reg::W2, m_src_reg);
m_emit->BLR(m_emit->ABI_SetupLambda(lambda));
float_emit.ABI_PopRegisters(m_fprs_in_use, ARM64Reg::X1);
m_emit->ABI_PopRegisters(m_gprs_in_use);
}
@ -173,15 +175,16 @@ private:
m_emit->ABI_PushRegisters(m_gprs_in_use);
float_emit.ABI_PushRegisters(m_fprs_in_use, ARM64Reg::X1);
m_emit->MOVI2R(ARM64Reg::W1, m_address);
m_emit->BLR(m_emit->ABI_SetupLambda(lambda));
float_emit.ABI_PopRegisters(m_fprs_in_use, ARM64Reg::X1);
m_emit->ABI_PopRegisters(m_gprs_in_use);
if (m_sign_extend)
m_emit->SBFM(m_dst_reg, ARM64Reg::W0, 0, sbits - 1);
else
m_emit->UBFM(m_dst_reg, ARM64Reg::W0, 0, sbits - 1);
float_emit.ABI_PopRegisters(m_fprs_in_use, ARM64Reg::X1);
m_emit->ABI_PopRegisters(m_gprs_in_use);
}
ARM64XEmitter* m_emit;