|
From: <sv...@va...> - 2009-05-09 12:45:18
|
Author: bart
Date: 2009-05-09 13:45:15 +0100 (Sat, 09 May 2009)
New Revision: 9805
Log:
Works now with non-zero ADDR_IGNORED_BITS too.
Modified:
branches/DRDDEV/drd/drd_bitmap.c
Modified: branches/DRDDEV/drd/drd_bitmap.c
===================================================================
--- branches/DRDDEV/drd/drd_bitmap.c 2009-05-09 12:32:56 UTC (rev 9804)
+++ branches/DRDDEV/drd/drd_bitmap.c 2009-05-09 12:45:15 UTC (rev 9805)
@@ -114,8 +114,7 @@
return DRD_(bm_access_range_store)(bm, a1, a2);
}
-void DRD_(bm_access_range_load)(struct bitmap* const bm,
- const Addr a1, const Addr a2)
+void DRD_(bm_access_range_load)(struct bitmap* const bm, Addr a1, Addr a2)
{
Addr b, b_next;
@@ -123,6 +122,9 @@
tl_assert(a1 < a2);
tl_assert(a2 < first_address_with_higher_msb(a2));
+ a1 = first_address_with_same_lsb(a1);
+ a2 = first_address_with_same_lsb(a2);
+
for (b = a1; b < a2; b = b_next)
{
Addr b_start;
@@ -209,8 +211,7 @@
DRD_(bm_access_range)(bm, a1, a1 + 8, eLoad);
}
-void DRD_(bm_access_range_store)(struct bitmap* const bm,
- const Addr a1, const Addr a2)
+void DRD_(bm_access_range_store)(struct bitmap* const bm, Addr a1, Addr a2)
{
Addr b, b_next;
@@ -218,6 +219,9 @@
tl_assert(a1 < a2);
tl_assert(a2 < first_address_with_higher_msb(a2));
+ a1 = first_address_with_same_lsb(a1);
+ a2 = first_address_with_same_lsb(a2);
+
for (b = a1; b < a2; b = b_next)
{
Addr b_start;
@@ -500,7 +504,7 @@
return False;
}
-void DRD_(bm_clear)(struct bitmap* const bm, const Addr a1, Addr a2)
+void DRD_(bm_clear)(struct bitmap* const bm, Addr a1, Addr a2)
{
Addr b, b_next;
@@ -514,6 +518,9 @@
" delta = 0x%lx)", bm, a1, a2, a2 - a1);
#endif
+ a1 = first_address_with_same_lsb(a1);
+ a2 = first_address_with_higher_lsb(a2 - 1);
+
for (b = a1; b < a2; b = b_next)
{
struct bitmap2* p2;
@@ -581,7 +588,7 @@
* Clear all references to loads in bitmap bm starting at address a1 and
* up to but not including address a2.
*/
-void DRD_(bm_clear_load)(struct bitmap* const bm, const Addr a1, Addr a2)
+void DRD_(bm_clear_load)(struct bitmap* const bm, Addr a1, Addr a2)
{
Addr b, b_next;
@@ -595,6 +602,9 @@
" delta = 0x%lx)", bm, a1, a2, a2 - a1);
#endif
+ a1 = first_address_with_same_lsb(a1);
+ a2 = first_address_with_higher_lsb(a2 - 1);
+
for (b = a1; b < a2; b = b_next)
{
struct bitmap2* p2;
@@ -666,7 +676,7 @@
* Clear all references to stores in bitmap bm starting at address a1 and
* up to but not including address a2.
*/
-void DRD_(bm_clear_store)(struct bitmap* const bm, const Addr a1, Addr a2)
+void DRD_(bm_clear_store)(struct bitmap* const bm, Addr a1, Addr a2)
{
Addr b, b_next;
@@ -680,6 +690,9 @@
" delta = 0x%lx)", bm, a1, a2, a2 - a1);
#endif
+ a1 = first_address_with_same_lsb(a1);
+ a2 = first_address_with_higher_lsb(a2 - 1);
+
for (b = a1; b < a2; b = b_next)
{
struct bitmap2* p2;
|