]> git.ipfire.org Git - thirdparty/glibc.git/commit
Convert e_exp2l.c into a template
authorGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Tue, 16 May 2017 16:34:34 +0000 (13:34 -0300)
committerGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Wed, 17 May 2017 17:44:08 +0000 (14:44 -0300)
commit7620dc123570e2c8080a4dcc51d220a9d92c8841
treeb6494a7a8a234c5d74af6e40a12e770185bd1c2d
parentad2f35cb396d24391150675fb55311c98d1e1592
Convert e_exp2l.c into a template

This patch converts the implementation of exp2l in math/e_exp2l.c into
a template in math/e_exp2_template.c, then adjusts Makefile to use
this template for long double (the implementations for float and
double in sysdeps have higher precedence and are not used).  This
template can also be used for float128, thus reducing the amount of
duplicated code that gets added when adding support the new type.

Tested for powerpc64le and s390x.

* math/Makefile (libm-calls): Move e_exp2F to gen-libm-calls.
(gen-libm-calls): Add e_exp2F to use the template.
* math/e_exp2l.c: Rename to math/e_exp2_template.c.
* math/e_exp2_template.c: New file, renamed from
math/e_exp2l.c, and made into a template.
* sysdeps/generic/math-type-macros.h (M_MIN_EXP): New macro.
ChangeLog
math/Makefile
math/e_exp2_template.c [moved from math/e_exp2l.c with 59% similarity]
sysdeps/generic/math-type-macros.h