summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/divtlb.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/emu/divtlb.cpp b/src/emu/divtlb.cpp
index a09abd5300a..41a0aa96aad 100644
--- a/src/emu/divtlb.cpp
+++ b/src/emu/divtlb.cpp
@@ -177,8 +177,9 @@ bool device_vtlb_interface::vtlb_fill(offs_t address, int intention)
// if this is the first successful translation for this address, allocate a new entry
if ((entry & VTLB_FLAGS_MASK) == 0)
{
- int liveindex = m_dynindex++ % m_dynamic;
+ int liveindex = m_dynindex;
+ m_dynindex = (m_dynindex + 1) % m_dynamic;
// if an entry already exists at this index, free it
if (m_live[liveindex] != 0)
@@ -277,7 +278,10 @@ void device_vtlb_interface::vtlb_dynload(u32 index, offs_t address, vtlb_entry v
return;
}
- int liveindex = m_dynindex++ % m_dynamic;
+ int liveindex = m_dynindex;
+
+ m_dynindex = (m_dynindex + 1) % m_dynamic;
+
// is entry already live?
if (!(entry & VTLB_FLAG_VALID))
{