PPU: Fixup interpreter and analyzer

This commit is contained in:
Eladash 2023-08-07 21:33:36 +03:00 committed by Elad Ashkenazi
parent edf4f7eacc
commit cdc0441405
2 changed files with 2 additions and 4 deletions

View File

@ -1463,7 +1463,7 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b
{
const u32 target = (op.aa ? 0 : iaddr) + (type == ppu_itype::B ? +op.bt24 : +op.bt14);
if (target >= start && target < end && (op.aa && verify_func(iaddr)))
if (target >= start && target < end && (!op.aa || verify_func(iaddr)))
{
if (target < func.addr || target >= func.addr + func.size)
{

View File

@ -3769,9 +3769,7 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
{
for (auto& block : func.blocks)
{
const auto targets = g_fxo->get<ppu_far_jumps_t>().get_targets(block.first, block.second);
if (!targets.empty())
if (g_fxo->is_init<ppu_far_jumps_t>() && !g_fxo->get<ppu_far_jumps_t>().get_targets(block.first, block.second).empty())
{
// Replace the block with ppu_far_jump
continue;