tlb_map.hh (3804:fa7a01dddc7a) tlb_map.hh (3832:49c95a73e29c)
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;

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

48
49 iterator find(const TlbRange &r)
50 {
51 iterator i;
52
53 i = tree.upper_bound(r);
54
55 if (i == tree.begin())
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;

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

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 // Nothing could match, so return end()
57 return tree.end();
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();
58
59 i--;
60
61 if (r.real != i->first.real)
62 return tree.end();
63 if (!r.real && r.contextId != i->first.contextId)
64 return tree.end();
65 if (r.partitionId != i->first.partitionId)

--- 70 unchanged lines hidden ---
65
66 i--;
67
68 if (r.real != i->first.real)
69 return tree.end();
70 if (!r.real && r.contextId != i->first.contextId)
71 return tree.end();
72 if (r.partitionId != i->first.partitionId)

--- 70 unchanged lines hidden ---