amd64: patch ffsl to use the compiler builtin
This shortens fdalloc by over 60 bytes. Correctness verified by running both variants at the same time and comparing the result of each call. Note someone(tm) should make a pass at converting everything else feasible.
This commit is contained in:
parent
6b8b1bfef0
commit
c4e64133d8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363242
@ -167,7 +167,8 @@ enable_intr(void)
|
|||||||
static __inline __pure2 int
|
static __inline __pure2 int
|
||||||
ffsl(long mask)
|
ffsl(long mask)
|
||||||
{
|
{
|
||||||
return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1);
|
|
||||||
|
return (__builtin_ffsl(mask));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HAVE_INLINE_FFSLL
|
#define HAVE_INLINE_FFSLL
|
||||||
|
Loading…
Reference in New Issue
Block a user