summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/emumem_heun.cpp
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2021-07-08 21:40:35 -0400
committer GitHub <noreply@github.com>2021-07-09 11:40:35 +1000
commitee61e4074b41dec22bdb2225efcfcfbb9c1ea410 (patch)
tree0df1076b61aa64b823fddbf3d4dd1adb7d7672cf /src/emu/emumem_heun.cpp
parenta9fefd83636dfdc104a83f7f0cfaec08f87a35e0 (diff)
emu/emumem*: Removed endianness template parameter from handler_entry_read, handler_entry_write and closely related classes. (#8255)
This appears to substantially reduce compilation time and binary size without too much impact on critical paths. The only critical-path parts really touched by this are probably handler_entry_read_units<Width, AddrShift, Endian>::read and handler_entry_write_units<Width, AddrShift, Endian>::write, which no longer need a branch on descriptor endianness for the downcast. The other instances of where the endianness now needs to be fetched from the address space are practically all in constructors, which probably don't get called too often except in drivers where the memory map is regularly rewritten (e.g. segas16b.cpp); even then the performance impact probably isn't huge.
Diffstat (limited to 'src/emu/emumem_heun.cpp')
-rw-r--r--src/emu/emumem_heun.cpp180
1 files changed, 64 insertions, 116 deletions
diff --git a/src/emu/emumem_heun.cpp b/src/emu/emumem_heun.cpp
index 2fcbdebfa1b..f81b95dac19 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<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_unmapped<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_unmapped<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
if (this->m_space->log_unmap() && !this->m_space->m_manager.machine().side_effects_disabled())
this->m_space->device().logerror(this->m_space->is_octal()
@@ -17,13 +17,13 @@ template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::ha
return this->m_space->unmap();
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_unmapped<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_read_unmapped<Width, AddrShift>::name() const
{
return "unmapped";
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_unmapped<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask)const
+template<int Width, int AddrShift> void handler_entry_write_unmapped<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask)const
{
if (this->m_space->log_unmap() && !this->m_space->m_manager.machine().side_effects_disabled())
this->m_space->device().logerror(this->m_space->is_octal()
@@ -35,7 +35,7 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write
2 << Width, mem_mask);
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_unmapped<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_write_unmapped<Width, AddrShift>::name() const
{
return "unmapped";
}
@@ -43,132 +43,80 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
-template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_nop<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_nop<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
return this->m_space->unmap();
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_nop<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_read_nop<Width, AddrShift>::name() const
{
return "nop";
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_nop<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
+template<int Width, int AddrShift> void handler_entry_write_nop<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_nop<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_write_nop<Width, AddrShift>::name() const
{
return "nop";
}
-template class handler_entry_read_unmapped<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_unmapped<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, -3, ENDIANNESS_BIG>;
-
-
-template class handler_entry_read_nop<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_nop<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_unmapped<0, 1>;
+template class handler_entry_read_unmapped<0, 0>;
+template class handler_entry_read_unmapped<1, 3>;
+template class handler_entry_read_unmapped<1, 0>;
+template class handler_entry_read_unmapped<1, -1>;
+template class handler_entry_read_unmapped<2, 3>;
+template class handler_entry_read_unmapped<2, 0>;
+template class handler_entry_read_unmapped<2, -1>;
+template class handler_entry_read_unmapped<2, -2>;
+template class handler_entry_read_unmapped<3, 0>;
+template class handler_entry_read_unmapped<3, -1>;
+template class handler_entry_read_unmapped<3, -2>;
+template class handler_entry_read_unmapped<3, -3>;
+
+template class handler_entry_write_unmapped<0, 1>;
+template class handler_entry_write_unmapped<0, 0>;
+template class handler_entry_write_unmapped<1, 3>;
+template class handler_entry_write_unmapped<1, 0>;
+template class handler_entry_write_unmapped<1, -1>;
+template class handler_entry_write_unmapped<2, 3>;
+template class handler_entry_write_unmapped<2, 0>;
+template class handler_entry_write_unmapped<2, -1>;
+template class handler_entry_write_unmapped<2, -2>;
+template class handler_entry_write_unmapped<3, 0>;
+template class handler_entry_write_unmapped<3, -1>;
+template class handler_entry_write_unmapped<3, -2>;
+template class handler_entry_write_unmapped<3, -3>;
+
+
+template class handler_entry_read_nop<0, 1>;
+template class handler_entry_read_nop<0, 0>;
+template class handler_entry_read_nop<1, 3>;
+template class handler_entry_read_nop<1, 0>;
+template class handler_entry_read_nop<1, -1>;
+template class handler_entry_read_nop<2, 3>;
+template class handler_entry_read_nop<2, 0>;
+template class handler_entry_read_nop<2, -1>;
+template class handler_entry_read_nop<2, -2>;
+template class handler_entry_read_nop<3, 0>;
+template class handler_entry_read_nop<3, -1>;
+template class handler_entry_read_nop<3, -2>;
+template class handler_entry_read_nop<3, -3>;
+
+template class handler_entry_write_nop<0, 1>;
+template class handler_entry_write_nop<0, 0>;
+template class handler_entry_write_nop<1, 3>;
+template class handler_entry_write_nop<1, 0>;
+template class handler_entry_write_nop<1, -1>;
+template class handler_entry_write_nop<2, 3>;
+template class handler_entry_write_nop<2, 0>;
+template class handler_entry_write_nop<2, -1>;
+template class handler_entry_write_nop<2, -2>;
+template class handler_entry_write_nop<3, 0>;
+template class handler_entry_write_nop<3, -1>;
+template class handler_entry_write_nop<3, -2>;
+template class handler_entry_write_nop<3, -3>;