Merge pull request #10061 from JosJuice/jitwidget-div-zero
DolphinQt: Fix divide by zero in JITWidget::Update
This commit is contained in:
commit
7d88354659
|
@ -186,14 +186,22 @@ void JITWidget::Update()
|
||||||
ppc_disasm << st.numCycles << " estimated cycles" << std::endl;
|
ppc_disasm << st.numCycles << " estimated cycles" << std::endl;
|
||||||
|
|
||||||
ppc_disasm << "Num instr: PPC: " << code_block.m_num_instructions
|
ppc_disasm << "Num instr: PPC: " << code_block.m_num_instructions
|
||||||
<< " Host: " << host_instructions_count << " (blowup: "
|
<< " Host: " << host_instructions_count;
|
||||||
<< 100 * host_instructions_count / code_block.m_num_instructions - 100 << "%)"
|
if (code_block.m_num_instructions != 0)
|
||||||
<< std::endl;
|
{
|
||||||
|
ppc_disasm << " (blowup: "
|
||||||
|
<< 100 * host_instructions_count / code_block.m_num_instructions - 100 << "%)";
|
||||||
|
}
|
||||||
|
ppc_disasm << std::endl;
|
||||||
|
|
||||||
ppc_disasm << "Num bytes: PPC: " << code_block.m_num_instructions * 4
|
ppc_disasm << "Num bytes: PPC: " << code_block.m_num_instructions * 4
|
||||||
<< " Host: " << host_code_size
|
<< " Host: " << host_code_size;
|
||||||
<< " (blowup: " << 100 * host_code_size / (4 * code_block.m_num_instructions) - 100
|
if (code_block.m_num_instructions != 0)
|
||||||
<< "%)" << std::endl;
|
{
|
||||||
|
ppc_disasm << " (blowup: " << 100 * host_code_size / (4 * code_block.m_num_instructions) - 100
|
||||||
|
<< "%)";
|
||||||
|
}
|
||||||
|
ppc_disasm << std::endl;
|
||||||
|
|
||||||
m_ppc_asm_widget->setHtml(
|
m_ppc_asm_widget->setHtml(
|
||||||
QStringLiteral("<pre>%1</pre>").arg(QString::fromStdString(ppc_disasm.str())));
|
QStringLiteral("<pre>%1</pre>").arg(QString::fromStdString(ppc_disasm.str())));
|
||||||
|
|
Loading…
Reference in New Issue