about summary refs log tree commit diff
path: root/math/Makefile
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>2017-05-16 13:34:34 -0300
committerGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>2017-05-17 14:44:08 -0300
commit7620dc123570e2c8080a4dcc51d220a9d92c8841 (patch)
treeb6494a7a8a234c5d74af6e40a12e770185bd1c2d /math/Makefile
parentad2f35cb396d24391150675fb55311c98d1e1592 (diff)
downloadglibc-7620dc123570e2c8080a4dcc51d220a9d92c8841.tar.gz
glibc-7620dc123570e2c8080a4dcc51d220a9d92c8841.tar.xz
glibc-7620dc123570e2c8080a4dcc51d220a9d92c8841.zip
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.
Diffstat (limited to 'math/Makefile')
-rw-r--r--math/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/math/Makefile b/math/Makefile
index ff4aa0051b..9aca4e04ec 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -59,7 +59,7 @@ gen-libm-calls = cargF conjF cimagF crealF cabsF s_cacosF		  \
 		 w_acoshF w_asinF w_atan2F w_atanhF w_coshF w_exp10F	  \
 		 w_exp2F w_fmodF w_hypotF w_j0F w_j1F w_jnF w_logF	  \
 		 w_log10F w_log2F w_powF w_remainderF w_sinhF w_sqrtF	  \
-		 w_tgammaF w_lgammaF w_lgammaF_r w_expF
+		 w_tgammaF w_lgammaF w_lgammaF_r w_expF e_exp2F
 
 libm-calls =								  \
 	e_acosF e_acoshF e_asinF e_atan2F e_atanhF e_coshF e_expF e_fmodF \
@@ -72,7 +72,7 @@ libm-calls =								  \
 	s_nextafterF s_nexttowardF s_rintF s_scalblnF			  \
 	s_significandF s_sinF s_tanF s_tanhF				  \
 	s_fpclassifyF s_truncF						  \
-	s_remquoF e_log2F e_exp2F s_roundF s_nearbyintF s_sincosF	  \
+	s_remquoF e_log2F s_roundF s_nearbyintF s_sincosF		  \
 	s_fmaF s_lrintF s_llrintF s_lroundF s_llroundF e_exp10F		  \
 	s_issignalingF $(calls:s_%=m_%) x2y2m1F				  \
 	gamma_productF lgamma_negF lgamma_productF			  \