summaryrefslogtreecommitdiff
path: root/ilog2.c
Commit message (Collapse)AuthorAgeFilesLines
* ilog2: optimize use of bsr for x86-64H. Peter Anvin2010-04-221-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>
* ilog2: Use ROUND helperCyrill Gorcunov2010-04-221-43/+22
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* ilog2: Get rid of tabsCyrill Gorcunov2010-04-221-69/+69
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Add generic ilog2 functionsH. Peter Anvin2010-04-211-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>