Line
Link Here
|
0 |
-- work/gcc-5666.3/gcc/toplev.h |
0 |
++ work/gcc-5666.3/gcc/toplev.h |
Lines 151-156
Link Here
|
151 |
/* Return true iff flags are set as if -ffast-math. */ |
151 |
/* Return true iff flags are set as if -ffast-math. */ |
152 |
extern bool fast_math_flags_set_p (void); |
152 |
extern bool fast_math_flags_set_p (void); |
153 |
|
153 |
|
|
|
154 |
#if GCC_VERSION < 3004 |
155 |
|
154 |
/* Return log2, or -1 if not exact. */ |
156 |
/* Return log2, or -1 if not exact. */ |
155 |
extern int exact_log2 (unsigned HOST_WIDE_INT); |
157 |
extern int exact_log2 (unsigned HOST_WIDE_INT); |
156 |
|
158 |
|
Lines 158-164
Link Here
|
158 |
extern int floor_log2 (unsigned HOST_WIDE_INT); |
160 |
extern int floor_log2 (unsigned HOST_WIDE_INT); |
159 |
|
161 |
|
160 |
/* Inline versions of the above for speed. */ |
162 |
/* Inline versions of the above for speed. */ |
161 |
#if GCC_VERSION >= 3004 |
163 |
#else /* GCC_VERSION < 3004 */ |
162 |
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG |
164 |
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG |
163 |
# define CLZ_HWI __builtin_clzl |
165 |
# define CLZ_HWI __builtin_clzl |
164 |
# define CTZ_HWI __builtin_ctzl |
166 |
# define CTZ_HWI __builtin_ctzl |
Lines 172-189
Link Here
|
172 |
# define CTZ_HWI __builtin_ctz |
172 |
# define CTZ_HWI __builtin_ctz |
173 |
# endif |
173 |
# endif |
174 |
|
174 |
|
175 |
extern inline int |
175 |
static inline int |
176 |
floor_log2 (unsigned HOST_WIDE_INT x) |
176 |
floor_log2 (unsigned HOST_WIDE_INT x) |
177 |
{ |
177 |
{ |
178 |
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1; |
178 |
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1; |
179 |
} |
179 |
} |
180 |
|
180 |
|
181 |
extern inline int |
181 |
static inline int |
182 |
exact_log2 (unsigned HOST_WIDE_INT x) |
182 |
exact_log2 (unsigned HOST_WIDE_INT x) |
183 |
{ |
183 |
{ |
184 |
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1; |
184 |
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1; |
185 |
} |
185 |
} |
186 |
#endif /* GCC_VERSION >= 3004 */ |
186 |
#endif /* GCC_VERSION < 3004 */ |
187 |
|
187 |
|
188 |
/* Functions used to get and set GCC's notion of in what directory |
188 |
/* Functions used to get and set GCC's notion of in what directory |
189 |
compilation was started. */ |
189 |
compilation was started. */ |
190 |
-- work/gcc-5666.3/gcc/toplev.c |
190 |
++ work/gcc-5666.3/gcc/toplev.c |
Lines 555-561
Link Here
|
555 |
for floor_log2 and exact_log2; see toplev.h. That construct, however, |
555 |
for floor_log2 and exact_log2; see toplev.h. That construct, however, |
556 |
conflicts with the ISO C++ One Definition Rule. */ |
556 |
conflicts with the ISO C++ One Definition Rule. */ |
557 |
|
557 |
|
558 |
#if GCC_VERSION < 3004 || !defined (__cplusplus) |
558 |
#if GCC_VERSION < 3004 |
559 |
|
559 |
|
560 |
/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. |
560 |
/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. |
561 |
If X is 0, return -1. */ |
561 |
If X is 0, return -1. */ |
Lines 607-613
Link Here
|
607 |
#endif |
607 |
#endif |
608 |
} |
608 |
} |
609 |
|
609 |
|
610 |
#endif /* GCC_VERSION < 3004 || !defined (__cplusplus) */ |
610 |
#endif /* GCC_VERSION < 3004 */ |
611 |
|
611 |
|
612 |
/* Handler for fatal signals, such as SIGSEGV. These are transformed |
612 |
/* Handler for fatal signals, such as SIGSEGV. These are transformed |
613 |
into ICE messages, which is much more user friendly. In case the |
613 |
into ICE messages, which is much more user friendly. In case the |