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] middle-end: provide generic "isnormal" transformation


On Sun, 8 Jul 2007, Richard Guenther wrote:

> On 6/19/07, Joseph S. Myers <joseph@codesourcery.com> wrote:
> > On Tue, 19 Jun 2007, Kaveh R. GHAZI wrote:
> >
> > > Yup, will do.  Any thoughts on which DEF_* macro to use?  DEF_GCC_BUILTIN,
> > > DEF_C99_C90RES_BUILTIN or something else?
> >
> > DEF_GCC_BUILTIN.  There is no associated standard library function, just
> > standard macros these builtins are of use in defining.
>
> But the standard macros are specified by C99, we should make them available
> for std=c99.  I fail to see how having an associated library function or not is
> related here.
>
> Or am I missing something?

Well I can't speak for Joseph, but here's my understanding of why this
relates to whether there is an associates library function.  The
DEF_GCC_BUILTIN macro is setup to have the FALLBACK_P parameter set to
false, so it never generates a library call.  All the DEF_LIB_* and
DEF_C9* macros set it to true and rely on falling back to a libc function.
Since generally there is no one associated function for the type-generic
macros, (and if there were, which FP type would it take as a parameter?),
we therefore want to use the DEF_GCC_BUILTIN style.

This is why all the unordered comparison ops are declared this way.
And therefore for isnormal and isfinite I'm doing the same.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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