summaryrefslogtreecommitdiff
path: root/ilog2.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-22ilog2: optimize use of bsr for x86-64H. Peter Anvin1-6/+6
On x86-64 platforms, we can rely on BSR not changing the destination operand when the input is zero. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-04-22ilog2: Use ROUND helperCyrill Gorcunov1-43/+22
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22ilog2: Get rid of tabsCyrill Gorcunov1-69/+69
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-21Add generic ilog2 functionsH. Peter Anvin1-0/+181
Add ilog2_{32,64}() and alignlog2_{32,64}() ... the latter is intended for alignment statements and return -1 for non-power-of-2 other than 0 (which returns 0). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>