mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
SPU: Fixup
This commit is contained in:
parent
32df7315be
commit
26495a8455
1 changed files with 16 additions and 6 deletions
|
@ -8148,15 +8148,23 @@ std::array<reg_state_t, s_reg_max>& block_reg_info::evaluate_start_state(const s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& res_state = is_all_resolved ? cur_node->start_reg_state : temp;
|
if (qi == 0)
|
||||||
|
|
||||||
if (!is_all_resolved)
|
|
||||||
{
|
{
|
||||||
res_state = reg_state_t::make_unknown<s_reg_max>(it->block_pc);
|
// TODO: First block is always resolved here, but this logic can be improved to detect more cases of opportunistic resolving
|
||||||
|
is_all_resolved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (usz bi = 0; is_all_resolved && bi < it->state_prev.size(); bi++)
|
auto& res_state = is_all_resolved ? cur_node->start_reg_state : temp;
|
||||||
|
|
||||||
|
for (usz bi = 0, is_first = 1; bi < it->state_prev.size(); bi++)
|
||||||
{
|
{
|
||||||
|
if (it->state_prev[bi].disconnected)
|
||||||
|
{
|
||||||
|
// Loop state, even if not ignored for a million times the result would still be the same
|
||||||
|
// So ignore it
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
std::array<reg_state_t, s_reg_max>* arg_state{};
|
std::array<reg_state_t, s_reg_max>* arg_state{};
|
||||||
const auto& node = ::at32(map, it->state_prev[bi].block_pc);
|
const auto& node = ::at32(map, it->state_prev[bi].block_pc);
|
||||||
|
|
||||||
|
@ -8172,7 +8180,7 @@ std::array<reg_state_t, s_reg_max>& block_reg_info::evaluate_start_state(const s
|
||||||
ensure(it->state_prev[bi].state_written);
|
ensure(it->state_prev[bi].state_written);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bi == 0)
|
if (is_first)
|
||||||
{
|
{
|
||||||
res_state = *arg_state;
|
res_state = *arg_state;
|
||||||
}
|
}
|
||||||
|
@ -8180,6 +8188,8 @@ std::array<reg_state_t, s_reg_max>& block_reg_info::evaluate_start_state(const s
|
||||||
{
|
{
|
||||||
merge(res_state, res_state, *arg_state, it->block_pc);
|
merge(res_state, res_state, *arg_state, it->block_pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_first = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<reg_state_t, s_reg_max>* result_storage{};
|
std::array<reg_state_t, s_reg_max>* result_storage{};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue