mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -167,7 +167,8 @@ enable_intr(void)
|
|||
static __inline __pure2 int
|
||||
ffsl(long mask)
|
||||
{
|
||||
return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1);
|
||||
|
||||
return (__builtin_ffsl(mask));
|
||||
}
|
||||
|
||||
#define HAVE_INLINE_FFSLL
|
||||
|
|
|
|||
Loading…
Reference in a new issue