vm: remove unused static function log2()

This commit is contained in:
Pawel Dziepak 2013-04-11 12:32:32 +02:00
parent 87d1bdb87c
commit d0a8e6ef2b

View File

@ -50,26 +50,6 @@ is_valid_spot(addr_t base, addr_t alignedBase, addr_t size, addr_t limit)
}
/* http://graphics.stanford.edu/~seander/bithacks.html */
static inline int
log2(uint32_t v)
{
static const int multiply_debruijn_bit_position[32] =
{
0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
};
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
return multiply_debruijn_bit_position[(uint32_t)(v * 0x07c4acddu) >> 27];
}
static inline bool
is_randomized(uint32 addressSpec)
{