Deleted Added
sdiff udiff text old ( 8953:488d45aeb672 ) new ( 8962:397cbf4b11a6 )
full compact
1/*
2 * Copyright (c) 2007-2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 84 unchanged lines hidden (view full) ---

93 trie.remove(tlb[lru].trieHandle);
94 tlb[lru].trieHandle = NULL;
95 freeList.push_back(&tlb[lru]);
96}
97
98TlbEntry *
99TLB::insert(Addr vpn, TlbEntry &entry)
100{
101 //TODO Deal with conflicting entries
102
103 TlbEntry *newEntry = NULL;
104 if (freeList.empty())
105 evictLRU();
106 newEntry = freeList.front();
107 freeList.pop_front();
108
109 *newEntry = entry;
110 newEntry->lruSeq = nextSeq();
111 newEntry->vaddr = vpn;
112 newEntry->trieHandle =
113 trie.insert(vpn, TlbEntryTrie::MaxBits - entry.logBytes, newEntry);
114 return newEntry;
115}
116
117TlbEntry *
118TLB::lookup(Addr va, bool update_lru)
119{
120 TlbEntry *entry = trie.lookup(va);
121 if (entry && update_lru)

--- 328 unchanged lines hidden ---