From 1b214630ce6f7e0099b8b6f87246246739b079cf Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 11 Aug 2023 08:04:08 -0700 Subject: x86_64: Add expm1 with FMA On Skylake, it improves expm1 bench performance by: Before After Improvement max 70.204 68.054 3% min 20.709 16.2 22% mean 22.1221 16.7367 24% NB: Add extern long double __expm1l (long double); extern long double __expm1f128 (long double); for __typeof (__expm1l) and __typeof (__expm1f128) when __expm1 is defined since __expm1 may be expanded in their declarations which causes the build failure. --- sysdeps/ieee754/dbl-64/s_expm1.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sysdeps/ieee754') diff --git a/sysdeps/ieee754/dbl-64/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c index 8f1c95bd04..1cafeca9c0 100644 --- a/sysdeps/ieee754/dbl-64/s_expm1.c +++ b/sysdeps/ieee754/dbl-64/s_expm1.c @@ -130,6 +130,11 @@ static const double 4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */ -2.01099218183624371326e-07 }; /* BE8AFDB7 6E09C32D */ +#ifndef SECTION +# define SECTION +#endif + +SECTION double __expm1 (double x) { @@ -258,4 +263,6 @@ __expm1 (double x) } return y; } +#ifndef __expm1 libm_alias_double (__expm1, expm1) +#endif -- cgit v1.2.3-70-g09d2