Fix register usage detection in PPCAnalyst.

lmw/stmw weren't properly setting input and output registers since they use multiple registers.
dcbz was just missing a flag in the instruction tables.
This commit is contained in:
Ryan Houdek
2014-12-02 15:50:18 -06:00
parent e40f129fdd
commit 08660c89ad
2 changed files with 19 additions and 3 deletions

View File

@ -560,6 +560,22 @@ void PPCAnalyzer::SetInstructionStats(CodeBlock *block, CodeOp *code, GekkoOPInf
code->regsIn[code->inst.RS] = true;
block->m_gpa->SetInputRegister(code->inst.RS, index);
}
if (code->inst.OPCD == 46) // lmw
{
for (int iReg = code->inst.RD; iReg < 32; ++iReg)
{
code->regsOut[iReg] = true;
block->m_gpa->SetOutputRegister(iReg, index);
}
}
else if (code->inst.OPCD == 47) //stmw
{
for (int iReg = code->inst.RS; iReg < 32; ++iReg)
{
code->regsIn[iReg] = true;
block->m_gpa->SetInputRegister(iReg, index);
}
}
code->fregOut = -1;
if (opinfo->flags & FL_OUT_FLOAT_D)