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/dsp56156/dsp56156.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/dsp56156/dsp56156.cpp')
-rw-r--r-- | src/devices/cpu/dsp56156/dsp56156.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/cpu/dsp56156/dsp56156.cpp b/src/devices/cpu/dsp56156/dsp56156.cpp index b6c5b4fd672..04952c0f7d3 100644 --- a/src/devices/cpu/dsp56156/dsp56156.cpp +++ b/src/devices/cpu/dsp56156/dsp56156.cpp @@ -141,7 +141,7 @@ device_memory_interface::space_config_vector dsp56156_device::memory_space_confi /*************************************************************************** MEMORY ACCESSORS ***************************************************************************/ -#define ROPCODE(pc) cpustate->cache->read_word(pc) +#define ROPCODE(pc) cpustate->cache.read_word(pc) /*************************************************************************** @@ -291,9 +291,9 @@ void dsp56156_device::device_start() save_item(NAME(m_core.peripheral_ram)); - m_core.program = &space(AS_PROGRAM); - m_core.cache = m_core.program->cache<1, -1, ENDIANNESS_LITTLE>(); - m_core.data = &space(AS_DATA); + space(AS_PROGRAM).cache(m_core.cache); + space(AS_PROGRAM).specific(m_core.program); + space(AS_DATA).specific(m_core.data); state_add(DSP56156_PC, "PC", m_core.PCU.pc).formatstr("%04X"); state_add(DSP56156_SR, "SR", m_core.PCU.sr).formatstr("%04X"); @@ -445,7 +445,7 @@ void dsp56156_device::device_reset() m_core.ppc = m_core.PCU.pc; /* HACK - Put a jump to 0x0000 at 0x0000 - this keeps the CPU locked to the instruction at address 0x0000 */ - m_core.program->write_word(0x0000, 0x0124); + m_core.program.write_word(0x0000, 0x0124); } |