diff options
Diffstat (limited to 'src/devices/cpu/dsp16')
-rw-r--r-- | src/devices/cpu/dsp16/dsp16.cpp | 16 | ||||
-rw-r--r-- | src/devices/cpu/dsp16/dsp16.h | 2 | ||||
-rw-r--r-- | src/devices/cpu/dsp16/dsp16fe.cpp | 6 | ||||
-rw-r--r-- | src/devices/cpu/dsp16/dsp16fe.h | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp index f0c28c5ca32..778d2efb701 100644 --- a/src/devices/cpu/dsp16/dsp16.cpp +++ b/src/devices/cpu/dsp16/dsp16.cpp @@ -186,7 +186,7 @@ dsp16_device_base::dsp16_device_base( { "ram", ENDIANNESS_BIG, 16, yaau_bits, -1, std::move(data_map) }, { "exm", ENDIANNESS_BIG, 16, 16, -1 } } , m_yaau_bits(yaau_bits) - , m_workram(*this, "workram"), m_spaces{ nullptr, nullptr, nullptr }, m_pcache(nullptr), m_workram_mask(0U) + , m_workram(*this, "workram"), m_spaces{ nullptr, nullptr, nullptr }, m_workram_mask(0U) , m_drc_cache(CACHE_SIZE), m_core(nullptr, [] (core_state *core) { core->~core_state(); }), m_recompiler() , m_cache_mode(cache::NONE), m_phase(phase::PURGE), m_int_enable{ 0U, 0U }, m_flags(FLAGS_NONE), m_cache_ptr(0U), m_cache_limit(0U), m_cache_iterations(0U) , m_exm_in(1U), m_int_in(CLEAR_LINE), m_iack_out(1U) @@ -231,7 +231,7 @@ void dsp16_device_base::device_start() m_spaces[AS_PROGRAM] = &space(AS_PROGRAM); m_spaces[AS_DATA] = &space(AS_DATA); m_spaces[AS_IO] = &space(AS_IO); - m_pcache = m_spaces[AS_PROGRAM]->cache<1, -1, ENDIANNESS_BIG>(); + m_spaces[AS_PROGRAM]->cache(m_pcache); m_workram_mask = u16((m_workram.bytes() >> 1) - 1); if (allow_drc()) @@ -1133,7 +1133,7 @@ template <bool Debugger, bool Caching> inline void dsp16_device_base::execute_so set_predicate(predicate); if (fetch_target) - *fetch_target = m_pcache->read_word(fetch_addr); + *fetch_target = m_pcache.read_word(fetch_addr); if (phase::OP1 == m_phase) { @@ -1274,7 +1274,7 @@ template <bool Debugger> inline void dsp16_device_base::execute_some_cache() m_core->op_dau_ad(op) = d; if (last_instruction) { - m_rom_data = m_pcache->read_word(m_core->xaau_pt); + m_rom_data = m_pcache.read_word(m_core->xaau_pt); m_phase = phase::OP2; } else @@ -1289,7 +1289,7 @@ template <bool Debugger> inline void dsp16_device_base::execute_some_cache() m_core->op_dau_ad(op) = m_core->dau_f1(op); m_core->dau_temp = s16(m_core->dau_y >> 16); m_core->dau_set_y(yaau_read<Debugger>(op)); - m_rom_data = m_pcache->read_word(m_core->xaau_pt); + m_rom_data = m_pcache.read_word(m_core->xaau_pt); m_phase = phase::OP2; break; @@ -1298,7 +1298,7 @@ template <bool Debugger> inline void dsp16_device_base::execute_some_cache() m_core->dau_set_y(yaau_read<Debugger>(op)); if (last_instruction) { - m_rom_data = m_pcache->read_word(m_core->xaau_pt); + m_rom_data = m_pcache.read_word(m_core->xaau_pt); m_phase = phase::OP2; } else @@ -1384,7 +1384,7 @@ template <bool Debugger> inline void dsp16_device_base::execute_some_cache() // overlapped fetch of next instruction from ROM mode_change = true; m_cache_mode = cache::NONE; - m_cache[m_cache_ptr = 0] = m_pcache->read_word(m_core->xaau_pc); + m_cache[m_cache_ptr = 0] = m_pcache.read_word(m_core->xaau_pc); m_st_pcbase = m_core->xaau_pc; } else @@ -1420,7 +1420,7 @@ inline void dsp16_device_base::overlap_rom_data_read() case 0x19: // F1 ; y = a0 ; x = *pt++[i] case 0x1b: // F1 ; y = a1 ; x = *pt++[i] case 0x1f: // F1 ; y = Y ; x = *pt++[i] - m_rom_data = m_pcache->read_word(m_core->xaau_pt); + m_rom_data = m_pcache.read_word(m_core->xaau_pt); break; } } diff --git a/src/devices/cpu/dsp16/dsp16.h b/src/devices/cpu/dsp16/dsp16.h index 13fa045341b..5cc6c6a67f2 100644 --- a/src/devices/cpu/dsp16/dsp16.h +++ b/src/devices/cpu/dsp16/dsp16.h @@ -275,7 +275,7 @@ private: // memory system access required_shared_ptr<u16> m_workram; address_space *m_spaces[3]; - memory_access_cache<1, -1, ENDIANNESS_BIG> *m_pcache; + memory_access<16, 1, -1, ENDIANNESS_BIG>::cache m_pcache; u16 m_workram_mask; // recompiler stuff diff --git a/src/devices/cpu/dsp16/dsp16fe.cpp b/src/devices/cpu/dsp16/dsp16fe.cpp index 2e79371bdd2..a972d14d8ff 100644 --- a/src/devices/cpu/dsp16/dsp16fe.cpp +++ b/src/devices/cpu/dsp16/dsp16fe.cpp @@ -30,7 +30,7 @@ bool dsp16_device_base::frontend::describe(opcode_desc &desc, opcode_desc const desc.length = 1U; desc.cycles = 1U; - u16 const op(m_host.m_pcache->read_word(desc.physpc)); + u16 const op(m_host.m_pcache.read_word(desc.physpc)); switch (op >> 11) { case 0x00: // goto JA @@ -219,9 +219,9 @@ bool dsp16_device_base::frontend::describe(opcode_desc &desc, opcode_desc const program fetch helpers ***********************************************************************/ -u16 dsp16_device_base::frontend::read_op(opcode_desc const &desc, u16 offset) const +u16 dsp16_device_base::frontend::read_op(opcode_desc const &desc, u16 offset) { - return m_host.m_pcache->read_word((desc.physpc & XAAU_I_EXT) | ((desc.physpc + offset) & XAAU_I_MASK)); + return m_host.m_pcache.read_word((desc.physpc & XAAU_I_EXT) | ((desc.physpc + offset) & XAAU_I_MASK)); } /*********************************************************************** diff --git a/src/devices/cpu/dsp16/dsp16fe.h b/src/devices/cpu/dsp16/dsp16fe.h index e61c383f2c8..8dc3b96700e 100644 --- a/src/devices/cpu/dsp16/dsp16fe.h +++ b/src/devices/cpu/dsp16/dsp16fe.h @@ -66,9 +66,9 @@ protected: private: // program fetch helpers - u16 read_op(opcode_desc const &desc, u16 offset) const; - u16 read_op(opcode_desc const &desc) const { return read_op(desc, 0U); } - u16 read_imm(opcode_desc const &desc) const { return read_op(desc, 1U); } + u16 read_op(opcode_desc const &desc, u16 offset); + u16 read_op(opcode_desc const &desc) { return read_op(desc, 0U); } + u16 read_imm(opcode_desc const &desc) { return read_op(desc, 1U); } // non-trivial instruction helpers bool describe_goto_b(opcode_desc &desc, u16 op); @@ -98,7 +98,7 @@ private: template <typename... T> static void flag_required_output_reg(opcode_desc &desc, T... reg) { flag_reg(desc.regreq, reg...); } // need access to host device for program fetch - dsp16_device_base const &m_host; + dsp16_device_base &m_host; // for making sweeping assumptions u32 m_cache_cycles = 0U, m_cache_last_cycles = 0U, m_cache_flags = 0U; |