From 1be1b43db40beaa89f4c46419def1fbce733c82c Mon Sep 17 00:00:00 2001 From: ps Date: Fri, 30 Jul 2004 16:44:29 +0000 Subject: 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. --- sys/amd64/include/cpufunc.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'sys/amd64') 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 -- cgit v1.1