This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Move declare_mgen_finite_alias definition
Joseph Myers <joseph@codesourcery.com> writes:
> On Fri, 11 May 2018, Tulio Magno Quites Machado Filho wrote:
>
>> Move declare_mgen_finite_alias, declare_mgen_finite_alias_s and
>> declare_mgen_finite_alias_x to a shared place in order to reuse them in
>> other files that also declare _finite aliases.
>
> I don't see any other type-generic templates declaring such aliases, so
> you'll need to give more explanation of why this is useful.
They are indeed not used right now.
Both this patch and the M_DECL_FUNC_R* one are preparing terrain for larger
patch sets. I thought this would be easier to review, but we can delay the
review of this patch if you prefer.
Anyway, let me elaborate: we created a new template that uses this macro
and the directory sysdeps/ieee754/ldbl-128ibm-compat/.
We're using template techniques to provide the new symbols instead of what
was adopted with float128_private.h. We haven't replaced this header (yet?),
though. The redefinition of macros that float128_private.h does, reached a
limit and became too complex to deal with.
With these macros, we can reuse code without redeclaring macros with the name
of functions. We can also redefine them per float type and directory, e.g.
sysdeps/ieee754/ldbl-128ibm-compat/math-type-macros-float128.h.
This is an example of a file, using a sister-macro.
sysdeps/ieee754/ldbl-128ibm-compat/e_acosf128.c:
#include <math-type-macros-float128.h>
#include "../float128/e_acosf128.c"
#undef __acosl_finite
#undef __acosl
declare_mgen_finite_alias2 (__ieee754_acos, __acos)
--
Tulio Magno