X86: Get rid of the unused getAllocator on the python base microop class.
[gem5.git] / src / arch / sparc / tlb_map.hh
index 226ef23a1b33017bb8ca71cd93d2ee845e09b0a5..fa49584ba5ec41aac8627717b911e50751fe0885 100644 (file)
@@ -52,9 +52,17 @@ class TlbMap
 
         i = tree.upper_bound(r);
 
-        if (i == tree.begin())
-            // Nothing could match, so return end()
-            return tree.end();
+        if (i == tree.begin()) {
+            if (r.real == i->first.real &&
+                r.partitionId == i->first.partitionId &&
+                i->first.va < r.va + r.size &&
+                i->first.va+i->first.size >= r.va &&
+                (r.real || r.contextId == i->first.contextId))
+                return i;
+            else
+                // Nothing could match, so return end()
+                return tree.end();
+        }
 
         i--;
 
@@ -128,6 +136,19 @@ class TlbMap
     {
         return tree.empty();
     }
+
+    void print()
+    {
+        iterator i;
+        i = tree.begin();
+        while (i != tree.end()) {
+           std::cout << std::hex << i->first.va << " " << i->first.size << " " <<
+                i->first.contextId << " " << i->first.partitionId << " " <<
+                i->first.real << " " << i->second << std::endl;
+            i++;
+        }
+    }
+
 };
 
 };