From 8fa23436f969f45880183daebdfe9896b45b7290 Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi <18193363+elad335@users.noreply.github.com> Date: Thu, 30 May 2024 09:28:14 +0300 Subject: [PATCH] PPU Analyzer: Unuse per-instruction compilation on fallback --- rpcs3/Emu/Cell/PPUAnalyser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpcs3/Emu/Cell/PPUAnalyser.cpp b/rpcs3/Emu/Cell/PPUAnalyser.cpp index c8390b6075..62b7e5d936 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.cpp +++ b/rpcs3/Emu/Cell/PPUAnalyser.cpp @@ -929,6 +929,7 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b } } + bool used_fallback = false; if (func_queue.empty() && segs[0].size >= 4u) { // Fallback, identify functions using callers (no jumptable detection, tail calls etc) @@ -955,6 +956,7 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b { ppu_log.trace("Enqueued PPU function 0x%x using a caller at 0x%x", target, iaddr); add_func(target, 0, 0); + used_fallback = true; } } } @@ -2053,6 +2055,11 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b { if (block.attr & ppu_attr::no_size && block.size > 4) { + if (used_fallback) + { + continue; + } + ppu_log.warning("Block 0x%x will be compiled on per-instruction basis (size=0x%x)", block.addr, block.size); for (u32 addr = block.addr; addr < block.addr + block.size; addr += 4)