mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12:00
Refactor some 'offending' code a bit (no effect)
It appears linkage errors were rare even in debug mode (GCC/clang).
This commit is contained in:
parent
6cf0c5cd6d
commit
f9bc682115
4 changed files with 34 additions and 19 deletions
|
@ -126,11 +126,16 @@ static u64& ppu_ref(u32 addr)
|
|||
// Get interpreter cache value
|
||||
static u64 ppu_cache(u32 addr)
|
||||
{
|
||||
if (g_cfg.core.ppu_decoder > ppu_decoder_type::fast)
|
||||
{
|
||||
fmt::throw_exception("Invalid PPU decoder");
|
||||
}
|
||||
|
||||
// Select opcode table
|
||||
const auto& table = *(
|
||||
g_cfg.core.ppu_decoder == ppu_decoder_type::precise ? &g_ppu_interpreter_precise.get_table() :
|
||||
g_cfg.core.ppu_decoder == ppu_decoder_type::fast ? &g_ppu_interpreter_fast.get_table() :
|
||||
(fmt::throw_exception("Invalid PPU decoder"), nullptr));
|
||||
g_cfg.core.ppu_decoder == ppu_decoder_type::precise
|
||||
? &g_ppu_interpreter_precise.get_table()
|
||||
: &g_ppu_interpreter_fast.get_table());
|
||||
|
||||
return reinterpret_cast<uptr>(table[ppu_decode(vm::read32(addr))]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue