1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

PPU LLVM: Fix crash in Unity games

This commit is contained in:
Eladash 2024-04-18 15:44:42 +03:00 committed by Elad Ashkenazi
parent 093198e3d5
commit 7bf8917c08

View File

@ -5055,12 +5055,19 @@ bool ppu_initialize(const ppu_module& info, bool check_only, u64 file_size)
// Try to patch all single and unregistered BLRs with the same function (TODO: Maybe generalize it into PIC code detection and patching) // Try to patch all single and unregistered BLRs with the same function (TODO: Maybe generalize it into PIC code detection and patching)
ppu_intrp_func_t BLR_func = nullptr; ppu_intrp_func_t BLR_func = nullptr;
const bool is_first = jit && !jit_mod.init;
const bool showing_only_apply_stage = !g_progr.load() && !g_progr_ptotal && !g_progr_ftotal && g_progr_ptotal.compare_and_swap_test(0, 1); const bool showing_only_apply_stage = !g_progr.load() && !g_progr_ptotal && !g_progr_ftotal && g_progr_ptotal.compare_and_swap_test(0, 1);
progr = "Applying PPU Code..."; progr = "Applying PPU Code...";
if (!jit)
{
// No functions - nothing to do
ensure(info.funcs.empty());
return compiled_new;
}
const bool is_first = !jit_mod.init;
if (is_first) if (is_first)
{ {
jit->fin(); jit->fin();