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/we32000/we32100.cpp | |
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/we32000/we32100.cpp')
-rw-r--r-- | src/devices/cpu/we32000/we32100.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/devices/cpu/we32000/we32100.cpp b/src/devices/cpu/we32000/we32100.cpp index 1d4b5fbcd04..b7f166e5287 100644 --- a/src/devices/cpu/we32000/we32100.cpp +++ b/src/devices/cpu/we32000/we32100.cpp @@ -18,8 +18,6 @@ DEFINE_DEVICE_TYPE(WE32100, we32100_device, "we32100", "AT&T WE32100") we32100_device::we32100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : cpu_device(mconfig, WE32100, tag, owner, clock) , m_space_config("program", ENDIANNESS_BIG, 32, 32, 0) - , m_space(nullptr) - , m_cache(nullptr) , m_r{0} , m_icount(0) { @@ -39,8 +37,8 @@ device_memory_interface::space_config_vector we32100_device::memory_space_config void we32100_device::device_start() { - m_space = &space(AS_PROGRAM); - m_cache = m_space->cache<2, 0, ENDIANNESS_BIG>(); + space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_space); set_icountptr(m_icount); @@ -70,10 +68,10 @@ void we32100_device::device_reset() void we32100_device::execute_run() { // On-reset sequence: load PCBP, then load PSW, PC and SP from there - m_r[13] = m_space->read_dword(0x00000080); - m_r[11] = m_space->read_dword(m_r[13]); - m_r[15] = m_space->read_dword(m_r[13] + 4); - m_r[12] = m_space->read_dword(m_r[13] + 8); + m_r[13] = m_space.read_dword(0x00000080); + m_r[11] = m_space.read_dword(m_r[13]); + m_r[15] = m_space.read_dword(m_r[13] + 4); + m_r[12] = m_space.read_dword(m_r[13] + 8); debugger_instruction_hook(m_r[15]); |