Home | History | Annotate | Download | only in drd

Lines Matching refs:bm2

340 static void bm2_clear(struct bitmap2* const bm2);
379 struct bitmap2** bm2)
383 tl_assert(bm2);
392 *bm2 = bm->cache[0].bm2;
399 *bm2 = bm->cache[1].bm2;
406 *bm2 = bm->cache[2].bm2;
414 *bm2 = bm->cache[3].bm2;
422 *bm2 = bm->cache[4].bm2;
430 *bm2 = bm->cache[5].bm2;
438 *bm2 = bm->cache[6].bm2;
446 *bm2 = bm->cache[7].bm2;
451 *bm2 = 0;
458 struct bitmap2* const bm2)
489 bm->cache[0].bm2 = bm2;
503 struct bitmap2* bm2;
509 if (! bm_cache_lookup(bm, a1, &bm2))
511 bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1);
512 bm_update_cache(bm, a1, bm2);
514 return bm2;
528 struct bitmap2* bm2;
534 if (! bm_cache_lookup(bm, a1, &bm2))
536 bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1);
539 return bm2;
544 void bm2_clear(struct bitmap2* const bm2)
547 tl_assert(bm2);
549 VG_(memset)(&bm2->bm1, 0, sizeof(bm2->bm1));
563 struct bitmap2* bm2;
571 bm2 = VG_(OSetGen_AllocNode)(bm->oset, sizeof(*bm2));
572 bm2->addr = a1;
573 VG_(OSetGen_Insert)(bm->oset, bm2);
575 bm_update_cache(bm, a1, bm2);
577 return bm2;
582 struct bitmap2* const bm2)
586 bm2_copy = bm2_insert(bm, bm2->addr);
587 VG_(memcpy)(&bm2_copy->bm1, &bm2->bm1, sizeof(bm2->bm1));
601 struct bitmap2* bm2;
607 if (bm_cache_lookup(bm, a1, &bm2))
609 if (bm2 == 0)
611 bm2 = bm2_insert(bm, a1);
612 bm2_clear(bm2);
617 bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1);
618 if (! bm2)
620 bm2 = bm2_insert(bm, a1);
621 bm2_clear(bm2);
623 bm_update_cache(bm, a1, bm2);
625 return bm2;
645 struct bitmap2* bm2;
651 bm2 = VG_(OSetGen_Remove)(bm->oset, &a1);
652 VG_(OSetGen_FreeNode)(bm->oset, bm2);
661 struct bitmap2* bm2;
667 bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1));
668 bm0_set_range(bm2->bm1.bm0_r,
677 struct bitmap2* bm2;
683 bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1));
684 bm0_set_range(bm2->bm1.bm0_w,
693 const struct bitmap2* bm2;
699 bm2 = bm2_lookup(bm, address_msb(a));
700 return (bm2
701 && bm0_is_any_set(bm2->bm1.bm0_w,
710 const struct bitmap2* bm2;
716 bm2 = bm2_lookup(bm, address_msb(a));
717 if (bm2)
719 if (bm0_is_any_set(bm2->bm1.bm0_r, address_lsb(a), SCALED_SIZE(size))
720 | bm0_is_any_set(bm2->bm1.bm0_w, address_lsb(a), SCALED_SIZE(size)))