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_mud.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/emu/emumem_mud.cpp') diff --git a/src/emu/emumem_mud.cpp b/src/emu/emumem_mud.cpp index 2fff5649b62..8359dd8224e 100644 --- a/src/emu/emumem_mud.cpp +++ b/src/emu/emumem_mud.cpp @@ -35,7 +35,7 @@ template<> u8 mask_to_ukey(u64 mask) (mask & 0x00000000000000ff ? 0x01 : 0x00); } -template memory_units_descriptor::memory_units_descriptor(u8 access_width, u8 access_endian, handler_entry *handler, offs_t addrstart, offs_t addrend, offs_t mask, typename emu::detail::handler_entry_size::uX unitmask, int cswidth) : m_handler(handler), m_access_width(access_width), m_access_endian(access_endian) +template memory_units_descriptor::memory_units_descriptor(u8 access_width, u8 access_endian, handler_entry *handler, offs_t addrstart, offs_t addrend, offs_t mask, typename emu::detail::handler_entry_size::uX unitmask, int cswidth) : m_handler(handler), m_access_width(access_width), m_access_endian(access_endian) { u32 bits_per_access = 8 << access_width; constexpr u32 NATIVE_MASK = Width + AddrShift >= 0 ? make_bitmask(Width + AddrShift) : 0; @@ -86,7 +86,7 @@ template memory_units_descriptor void memory_units_descriptor::generate(u8 ukey, typename emu::detail::handler_entry_size::uX gumask, typename emu::detail::handler_entry_size::uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count) +template void memory_units_descriptor::generate(u8 ukey, typename emu::detail::handler_entry_size::uX gumask, typename emu::detail::handler_entry_size::uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count) { auto &entries = m_entries_for_key[ukey]; -- cgit v1.2.3-70-g09d2