mirror of
https://github.com/ares-emulator/ares.git
synced 2026-11-09 17:03:16 -10:00
n64: fix exception kind in case of TLB invalid page and with nonmatching asid
Fix several tests in n64-systemtest ROM.
This commit is contained in:
1 parent
8d04515b5f
commit
56458d5ba5
1 file changed
+2
-2
@@ -2,7 +2,6 @@
|
||||
|
||||
auto CPU::TLB::load(u32 address) -> Match {
|
||||
for(auto& entry : this->entry) {
|
||||
if(!entry.globals || entry.addressSpaceID != self.scc.tlb.addressSpaceID) continue;
|
||||
if((address & entry.addressMaskHi) != (u32)entry.addressCompare) continue;
|
||||
bool lo = address & entry.addressSelect;
|
||||
if(!entry.valid[lo]) {
|
||||
@@ -11,6 +10,7 @@ auto CPU::TLB::load(u32 address) -> Match {
|
||||
self.exception.tlbLoadInvalid();
|
||||
return {false};
|
||||
}
|
||||
if(!entry.globals || entry.addressSpaceID != self.scc.tlb.addressSpaceID) continue;
|
||||
physicalAddress = entry.physicalAddress[lo] + (address & entry.addressMaskLo);
|
||||
self.debugger.tlbLoad(address, physicalAddress);
|
||||
return {true, entry.cacheAlgorithm[lo] != 2, physicalAddress};
|
||||
@@ -23,7 +23,6 @@ auto CPU::TLB::load(u32 address) -> Match {
|
||||
|
||||
auto CPU::TLB::store(u32 address) -> Match {
|
||||
for(auto& entry : this->entry) {
|
||||
if(!entry.globals || entry.addressSpaceID != self.scc.tlb.addressSpaceID) continue;
|
||||
if((address & entry.addressMaskHi) != (u32)entry.addressCompare) continue;
|
||||
bool lo = address & entry.addressSelect;
|
||||
if(!entry.valid[lo]) {
|
||||
@@ -38,6 +37,7 @@ auto CPU::TLB::store(u32 address) -> Match {
|
||||
self.exception.tlbModification();
|
||||
return {false};
|
||||
}
|
||||
if(!entry.globals || entry.addressSpaceID != self.scc.tlb.addressSpaceID) continue;
|
||||
physicalAddress = entry.physicalAddress[lo] + (address & entry.addressMaskLo);
|
||||
self.debugger.tlbStore(address, physicalAddress);
|
||||
return {true, entry.cacheAlgorithm[lo] != 2, physicalAddress};
|
||||
|
||||
Reference in new issue
Block a user