about summary refs log tree commit diff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2023-08-11 08:04:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2023-08-14 08:14:19 -0700
commit1b214630ce6f7e0099b8b6f87246246739b079cf (patch)
treebed526aa9ce38f6c09e144cf27fc24128b0b12c0 /sysdeps/ieee754
parentdd2794d6680d322754464448a25916ee199ce678 (diff)
downloadglibc-1b214630ce6f7e0099b8b6f87246246739b079cf.tar.gz
glibc-1b214630ce6f7e0099b8b6f87246246739b079cf.tar.xz
glibc-1b214630ce6f7e0099b8b6f87246246739b079cf.zip
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.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/dbl-64/s_expm1.c7
1 files changed, 7 insertions, 0 deletions
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