ilog2: optimize use of bsr for x86-64
commitc138e6a4b23bf6e34a43e178fb4b09a13944f1d4
authorH. Peter Anvin <hpa@zytor.com>
Thu, 22 Apr 2010 18:02:56 +0000 (22 11:02 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 22 Apr 2010 18:02:56 +0000 (22 11:02 -0700)
tree2f750878ede20f6983e71763800fe8ba99b7f0d4
parent671a19600cb99b7350728a0985dacd77af885a86
ilog2: optimize use of bsr for x86-64

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.c