|
From: <sv...@va...> - 2006-03-28 12:51:19
|
Author: njn
Date: 2006-03-28 13:51:02 +0100 (Tue, 28 Mar 2006)
New Revision: 5797
Log:
Change to some better function names.
Modified:
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_main.c 2006-03-28 12:35:08 UTC (rev 5796)
+++ trunk/memcheck/mc_main.c 2006-03-28 12:51:02 UTC (rev 5797)
@@ -459,17 +459,17 @@
: get_secmap_high_ptr(a));
}
=20
-static INLINE SecMap* get_secmap_readable_low ( Addr a )
+static INLINE SecMap* get_secmap_for_reading_low ( Addr a )
{
return *get_secmap_low_ptr(a);
}
=20
-static INLINE SecMap* get_secmap_readable_high ( Addr a )
+static INLINE SecMap* get_secmap_for_reading_high ( Addr a )
{
return *get_secmap_high_ptr(a);
}
=20
-static INLINE SecMap* get_secmap_writable_low(Addr a)
+static INLINE SecMap* get_secmap_for_writing_low(Addr a)
{
SecMap** p =3D get_secmap_low_ptr(a);
if (EXPECTED_NOT_TAKEN(is_distinguished_sm(*p)))
@@ -477,7 +477,7 @@
return *p;
}
=20
-static INLINE SecMap* get_secmap_writable_high ( Addr a )
+static INLINE SecMap* get_secmap_for_writing_high ( Addr a )
{
SecMap** p =3D get_secmap_high_ptr(a);
if (EXPECTED_NOT_TAKEN(is_distinguished_sm(*p)))
@@ -490,11 +490,11 @@
secmap may be a distinguished one as the caller will only want to
be able to read it.=20
*/
-static SecMap* get_secmap_readable ( Addr a )
+static SecMap* get_secmap_for_reading ( Addr a )
{
return ( a <=3D MAX_PRIMARY_ADDRESS
- ? get_secmap_readable_low (a)
- : get_secmap_readable_high(a) );
+ ? get_secmap_for_reading_low (a)
+ : get_secmap_for_reading_high(a) );
}
=20
/* Produce the secmap for 'a', either from the primary map or by
@@ -504,11 +504,11 @@
writable copy of it, install it, and return the copy instead. (COW
semantics).
*/
-static SecMap* get_secmap_writable ( Addr a )
+static SecMap* get_secmap_for_writing ( Addr a )
{
return ( a <=3D MAX_PRIMARY_ADDRESS
- ? get_secmap_writable_low (a)
- : get_secmap_writable_high(a) );
+ ? get_secmap_for_writing_low (a)
+ : get_secmap_for_writing_high(a) );
}
=20
/* If 'a' has a SecMap, produce it. Else produce NULL. But don't
@@ -518,7 +518,7 @@
static SecMap* maybe_get_secmap_for ( Addr a )
{
if (a <=3D MAX_PRIMARY_ADDRESS) {
- return get_secmap_readable_low(a);
+ return get_secmap_for_reading_low(a);
} else {
AuxMapEnt* am =3D maybe_find_in_auxmap(a);
return am ? am->sm : NULL;
@@ -574,7 +574,7 @@
static INLINE
void set_vabits2 ( Addr a, UChar vabits2 )
{
- SecMap* sm =3D get_secmap_writable(a);
+ SecMap* sm =3D get_secmap_for_writing(a);
UWord sm_off =3D SM_OFF(a);
insert_vabits2_into_vabits8( a, vabits2, &(sm->vabits8[sm_off]) );
}
@@ -582,7 +582,7 @@
static INLINE
UChar get_vabits2 ( Addr a )
{
- SecMap* sm =3D get_secmap_readable(a);
+ SecMap* sm =3D get_secmap_for_reading(a);
UWord sm_off =3D SM_OFF(a);
UChar vabits8 =3D sm->vabits8[sm_off];
return extract_vabits2_from_vabits8(a, vabits8);
@@ -1276,7 +1276,7 @@
return;
}
=20
- sm =3D get_secmap_writable_low(a);
+ sm =3D get_secmap_for_writing_low(a);
sm_off =3D SM_OFF(a);
sm->vabits8[sm_off] =3D VA_BITS8_WRITABLE;
#endif
@@ -1300,7 +1300,7 @@
return;
}
=20
- sm =3D get_secmap_writable_low(a);
+ sm =3D get_secmap_for_writing_low(a);
sm_off =3D SM_OFF(a);
sm->vabits8[sm_off] =3D VA_BITS8_NOACCESS;
#endif
@@ -1325,7 +1325,7 @@
return;
}
=20
- sm =3D get_secmap_writable_low(a);
+ sm =3D get_secmap_for_writing_low(a);
sm_off16 =3D SM_OFF_16(a);
((UShort*)(sm->vabits8))[sm_off16] =3D VA_BITS16_WRITABLE;
#endif
@@ -1349,7 +1349,7 @@
return;
}
=20
- sm =3D get_secmap_writable_low(a);
+ sm =3D get_secmap_for_writing_low(a);
sm_off16 =3D SM_OFF_16(a);
((UShort*)(sm->vabits8))[sm_off16] =3D VA_BITS16_NOACCESS;
#endif
@@ -1806,8 +1806,8 @@
tl_assert(a_lo < a_hi); // paranoia: detect overflow
if (a_hi < MAX_PRIMARY_ADDRESS) {
// Now we know the entire range is within the main primary map.
- SecMap* sm =3D get_secmap_writable_low(a_lo);
- SecMap* sm_hi =3D get_secmap_writable_low(a_hi);
+ SecMap* sm =3D get_secmap_for_writing_low(a_lo);
+ SecMap* sm_hi =3D get_secmap_for_writing_low(a_hi);
/* Now we know that the entire address range falls within a
single secondary map, and that that secondary 'lives' in
the main primary map. */
@@ -1844,8 +1844,8 @@
tl_assert(a_lo < a_hi); // paranoia: detect overflow
if (a_hi < MAX_PRIMARY_ADDRESS) {
// Now we know the entire range is within the main primary map.
- SecMap* sm =3D get_secmap_writable_low(a_lo);
- SecMap* sm_hi =3D get_secmap_writable_low(a_hi);
+ SecMap* sm =3D get_secmap_for_writing_low(a_lo);
+ SecMap* sm_hi =3D get_secmap_for_writing_low(a_hi);
/* Now we know that the entire address range falls within a
single secondary map, and that that secondary 'lives' in
the main primary map. */
@@ -3063,7 +3063,7 @@
return (ULong)mc_LOADVn_slow( a, 64, isBigEndian );
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off16 =3D SM_OFF_16(a);
vabits16 =3D ((UShort*)(sm->vabits8))[sm_off16];
=20
@@ -3111,7 +3111,7 @@
return;
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off16 =3D SM_OFF_16(a);
vabits16 =3D ((UShort*)(sm->vabits8))[sm_off16];
=20
@@ -3167,7 +3167,7 @@
return (UWord)mc_LOADVn_slow( a, 32, isBigEndian );
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off =3D SM_OFF(a);
vabits8 =3D sm->vabits8[sm_off];
=20
@@ -3215,7 +3215,7 @@
return;
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off =3D SM_OFF(a);
vabits8 =3D sm->vabits8[sm_off];
=20
@@ -3305,7 +3305,7 @@
return (UWord)mc_LOADVn_slow( a, 16, isBigEndian );
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off =3D SM_OFF(a);
vabits8 =3D sm->vabits8[sm_off];
// Handle common case quickly: a is suitably aligned, is mapped, and =
is
@@ -3356,7 +3356,7 @@
return;
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off =3D SM_OFF(a);
vabits8 =3D sm->vabits8[sm_off];
if (EXPECTED_TAKEN( !is_distinguished_sm(sm) &&=20
@@ -3414,7 +3414,7 @@
return (UWord)mc_LOADVn_slow( a, 8, False/*irrelevant*/ );
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off =3D SM_OFF(a);
vabits8 =3D sm->vabits8[sm_off];
// Convert V bits from compact memory form to expanded register form
@@ -3456,7 +3456,7 @@
return;
}
=20
- sm =3D get_secmap_readable_low(a);
+ sm =3D get_secmap_for_reading_low(a);
sm_off =3D SM_OFF(a);
vabits8 =3D sm->vabits8[sm_off];
if (EXPECTED_TAKEN
|