Search
lxdream.org :: lxdream :: r807:1ca418e6ed5d
lxdream 0.9.1
released Jun 29
Download Now
changeset807:1ca418e6ed5d
parent806:6ef1ce4a9dbc
child808:da414654f3fa
authornkeynes
dateSat Aug 09 07:39:47 2008 +0000 (11 years ago)
Fix ITLB lookup ASID behaviour (was somewhat back-to-front)
src/sh4/mmu.c
1.1 --- a/src/sh4/mmu.c Fri Aug 08 00:17:57 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;
.