diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 36d4295320..5dcca95f57 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -94,7 +94,7 @@ void spu_cache::initialize() } // SPU cache file (version + block size type) - const std::string loc = _main->cache + u8"spu-ยง" + fmt::to_lower(g_cfg.core.spu_block_size.to_string()) + "-v4.dat"; + const std::string loc = _main->cache + "spu-" + fmt::to_lower(g_cfg.core.spu_block_size.to_string()) + "-v5.dat"; auto cache = std::make_shared(loc); @@ -556,7 +556,7 @@ std::vector spu_recompiler_base::block(const be_t* ls, u32 entry_point add_block(pos + 4); } } - else if (type == spu_itype::BI && !op.d && !op.e) + else if (type == spu_itype::BI && g_cfg.core.spu_block_size != spu_block_size_type::safe && !op.d && !op.e && !sync) { // Analyse jump table (TODO) std::basic_string jt_abs; @@ -590,6 +590,8 @@ std::vector spu_recompiler_base::block(const be_t* ls, u32 entry_point if (std::max(jt_abs.size(), jt_rel.size()) * 4 + start <= i) { // Neither type of jump table completes + jt_abs.clear(); + jt_rel.clear(); break; } } @@ -619,6 +621,8 @@ std::vector spu_recompiler_base::block(const be_t* ls, u32 entry_point { jt_abs.clear(); } + + verify(HERE), jt_abs.size() != jt_rel.size(); } if (jt_abs.size() >= jt_rel.size()) @@ -685,6 +689,10 @@ std::vector spu_recompiler_base::block(const be_t* ls, u32 entry_point LOG_WARNING(SPU, "[0x%x] No patterns detected (hbr=0x%x:0x%x)", pos, hbr_loc, hbr_tg); } } + else if (type == spu_itype::BI && sync) + { + LOG_NOTICE(SPU, "[0x%x] At 0x%x: ignoring indirect branch (SYNC)", result[0], pos); + } if (type == spu_itype::BI || sl) {