summaryrefslogtreecommitdiff
path: root/src/arch/alpha/tlb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/alpha/tlb.cc')
-rw-r--r--src/arch/alpha/tlb.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/alpha/tlb.cc b/src/arch/alpha/tlb.cc
index 3ab65e664..2dfff8c5f 100644
--- a/src/arch/alpha/tlb.cc
+++ b/src/arch/alpha/tlb.cc
@@ -213,7 +213,7 @@ TLB::flushAddr(Addr addr, uint8_t asn)
if (i == lookupTable.end())
return;
- while (i->first == vaddr.vpn()) {
+ while (i != lookupTable.end() && i->first == vaddr.vpn()) {
int index = i->second;
PTE *pte = &table[index];
assert(pte->valid);
@@ -225,10 +225,10 @@ TLB::flushAddr(Addr addr, uint8_t asn)
// invalidate this entry
pte->valid = false;
- lookupTable.erase(i);
+ lookupTable.erase(i++);
+ } else {
+ ++i;
}
-
- ++i;
}
}