i386: improve tlb performance slightly (nw)

This commit is contained in:
cracyc 2013-02-07 01:28:14 +00:00
parent 27ff493685
commit c8dc44b9fa
2 changed files with 5 additions and 8 deletions

View File

@ -527,11 +527,10 @@ static int i386_translate_address(i386_state *cpustate, int intention, offs_t *a
ret = FALSE;
else
{
if(!(page_dir & 0x40) && write)
{
cpustate->program->write_dword(pdbr + directory * 4, page_dir | 0x60);
if(write)
perm |= VTLB_FLAG_DIRTY;
}
if(!(page_dir & 0x40) && write)
cpustate->program->write_dword(pdbr + directory * 4, page_dir | 0x60);
else if(!(page_dir & 0x20))
cpustate->program->write_dword(pdbr + directory * 4, page_dir | 0x20);
ret = TRUE;
@ -557,13 +556,12 @@ static int i386_translate_address(i386_state *cpustate, int intention, offs_t *a
ret = FALSE;
else
{
if(write)
perm |= VTLB_FLAG_DIRTY;
if(!(page_dir & 0x20))
cpustate->program->write_dword(pdbr + directory * 4, page_dir | 0x20);
if(!(page_entry & 0x40) && write)
{
cpustate->program->write_dword((page_dir & 0xfffff000) + (table * 4), page_entry | 0x60);
perm |= VTLB_FLAG_DIRTY;
}
else if(!(page_entry & 0x20))
cpustate->program->write_dword((page_dir & 0xfffff000) + (table * 4), page_entry | 0x20);
ret = TRUE;

View File

@ -232,7 +232,6 @@ void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtl
void vtlb_dynload(vtlb_state *vtlb, int index, offs_t address, vtlb_entry value)
{
vtlb_entry entry = vtlb->table[index];
value &= VTLB_FLAGS_MASK;
if (vtlb->dynamic == 0)
{