mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
Disable SPU asmjit on ARM. Only supported on x86
This commit is contained in:
parent
77eef4d783
commit
e110334c2c
3 changed files with 51 additions and 8 deletions
|
@ -842,6 +842,7 @@ void spu_cache::initialize(bool build_existing_cache)
|
||||||
// Initialize compiler instances for parallel compilation
|
// Initialize compiler instances for parallel compilation
|
||||||
std::unique_ptr<spu_recompiler_base> compiler;
|
std::unique_ptr<spu_recompiler_base> compiler;
|
||||||
|
|
||||||
|
#if defined(ARCH_X64)
|
||||||
if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit)
|
if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit)
|
||||||
{
|
{
|
||||||
compiler = spu_recompiler_base::make_asmjit_recompiler();
|
compiler = spu_recompiler_base::make_asmjit_recompiler();
|
||||||
|
@ -850,6 +851,22 @@ void spu_cache::initialize(bool build_existing_cache)
|
||||||
{
|
{
|
||||||
compiler = spu_recompiler_base::make_llvm_recompiler();
|
compiler = spu_recompiler_base::make_llvm_recompiler();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Unsupported spu decoder '%s'", g_cfg.core.spu_decoder);
|
||||||
|
}
|
||||||
|
#elif defined(ARCH_ARM64)
|
||||||
|
if (g_cfg.core.spu_decoder == spu_decoder_type::llvm)
|
||||||
|
{
|
||||||
|
compiler = spu_recompiler_base::make_llvm_recompiler();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Unsupported spu decoder '%s'", g_cfg.core.spu_decoder);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#error "Unimplemented"
|
||||||
|
#endif
|
||||||
|
|
||||||
compiler->init();
|
compiler->init();
|
||||||
|
|
||||||
|
@ -2545,7 +2562,7 @@ bool reg_state_t::is_const() const
|
||||||
|
|
||||||
bool reg_state_t::compare_tags(const reg_state_t& rhs) const
|
bool reg_state_t::compare_tags(const reg_state_t& rhs) const
|
||||||
{
|
{
|
||||||
// Compare by tag, address of instruction origin
|
// Compare by tag, address of instruction origin
|
||||||
return tag == rhs.tag && origin == rhs.origin && is_instruction == rhs.is_instruction;
|
return tag == rhs.tag && origin == rhs.origin && is_instruction == rhs.is_instruction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6066,7 +6083,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
|
||||||
else if (atomic16->ls_offs.compare_with_mask_indifference(atomic16->lsa, SPU_LS_MASK_128) && atomic16->ls.is_less_than(128 - (atomic16->ls_offs.value & 127)))
|
else if (atomic16->ls_offs.compare_with_mask_indifference(atomic16->lsa, SPU_LS_MASK_128) && atomic16->ls.is_less_than(128 - (atomic16->ls_offs.value & 127)))
|
||||||
{
|
{
|
||||||
// Relative memory access with offset less than 128 bytes
|
// Relative memory access with offset less than 128 bytes
|
||||||
// Common around SPU utilities which have less strict restrictions about memory alignment
|
// Common around SPU utilities which have less strict restrictions about memory alignment
|
||||||
ok = true;
|
ok = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6340,7 +6357,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
|
||||||
{
|
{
|
||||||
atomic16->mem_count++;
|
atomic16->mem_count++;
|
||||||
|
|
||||||
// Do not clear lower 16 bytes addressing because the program can move on 4-byte basis
|
// Do not clear lower 16 bytes addressing because the program can move on 4-byte basis
|
||||||
const u32 offs = spu_branch_target(pos - result.lower_bound, op.si16);
|
const u32 offs = spu_branch_target(pos - result.lower_bound, op.si16);
|
||||||
|
|
||||||
if (atomic16->lsa.is_const() && [&]()
|
if (atomic16->lsa.is_const() && [&]()
|
||||||
|
@ -8142,7 +8159,7 @@ std::array<reg_state_t, s_reg_max>& block_reg_info::evaluate_start_state(const s
|
||||||
// Check if the node is resolved
|
// Check if the node is resolved
|
||||||
if (!node->has_true_state)
|
if (!node->has_true_state)
|
||||||
{
|
{
|
||||||
// Assume this block cannot be resolved at the moment
|
// Assume this block cannot be resolved at the moment
|
||||||
is_all_resolved = false;
|
is_all_resolved = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2140,20 +2140,31 @@ spu_thread::spu_thread(lv2_spu_group* group, u32 index, std::string_view name, u
|
||||||
, lv2_id(lv2_id)
|
, lv2_id(lv2_id)
|
||||||
, spu_tname(make_single<std::string>(name))
|
, spu_tname(make_single<std::string>(name))
|
||||||
{
|
{
|
||||||
|
#if defined(ARCH_X64)
|
||||||
if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit)
|
if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit)
|
||||||
{
|
{
|
||||||
jit = spu_recompiler_base::make_asmjit_recompiler();
|
jit = spu_recompiler_base::make_asmjit_recompiler();
|
||||||
}
|
}
|
||||||
else if (g_cfg.core.spu_decoder == spu_decoder_type::llvm)
|
else if (g_cfg.core.spu_decoder == spu_decoder_type::llvm)
|
||||||
{
|
{
|
||||||
#if defined(ARCH_X64)
|
|
||||||
jit = spu_recompiler_base::make_fast_llvm_recompiler();
|
jit = spu_recompiler_base::make_fast_llvm_recompiler();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Unsupported spu decoder '%s'", g_cfg.core.spu_decoder);
|
||||||
|
}
|
||||||
#elif defined(ARCH_ARM64)
|
#elif defined(ARCH_ARM64)
|
||||||
|
if (g_cfg.core.spu_decoder == spu_decoder_type::llvm)
|
||||||
|
{
|
||||||
jit = spu_recompiler_base::make_llvm_recompiler();
|
jit = spu_recompiler_base::make_llvm_recompiler();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Unsupported spu decoder '%s'", g_cfg.core.spu_decoder);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#error "Unimplemented"
|
#error "Unimplemented"
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
if (g_cfg.core.mfc_debug)
|
if (g_cfg.core.mfc_debug)
|
||||||
{
|
{
|
||||||
|
@ -2215,20 +2226,31 @@ spu_thread::spu_thread(utils::serial& ar, lv2_spu_group* group)
|
||||||
, lv2_id(ar)
|
, lv2_id(ar)
|
||||||
, spu_tname(make_single<std::string>(ar.operator std::string()))
|
, spu_tname(make_single<std::string>(ar.operator std::string()))
|
||||||
{
|
{
|
||||||
|
#if defined(ARCH_X64)
|
||||||
if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit)
|
if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit)
|
||||||
{
|
{
|
||||||
jit = spu_recompiler_base::make_asmjit_recompiler();
|
jit = spu_recompiler_base::make_asmjit_recompiler();
|
||||||
}
|
}
|
||||||
else if (g_cfg.core.spu_decoder == spu_decoder_type::llvm)
|
else if (g_cfg.core.spu_decoder == spu_decoder_type::llvm)
|
||||||
{
|
{
|
||||||
#if defined(ARCH_X64)
|
|
||||||
jit = spu_recompiler_base::make_fast_llvm_recompiler();
|
jit = spu_recompiler_base::make_fast_llvm_recompiler();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Unsupported spu decoder '%s'", g_cfg.core.spu_decoder);
|
||||||
|
}
|
||||||
#elif defined(ARCH_ARM64)
|
#elif defined(ARCH_ARM64)
|
||||||
|
if (g_cfg.core.spu_decoder == spu_decoder_type::llvm)
|
||||||
|
{
|
||||||
jit = spu_recompiler_base::make_llvm_recompiler();
|
jit = spu_recompiler_base::make_llvm_recompiler();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::throw_exception("Unsupported spu decoder '%s'", g_cfg.core.spu_decoder);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#error "Unimplemented"
|
#error "Unimplemented"
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
if (g_cfg.core.mfc_debug)
|
if (g_cfg.core.mfc_debug)
|
||||||
{
|
{
|
||||||
|
|
|
@ -398,6 +398,10 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||||
spu_bg->addButton(ui->spu_asmjit, static_cast<int>(spu_decoder_type::asmjit));
|
spu_bg->addButton(ui->spu_asmjit, static_cast<int>(spu_decoder_type::asmjit));
|
||||||
spu_bg->addButton(ui->spu_llvm, static_cast<int>(spu_decoder_type::llvm));
|
spu_bg->addButton(ui->spu_llvm, static_cast<int>(spu_decoder_type::llvm));
|
||||||
|
|
||||||
|
#ifndef ARCH_X64
|
||||||
|
ui->spu_asmjit->setEnabled(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
connect(spu_bg, &QButtonGroup::idToggled, [this](int id, bool checked)
|
connect(spu_bg, &QButtonGroup::idToggled, [this](int id, bool checked)
|
||||||
{
|
{
|
||||||
if (!checked) return;
|
if (!checked) return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue