mirror of https://github.com/RPCS3/rpcs3.git
parent
12eee6a19e
commit
5d4c5ecc1c
|
@ -206,9 +206,9 @@ spu_function_t spu_recompiler::compile(std::vector<u32>&& func_rv)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check code
|
// Check code
|
||||||
if (false)
|
if (!g_cfg.core.spu_verification)
|
||||||
{
|
{
|
||||||
// Disable check (not available)
|
// Disable check (unsafe)
|
||||||
}
|
}
|
||||||
else if (func.size() - 1 == 1)
|
else if (func.size() - 1 == 1)
|
||||||
{
|
{
|
||||||
|
@ -764,11 +764,14 @@ spu_function_t spu_recompiler::compile(std::vector<u32>&& func_rv)
|
||||||
c->bind(label_stop);
|
c->bind(label_stop);
|
||||||
c->ret();
|
c->ret();
|
||||||
|
|
||||||
|
if (g_cfg.core.spu_verification)
|
||||||
|
{
|
||||||
// Dispatch
|
// Dispatch
|
||||||
c->align(kAlignCode, 16);
|
c->align(kAlignCode, 16);
|
||||||
c->bind(label_diff);
|
c->bind(label_diff);
|
||||||
c->inc(SPU_OFF_64(block_failure));
|
c->inc(SPU_OFF_64(block_failure));
|
||||||
c->jmp(imm_ptr(&spu_recompiler_base::dispatch));
|
c->jmp(imm_ptr(&spu_recompiler_base::dispatch));
|
||||||
|
}
|
||||||
|
|
||||||
for (auto&& work : decltype(after)(std::move(after)))
|
for (auto&& work : decltype(after)(std::move(after)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1320,9 +1320,10 @@ public:
|
||||||
// Emit code check
|
// Emit code check
|
||||||
m_ir->SetInsertPoint(label_test);
|
m_ir->SetInsertPoint(label_test);
|
||||||
|
|
||||||
if (false)
|
if (!g_cfg.core.spu_verification)
|
||||||
{
|
{
|
||||||
// Disable check (not available)
|
// Disable check (unsafe)
|
||||||
|
m_ir->CreateBr(label_body);
|
||||||
}
|
}
|
||||||
else if (func.size() - 1 == 1)
|
else if (func.size() - 1 == 1)
|
||||||
{
|
{
|
||||||
|
@ -1506,9 +1507,17 @@ public:
|
||||||
m_ir->CreateRetVoid();
|
m_ir->CreateRetVoid();
|
||||||
|
|
||||||
m_ir->SetInsertPoint(label_diff);
|
m_ir->SetInsertPoint(label_diff);
|
||||||
|
|
||||||
|
if (g_cfg.core.spu_verification)
|
||||||
|
{
|
||||||
const auto pbfail = spu_ptr<u64>(&SPUThread::block_failure);
|
const auto pbfail = spu_ptr<u64>(&SPUThread::block_failure);
|
||||||
m_ir->CreateStore(m_ir->CreateAdd(m_ir->CreateLoad(pbfail), m_ir->getInt64(1)), pbfail);
|
m_ir->CreateStore(m_ir->CreateAdd(m_ir->CreateLoad(pbfail), m_ir->getInt64(1)), pbfail);
|
||||||
tail(&spu_recompiler_base::dispatch, m_thread, m_ir->getInt32(0), m_ir->getInt32(0));
|
tail(&spu_recompiler_base::dispatch, m_thread, m_ir->getInt32(0), m_ir->getInt32(0));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_ir->CreateUnreachable();
|
||||||
|
}
|
||||||
|
|
||||||
// Clear context
|
// Clear context
|
||||||
m_gpr.fill({});
|
m_gpr.fill({});
|
||||||
|
|
|
@ -322,6 +322,7 @@ struct cfg_root : cfg::node
|
||||||
cfg::_bool spu_shared_runtime{this, "SPU Shared Runtime", true}; // Share compiled SPU functions between all threads
|
cfg::_bool spu_shared_runtime{this, "SPU Shared Runtime", true}; // Share compiled SPU functions between all threads
|
||||||
cfg::_enum<spu_block_size_type> spu_block_size{this, "SPU Block Size"};
|
cfg::_enum<spu_block_size_type> spu_block_size{this, "SPU Block Size"};
|
||||||
cfg::_bool spu_accurate_getllar{this, "Accurate GETLLAR", false};
|
cfg::_bool spu_accurate_getllar{this, "Accurate GETLLAR", false};
|
||||||
|
cfg::_bool spu_verification{this, "SPU Verification", true}; // Should be enabled
|
||||||
|
|
||||||
cfg::_enum<lib_loading_type> lib_loading{this, "Lib Loader", lib_loading_type::liblv2only};
|
cfg::_enum<lib_loading_type> lib_loading{this, "Lib Loader", lib_loading_type::liblv2only};
|
||||||
cfg::_bool hook_functions{this, "Hook static functions"};
|
cfg::_bool hook_functions{this, "Hook static functions"};
|
||||||
|
|
Loading…
Reference in New Issue