From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson To: "Joseph S. Myers" Cc: gcc@gcc.gnu.org, libc-alpha@sourceware.cygnus.com Subject: Re: Implementation of Date: Mon, 31 Jul 2000 11:14:00 -0000 Message-id: <20000731111450.A6913@cygnus.com> References: X-SW-Source: 2000-07/msg01013.html 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 > 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~