This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.24-40-gbf79a33


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  bf79a337ec86c2530edd26f4270f9688bf428ea2 (commit)
       via  8a9f4eb95894eae7e725e79721ba26fbc5b4ed06 (commit)
       via  9c8addbc1cd414711310c5a47693f5b0f0b9be3a (commit)
      from  d4cf1331007743c21e4f03603add48a107a6857d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bf79a337ec86c2530edd26f4270f9688bf428ea2

commit bf79a337ec86c2530edd26f4270f9688bf428ea2
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Fri Aug 5 22:35:01 2016 +0200

    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.

diff --git a/ChangeLog b/ChangeLog
index 3927bf7..d244dcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2016-08-05  Aurelien Jarno  <aurelien@aurel32.net>
 
+	* 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.
+
+2016-08-05  Aurelien Jarno  <aurelien@aurel32.net>
+
 	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
 	[$(subdir) = math && $(have-as-vis3) = yes] (libm-sysdep_routines):
 	Remove s_fdimf-vis3, s_fdim-vis3.
diff --git a/math/s_fdim.c b/math/s_fdim.c
index a051ed8..1786521 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 8aed61d..e457f9d 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
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
index 13d3c6d..4489b70 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
@@ -5,7 +5,10 @@ libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_fabs-vis3 \
 			s_rintf-vis3 s_rint-vis3 w_sqrt-vis3 w_sqrtf-vis3 \
 			s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3 \
 			s_fmaf-vis3 s_fma-vis3 s_nearbyint-vis3 \
-			s_nearbyintf-vis3
+			s_nearbyintf-vis3 s_fdimf-vis3 s_fdim-vis3
 sysdep_routines += s_copysignf-vis3 s_copysign-vis3
+
+CFLAGS-s_fdimf-vis3.c += -Wa,-Av9d -mvis3
+CFLAGS-s_fdim-vis3.c += -Wa,-Av9d -mvis3
 endif
 endif
diff --git a/math/s_fdimf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c
similarity index 62%
copy from math/s_fdimf.c
copy to sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c
index 8aed61d..2973b49 100644
--- a/math/s_fdimf.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c
@@ -1,7 +1,6 @@
-/* Return positive difference between arguments.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Compute positive difference, sparc 32-bit+v9+vis3.
+   Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -17,20 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <math.h>
-#include <math_private.h>
 
-float
-__fdimf (float x, float y)
-{
-  if (islessequal (x, y))
-    return 0.0f;
+#define __fdim __fdim_vis3
 
-  float r = math_narrow_eval (x - y);
-  if (isinf (r) && !isinf (x) && !isinf (y))
-    __set_errno (ERANGE);
-
-  return r;
-}
-weak_alias (__fdimf, fdimf)
+#include <math/s_fdim.c>
diff --git a/math/s_fdimf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
similarity index 61%
copy from math/s_fdimf.c
copy to sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
index 8aed61d..c9c7704 100644
--- a/math/s_fdimf.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
@@ -1,7 +1,6 @@
-/* Return positive difference between arguments.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Compute positive difference, sparc 32-bit.
+   Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -17,20 +16,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
-#include <math.h>
-#include <math_private.h>
+#ifdef HAVE_AS_VIS3_SUPPORT
+# include <sparc-ifunc.h>
+# include <math.h>
 
-float
-__fdimf (float x, float y)
-{
-  if (islessequal (x, y))
-    return 0.0f;
+extern double __fdim_vis3 (double, double);
+extern double __fdim_generic (double, double);
 
-  float r = math_narrow_eval (x - y);
-  if (isinf (r) && !isinf (x) && !isinf (y))
-    __set_errno (ERANGE);
+sparc_libm_ifunc(__fdim, hwcap & HWCAP_SPARC_VIS3 ? __fdim_vis3 : __fdim_generic);
+weak_alias (__fdim, fdim)
 
-  return r;
-}
-weak_alias (__fdimf, fdimf)
+# define __fdim __fdim_generic
+#endif
+
+#include <math/s_fdim.c>
diff --git a/math/s_fdimf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.c
similarity index 62%
copy from math/s_fdimf.c
copy to sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.c
index 8aed61d..75997c6 100644
--- a/math/s_fdimf.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.c
@@ -1,7 +1,6 @@
-/* Return positive difference between arguments.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Float compute positive difference, sparc 32-bit+v9+vis3.
+   Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -17,20 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <math.h>
-#include <math_private.h>
 
-float
-__fdimf (float x, float y)
-{
-  if (islessequal (x, y))
-    return 0.0f;
+#define __fdimf __fdimf_vis3
 
-  float r = math_narrow_eval (x - y);
-  if (isinf (r) && !isinf (x) && !isinf (y))
-    __set_errno (ERANGE);
-
-  return r;
-}
-weak_alias (__fdimf, fdimf)
+#include <math/s_fdimf.c>
diff --git a/math/s_fdimf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c
similarity index 63%
copy from math/s_fdimf.c
copy to sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c
index 8aed61d..767520f 100644
--- a/math/s_fdimf.c
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c
@@ -1,7 +1,6 @@
-/* Return positive difference between arguments.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Float compute positive difference, sparc 32-bit.
+   Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -17,20 +16,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
-#include <math.h>
-#include <math_private.h>
+#ifdef HAVE_AS_VIS3_SUPPORT
+# include <sparc-ifunc.h>
+# include <math.h>
 
-float
-__fdimf (float x, float y)
-{
-  if (islessequal (x, y))
-    return 0.0f;
+extern float __fdimf_vis3 (float, float);
+extern float __fdimf_generic (float, float);
 
-  float r = math_narrow_eval (x - y);
-  if (isinf (r) && !isinf (x) && !isinf (y))
-    __set_errno (ERANGE);
-
-  return r;
-}
+sparc_libm_ifunc(__fdimf, hwcap & HWCAP_SPARC_VIS3 ? __fdimf_vis3 : __fdimf_generic);
 weak_alias (__fdimf, fdimf)
+
+# define __fdimf __fdimf_generic
+#endif
+
+#include <math/s_fdimf.c>

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a9f4eb95894eae7e725e79721ba26fbc5b4ed06

commit 8a9f4eb95894eae7e725e79721ba26fbc5b4ed06
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Fri Aug 5 22:35:01 2016 +0200

    sparc: remove fdim sparc specific implementations
    
    The fdim and fdimf functions on sparc do not fully follow the standard
    and do not set errno to ERANGE when the result overflows. Since glibc
    2.24 this causes the two following tests to fail:
    
      Failure: fdim (max_value, -max_value): errno set to 0, expected 34 (ERANGE)
      Failure: fdim_upward (max_value, -max_value): errno set to 0, expected 34 (ERANGE)
    
    It happens that using GCC with the generic C code generates very similar
    code to the sparc specific implementations. Therefore this patches
    remove them. Note it might still worth adding a vis3 specific version of
    fdim on sparc32/sparcv9, this is done in a following patch to ease
    backporting.
    
    Changelog:
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
    	[$(subdir) = math && $(have-as-vis3) = yes] (libm-sysdep_routines):
    	Remove s_fdimf-vis3, s_fdim-vis3.
    	* sysdeps/sparc/sparc32/fpu/s_fdim.S: Delete file.
    	* sysdeps/sparc/sparc32/fpu/s_fdimf.S: Likewise.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S: Likewise.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S: Likewise.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S: Likewise.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S: Likewise.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S: Likewise.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S: Likewise.
    	* sysdeps/sparc/sparc64/fpu/s_fdim.S: Likewise.
    	* sysdeps/sparc/sparc64/fpu/s_fdimf.S: Likewise.

diff --git a/ChangeLog b/ChangeLog
index e49167c..3927bf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2016-08-05  Aurelien Jarno  <aurelien@aurel32.net>
 
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
+	[$(subdir) = math && $(have-as-vis3) = yes] (libm-sysdep_routines):
+	Remove s_fdimf-vis3, s_fdim-vis3.
+	* sysdeps/sparc/sparc32/fpu/s_fdim.S: Delete file.
+	* sysdeps/sparc/sparc32/fpu/s_fdimf.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S: Likewise.
+	* sysdeps/sparc/sparc64/fpu/s_fdim.S: Likewise.
+	* sysdeps/sparc/sparc64/fpu/s_fdimf.S: Likewise.
+
+2016-08-05  Aurelien Jarno  <aurelien@aurel32.net>
+
 	* sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Add -mvis.
 	* sysdeps/sparc/sparc64/Makefile (sysdep-CFLAGS): New. Define to
 	-Wa,-Av9a -mvis.
diff --git a/sysdeps/sparc/sparc32/fpu/s_fdim.S b/sysdeps/sparc/sparc32/fpu/s_fdim.S
deleted file mode 100644
index e93970f..0000000
--- a/sysdeps/sparc/sparc32/fpu/s_fdim.S
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Compute positive difference, sparc 32-bit.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-#include <math_ldbl_opt.h>
-
-ENTRY(__fdim)
-	std	%o0, [%sp + 72]
-	std	%o2, [%sp + 80]
-	ldd	[%sp + 72], %f0
-	ldd	[%sp + 80], %f2
-	fcmpd	%f0, %f2
-	st	%g0, [%sp + 72]
-	fbug	1f
-	 st	%g0, [%sp + 76]
-	ldd	[%sp + 72], %f0
-	fnegs	%f0, %f2
-	fmovs	%f1, %f3
-1:	retl
-	 fsubd	%f0, %f2, %f0
-END(__fdim)
-weak_alias (__fdim, fdim)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __fdim, fdiml, GLIBC_2_1);
-#endif
diff --git a/sysdeps/sparc/sparc32/fpu/s_fdimf.S b/sysdeps/sparc/sparc32/fpu/s_fdimf.S
deleted file mode 100644
index c3fe8af..0000000
--- a/sysdeps/sparc/sparc32/fpu/s_fdimf.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Compute positive difference, sparc 32-bit.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-
-ENTRY(__fdimf)
-	st	%o0, [%sp + 72]
-	st	%o1, [%sp + 76]
-	ld	[%sp + 72], %f0
-	ld	[%sp + 76], %f1
-	fcmps	%f0, %f1
-	fbug	1f
-	 st	%g0, [%sp + 72]
-	ld	[%sp + 72], %f0
-	fnegs	%f0, %f1
-1:	retl
-	 fsubs	%f0, %f1, %f0
-END(__fdimf)
-weak_alias (__fdimf, fdimf)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
index ebbe28b..13d3c6d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
@@ -4,8 +4,8 @@ libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_fabs-vis3 \
 			s_fabsf-vis3 s_llrintf-vis3 s_llrint-vis3 \
 			s_rintf-vis3 s_rint-vis3 w_sqrt-vis3 w_sqrtf-vis3 \
 			s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3 \
-			s_fmaf-vis3 s_fma-vis3 s_fdimf-vis3 s_fdim-vis3 \
-			s_nearbyint-vis3 s_nearbyintf-vis3
+			s_fmaf-vis3 s_fma-vis3 s_nearbyint-vis3 \
+			s_nearbyintf-vis3
 sysdep_routines += s_copysignf-vis3 s_copysign-vis3
 endif
 endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S
deleted file mode 100644
index 4a479b1..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Compute positive difference, sparc 32-bit+v9+vis3.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-
-ENTRY(__fdim_vis3)
-	movwtos	%o0, %f0
-	movwtos	%o1, %f1
-	movwtos	%o2, %f2
-	movwtos	%o3, %f3
-	fcmpd	%f0, %f2
-	fbug	1f
-	 nop
-	fzero	%f0
-	fnegd	%f0, %f2
-1:	retl
-	 fsubd	%f0, %f2, %f0
-END(__fdim_vis3)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S
deleted file mode 100644
index 4b13408..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <sparc-ifunc.h>
-#include <math_ldbl_opt.h>
-
-SPARC_ASM_VIS3_IFUNC(fdim)
-
-weak_alias (__fdim, fdim)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __fdim, fdiml, GLIBC_2_1);
-#endif
-
-# undef weak_alias
-# define weak_alias(a, b)
-# undef compat_symbol
-# define compat_symbol(a, b, c, d)
-
-#define __fdim __fdim_generic
-
-#include "../s_fdim.S"
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S
deleted file mode 100644
index 081fc15..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Compute positive difference, sparc 32-bit+v9+vis3.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-
-ENTRY(__fdimf_vis3)
-	movwtos	%o0, %f0
-	movwtos	%o1, %f1
-	fcmps	%f0, %f1
-	fbug	1f
-	 nop
-	fzeros	%f0
-	fnegs	%f0, %f1
-1:	retl
-	 fsubs	%f0, %f1, %f0
-END(__fdimf_vis3)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S
deleted file mode 100644
index 30381d6..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <sparc-ifunc.h>
-
-SPARC_ASM_VIS3_IFUNC(fdimf)
-
-weak_alias (__fdimf, fdimf)
-
-# undef weak_alias
-# define weak_alias(a, b)
-
-#define __fdimf __fdimf_generic
-
-#include "../s_fdimf.S"
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S
deleted file mode 100644
index 37f7f44..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Compute positive difference, sparc 32-bit+v9.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-#include <math_ldbl_opt.h>
-
-ENTRY(__fdim)
-	std	%o0, [%sp + 72]
-	std	%o2, [%sp + 80]
-	ldd	[%sp + 72], %f0
-	ldd	[%sp + 80], %f2
-	fcmpd	%f0, %f2
-	fbug	1f
-	 nop
-	fzero	%f0
-	fnegd	%f0, %f2
-1:	retl
-	 fsubd	%f0, %f2, %f0
-END(__fdim)
-weak_alias (__fdim, fdim)
-
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __fdim, fdiml, GLIBC_2_1);
-#endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S
deleted file mode 100644
index 9e0e3f2..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Compute positive difference, sparc 32-bit+v9.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-
-ENTRY(__fdimf)
-	st	%o0, [%sp + 72]
-	st	%o1, [%sp + 76]
-	ld	[%sp + 72], %f0
-	ld	[%sp + 76], %f1
-	fcmps	%f0, %f1
-	fbug	1f
-	 nop
-	fzeros	%f0
-	fnegs	%f0, %f1
-1:	retl
-	 fsubs	%f0, %f1, %f0
-END(__fdimf)
-weak_alias (__fdimf, fdimf)
diff --git a/sysdeps/sparc/sparc64/fpu/s_fdim.S b/sysdeps/sparc/sparc64/fpu/s_fdim.S
deleted file mode 100644
index 7fae72a..0000000
--- a/sysdeps/sparc/sparc64/fpu/s_fdim.S
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Compute positive difference, sparc 64-bit.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-#include <math_ldbl_opt.h>
-
-ENTRY(__fdim)
-	fcmpd	%f0, %f2
-	fbug	1f
-	 nop
-	fzero	%f0
-	fnegd	%f0, %f2
-1:	retl
-	 fsubd	%f0, %f2, %f0
-END(__fdim)
-weak_alias (__fdim, fdim)
diff --git a/sysdeps/sparc/sparc64/fpu/s_fdimf.S b/sysdeps/sparc/sparc64/fpu/s_fdimf.S
deleted file mode 100644
index 356c23c..0000000
--- a/sysdeps/sparc/sparc64/fpu/s_fdimf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Compute positive difference, sparc 64-bit.
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@davemloft.net>.
-
-   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>
-
-ENTRY(__fdimf)
-	fcmps	%f1, %f3
-	fbug	1f
-	 nop
-	fzeros	%f1
-	fnegs	%f1, %f3
-1:	retl
-	 fsubs	%f1, %f3, %f0
-END(__fdimf)
-weak_alias (__fdimf, fdimf)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c8addbc1cd414711310c5a47693f5b0f0b9be3a

commit 9c8addbc1cd414711310c5a47693f5b0f0b9be3a
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Fri Aug 5 22:35:01 2016 +0200

    sparc: build with -mvis on sparc32/sparcv9 and sparc64
    
    When building for sparc32/sparcv9 or sparc64, we assume that VIS
    instructions are available and use them in the sparc specific assembly
    code. However we do not tell GCC to use such instructions, resulting in
    slightly suboptimal code.
    
    Fix that by passing -Wa,-Av9a -mvis to GCC.
    
    Changelog:
    	* sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Add -mvis.
    	* sysdeps/sparc/sparc64/Makefile (sysdep-CFLAGS): New. Define to
    	-Wa,-Av9a -mvis.

diff --git a/ChangeLog b/ChangeLog
index 5144263..e49167c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-05  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Add -mvis.
+	* sysdeps/sparc/sparc64/Makefile (sysdep-CFLAGS): New. Define to
+	-Wa,-Av9a -mvis.
+
 2016-08-05  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
 
 	* math/gen-libm-test.pl (apply_lit): Rewrite to apply
diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile
index fefc742..08c5a96 100644
--- a/sysdeps/sparc/sparc32/sparcv9/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/Makefile
@@ -1,4 +1,4 @@
-sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a
+sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a -mvis
 
 ifeq ($(have-as-vis3),yes)
 ASFLAGS-.o += -Wa,-Av9d
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index 3a12510..fbabf69 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -1,3 +1,5 @@
+sysdep-CFLAGS += -Wa,-Av9a -mvis
+
 ifeq ($(subdir),string)
 sysdep_routines += align-cpy
 endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   34 ++++++++++++++++
 math/s_fdim.c                                      |    4 +-
 math/s_fdimf.c                                     |    2 +
 sysdeps/sparc/sparc32/fpu/s_fdim.S                 |   42 --------------------
 sysdeps/sparc/sparc32/fpu/s_fdimf.S                |   35 ----------------
 sysdeps/sparc/sparc32/sparcv9/Makefile             |    2 +-
 .../sparc/sparc32/sparcv9/fpu/multiarch/Makefile   |    7 ++-
 .../sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S    |   34 ----------------
 .../sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c    |   23 +++++++++++
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S   |   19 ---------
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c   |   32 +++++++++++++++
 .../sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S   |   32 ---------------
 .../sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.c   |   23 +++++++++++
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S  |   12 ------
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c  |   32 +++++++++++++++
 sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S         |   40 -------------------
 sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S        |   35 ----------------
 sysdeps/sparc/sparc64/Makefile                     |    2 +
 sysdeps/sparc/sparc64/fpu/s_fdim.S                 |   32 ---------------
 sysdeps/sparc/sparc64/fpu/s_fdimf.S                |   31 --------------
 20 files changed, 157 insertions(+), 316 deletions(-)
 delete mode 100644 sysdeps/sparc/sparc32/fpu/s_fdim.S
 delete mode 100644 sysdeps/sparc/sparc32/fpu/s_fdimf.S
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.c
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S
 delete mode 100644 sysdeps/sparc/sparc64/fpu/s_fdim.S
 delete mode 100644 sysdeps/sparc/sparc64/fpu/s_fdimf.S


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]