]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Renamed bm_lookup() into bm2_lookup() and shifted right 2nd argument by ADDR0_BITS.
authorBart Van Assche <bvanassche@acm.org>
Sat, 22 Mar 2008 16:44:03 +0000 (16:44 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sat, 22 Mar 2008 16:44:03 +0000 (16:44 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7752

exp-drd/drd_bitmap.c
exp-drd/drd_bitmap.h

index 2f14b44d92f6320fa48b255907dd6fa6a3986b9f..912065b38c660c42fc8229a62987a50d69154287 100644 (file)
@@ -280,7 +280,7 @@ UWord bm_has_any_access(const struct bitmap* const bm,
 
   for (b = a1; b < a2; b = b_next)
   {
-    struct bitmap2* bm2 = bm_lookup(bm, b);
+    struct bitmap2* bm2 = bm2_lookup(bm, b >> ADDR0_BITS);
 
     b_next = (b & ~ADDR0_MASK) + ADDR0_COUNT;
     if (b_next > a2)
@@ -342,7 +342,7 @@ UWord bm_has_1(const struct bitmap* const bm,
 
   tl_assert(bm);
 
-  p2 = bm_lookup(bm, a);
+  p2 = bm2_lookup(bm, a >> ADDR0_BITS);
   if (p2)
   {
     p1 = &p2->bm1;
@@ -401,7 +401,7 @@ void bm_clear(const struct bitmap* const bm,
 
   for (b = a1; b < a2; b = b_next)
   {
-    struct bitmap2* const p2 = bm_lookup(bm, b);
+    struct bitmap2* const p2 = bm2_lookup(bm, b >> ADDR0_BITS);
 
     b_next = (b & ~ADDR0_MASK) + ADDR0_COUNT;
     if (b_next > a2)
@@ -453,7 +453,7 @@ Bool bm_has_conflict_with(const struct bitmap* const bm,
 
   for (b = a1; b < a2; b = b_next)
   {
-    struct bitmap2* bm2 = bm_lookup(bm, b);
+    struct bitmap2* bm2 = bm2_lookup(bm, b >> ADDR0_BITS);
 
     b_next = (b & ~ADDR0_MASK) + ADDR0_COUNT;
     if (b_next > a2)
@@ -515,7 +515,7 @@ Bool bm_aligned_load_has_conflict_with(const struct bitmap* const bm,
 {
   struct bitmap2* bm2;
 
-  bm2 = bm_lookup(bm, a1);
+  bm2 = bm2_lookup(bm, a1 >> ADDR0_BITS);
 
   return (bm2 && bm0_is_any_set(bm2->bm1.bm0_w, a1 & ADDR0_MASK, size));
 }
@@ -526,7 +526,7 @@ Bool bm_aligned_store_has_conflict_with(const struct bitmap* const bm,
 {
   struct bitmap2* bm2;
 
-  bm2 = bm_lookup(bm, a1);
+  bm2 = bm2_lookup(bm, a1 >> ADDR0_BITS);
 
   if (bm2)
   {
index cf75a8541dea0d01fe7c665f9870850c2662ab0a..0fbe5a3ccef63e37ab9c87504ec70dbf9d5de2d4 100644 (file)
@@ -157,10 +157,9 @@ struct bitmap
 };
 
 static __inline__
-struct bitmap2* bm_lookup(const struct bitmap* const bm, const Addr a)
+struct bitmap2* bm2_lookup(const struct bitmap* const bm, const UWord a1)
 {
   struct bitmap2* result;
-  const UWord a1 = a >> ADDR0_BITS;
   if (a1 == bm->last_lookup_a1)
   {
     return bm->last_lookup_result;