This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Address PR middle-end/35509 by adding a separate isinf_sign builtin


On Sun, 18 May 2008, Kaveh R. GHAZI wrote:

> @@ -6294,8 +6295,10 @@ the same names as the standard macros (
>  @code{islessgreater}, and @code{isunordered}) , with @code{__builtin_}
>  prefixed.  We intend for a library implementor to be able to simply
>  @code{#define} each standard macro to its built-in equivalent.
> -In the same fashion, GCC provides @code{isfinite} and @code{isnormal}
> -built-ins used with @code{__builtin_} prefixed.
> +In the same fashion, GCC provides @code{isfinite}, @code{isinf_sign}
> +and @code{isnormal} built-ins used with @code{__builtin_} prefixed.
> +The @code{isinf} and @code{isnan} builtins appear both with and
> +without the @code{__builtin_} prefix.

This doesn't actually say what __builtin_isinf_sign does (that is, that it 
can be used to implement the standard isinf macro with particular rules 
for the sign of the return value).

Do we have a bug for __builtin_signbit not being type-generic (it's 
BT_FN_INT_DOUBLE)?  It's the odd one out of these built-in functions in 
not being usable directly to implement the standard macro (although we 
don't have a built-in function at all for fpclassify, where the 
library-dependent FP_* return values complicate things).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]