From: Bart Van Assche Date: Sat, 22 Mar 2008 16:44:03 +0000 (+0000) Subject: Renamed bm_lookup() into bm2_lookup() and shifted right 2nd argument by ADDR0_BITS. X-Git-Tag: svn/VALGRIND_3_4_0~821 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07537d0b8e10a48403f59d00ae17a297eb39d2a9;p=thirdparty%2Fvalgrind.git Renamed bm_lookup() into bm2_lookup() and shifted right 2nd argument by ADDR0_BITS. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7752 --- diff --git a/exp-drd/drd_bitmap.c b/exp-drd/drd_bitmap.c index 2f14b44d92..912065b38c 100644 --- a/exp-drd/drd_bitmap.c +++ b/exp-drd/drd_bitmap.c @@ -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) { diff --git a/exp-drd/drd_bitmap.h b/exp-drd/drd_bitmap.h index cf75a8541d..0fbe5a3cce 100644 --- a/exp-drd/drd_bitmap.h +++ b/exp-drd/drd_bitmap.h @@ -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;