From d0a8e6ef2bc88d776c0e6f167bbd4ac9b8c262dd Mon Sep 17 00:00:00 2001 From: Pawel Dziepak Date: Thu, 11 Apr 2013 12:32:32 +0200 Subject: [PATCH] vm: remove unused static function log2() --- src/system/kernel/vm/VMUserAddressSpace.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/system/kernel/vm/VMUserAddressSpace.cpp b/src/system/kernel/vm/VMUserAddressSpace.cpp index 2be6d1a689..a366cf78e6 100644 --- a/src/system/kernel/vm/VMUserAddressSpace.cpp +++ b/src/system/kernel/vm/VMUserAddressSpace.cpp @@ -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) {