Search
lxdream.org :: lxdream/src/sh4/mmu.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/mmu.c
changeset 807:1ca418e6ed5d
prev796:a2dc83592467
next810:833cc4960556
author nkeynes
date Sat Aug 09 07:39:47 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Fix ITLB lookup ASID behaviour (was somewhat back-to-front)
file annotate diff log raw
1.1 --- a/src/sh4/mmu.c Wed Jul 30 22:50:44 2008 +0000
1.2 +++ b/src/sh4/mmu.c Sat Aug 09 07:39:47 2008 +0000
1.3 @@ -807,7 +807,10 @@
1.4 return TRUE;
1.5 }
1.6
1.7 - entryNo = mmu_itlb_lookup_vpn( addr );
1.8 + if( (mmucr & MMUCR_SV) == 0 )
1.9 + entryNo = mmu_itlb_lookup_vpn_asid( addr );
1.10 + else
1.11 + entryNo = mmu_itlb_lookup_vpn( addr );
1.12 } else {
1.13 if( addr & 0x80000000 ) {
1.14 MMU_READ_ADDR_ERROR();
1.15 @@ -820,11 +823,8 @@
1.16 return TRUE;
1.17 }
1.18
1.19 - if( mmucr & MMUCR_SV ) {
1.20 - entryNo = mmu_itlb_lookup_vpn( addr );
1.21 - } else {
1.22 - entryNo = mmu_itlb_lookup_vpn_asid( addr );
1.23 - }
1.24 + entryNo = mmu_itlb_lookup_vpn_asid( addr );
1.25 +
1.26 if( entryNo != -1 && (mmu_itlb[entryNo].flags & TLB_USERMODE) == 0 ) {
1.27 MMU_TLB_READ_PROT_ERROR(addr);
1.28 return FALSE;
.