summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-15 20:20:49 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-15 20:29:44 -0700
commit006f1daa5aacba8a10b7c748f6559a56d0ffbf12 (patch)
tree4b349ed9402e45474843cf61eff5b1d0ada32c53
parent11e0098ef008db301a82b753dda466dc61cdd0bc (diff)
downloadglibc-006f1daa5aacba8a10b7c748f6559a56d0ffbf12.tar.gz
Create a header for sparc ifunc expansion and use it for VIS3 ifuncs.
* sysdeps/sparc/sparc-ifunc.h: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S: Use sparc-ifunc.h * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S: Likewise.
-rw-r--r--ChangeLog42
-rw-r--r--sysdeps/sparc/sparc-ifunc.h112
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S40
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S40
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S40
40 files changed, 268 insertions, 1406 deletions
diff --git a/ChangeLog b/ChangeLog
index 276518540a..88f99c37cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2012-03-15 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc-ifunc.h: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S: Use sparc-ifunc.h
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S: Likewise.
+
2012-03-15 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/powerpc/fpu/e_hypotf.c: Use double precision instead of
diff --git a/sysdeps/sparc/sparc-ifunc.h b/sysdeps/sparc/sparc-ifunc.h
new file mode 100644
index 0000000000..db53a7126e
--- /dev/null
+++ b/sysdeps/sparc/sparc-ifunc.h
@@ -0,0 +1,112 @@
+/* This file is part of the GNU C Library.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+# ifdef SHARED
+
+# define SPARC_ASM_IFUNC_DFLT(name, dflt) \
+ENTRY (__##name) \
+ .type __##name, @gnu_indirect_function; \
+ SETUP_PIC_REG_LEAF(o3, o5); \
+ sethi %gdop_hix22(dflt), %o1; \
+ xor %o1, %gdop_lox10(dflt), %o1; \
+ add %o3, %o1, %o1; \
+ retl; \
+ mov %o1, %o0; \
+END (__##name)
+
+# define SPARC_ASM_IFUNC1(name, m1, f1, dflt) \
+ENTRY (__##name) \
+ .type __##name, @gnu_indirect_function; \
+ SETUP_PIC_REG_LEAF(o3, o5); \
+ set m1, %o1; \
+ andcc %o0, %o1, %g0; \
+ be 9f; \
+ nop; \
+ sethi %gdop_hix22(f1), %o1; \
+ xor %o1, %gdop_lox10(f1), %o1; \
+ ba 10f; \
+ nop; \
+9: sethi %gdop_hix22(dflt), %o1; \
+ xor %o1, %gdop_lox10(dflt), %o1; \
+10: add %o3, %o1, %o1; \
+ retl; \
+ mov %o1, %o0; \
+END (__##name)
+
+# else /* SHARED */
+
+# ifdef __arch64__
+# define SET(SYM, TMP, REG) setx SYM, TMP, REG
+# else
+# define SET(SYM, TMP, REG) set SYM, REG
+# endif
+
+# define SPARC_ASM_IFUNC_DFLT(name, dflt) \
+ENTRY (__##name) \
+ .type __##name, @gnu_indirect_function; \
+ SET(dflt, %g1, %o1); \
+ retl; \
+ mov %o1, %o0; \
+END (__##name)
+
+# define SPARC_ASM_IFUNC1(name, m1, f1, dflt) \
+ENTRY (__##name) \
+ .type __##name, @gnu_indirect_function; \
+ set m1, %o1; \
+ andcc %o0, %o1, %g0; \
+ be 9f; \
+ nop; \
+ SET(f1, %g1, %o1); \
+ ba 10f; \
+ nop; \
+9: SET(dflt, %g1, %o1); \
+10: retl; \
+ mov %o1, %o0; \
+END (__##name)
+
+# endif /* SHARED */
+
+# ifdef HAVE_AS_VIS3_SUPPORT
+
+#define SPARC_ASM_VIS3_IFUNC(name) \
+ SPARC_ASM_IFUNC1(name, HWCAP_SPARC_VIS3, \
+ __##name##_vis3, __##name##_generic)
+
+# else /* HAVE_AS_VIS3_SUPPORT */
+
+#define SPARC_ASM_VIS3_IFUNC(name) \
+ SPARC_ASM_IFUNC_DFLT(name, __##name##_generic)
+
+# endif /* HAVE_AS_VIS3_SUPPORT */
+
+
+#else /* __ASSEMBLER__ */
+
+# define sparc_libm_ifunc(name, expr) \
+ extern void *name##_ifunc (int) __asm__ (#name); \
+ void *name##_ifunc (int hwcap) \
+ { \
+ __typeof (name) *res = expr; \
+ return res; \
+ } \
+ __asm__ (".type " #name ", %gnu_indirect_function");
+
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
index f91fda61b9..fa4c7c353f 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(ceil)
- .text
-ENTRY(__ceil)
- .type __ceil, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__ceil_vis3), %o1
- xor %o1, %gdop_lox10(__ceil_vis3), %o1
-# else
- set __ceil_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__ceil_generic), %o1
- xor %o1, %gdop_lox10(__ceil_generic), %o1
-# else
- set __ceil_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__ceil)
weak_alias (__ceil, ceil)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S
index 048b6195d8..3047dd8faa 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(ceilf)
- .text
-ENTRY(__ceilf)
- .type __ceilf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__ceilf_vis3), %o1
- xor %o1, %gdop_lox10(__ceilf_vis3), %o1
-# else
- set __ceilf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__ceilf_generic), %o1
- xor %o1, %gdop_lox10(__ceilf_generic), %o1
-# else
- set __ceilf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__ceilf)
weak_alias (__ceilf, ceilf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
index 7179058f06..cdd98c00f4 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(copysign)
- .text
-ENTRY(__copysign)
- .type __copysign, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__copysign_vis3), %o1
- xor %o1, %gdop_lox10(__copysign_vis3), %o1
-# else
- set __copysign_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__copysign_generic), %o1
- xor %o1, %gdop_lox10(__copysign_generic), %o1
-# else
- set __copysign_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__copysign)
weak_alias (__copysign, copysign)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S
index 4d055f2df5..cd409550de 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(copysignf)
- .text
-ENTRY(__copysignf)
- .type __copysignf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__copysignf_vis3), %o1
- xor %o1, %gdop_lox10(__copysignf_vis3), %o1
-# else
- set __copysignf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__copysignf_generic), %o1
- xor %o1, %gdop_lox10(__copysignf_generic), %o1
-# else
- set __copysignf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__copysignf)
weak_alias (__copysignf, copysignf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
index ed70e4be2c..86c63989a4 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fabs)
- .text
-ENTRY(__fabs)
- .type __fabs, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fabs_vis3), %o1
- xor %o1, %gdop_lox10(__fabs_vis3), %o1
-# else
- set __fabs_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fabs_generic), %o1
- xor %o1, %gdop_lox10(__fabs_generic), %o1
-# else
- set __fabs_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fabs)
weak_alias (__fabs, fabs)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S
index 4b7351fc2e..0f2e11e01f 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fabsf)
- .text
-ENTRY(__fabsf)
- .type __fabsf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fabsf_vis3), %o1
- xor %o1, %gdop_lox10(__fabsf_vis3), %o1
-# else
- set __fabsf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fabsf_generic), %o1
- xor %o1, %gdop_lox10(__fabsf_generic), %o1
-# else
- set __fabsf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fabsf)
weak_alias (__fabsf, fabsf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
index 1cdc53fb84..6ae9947a7a 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(floor)
- .text
-ENTRY(__floor)
- .type __floor, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__floor_vis3), %o1
- xor %o1, %gdop_lox10(__floor_vis3), %o1
-# else
- set __floor_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__floor_generic), %o1
- xor %o1, %gdop_lox10(__floor_generic), %o1
-# else
- set __floor_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__floor)
weak_alias (__floor, floor)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S
index 0dcd0e1431..31cda385b7 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(floorf)
- .text
-ENTRY(__floorf)
- .type __floorf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__floorf_vis3), %o1
- xor %o1, %gdop_lox10(__floorf_vis3), %o1
-# else
- set __floorf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__floorf_generic), %o1
- xor %o1, %gdop_lox10(__floorf_generic), %o1
-# else
- set __floorf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__floorf)
weak_alias (__floorf, floorf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
index f604f5b533..d5e59d8d1e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fmax)
- .text
-ENTRY(__fmax)
- .type __fmax, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fmax_vis3), %o1
- xor %o1, %gdop_lox10(__fmax_vis3), %o1
-# else
- set __fmax_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fmax_generic), %o1
- xor %o1, %gdop_lox10(__fmax_generic), %o1
-# else
- set __fmax_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fmax)
weak_alias (__fmax, fmax)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
index c188f8e568..daa91579c4 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fmaxf)
- .text
-ENTRY(__fmaxf)
- .type __fmaxf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fmaxf_vis3), %o1
- xor %o1, %gdop_lox10(__fmaxf_vis3), %o1
-# else
- set __fmaxf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fmaxf_generic), %o1
- xor %o1, %gdop_lox10(__fmaxf_generic), %o1
-# else
- set __fmaxf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fmaxf)
weak_alias (__fmaxf, fmaxf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
index ed7018b58b..b2aec1bbc0 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fmin)
- .text
-ENTRY(__fmin)
- .type __fmin, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fmin_vis3), %o1
- xor %o1, %gdop_lox10(__fmin_vis3), %o1
-# else
- set __fmin_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fmin_generic), %o1
- xor %o1, %gdop_lox10(__fmin_generic), %o1
-# else
- set __fmin_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fmin)
weak_alias (__fmin, fmin)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
index 6c7a4928c1..c4690e1df9 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fminf)
- .text
-ENTRY(__fminf)
- .type __fminf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fminf_vis3), %o1
- xor %o1, %gdop_lox10(__fminf_vis3), %o1
-# else
- set __fminf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fminf_generic), %o1
- xor %o1, %gdop_lox10(__fminf_generic), %o1
-# else
- set __fminf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fminf)
weak_alias (__fminf, fminf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
index 3a9294d3a8..a904aeca2a 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(llrint)
- .text
-ENTRY(__llrint)
- .type __llrint, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__llrint_vis3), %o1
- xor %o1, %gdop_lox10(__llrint_vis3), %o1
-# else
- set __llrint_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__llrint_generic), %o1
- xor %o1, %gdop_lox10(__llrint_generic), %o1
-# else
- set __llrint_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__llrint)
weak_alias (__llrint, llrint)
strong_alias (__llrint, __lllrint)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S
index f2236f0eec..8af5244e7e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(llrintf)
- .text
-ENTRY(__llrintf)
- .type __llrintf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__llrintf_vis3), %o1
- xor %o1, %gdop_lox10(__llrintf_vis3), %o1
-# else
- set __llrintf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__llrintf_generic), %o1
- xor %o1, %gdop_lox10(__llrintf_generic), %o1
-# else
- set __llrintf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__llrintf)
weak_alias (__llrintf, llrintf)
strong_alias (__llrintf, __lllrintf)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
index 3872ae299e..cc980eb8c7 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(rint)
- .text
-ENTRY(__rint)
- .type __rint, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__rint_vis3), %o1
- xor %o1, %gdop_lox10(__rint_vis3), %o1
-# else
- set __rint_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__rint_generic), %o1
- xor %o1, %gdop_lox10(__rint_generic), %o1
-# else
- set __rint_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__rint)
weak_alias (__rint, rint)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S
index 9918929220..38fd936086 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(rintf)
- .text
-ENTRY(__rintf)
- .type __rintf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__rintf_vis3), %o1
- xor %o1, %gdop_lox10(__rintf_vis3), %o1
-# else
- set __rintf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__rintf_generic), %o1
- xor %o1, %gdop_lox10(__rintf_generic), %o1
-# else
- set __rintf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__rintf)
weak_alias (__rintf, rintf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S
index 80b15767ce..3b070721d2 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(sqrt)
- .text
-ENTRY(__sqrt)
- .type __sqrt, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__sqrt_vis3), %o1
- xor %o1, %gdop_lox10(__sqrt_vis3), %o1
-# else
- set __sqrt_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__sqrt_generic), %o1
- xor %o1, %gdop_lox10(__sqrt_generic), %o1
-# else
- set __sqrt_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__sqrt)
weak_alias (__sqrt, sqrt)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S
index a700a4e876..777a04058c 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(sqrtf)
- .text
-ENTRY(__sqrtf)
- .type __sqrtf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__sqrtf_vis3), %o1
- xor %o1, %gdop_lox10(__sqrtf_vis3), %o1
-# else
- set __sqrtf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__sqrtf_generic), %o1
- xor %o1, %gdop_lox10(__sqrtf_generic), %o1
-# else
- set __sqrtf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__sqrtf)
weak_alias (__sqrtf, sqrtf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S
index f91fda61b9..fa4c7c353f 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(ceil)
- .text
-ENTRY(__ceil)
- .type __ceil, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__ceil_vis3), %o1
- xor %o1, %gdop_lox10(__ceil_vis3), %o1
-# else
- set __ceil_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__ceil_generic), %o1
- xor %o1, %gdop_lox10(__ceil_generic), %o1
-# else
- set __ceil_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__ceil)
weak_alias (__ceil, ceil)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S
index 048b6195d8..3047dd8faa 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(ceilf)
- .text
-ENTRY(__ceilf)
- .type __ceilf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__ceilf_vis3), %o1
- xor %o1, %gdop_lox10(__ceilf_vis3), %o1
-# else
- set __ceilf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__ceilf_generic), %o1
- xor %o1, %gdop_lox10(__ceilf_generic), %o1
-# else
- set __ceilf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__ceilf)
weak_alias (__ceilf, ceilf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S
index f4bfdcef96..78406a62b1 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(finite)
- .text
-ENTRY(__finite)
- .type __finite, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__finite_vis3), %o1
- xor %o1, %gdop_lox10(__finite_vis3), %o1
-# else
- set __finite_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__finite_generic), %o1
- xor %o1, %gdop_lox10(__finite_generic), %o1
-# else
- set __finite_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__finite)
hidden_def (__finite)
weak_alias (__finite, finite)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S
index 65ca7fd1c6..cafd41fd92 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(finitef)
- .text
-ENTRY(__finitef)
- .type __finitef, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__finitef_vis3), %o1
- xor %o1, %gdop_lox10(__finitef_vis3), %o1
-# else
- set __finitef_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__finitef_generic), %o1
- xor %o1, %gdop_lox10(__finitef_generic), %o1
-# else
- set __finitef_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__finitef)
hidden_def (__finitef)
weak_alias (__finitef, finitef)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S
index 1cdc53fb84..6ae9947a7a 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(floor)
- .text
-ENTRY(__floor)
- .type __floor, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__floor_vis3), %o1
- xor %o1, %gdop_lox10(__floor_vis3), %o1
-# else
- set __floor_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__floor_generic), %o1
- xor %o1, %gdop_lox10(__floor_generic), %o1
-# else
- set __floor_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__floor)
weak_alias (__floor, floor)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S
index 0dcd0e1431..31cda385b7 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(floorf)
- .text
-ENTRY(__floorf)
- .type __floorf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__floorf_vis3), %o1
- xor %o1, %gdop_lox10(__floorf_vis3), %o1
-# else
- set __floorf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__floorf_generic), %o1
- xor %o1, %gdop_lox10(__floorf_generic), %o1
-# else
- set __floorf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__floorf)
weak_alias (__floorf, floorf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S
index f604f5b533..d5e59d8d1e 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fmax)
- .text
-ENTRY(__fmax)
- .type __fmax, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fmax_vis3), %o1
- xor %o1, %gdop_lox10(__fmax_vis3), %o1
-# else
- set __fmax_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fmax_generic), %o1
- xor %o1, %gdop_lox10(__fmax_generic), %o1
-# else
- set __fmax_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fmax)
weak_alias (__fmax, fmax)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S
index c188f8e568..daa91579c4 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fmaxf)
- .text
-ENTRY(__fmaxf)
- .type __fmaxf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fmaxf_vis3), %o1
- xor %o1, %gdop_lox10(__fmaxf_vis3), %o1
-# else
- set __fmaxf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fmaxf_generic), %o1
- xor %o1, %gdop_lox10(__fmaxf_generic), %o1
-# else
- set __fmaxf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fmaxf)
weak_alias (__fmaxf, fmaxf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
index ed7018b58b..b2aec1bbc0 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fmin)
- .text
-ENTRY(__fmin)
- .type __fmin, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fmin_vis3), %o1
- xor %o1, %gdop_lox10(__fmin_vis3), %o1
-# else
- set __fmin_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fmin_generic), %o1
- xor %o1, %gdop_lox10(__fmin_generic), %o1
-# else
- set __fmin_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fmin)
weak_alias (__fmin, fmin)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S
index 6c7a4928c1..c4690e1df9 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(fminf)
- .text
-ENTRY(__fminf)
- .type __fminf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__fminf_vis3), %o1
- xor %o1, %gdop_lox10(__fminf_vis3), %o1
-# else
- set __fminf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__fminf_generic), %o1
- xor %o1, %gdop_lox10(__fminf_generic), %o1
-# else
- set __fminf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__fminf)
weak_alias (__fminf, fminf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S
index 8b47267f6b..ed9b62640d 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(isinf)
- .text
-ENTRY(__isinf)
- .type __isinf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__isinf_vis3), %o1
- xor %o1, %gdop_lox10(__isinf_vis3), %o1
-# else
- set __isinf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__isinf_generic), %o1
- xor %o1, %gdop_lox10(__isinf_generic), %o1
-# else
- set __isinf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__isinf)
hidden_def (__isinf)
weak_alias (__isinf, isinf)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S
index 9a42a01d40..04517398f8 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(isinff)
- .text
-ENTRY(__isinff)
- .type __isinff, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__isinff_vis3), %o1
- xor %o1, %gdop_lox10(__isinff_vis3), %o1
-# else
- set __isinff_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__isinff_generic), %o1
- xor %o1, %gdop_lox10(__isinff_generic), %o1
-# else
- set __isinff_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__isinff)
hidden_def (__isinff)
weak_alias (__isinff, isinff)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S
index d75077cfec..40e985a5d4 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(isnan)
- .text
-ENTRY(__isnan)
- .type __isnan, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__isnan_vis3), %o1
- xor %o1, %gdop_lox10(__isnan_vis3), %o1
-# else
- set __isnan_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__isnan_generic), %o1
- xor %o1, %gdop_lox10(__isnan_generic), %o1
-# else
- set __isnan_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__isnan)
hidden_def (__isnan)
weak_alias (__isnan, isnan)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S
index 6d11dd4b4e..6b53b69d2e 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(isnanf)
- .text
-ENTRY(__isnanf)
- .type __isnanf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__isnanf_vis3), %o1
- xor %o1, %gdop_lox10(__isnanf_vis3), %o1
-# else
- set __isnanf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__isnanf_generic), %o1
- xor %o1, %gdop_lox10(__isnanf_generic), %o1
-# else
- set __isnanf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__isnanf)
hidden_def (__isnanf)
weak_alias (__isnanf, isnanf)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S
index e63e83343b..94af8f028c 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(lrint)
- .text
-ENTRY(__lrint)
- .type __lrint, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__lrint_vis3), %o1
- xor %o1, %gdop_lox10(__lrint_vis3), %o1
-# else
- set __lrint_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__lrint_generic), %o1
- xor %o1, %gdop_lox10(__lrint_generic), %o1
-# else
- set __lrint_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__lrint)
weak_alias (__lrint, lrint)
strong_alias (__lrint, __llrint)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S
index 809aaa8a14..e6ea4061c3 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(lrintf)
- .text
-ENTRY(__lrintf)
- .type __lrintf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__lrintf_vis3), %o1
- xor %o1, %gdop_lox10(__lrintf_vis3), %o1
-# else
- set __lrintf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__lrintf_generic), %o1
- xor %o1, %gdop_lox10(__lrintf_generic), %o1
-# else
- set __lrintf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__lrintf)
weak_alias (__lrintf, lrintf)
strong_alias (__lrintf, __llrintf)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S
index 3872ae299e..cc980eb8c7 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(rint)
- .text
-ENTRY(__rint)
- .type __rint, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__rint_vis3), %o1
- xor %o1, %gdop_lox10(__rint_vis3), %o1
-# else
- set __rint_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__rint_generic), %o1
- xor %o1, %gdop_lox10(__rint_generic), %o1
-# else
- set __rint_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__rint)
weak_alias (__rint, rint)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S
index 9918929220..38fd936086 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(rintf)
- .text
-ENTRY(__rintf)
- .type __rintf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__rintf_vis3), %o1
- xor %o1, %gdop_lox10(__rintf_vis3), %o1
-# else
- set __rintf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__rintf_generic), %o1
- xor %o1, %gdop_lox10(__rintf_generic), %o1
-# else
- set __rintf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__rintf)
weak_alias (__rintf, rintf)
# undef weak_alias
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S
index a8e9728935..e69550c474 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(signbit)
- .text
-ENTRY(__signbit)
- .type __signbit, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__signbit_vis3), %o1
- xor %o1, %gdop_lox10(__signbit_vis3), %o1
-# else
- set __signbit_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__signbit_generic), %o1
- xor %o1, %gdop_lox10(__signbit_generic), %o1
-# else
- set __signbit_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__signbit)
weak_alias (__signbit, signbit)
/* On 64-bit the double version will also always work for
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S
index 721bc7fe4a..c35c79f88a 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S
@@ -1,41 +1,7 @@
-#include <sysdep.h>
+#include <sparc-ifunc.h>
+
+SPARC_ASM_VIS3_IFUNC(signbitf)
- .text
-ENTRY(__signbitf)
- .type __signbitf, @gnu_indirect_function
-# ifdef SHARED
- SETUP_PIC_REG_LEAF(o3, o5)
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
- set HWCAP_SPARC_VIS3, %o1
- andcc %o0, %o1, %g0
- be 9f
- nop
-# ifdef SHARED
- sethi %gdop_hix22(__signbitf_vis3), %o1
- xor %o1, %gdop_lox10(__signbitf_vis3), %o1
-# else
- set __signbitf_vis3, %o1
-# endif
- ba 10f
- nop
-9:
-# endif
-# ifdef SHARED
- sethi %gdop_hix22(__signbitf_generic), %o1
- xor %o1, %gdop_lox10(__signbitf_generic), %o1
-# else
- set __signbitf_generic, %o1
-# endif
-# ifdef HAVE_AS_VIS3_SUPPORT
-10:
-# endif
-# ifdef SHARED
- add %o3, %o1, %o1
-# endif
- retl
- mov %o1, %o0
-END(__signbitf)
weak_alias (__signbitf, signbitf)
# undef weak_alias