tlb.cc (8232:b28d06a175be) tlb.cc (8607:5fb918115c07)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * Copyright (c) 2007-2008 The Florida State University
5 * Copyright (c) 2009 The University of Edinburgh
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

113 assert(Index<size);
114 return &table[Index];
115}
116
117int
118TLB::probeEntry(Addr vpn,uint8_t asn) const
119{
120 // assume not found...
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * Copyright (c) 2007-2008 The Florida State University
5 * Copyright (c) 2009 The University of Edinburgh
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

113 assert(Index<size);
114 return &table[Index];
115}
116
117int
118TLB::probeEntry(Addr vpn,uint8_t asn) const
119{
120 // assume not found...
121 PowerISA::PTE *retval = NULL;
122 int Ind = -1;
123 PageTable::const_iterator i = lookupTable.find(vpn);
124 if (i != lookupTable.end()) {
125 while (i->first == vpn) {
126 int index = i->second;
127 PowerISA::PTE *pte = &table[index];
128 Addr Mask = pte->Mask;
129 Addr InvMask = ~Mask;
130 Addr VPN = pte->VPN;
131 if (((vpn & InvMask) == (VPN & InvMask))
132 && (pte->G || (asn == pte->asid))) {
133
134 // We have a VPN + ASID Match
121 int Ind = -1;
122 PageTable::const_iterator i = lookupTable.find(vpn);
123 if (i != lookupTable.end()) {
124 while (i->first == vpn) {
125 int index = i->second;
126 PowerISA::PTE *pte = &table[index];
127 Addr Mask = pte->Mask;
128 Addr InvMask = ~Mask;
129 Addr VPN = pte->VPN;
130 if (((vpn & InvMask) == (VPN & InvMask))
131 && (pte->G || (asn == pte->asid))) {
132
133 // We have a VPN + ASID Match
135 retval = pte;
136 Ind = index;
137 break;
138 }
139 ++i;
140 }
141 }
142
143 DPRINTF(Power, "VPN: %x, asid: %d, Result of TLBP: %d\n", vpn, asn, Ind);

--- 203 unchanged lines hidden ---
134 Ind = index;
135 break;
136 }
137 ++i;
138 }
139 }
140
141 DPRINTF(Power, "VPN: %x, asid: %d, Result of TLBP: %d\n", vpn, asn, Ind);

--- 203 unchanged lines hidden ---