diff options
author | 2020-05-25 16:42:42 +0200 | |
---|---|---|
committer | 2020-05-25 16:42:57 +0200 | |
commit | 22513fb6fe281f5ccb75aaddb6417a12a66c313d (patch) | |
tree | 3cf84032cc6482d685a8dbb57e015bd17c7f7fdc /src/devices/cpu/vt61 | |
parent | e42c2d2874cf9c1092c01ab5ce9ef997d465ce25 (diff) |
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).
Diffstat (limited to 'src/devices/cpu/vt61')
-rw-r--r-- | src/devices/cpu/vt61/vt61.cpp | 9 | ||||
-rw-r--r-- | src/devices/cpu/vt61/vt61.h | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/devices/cpu/vt61/vt61.cpp b/src/devices/cpu/vt61/vt61.cpp index 96fba64faf5..377d9e58244 100644 --- a/src/devices/cpu/vt61/vt61.cpp +++ b/src/devices/cpu/vt61/vt61.cpp @@ -20,9 +20,6 @@ vt61_cpu_device::vt61_cpu_device(const machine_config &mconfig, const char *tag, , m_program_config("microprogram", ENDIANNESS_LITTLE, 16, 10, -1) , m_memory_config("memory", ENDIANNESS_LITTLE, 8, 16, 0) , m_idr_config("IDR", ENDIANNESS_LITTLE, 8, 6, 0) - , m_program_cache(nullptr) - , m_memory_cache(nullptr) - , m_idr_cache(nullptr) , m_pc(0) , m_ac(0) , m_mar(0) @@ -55,9 +52,9 @@ device_memory_interface::space_config_vector vt61_cpu_device::memory_space_confi void vt61_cpu_device::device_start() { - m_program_cache = space(AS_PROGRAM).cache<1, -1, ENDIANNESS_LITTLE>(); - m_memory_cache = space(AS_DATA).cache<0, 0, ENDIANNESS_LITTLE>(); - m_idr_cache = space(AS_IDR).cache<0, 0, ENDIANNESS_LITTLE>(); + space(AS_PROGRAM).cache(m_program_cache); + space(AS_DATA).cache(m_memory_cache); + space(AS_IDR).cache(m_idr_cache); set_icountptr(m_icount); diff --git a/src/devices/cpu/vt61/vt61.h b/src/devices/cpu/vt61/vt61.h index c5c3013641f..c2aa2d39f6b 100644 --- a/src/devices/cpu/vt61/vt61.h +++ b/src/devices/cpu/vt61/vt61.h @@ -51,9 +51,9 @@ private: address_space_config m_program_config; address_space_config m_memory_config; address_space_config m_idr_config; - memory_access_cache<1, -1, ENDIANNESS_LITTLE> *m_program_cache; - memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_memory_cache; - memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_idr_cache; + memory_access<10, 1, -1, ENDIANNESS_LITTLE>::cache m_program_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_memory_cache; + memory_access< 6, 0, 0, ENDIANNESS_LITTLE>::cache m_idr_cache; // processor state u16 m_pc; |