Lines Matching refs:bm2

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