about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2016-08-05 22:35:01 +0200
committerAurelien Jarno <aurelien@aurel32.net>2016-08-05 22:35:01 +0200
commitbf79a337ec86c2530edd26f4270f9688bf428ea2 (patch)
tree3c9fdd99e6d843069b49f1ba940d89d1af919e94 /math
parent8a9f4eb95894eae7e725e79721ba26fbc5b4ed06 (diff)
downloadglibc-bf79a337ec86c2530edd26f4270f9688bf428ea2.tar.gz
glibc-bf79a337ec86c2530edd26f4270f9688bf428ea2.tar.xz
glibc-bf79a337ec86c2530edd26f4270f9688bf428ea2.zip
sparc32/sparcv9: add a VIS3 version of fdim
sparc32 passes floating point values in the integer registers. VIS3
instructions gives access to the movwtos instruction to directly
transfer a value from an integer register to a floating point register.
Therefore it makes sense to provide a VIS3 version consisting in the
generic version compiled with -mvis3.

Changelog:
	* math/s_fdim.c: Avoid alias renamed.
	* math/s_fdimf.c: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
	[$(subdir) = math && $(have-as-vis3) = yes] (libm-sysdep_routines):
	Add s_fdimf-vis3, s_fdim-vis3.
	(CFLAGS-s_fdimf-vis3.c): New. Set to -Wa,-Av9d -mvis3.
	(CFLAGS-s_fdim-vis3.c): Likewise.
	sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c: New file.
	sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Likewise.
Diffstat (limited to 'math')
-rw-r--r--math/s_fdim.c4
-rw-r--r--math/s_fdimf.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/math/s_fdim.c b/math/s_fdim.c
index a051ed8db9..1786521c17 100644
--- a/math/s_fdim.c
+++ b/math/s_fdim.c
@@ -33,8 +33,10 @@ __fdim (double x, double y)
 
   return r;
 }
+#ifndef __fdim
 weak_alias (__fdim, fdim)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
 strong_alias (__fdim, __fdiml)
 weak_alias (__fdim, fdiml)
+# endif
 #endif
diff --git a/math/s_fdimf.c b/math/s_fdimf.c
index 8aed61d9e7..e457f9d3b9 100644
--- a/math/s_fdimf.c
+++ b/math/s_fdimf.c
@@ -33,4 +33,6 @@ __fdimf (float x, float y)
 
   return r;
 }
+#ifndef __fdimf
 weak_alias (__fdimf, fdimf)
+#endif