diff options
author | ps <ps@FreeBSD.org> | 2004-07-30 16:44:29 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2004-07-30 16:44:29 +0000 |
commit | 1be1b43db40beaa89f4c46419def1fbce733c82c (patch) | |
tree | a91e618e0e34aba73e66112d21f7a5dc2caa20a0 | |
parent | ea736f2d3f6ae9a11905a5dd490e669cf3c1c7fc (diff) | |
download | FreeBSD-src-1be1b43db40beaa89f4c46419def1fbce733c82c.zip FreeBSD-src-1be1b43db40beaa89f4c46419def1fbce733c82c.tar.gz |
MFia64:
Fix -O builds with gcc 3.4 by defining ffs as __builtin_ffs instead
of creating an inline function that just calls __builtin_ffs.
-rw-r--r-- | sys/amd64/include/cpufunc.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 3304fae..e558858 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -118,23 +118,7 @@ enable_intr(void) #ifdef _KERNEL #define HAVE_INLINE_FFS - -static __inline int -ffs(int mask) -{ -#if 0 - /* - * Note that gcc-2's builtin ffs would be used if we didn't declare - * this inline or turn off the builtin. The builtin is faster but - * broken in gcc-2.4.5 and slower but working in gcc-2.5 and later - * versions. - */ - return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1); -#else - /* Actually, the above is way out of date. The builtins use cmov etc */ - return (__builtin_ffs(mask)); -#endif -} +#define ffs(x) __builtin_ffs(x) #define HAVE_INLINE_FFSL |