SPU: write cache before compiling

This commit is contained in:
Nekotekina 2019-04-13 22:36:33 +03:00
parent e064b92058
commit 8deb20e928
2 changed files with 5 additions and 10 deletions

View file

@ -844,11 +844,6 @@ bool spu_recompiler::compile(u64 last_reset_count, const std::vector<u32>& func)
fs::file(m_spurt->get_cache_path() + "spu.log", fs::write + fs::append).write(log);
}
if (m_cache && g_cfg.core.spu_cache)
{
m_cache->add(func);
}
return true;
}

View file

@ -785,6 +785,11 @@ spu_recompiler_base::~spu_recompiler_base()
void spu_recompiler_base::make_function(const std::vector<u32>& data)
{
if (m_cache && g_cfg.core.spu_cache)
{
m_cache->add(data);
}
for (u64 reset_count = m_spurt->get_reset_count();;)
{
if (LIKELY(compile(reset_count, data)))
@ -3538,11 +3543,6 @@ public:
fs::file(m_spurt->get_cache_path() + "spu.log", fs::write + fs::append).write(log);
}
if (m_cache && g_cfg.core.spu_cache)
{
m_cache->add(func);
}
return true;
}