diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index a4fccecd75..50138efc06 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -3199,7 +3199,7 @@ extern fs::file make_file_view(fs::file&& _file, u64 offset) extern void ppu_finalize(const ppu_module& info) { - if (info.name.empty()) + if (!info.cache.empty()) { // Don't remove main module from memory return; @@ -3226,7 +3226,7 @@ extern void ppu_finalize(const ppu_module& info) fmt::append(cache_path, "ppu-%s-%s/", fmt::base57(info.sha1), info.path.substr(info.path.find_last_of('/') + 1)); #ifdef LLVM_AVAILABLE - g_fxo->get().remove(cache_path + info.name + "_" + std::to_string(info.segs[0].addr)); + g_fxo->get().remove(cache_path + info.name + "_" + std::to_string(std::bit_cast(info.segs[0].ptr))); #endif } @@ -3572,6 +3572,11 @@ extern void ppu_precompile(std::vector& dir_queue, std::vector data) - jit_module& jit_mod = g_fxo->get().get(cache_path + info.name + "_" + std::to_string(info.segs[0].addr)); + jit_module& jit_mod = g_fxo->get().get(cache_path + info.name + "_" + std::to_string(std::bit_cast(info.segs[0].ptr))); // Compiler instance (deferred initialization) std::shared_ptr& jit = jit_mod.pjit;