about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32
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 /sysdeps/sparc/sparc32
parent11e0098ef008db301a82b753dda466dc61cdd0bc (diff)
downloadglibc-006f1daa5aacba8a10b7c748f6559a56d0ffbf12.tar.gz
glibc-006f1daa5aacba8a10b7c748f6559a56d0ffbf12.tar.xz
glibc-006f1daa5aacba8a10b7c748f6559a56d0ffbf12.zip
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.
Diffstat (limited to 'sysdeps/sparc/sparc32')
-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
18 files changed, 54 insertions, 666 deletions
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