aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-15 23:09:16 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-15 23:09:16 -0700
commite6a62e18fd9d429950e25db97ac216fa570bfa30 (patch)
treefc9cb7df1e12d2fe12e7045673fe5ac779f26496 /sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
parentc4a7b16eb80d59539d2d2cc1f9445e877b55cd2b (diff)
downloadglibc-e6a62e18fd9d429950e25db97ac216fa570bfa30.tar
glibc-e6a62e18fd9d429950e25db97ac216fa570bfa30.tar.gz
glibc-e6a62e18fd9d429950e25db97ac216fa570bfa30.tar.bz2
glibc-e6a62e18fd9d429950e25db97ac216fa570bfa30.zip
Add sparc vis3 optimized fma/fmaf.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add fma/fmaf sysdep routines. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise.
Diffstat (limited to 'sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c')
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
new file mode 100644
index 0000000000..3f2f1622c8
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
@@ -0,0 +1,14 @@
+#ifdef HAVE_AS_VIS3_SUPPORT
+# include <sparc-ifunc.h>
+# include <math.h>
+
+extern double __fma_vis3 (double, double, double);
+extern double __fma_generic (double, double, double);
+
+sparc_libm_ifunc(__fma, hwcap & HWCAP_SPARC_FMAF ? __fma_vis3 : __fma_generic);
+weak_alias (__fma, fma)
+
+# define __fma __fma_generic
+#endif
+
+#include <sysdeps/ieee754/dbl-64/s_fma.c>