This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/avx created. glibc-2.16-ports-merge-420-geb154fc
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 2 Oct 2012 19:46:21 -0000
- Subject: GNU C Library master sources branch hjl/avx created. glibc-2.16-ports-merge-420-geb154fc
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, hjl/avx has been created
at eb154fc6b4503e9ae44752a6d0a716cfea30822d (commit)
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb154fc6b4503e9ae44752a6d0a716cfea30822d
commit eb154fc6b4503e9ae44752a6d0a716cfea30822d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Oct 2 12:43:40 2012 -0700
Compile AVX libm functions with -mavx
This reverts:
commit 56f6f6a2403cfa7267cad722597113be35ecf70d
Author: Ulrich Drepper <drepper@gmail.com>
Date: Sat Jan 28 14:48:46 2012 -0500
Use -msse2avx option for x86-64 libm functions
which contains:
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
index 3a615fc..6867c6e 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
@@ -14,7 +14,7 @@ extern double __ieee754_atan2_fma4 (double, double);
libm_ifunc (__ieee754_atan2,
HAS_FMA4 ? __ieee754_atan2_fma4
- : (HAS_YMM_USABLE ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
+ : (HAS_AVX ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
strong_alias (__ieee754_atan2, __atan2_finite)
# define __ieee754_atan2 __ieee754_atan2_sse2
That is you don't need YMM state support to enable AVX. But that is no
longer true after
commit 1a0994f5356214e8af8a1c1cc33fbf74a7ac8993
Author: Carlos O'Donell <carlos_odonell@mentor.com>
Date: Wed May 16 20:14:24 2012 -0700
BZ#14059: Fix AVX and FMA4 detection.
Fix AVX and FMA4 detection by following the guidelines
set out by Intel and AMD for detecting these features.
Now HAS_AVX means YMM state support.
diff --git a/ChangeLog b/ChangeLog
index 69d7941..f92579e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.h.in (HAVE_SSE2AVX_SUPPORT): Removed.
+ * config.make.in (config-cflags-sse2avx): Likewise.
+ * configure.in (libc_cv_cc_sse2avx): Remove AC_SUBST.
+ * sysdeps/i386/configure.in: Remove -msse2avx check.
+ * sysdeps/x86_64/configure.in: Likewise.
+ * sysdeps/i386/fpu/fenv_private.h: Remove SSE2AVX check.
+ * sysdeps/x86_64/fpu/math_private.h: Likewise.
+ * configure: Regenerated.
+ * sysdeps/i386/configure: Likewise.
+ * sysdeps/x86_64/configure: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/Makefile: Check config-cflags-avx
+ instead of config-cflags-sse2avx.
+ (CFLAGS-e_atan2-avx.c): Set to -mavx.
+ (CFLAGS-e_exp-avx.c): Likewise.
+ (CFLAGS-e_log-avx.c): Likewise.
+ (CFLAGS-mpa-avx.c): Likewise.
+ (CFLAGS-mpexp-avx.c): Likewise.
+ (CFLAGS-mplog-avx.c): Likewise.
+ (CFLAGS-s_atan-avx.c): Likewise.
+ (CFLAGS-s_sin-avx.c): Likewise.
+ (CFLAGS-slowexp-avx.c): Likewise.
+ (CFLAGS-s_tan-avx.c): Likewise.
+
2012-10-02 Dmitry V. Levin <ldv@altlinux.org>
[BZ #10631]
diff --git a/config.h.in b/config.h.in
index 10a9925..704aec6 100644
--- a/config.h.in
+++ b/config.h.in
@@ -95,9 +95,6 @@
/* Define if gcc supports AVX. */
#undef HAVE_AVX_SUPPORT
-/* Define if gcc supports VEX encoding. */
-#undef HAVE_SSE2AVX_SUPPORT
-
/* Define if gcc supports FMA4. */
#undef HAVE_FMA4_SUPPORT
diff --git a/config.make.in b/config.make.in
index b6d1c94..d1f512b 100644
--- a/config.make.in
+++ b/config.make.in
@@ -38,7 +38,6 @@ asflags-cpu = @libc_cv_cc_submachine@
config-extra-cflags = @libc_extra_cflags@
config-cflags-sse4 = @libc_cv_cc_sse4@
config-cflags-avx = @libc_cv_cc_avx@
-config-cflags-sse2avx = @libc_cv_cc_sse2avx@
config-cflags-novzeroupper = @libc_cv_cc_novzeroupper@
config-cflags-nofma = @libc_cv_cc_nofma@
config-asflags-i686 = @libc_cv_as_i686@
diff --git a/configure b/configure
index 739d2bd..2094db9 100755
--- a/configure
+++ b/configure
@@ -586,7 +586,6 @@ libc_cv_as_i686
libc_cv_cc_nofma
libc_cv_cc_fma4
libc_cv_cc_novzeroupper
-libc_cv_cc_sse2avx
libc_cv_cc_avx
libc_cv_cc_sse4
libc_cv_forced_unwind
@@ -7498,7 +7497,6 @@ fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIC is default" >&5
$as_echo_n "checking whether -fPIC is default... " >&6; }
if ${libc_cv_pic_default+:} false; then :
diff --git a/configure.in b/configure.in
index 878bf1a..0e8afc2 100644
--- a/configure.in
+++ b/configure.in
@@ -2149,7 +2149,6 @@ AC_SUBST(libc_cv_forced_unwind)
dnl sysdeps/CPU/configure.in checks set this via arch-specific asm tests
AC_SUBST(libc_cv_cc_sse4)
AC_SUBST(libc_cv_cc_avx)
-AC_SUBST(libc_cv_cc_sse2avx)
AC_SUBST(libc_cv_cc_novzeroupper)
AC_SUBST(libc_cv_cc_fma4)
AC_SUBST(libc_cv_cc_nofma)
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure
index 608ff29..0033308 100644
--- a/sysdeps/i386/configure
+++ b/sysdeps/i386/configure
@@ -162,6 +162,7 @@ else
fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
$as_echo_n "checking for SSE4 support... " >&6; }
if ${libc_cv_cc_sse4+:} false; then :
@@ -230,30 +231,6 @@ if test $libc_cv_cc_avx = yes; then
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
-$as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
-if ${libc_cv_cc_sse2avx+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- libc_cv_cc_sse2avx=yes
-else
- libc_cv_cc_sse2avx=no
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
-$as_echo "$libc_cv_cc_sse2avx" >&6; }
-if test $libc_cv_cc_sse2avx = yes; then
- $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
$as_echo_n "checking for FMA4 support... " >&6; }
if ${libc_cv_cc_fma4+:} false; then :
@@ -299,3 +276,4 @@ fi
$as_echo "$libc_cv_cc_novzeroupper" >&6; }
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in
index 36cb3e4..0341a05 100644
--- a/sysdeps/i386/configure.in
+++ b/sysdeps/i386/configure.in
@@ -28,16 +28,6 @@ if test $libc_cv_cc_avx = yes; then
AC_DEFINE(HAVE_AVX_SUPPORT)
fi
-dnl Check if -msse2avx works.
-AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
-LIBC_TRY_CC_OPTION([-msse2avx],
- [libc_cv_cc_sse2avx=yes],
- [libc_cv_cc_sse2avx=no])
-])
-if test $libc_cv_cc_sse2avx = yes; then
- AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
-fi
-
dnl Check if -mfma4 works.
AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no])
diff --git a/sysdeps/i386/fpu/fenv_private.h b/sysdeps/i386/fpu/fenv_private.h
index f33f57c..959f81e 100644
--- a/sysdeps/i386/fpu/fenv_private.h
+++ b/sysdeps/i386/fpu/fenv_private.h
@@ -47,7 +47,7 @@
need not care for both the 387 and the sse unit, only the one we're
actually using. */
-#if defined __AVX__ || defined SSE2AVX
+#ifdef __AVX__
# define STMXCSR "vstmxcsr"
# define LDMXCSR "vldmxcsr"
#else
diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index adbaeee..a30bcc4 100644
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -72,10 +72,6 @@ $as_echo X/"$0" |
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
- # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
- # already done that, so ensure we don't try to do so again and fall
- # in an infinite loop. This has already happened in practice.
- _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -215,30 +211,6 @@ if test $libc_cv_cc_avx = yes; then
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
-$as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
-if ${libc_cv_cc_sse2avx+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- libc_cv_cc_sse2avx=yes
-else
- libc_cv_cc_sse2avx=no
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
-$as_echo "$libc_cv_cc_sse2avx" >&6; }
-if test $libc_cv_cc_sse2avx = yes; then
- $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
$as_echo_n "checking for FMA4 support... " >&6; }
if ${libc_cv_cc_fma4+:} false; then :
diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in
index 94bcd19..0353464 100644
--- a/sysdeps/x86_64/configure.in
+++ b/sysdeps/x86_64/configure.in
@@ -21,16 +21,6 @@ if test $libc_cv_cc_avx = yes; then
AC_DEFINE(HAVE_AVX_SUPPORT)
fi
-dnl Check if -msse2avx works.
-AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
-LIBC_TRY_CC_OPTION([-msse2avx],
- [libc_cv_cc_sse2avx=yes],
- [libc_cv_cc_sse2avx=no])
-])
-if test $libc_cv_cc_sse2avx = yes; then
- AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
-fi
-
dnl Check if -mfma4 works.
AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no])
diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h
index 63a699e..43d9049 100644
--- a/sysdeps/x86_64/fpu/math_private.h
+++ b/sysdeps/x86_64/fpu/math_private.h
@@ -3,7 +3,7 @@
/* We can do a few things better on x86-64. */
-#if defined __AVX__ || defined SSE2AVX
+#ifdef __AVX__
# define MOVD "vmovd"
#else
# define MOVD "movd"
@@ -50,7 +50,7 @@ extern __always_inline double
__ieee754_sqrt (double d)
{
double res;
-#if defined __AVX__ || defined SSE2AVX
+#ifdef __AVX__
asm ("vsqrtsd %1, %0, %0" : "=x" (res) : "xm" (d));
#else
asm ("sqrtsd %1, %0" : "=x" (res) : "xm" (d));
@@ -62,7 +62,7 @@ extern __always_inline float
__ieee754_sqrtf (float d)
{
float res;
-#if defined __AVX__ || defined SSE2AVX
+#ifdef __AVX__
asm ("vsqrtss %1, %0, %0" : "=x" (res) : "xm" (d));
#else
asm ("sqrtss %1, %0" : "=x" (res) : "xm" (d));
@@ -83,7 +83,7 @@ extern __always_inline double
__rint (double d)
{
double res;
-# if defined __AVX__ || defined SSE2AVX
+# ifdef __AVX__
asm ("vroundsd $4, %1, %0, %0" : "=x" (res) : "xm" (d));
# else
asm ("roundsd $4, %1, %0" : "=x" (res) : "xm" (d));
@@ -95,7 +95,7 @@ extern __always_inline float
__rintf (float d)
{
float res;
-# if defined __AVX__ || defined SSE2AVX
+# ifdef __AVX__
asm ("vroundss $4, %1, %0, %0" : "=x" (res) : "xm" (d));
# else
asm ("roundss $4, %1, %0" : "=x" (res) : "xm" (d));
@@ -107,7 +107,7 @@ extern __always_inline double
__floor (double d)
{
double res;
-# if defined __AVX__ || defined SSE2AVX
+# ifdef __AVX__
asm ("vroundsd $1, %1, %0, %0" : "=x" (res) : "xm" (d));
# else
asm ("roundsd $1, %1, %0" : "=x" (res) : "xm" (d));
@@ -119,7 +119,7 @@ extern __always_inline float
__floorf (float d)
{
float res;
-# if defined __AVX__ || defined SSE2AVX
+# ifdef __AVX__
asm ("vroundss $1, %1, %0, %0" : "=x" (res) : "xm" (d));
# else
asm ("roundss $1, %1, %0" : "=x" (res) : "xm" (d));
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 12b0526..ad09ac4 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -33,21 +33,21 @@ CFLAGS-s_sin-fma4.c = -mfma4
CFLAGS-s_tan-fma4.c = -mfma4
endif
-ifeq ($(config-cflags-sse2avx),yes)
+ifeq ($(config-cflags-avx),yes)
libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
e_atan2-avx s_sin-avx s_tan-avx \
mplog-avx mpa-avx slowexp-avx \
mpexp-avx
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-mpa-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-mpexp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-mplog-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-slowexp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = -mavx
+CFLAGS-e_exp-avx.c = -mavx
+CFLAGS-e_log-avx.c = -mavx
+CFLAGS-mpa-avx.c = -mavx
+CFLAGS-mpexp-avx.c = -mavx
+CFLAGS-mplog-avx.c = -mavx
+CFLAGS-s_atan-avx.c = -mavx
+CFLAGS-s_sin-avx.c = -mavx
+CFLAGS-slowexp-avx.c = -mavx
+CFLAGS-s_tan-avx.c = -mavx
endif
endif
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources