tlb.cc (8772:a5a83fc04972) tlb.cc (8795:0909f8ed7aa0)
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

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

114 assert(Index<size);
115 return &table[Index];
116}
117
118int
119TLB::probeEntry(Addr vpn,uint8_t asn) const
120{
121 // 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

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

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

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

--- 203 unchanged lines hidden ---