1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 38 unchanged lines hidden (view full) --- 47 typedef RangeMap::iterator iterator; 48 49 iterator find(const TlbRange &r) 50 { 51 iterator i; 52 53 i = tree.upper_bound(r); 54 |
55 if (i == tree.begin()) { |
56 if (r.real == i->first.real && 57 r.partitionId == i->first.partitionId && 58 i->first.va < r.va + r.size && 59 i->first.va+i->first.size >= r.va && 60 (r.real || r.contextId == i->first.contextId)) 61 return i; 62 else 63 // Nothing could match, so return end() 64 return tree.end(); |
65 } |
66 67 i--; 68 69 if (r.real != i->first.real) 70 return tree.end(); 71 if (!r.real && r.contextId != i->first.contextId) 72 return tree.end(); 73 if (r.partitionId != i->first.partitionId) --- 83 unchanged lines hidden --- |