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.15-407-gdd7f470


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  dd7f470327139a88019b2c5ded8fc2811b0fed00 (commit)
       via  e6a62e18fd9d429950e25db97ac216fa570bfa30 (commit)
      from  c4a7b16eb80d59539d2d2cc1f9445e877b55cd2b (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd7f470327139a88019b2c5ded8fc2811b0fed00

commit dd7f470327139a88019b2c5ded8fc2811b0fed00
Author: David S. Miller <davem@davemloft.net>
Date:   Fri Mar 16 03:05:49 2012 -0700

    Implement optimized libc_fe*() math routines on sparc.
    
    	* sysdeps/sparc/fpu/math_private.h: New file.

diff --git a/ChangeLog b/ChangeLog
index bb85537..a5d592e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-16  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/sparc/fpu/math_private.h: New file.
+
 2012-03-15  David S. Miller  <davem@davemloft.net>
 
 	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S: New file.
diff --git a/sysdeps/sparc/fpu/math_private.h b/sysdeps/sparc/fpu/math_private.h
new file mode 100644
index 0000000..05ef623
--- /dev/null
+++ b/sysdeps/sparc/fpu/math_private.h
@@ -0,0 +1,68 @@
+#ifndef SPARC_MATH_PRIVATE_H
+#define SPARC_MATH_PRIVATE_H 1
+
+#include_next <math_private.h>
+#include <fenv.h>
+
+#undef libc_feholdexcept
+#define libc_feholdexcept(e) \
+  do {							\
+     fenv_t etmp;					\
+     __fenv_stfsr(etmp);				\
+     *(e) = etmp;					\
+     etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);	\
+     __fenv_ldfsr(etmp);				\
+  } while (0)
+#undef libc_feholdexceptf
+#define libc_feholdexceptf(e) libc_feholdexcept (e)
+#undef libc_feholdexceptl
+#define libc_feholdexceptl(e) libc_feholdexcept (e)
+
+#undef libc_feholdexcept_setround
+#define libc_feholdexcept_setround(e, r) \
+  do {							\
+     fenv_t etmp;					\
+     __fenv_stfsr(etmp);				\
+     *(e) = etmp;					\
+     etmp = etmp & ~((0x1f << 23) | FE_ALL_EXCEPT);	\
+     etmp = (etmp & ~__FE_ROUND_MASK) | (r);		\
+     __fenv_ldfsr(etmp);				\
+  } while (0)
+#undef libc_feholdexcept_setroundf
+#define libc_feholdexcept_setroundf(e, r) libc_feholdexcept_setround (e, r)
+#undef libc_feholdexcept_setroundl
+#define libc_feholdexcept_setroundl(e, r) libc_feholdexcept_setround (e, r)
+
+#undef libc_fetestexcept
+#define libc_fetestexcept(e) \
+  ({							\
+     fenv_t etmp;					\
+     __fenv_stfsr(etmp);				\
+     etmp & (e) & FE_ALL_EXCEPT; })
+#undef libc_fetestexceptf
+#define libc_fetestexceptf(e) libc_fetestexcept (e)
+#undef libc_fetestexceptl
+#define libc_fetestexceptl(e) libc_fetestexcept (e)
+
+#undef libc_fesetenv
+#define libc_fesetenv(e) \
+  __fenv_ldfsr(*e)
+#undef libc_fesetenvf
+#define libc_fesetenvf(e) libc_fesetenv (e)
+#undef libc_fesetenvl
+#define libc_fesetenvl(e) libc_fesetenv (e)
+
+#undef libc_feupdateenv
+#define libc_feupdateenv(e) \
+  do {						\
+     fenv_t etmp;				\
+     __fenv_stfsr(etmp);			\
+     __fenv_ldfsr(*e);				\
+     __feraiseexcept (etmp & FE_ALL_EXCEPT);	\
+  } while (0)
+#undef libc_feupdateenvf
+#define libc_feupdateenvf(e) libc_feupdateenv (e)
+#undef libc_feupdateenvl
+#define libc_feupdateenvl(e) libc_feupdateenv (e)
+
+#endif /* SPARC_MATH_PRIVATE_H */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6a62e18fd9d429950e25db97ac216fa570bfa30

commit e6a62e18fd9d429950e25db97ac216fa570bfa30
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Mar 15 23:09:16 2012 -0700

    Add sparc vis3 optimized fma/fmaf.
    
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S: New file.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: New file.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S: New file.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c: New file.
    	* sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S: New file.
    	* sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: New file.
    	* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S: New file.
    	* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c: New file.
    	* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add fma/fmaf
    	sysdep routines.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise.

diff --git a/ChangeLog b/ChangeLog
index 3ad8764..bb85537 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2012-03-15  David S. Miller  <davem@davemloft.net>
 
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add fma/fmaf
+	sysdep routines.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise.
+
 	* sysdeps/sparc/sparc32/fpu/s_fma.c: New file.
 	* sysdeps/sparc/sparc64/fpu/s_fma.c: New file.
 
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
index af62259..ee9f6ff 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
@@ -4,7 +4,8 @@ libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_ceilf-vis3 \
 			s_ceil-vis3 s_fabs-vis3 s_fabsf-vis3 s_floor-vis3 \
 			s_floorf-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_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3 \
+			s_fmaf-vis3 s_fma-vis3
 sysdep_routines += s_copysignf-vis3 s_copysign-vis3
 endif
 endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S
new file mode 100644
index 0000000..ee27900
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S
@@ -0,0 +1,31 @@
+/* fma function, sparc32 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@davemloft.net>, 2012.
+
+   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 (__fma_vis3)
+	movwtos	%o0, %f0
+	movwtos	%o1, %f1
+	movwtos	%o2, %f2
+	movwtos	%o3, %f3
+	movwtos	%o4, %f4
+	movwtos	%o5, %f5
+	retl
+	 fmaddd	%f0, %f2, %f4, %f0
+END (__fma_vis3)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
new file mode 100644
index 0000000..3f2f162
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
@@ -0,0 +1,14 @@
+#ifdef HAVE_AS_VIS3_SUPPORT
+# include <sparc-ifunc.h>
+# include <math.h>
+
+extern double __fma_vis3 (double, double, double);
+extern double __fma_generic (double, double, double);
+
+sparc_libm_ifunc(__fma, hwcap & HWCAP_SPARC_FMAF ? __fma_vis3 : __fma_generic);
+weak_alias (__fma, fma)
+
+# define __fma __fma_generic
+#endif
+
+#include <sysdeps/ieee754/dbl-64/s_fma.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S
new file mode 100644
index 0000000..1a934f6
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S
@@ -0,0 +1,28 @@
+/* fmaf function, sparc32 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@davemloft.net>, 2012.
+
+   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 (__fmaf_vis3)
+	movwtos	%o0, %f1
+	movwtos	%o1, %f3
+	movwtos	%o2, %f5
+	retl
+	 fmadds	%f1, %f3, %f5, %f0
+END (__fmaf_vis3)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c
new file mode 100644
index 0000000..7a273a3
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c
@@ -0,0 +1,14 @@
+#ifdef HAVE_AS_VIS3_SUPPORT
+# include <sparc-ifunc.h>
+# include <math.h>
+
+extern float __fmaf_vis3 (float, float, float);
+extern float __fmaf_generic (float, float, float);
+
+sparc_libm_ifunc(__fmaf, hwcap & HWCAP_SPARC_FMAF ? __fmaf_vis3 : __fmaf_generic);
+weak_alias (__fmaf, fmaf)
+
+# define __fmaf __fmaf_generic
+#endif
+
+#include <sysdeps/ieee754/dbl-64/s_fmaf.c>
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
index 0aa4046..8345848 100644
--- a/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
@@ -6,7 +6,8 @@ libm-sysdep_routines += m_signbitf-vis3 m_signbit-vis3 s_ceilf-vis3 \
 			m_isinf-vis3 m_isnanf-vis3 m_isnan-vis3 \
 			s_lrintf-vis3 s_lrint-vis3 s_rintf-vis3 \
 			s_rint-vis3 s_fminf-vis3 s_fmin-vis3 \
-			s_fmaxf-vis3 s_fmax-vis3
+			s_fmaxf-vis3 s_fmax-vis3 s_fmaf-vis3 \
+			s_fma-vis3
 sysdep_routines += s_signbitf-vis3 s_signbit-vis3 s_finitef-vis3 \
 		   s_finite-vis3 s_isinff-vis3 s_isinf-vis3 \
 		   s_isnanf-vis3 s_isnan-vis3
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S
new file mode 100644
index 0000000..8b57eb2
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S
@@ -0,0 +1,25 @@
+/* fma function, sparc64 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@davemloft.net>, 2012.
+
+   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 (__fma_vis3)
+	retl
+	 fmaddd	%f0, %f2, %f4, %f0
+END (__fma_vis3)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
new file mode 100644
index 0000000..3f2f162
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
@@ -0,0 +1,14 @@
+#ifdef HAVE_AS_VIS3_SUPPORT
+# include <sparc-ifunc.h>
+# include <math.h>
+
+extern double __fma_vis3 (double, double, double);
+extern double __fma_generic (double, double, double);
+
+sparc_libm_ifunc(__fma, hwcap & HWCAP_SPARC_FMAF ? __fma_vis3 : __fma_generic);
+weak_alias (__fma, fma)
+
+# define __fma __fma_generic
+#endif
+
+#include <sysdeps/ieee754/dbl-64/s_fma.c>
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S
new file mode 100644
index 0000000..e431e71
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S
@@ -0,0 +1,25 @@
+/* fmaf function, sparc64 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@davemloft.net>, 2012.
+
+   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 (__fmaf_vis3)
+	retl
+	 fmadds	%f1, %f3, %f5, %f0
+END (__fmaf_vis3)
diff --git a/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c
new file mode 100644
index 0000000..7a273a3
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c
@@ -0,0 +1,14 @@
+#ifdef HAVE_AS_VIS3_SUPPORT
+# include <sparc-ifunc.h>
+# include <math.h>
+
+extern float __fmaf_vis3 (float, float, float);
+extern float __fmaf_generic (float, float, float);
+
+sparc_libm_ifunc(__fmaf, hwcap & HWCAP_SPARC_FMAF ? __fmaf_vis3 : __fmaf_generic);
+weak_alias (__fmaf, fmaf)
+
+# define __fmaf __fmaf_generic
+#endif
+
+#include <sysdeps/ieee754/dbl-64/s_fmaf.c>

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

Summary of changes:
 ChangeLog                                          |   16 +++++
 sysdeps/sparc/fpu/math_private.h                   |   68 ++++++++++++++++++++
 .../sparc/sparc32/sparcv9/fpu/multiarch/Makefile   |    3 +-
 .../sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S     |   31 +++++++++
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c    |   14 ++++
 .../sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S    |   28 ++++++++
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c   |   14 ++++
 sysdeps/sparc/sparc64/fpu/multiarch/Makefile       |    3 +-
 sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S   |   25 +++++++
 sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c        |   14 ++++
 sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S  |   25 +++++++
 sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c       |   14 ++++
 12 files changed, 253 insertions(+), 2 deletions(-)
 create mode 100644 sysdeps/sparc/fpu/math_private.h
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S
 create mode 100644 sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c
 create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S
 create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
 create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S
 create mode 100644 sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c


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]