This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] middle-end: provide generic "isnormal" transformation
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 8 Jul 2007 18:13:10 -0400 (EDT)
- Subject: Re: [PATCH] middle-end: provide generic "isnormal" transformation
- References: <Pine.GSO.4.58.0706190036180.28409@caipclassic.rutgers.edu> <Pine.LNX.4.64.0706191304380.13153@digraph.polyomino.org.uk> <Pine.GSO.4.58.0706191334250.29806@caipclassic.rutgers.edu> <Pine.LNX.4.64.0706191756230.15926@digraph.polyomino.org.uk> <84fc9c000707081404u3bcd93f6pc79a56da3aa599b8@mail.gmail.com>
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