Author: mjg
Date: Tue Jul 28 07:04:46 2020
New Revision: 363633
URL: https://svnweb.freebsd.org/changeset/base/363633

Log:
  MFC r363242:
  
      amd64: patch ffsl to use the compiler builtin

Modified:
  stable/12/sys/amd64/include/cpufunc.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/include/cpufunc.h
==============================================================================
--- stable/12/sys/amd64/include/cpufunc.h       Tue Jul 28 04:58:01 2020        
(r363632)
+++ stable/12/sys/amd64/include/cpufunc.h       Tue Jul 28 07:04:46 2020        
(r363633)
@@ -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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to