mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
divtlb.cpp: strore address of elemtnt 0 of m_table and return it in vtlb_table, with this in debug mode i386 is 1.7 times faster (nw)
This commit is contained in:
parent
649c13736c
commit
4df54c9986
@ -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;
|
||||
}
|
||||
|
@ -83,6 +83,7 @@ private:
|
||||
std::vector<offs_t> m_live; // array of live entries by table index
|
||||
std::vector<int> m_fixedpages; // number of pages each fixed entry covers
|
||||
std::vector<vtlb_entry> m_table; // table of entries by address
|
||||
vtlb_entry *m_table_base; // pointer to m_table[0]
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user