From 22513fb6fe281f5ccb75aaddb6417a12a66c313d Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 25 May 2020 16:42:42 +0200 Subject: emumem: A little more speedup. cache and specific change syntax, and are not pointers anymore [O. Galibert] The last(?) two changes are: - Add a template parameter to everything (theoretically the address space width, in practice a level derived from it to keep as much compatibility between widths as possible) so that the shift size becomes a constant. - Change the syntax of declaring and initializing the caches and specifics so that they're embedded in the owner device. Solves lifetime issues and also removes one indirection (looking up the base dispatch pointer through the cache/specific pointer). --- src/emu/emumem_heun.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/emu/emumem_heun.cpp') diff --git a/src/emu/emumem_heun.cpp b/src/emu/emumem_heun.cpp index c25d77bbd33..ff1899d686e 100644 --- a/src/emu/emumem_heun.cpp +++ b/src/emu/emumem_heun.cpp @@ -5,7 +5,7 @@ #include "emumem_hea.h" #include "emumem_heun.h" -template typename emu::detail::handler_entry_size::uX handler_entry_read_unmapped::read(offs_t offset, uX mem_mask) +template typename emu::detail::handler_entry_size::uX handler_entry_read_unmapped::read(offs_t offset, uX mem_mask) const { if (inh::m_space->log_unmap() && !inh::m_space->m_manager.machine().side_effects_disabled()) inh::m_space->device().logerror(inh::m_space->is_octal() @@ -17,13 +17,13 @@ template typename emu::detail::handler_ent return inh::m_space->unmap(); } -template std::string handler_entry_read_unmapped::name() const +template std::string handler_entry_read_unmapped::name() const { return "unmapped"; } -template void handler_entry_write_unmapped::write(offs_t offset, uX data, uX mem_mask) +template void handler_entry_write_unmapped::write(offs_t offset, uX data, uX mem_mask)const { if (inh::m_space->log_unmap() && !inh::m_space->m_manager.machine().side_effects_disabled()) inh::m_space->device().logerror(inh::m_space->is_octal() @@ -35,7 +35,7 @@ template void handler_entry_write_unmapped 2 << Width, mem_mask); } -template std::string handler_entry_write_unmapped::name() const +template std::string handler_entry_write_unmapped::name() const { return "unmapped"; } @@ -43,22 +43,22 @@ template std::string handler_entry_write_u -template typename emu::detail::handler_entry_size::uX handler_entry_read_nop::read(offs_t offset, uX mem_mask) +template typename emu::detail::handler_entry_size::uX handler_entry_read_nop::read(offs_t offset, uX mem_mask) const { return inh::m_space->unmap(); } -template std::string handler_entry_read_nop::name() const +template std::string handler_entry_read_nop::name() const { return "nop"; } -template void handler_entry_write_nop::write(offs_t offset, uX data, uX mem_mask) +template void handler_entry_write_nop::write(offs_t offset, uX data, uX mem_mask) const { } -template std::string handler_entry_write_nop::name() const +template std::string handler_entry_write_nop::name() const { return "nop"; } -- cgit v1.2.3-70-g09d2