summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/divtlb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/divtlb.cpp')
-rw-r--r--src/emu/divtlb.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emu/divtlb.cpp b/src/emu/divtlb.cpp
index 3f4266a2285..9240fa5ad94 100644
--- a/src/emu/divtlb.cpp
+++ b/src/emu/divtlb.cpp
@@ -36,7 +36,8 @@ device_vtlb_interface::device_vtlb_interface(const machine_config &mconfig, devi
m_fixed(0),
m_dynindex(0),
m_pageshift(0),
- m_addrwidth(0)
+ m_addrwidth(0),
+ m_table_base(nullptr)
{
}
@@ -92,6 +93,8 @@ void device_vtlb_interface::interface_pre_start()
// allocate the lookup table
m_table.resize((size_t) 1 << (m_addrwidth - m_pageshift));
memset(&m_table[0], 0, m_table.size()*sizeof(m_table[0]));
+ // pointer to first element for quick access
+ m_table_base = &m_table[0];
// allocate the fixed page count array
if (m_fixed > 0)
@@ -336,5 +339,5 @@ void device_vtlb_interface::vtlb_flush_address(offs_t address)
const vtlb_entry *device_vtlb_interface::vtlb_table() const
{
- return &m_table[0];
+ return m_table_base;
}