Try to handle LL caches which are of size 50% above a power of 2 (eg,
6MB, 12MB) and have a non-power-of-2 number of sets.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11812 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/pub_tool_libcbase.h b/include/pub_tool_libcbase.h
index 0e61691..bc7c9f4 100644
--- a/include/pub_tool_libcbase.h
+++ b/include/pub_tool_libcbase.h
@@ -181,10 +181,13 @@
extern void VG_(ssort)( void* base, SizeT nmemb, SizeT size,
Int (*compar)(void*, void*) );
-/* Returns the base-2 logarithm of x. Returns -1 if x is not a power
- of two. Nb: VG_(log2)(1) == 0. */
+/* Returns the base-2 logarithm of a 32 bit unsigned number. Returns
+ -1 if it is not a power of two. Nb: VG_(log2)(1) == 0. */
extern Int VG_(log2) ( UInt x );
+/* Ditto for 64 bit unsigned numbers. */
+extern Int VG_(log2_64)( ULong x );
+
// A pseudo-random number generator returning a random UInt. If pSeed
// is NULL, it uses its own seed, which starts at zero. If pSeed is
// non-NULL, it uses and updates whatever pSeed points at.