aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-15 02:13:54 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-15 02:13:54 -0700
commitf7062b9a6f8ccaeb080b6c819ceec59b77cce3c4 (patch)
treed72011561c032765833f16dbca7f5a67309cae03 /sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
parent559398ab746fd7dbbe09e847813a1b917b9ded14 (diff)
downloadglibc-f7062b9a6f8ccaeb080b6c819ceec59b77cce3c4.tar
glibc-f7062b9a6f8ccaeb080b6c819ceec59b77cce3c4.tar.gz
glibc-f7062b9a6f8ccaeb080b6c819ceec59b77cce3c4.tar.bz2
glibc-f7062b9a6f8ccaeb080b6c819ceec59b77cce3c4.zip
Sparc optimized fmin{,f} and fmax{,f}.
* sysdeps/sparc/sparc64/fpu/s_fmax.S: New file. * sysdeps/sparc/sparc64/fpu/s_fmaxf.S: New file. * sysdeps/sparc/sparc64/fpu/s_fmin.S: New file. * sysdeps/sparc/sparc64/fpu/s_fminf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add new vis3 fmin/fmax sysdep routines. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise.
Diffstat (limited to 'sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S')
-rw-r--r--sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S46
1 files changed, 46 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
new file mode 100644
index 0000000000..ed7018b58b
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
@@ -0,0 +1,46 @@
+#include <sysdep.h>
+
+ .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
+# define weak_alias(a, b)
+
+#define __fmin __fmin_generic
+
+#include "../s_fmin.S"