This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Implementation of <tgmath.h>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Subject: Re: Implementation of <tgmath.h>
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 31 Jul 2000 11:14:50 -0700
- Cc: gcc at gcc dot gnu dot org, libc-alpha at sourceware dot cygnus dot com
- References: <Pine.SOL.4.21.0007282023140.4217-100000@red.csi.cam.ac.uk>
On Fri, Jul 28, 2000 at 08:47:26PM +0100, Joseph S. Myers wrote:
> The best suggestion I have for a compiler extension to allow a correct
> implementation would be a series of builtin functions corresponding to
> the glibc macros, so that for example
>
> #define expm1(Val) __builtin_tgmath_unary_real_only(Val, expm1f, expm1, \
> expm1l)
>
> would have the compiler create a call to the appropriate one of expm1f,
> expm1, expm1l according to the type of Val and the rules of <tgmath.h>
> when it sees a call to __builtin_tgmath_unary_real_only.
Ug. This would seem to need the addition of mini-templates to
the C front end.
OTOH, the IA-64 abi has some builtin functions that could benefit
from this. At present we implement two separate builtins and
play header file tricks to try and make it come out right.
r~