Lines Matching refs:bm2
342 static void bm2_clear(struct bitmap2* const bm2);
381 struct bitmap2** bm2) in bm_cache_lookup() argument
385 tl_assert(bm2); in bm_cache_lookup()
394 *bm2 = bm->cache[0].bm2; in bm_cache_lookup()
401 *bm2 = bm->cache[1].bm2; in bm_cache_lookup()
408 *bm2 = bm->cache[2].bm2; in bm_cache_lookup()
416 *bm2 = bm->cache[3].bm2; in bm_cache_lookup()
424 *bm2 = bm->cache[4].bm2; in bm_cache_lookup()
432 *bm2 = bm->cache[5].bm2; in bm_cache_lookup()
440 *bm2 = bm->cache[6].bm2; in bm_cache_lookup()
448 *bm2 = bm->cache[7].bm2; in bm_cache_lookup()
453 *bm2 = 0; in bm_cache_lookup()
460 struct bitmap2* const bm2) in bm_update_cache() argument
491 bm->cache[0].bm2 = bm2; in bm_update_cache()
505 struct bitmap2* bm2; in bm2_lookup() local
511 if (! bm_cache_lookup(bm, a1, &bm2)) in bm2_lookup()
513 bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1); in bm2_lookup()
514 bm_update_cache(bm, a1, bm2); in bm2_lookup()
516 return bm2; in bm2_lookup()
530 struct bitmap2* bm2; in bm2_lookup_exclusive() local
536 if (! bm_cache_lookup(bm, a1, &bm2)) in bm2_lookup_exclusive()
538 bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1); in bm2_lookup_exclusive()
541 return bm2; in bm2_lookup_exclusive()
546 void bm2_clear(struct bitmap2* const bm2) in bm2_clear() argument
549 tl_assert(bm2); in bm2_clear()
551 VG_(memset)(&bm2->bm1, 0, sizeof(bm2->bm1)); in bm2_clear()
565 struct bitmap2* bm2; in bm2_insert() local
573 bm2 = VG_(OSetGen_AllocNode)(bm->oset, sizeof(*bm2)); in bm2_insert()
574 bm2->addr = a1; in bm2_insert()
575 VG_(OSetGen_Insert)(bm->oset, bm2); in bm2_insert()
577 bm_update_cache(bm, a1, bm2); in bm2_insert()
579 return bm2; in bm2_insert()
584 struct bitmap2* const bm2) in bm2_insert_copy() argument
588 bm2_copy = bm2_insert(bm, bm2->addr); in bm2_insert_copy()
589 VG_(memcpy)(&bm2_copy->bm1, &bm2->bm1, sizeof(bm2->bm1)); in bm2_insert_copy()
603 struct bitmap2* bm2; in bm2_lookup_or_insert() local
609 if (bm_cache_lookup(bm, a1, &bm2)) in bm2_lookup_or_insert()
611 if (bm2 == 0) in bm2_lookup_or_insert()
613 bm2 = bm2_insert(bm, a1); in bm2_lookup_or_insert()
614 bm2_clear(bm2); in bm2_lookup_or_insert()
619 bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1); in bm2_lookup_or_insert()
620 if (! bm2) in bm2_lookup_or_insert()
622 bm2 = bm2_insert(bm, a1); in bm2_lookup_or_insert()
623 bm2_clear(bm2); in bm2_lookup_or_insert()
625 bm_update_cache(bm, a1, bm2); in bm2_lookup_or_insert()
627 return bm2; in bm2_lookup_or_insert()
647 struct bitmap2* bm2; in bm2_remove() local
653 bm2 = VG_(OSetGen_Remove)(bm->oset, &a1); in bm2_remove()
654 VG_(OSetGen_FreeNode)(bm->oset, bm2); in bm2_remove()
663 struct bitmap2* bm2; in bm_access_aligned_load() local
669 bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1)); in bm_access_aligned_load()
670 bm0_set_range(bm2->bm1.bm0_r, in bm_access_aligned_load()
679 struct bitmap2* bm2; in bm_access_aligned_store() local
685 bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1)); in bm_access_aligned_store()
686 bm0_set_range(bm2->bm1.bm0_w, in bm_access_aligned_store()
695 const struct bitmap2* bm2; in bm_aligned_load_has_conflict_with() local
701 bm2 = bm2_lookup(bm, address_msb(a)); in bm_aligned_load_has_conflict_with()
702 return (bm2 in bm_aligned_load_has_conflict_with()
703 && bm0_is_any_set(bm2->bm1.bm0_w, in bm_aligned_load_has_conflict_with()
712 const struct bitmap2* bm2; in bm_aligned_store_has_conflict_with() local
718 bm2 = bm2_lookup(bm, address_msb(a)); in bm_aligned_store_has_conflict_with()
719 if (bm2) in bm_aligned_store_has_conflict_with()
721 if (bm0_is_any_set(bm2->bm1.bm0_r, address_lsb(a), SCALED_SIZE(size)) in bm_aligned_store_has_conflict_with()
722 | bm0_is_any_set(bm2->bm1.bm0_w, address_lsb(a), SCALED_SIZE(size))) in bm_aligned_store_has_conflict_with()