Prevent MFHI and MFLO from clobbering R0.

This commit is contained in:
Jean-Philip Desjardins 2018-05-22 20:37:28 -04:00
parent 70791896e5
commit f14c8d47f4

View File

@ -898,6 +898,8 @@ void CMA_MIPSIV::SYNC()
//10
void CMA_MIPSIV::MFHI()
{
if(m_nRD == 0) return;
m_codeGen->PushRel(offsetof(CMIPS, m_State.nHI[0]));
m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRD].nV[0]));
@ -918,6 +920,8 @@ void CMA_MIPSIV::MTHI()
//12
void CMA_MIPSIV::MFLO()
{
if(m_nRD == 0) return;
m_codeGen->PushRel(offsetof(CMIPS, m_State.nLO[0]));
m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRD].nV[0]));