summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/mips/mips3com.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/mips/mips3com.cpp')
-rw-r--r--src/devices/cpu/mips/mips3com.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/devices/cpu/mips/mips3com.cpp b/src/devices/cpu/mips/mips3com.cpp
index 9edd05f8b67..8b8accf8c4c 100644
--- a/src/devices/cpu/mips/mips3com.cpp
+++ b/src/devices/cpu/mips/mips3com.cpp
@@ -366,7 +366,11 @@ void mips3_device::tlb_map_entry(int tlbindex)
}
/* get the number of pages from the page mask */
- count = ((entry->page_mask >> 13) & 0x00fff) + 1;
+ /* R5900: if the S bit is set in EntryLo, it is the scratchpad, and is always 4 pages. */
+ if ((entry->entry_lo[0] & 0x80000000) && m_flavor == MIPS3_TYPE_R5900)
+ count = 4;
+ else
+ count = ((entry->page_mask >> 13) & 0x00fff) + 1;
/* loop over both the even and odd pages */
for (which = 0; which < 2; which++)