extern bool fast_math_flags_set_p (void);
extern bool fast_math_flags_struct_set_p (struct cl_optimization *);
+/* Inline versions of the above for speed. */
+#if GCC_VERSION < 3004
+
/* Return log2, or -1 if not exact. */
extern int exact_log2 (unsigned HOST_WIDE_INT);
/* Return floor of log2, with -1 for zero. */
extern int floor_log2 (unsigned HOST_WIDE_INT);
-/* Inline versions of the above for speed. */
-#if GCC_VERSION >= 3004
+#else /* GCC_VERSION >= 3004 */
+
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
# define CLZ_HWI __builtin_clzl
# define CTZ_HWI __builtin_ctzl
# define CTZ_HWI __builtin_ctz
# endif
-extern inline int
+static inline int
floor_log2 (unsigned HOST_WIDE_INT x)
{
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
}
-extern inline int
+static inline int
exact_log2 (unsigned HOST_WIDE_INT x)
{
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
}
+
#endif /* GCC_VERSION >= 3004 */
/* Functions used to get and set GCC's notion of in what directory