|
|
147e83 |
From 63be4dc8f5be08f40df927377bdf0bae5239ce53 Mon Sep 17 00:00:00 2001
|
|
|
147e83 |
From: Stefan Liebler <stli@linux.vnet.ibm.com>
|
|
|
147e83 |
Date: Thu, 27 Jul 2017 10:53:58 +0200
|
|
|
147e83 |
Subject: [PATCH 01/10] S390: Configure checks
|
|
|
147e83 |
HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT.
|
|
|
147e83 |
|
|
|
147e83 |
This configure check was added upstream with commit
|
|
|
147e83 |
e9b424881a4f85284e56d8b561c54ff57a7c1c9b
|
|
|
147e83 |
"S390: Do not set FE_INEXACT with feraiseexcept (FE_OWERFLOW|FE_UNDERFLOW)."
|
|
|
147e83 |
|
|
|
147e83 |
HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT will be defined if gcc/assembler
|
|
|
147e83 |
can handle zarch z196 instructions by default.
|
|
|
147e83 |
Thus it is defined on s390x-glibc on RHEL 7, but not for s390-glibc.
|
|
|
147e83 |
|
|
|
147e83 |
ChangeLog:
|
|
|
147e83 |
|
|
|
147e83 |
* config.h.in (HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT):
|
|
|
147e83 |
New undefine.
|
|
|
147e83 |
* sysdeps/s390/configure.ac: Add test for z196 zarch support.
|
|
|
147e83 |
* sysdeps/s390/configure: Regenerated.
|
|
|
147e83 |
---
|
|
|
147e83 |
config.h.in | 3 +++
|
|
|
147e83 |
sysdeps/s390/configure | 36 ++++++++++++++++++++++++++++++++++++
|
|
|
147e83 |
sysdeps/s390/configure.in | 26 ++++++++++++++++++++++++++
|
|
|
147e83 |
3 files changed, 65 insertions(+)
|
|
|
147e83 |
|
|
|
147e83 |
diff --git a/config.h.in b/config.h.in
|
|
|
147e83 |
index 66ac85a..07bc713 100644
|
|
|
147e83 |
--- a/config.h.in
|
|
|
147e83 |
+++ b/config.h.in
|
|
|
147e83 |
@@ -110,6 +110,9 @@
|
|
|
147e83 |
/* Define if assembler supports Intel MPX. */
|
|
|
147e83 |
#undef HAVE_MPX_SUPPORT
|
|
|
147e83 |
|
|
|
147e83 |
+/* Define if assembler supports z196 zarch instructions as default on S390. */
|
|
|
147e83 |
+#undef HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT
|
|
|
147e83 |
+
|
|
|
147e83 |
/* Define if assembler supports vector instructions on S390. */
|
|
|
147e83 |
#undef HAVE_S390_VX_ASM_SUPPORT
|
|
|
147e83 |
|
|
|
147e83 |
diff --git a/sysdeps/s390/configure b/sysdeps/s390/configure
|
|
|
147e83 |
index eb49a4c..bb670f3 100644
|
|
|
147e83 |
--- a/sysdeps/s390/configure
|
|
|
147e83 |
+++ b/sysdeps/s390/configure
|
|
|
147e83 |
@@ -75,3 +75,39 @@ then
|
|
|
147e83 |
$as_echo "#define HAVE_S390_VX_GCC_SUPPORT 1" >>confdefs.h
|
|
|
147e83 |
|
|
|
147e83 |
fi
|
|
|
147e83 |
+
|
|
|
147e83 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 z196 zarch instruction support as default" >&5
|
|
|
147e83 |
+$as_echo_n "checking for S390 z196 zarch instruction support as default... " >&6; }
|
|
|
147e83 |
+if ${libc_cv_asm_s390_min_z196_zarch+:} false; then :
|
|
|
147e83 |
+ $as_echo_n "(cached) " >&6
|
|
|
147e83 |
+else
|
|
|
147e83 |
+ cat > conftest.c <<\EOF
|
|
|
147e83 |
+float testinsn (double e)
|
|
|
147e83 |
+{
|
|
|
147e83 |
+ float d;
|
|
|
147e83 |
+ __asm__ ("ledbra %0,5,%1,4" : "=f" (d) : "f" (e) );
|
|
|
147e83 |
+ return d;
|
|
|
147e83 |
+}
|
|
|
147e83 |
+EOF
|
|
|
147e83 |
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c
|
|
|
147e83 |
+ -o conftest.o &> /dev/null'
|
|
|
147e83 |
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
|
|
147e83 |
+ (eval $ac_try) 2>&5
|
|
|
147e83 |
+ ac_status=$?
|
|
|
147e83 |
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
|
147e83 |
+ test $ac_status = 0; }; } ;
|
|
|
147e83 |
+then
|
|
|
147e83 |
+ libc_cv_asm_s390_min_z196_zarch=yes
|
|
|
147e83 |
+else
|
|
|
147e83 |
+ libc_cv_asm_s390_min_z196_zarch=no
|
|
|
147e83 |
+fi
|
|
|
147e83 |
+rm -f conftest*
|
|
|
147e83 |
+fi
|
|
|
147e83 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_z196_zarch" >&5
|
|
|
147e83 |
+$as_echo "$libc_cv_asm_s390_min_z196_zarch" >&6; }
|
|
|
147e83 |
+
|
|
|
147e83 |
+if test "$libc_cv_asm_s390_min_z196_zarch" = yes ;
|
|
|
147e83 |
+then
|
|
|
147e83 |
+ $as_echo "#define HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT 1" >>confdefs.h
|
|
|
147e83 |
+
|
|
|
147e83 |
+fi
|
|
|
147e83 |
diff --git a/sysdeps/s390/configure.in b/sysdeps/s390/configure.in
|
|
|
147e83 |
index a3b1f25..bad92bd 100644
|
|
|
147e83 |
--- a/sysdeps/s390/configure.in
|
|
|
147e83 |
+++ b/sysdeps/s390/configure.in
|
|
|
147e83 |
@@ -53,3 +53,29 @@ if test "$libc_cv_gcc_s390_vx" = yes ;
|
|
|
147e83 |
then
|
|
|
147e83 |
AC_DEFINE(HAVE_S390_VX_GCC_SUPPORT)
|
|
|
147e83 |
fi
|
|
|
147e83 |
+
|
|
|
147e83 |
+AC_CACHE_CHECK(for S390 z196 zarch instruction support as default,
|
|
|
147e83 |
+ libc_cv_asm_s390_min_z196_zarch, [dnl
|
|
|
147e83 |
+cat > conftest.c <<\EOF
|
|
|
147e83 |
+float testinsn (double e)
|
|
|
147e83 |
+{
|
|
|
147e83 |
+ float d;
|
|
|
147e83 |
+ __asm__ ("ledbra %0,5,%1,4" : "=f" (d) : "f" (e) );
|
|
|
147e83 |
+ return d;
|
|
|
147e83 |
+}
|
|
|
147e83 |
+EOF
|
|
|
147e83 |
+dnl
|
|
|
147e83 |
+dnl test, if assembler supports S390 z196 zarch instructions as default
|
|
|
147e83 |
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c
|
|
|
147e83 |
+ -o conftest.o &> /dev/null]) ;
|
|
|
147e83 |
+then
|
|
|
147e83 |
+ libc_cv_asm_s390_min_z196_zarch=yes
|
|
|
147e83 |
+else
|
|
|
147e83 |
+ libc_cv_asm_s390_min_z196_zarch=no
|
|
|
147e83 |
+fi
|
|
|
147e83 |
+rm -f conftest* ])
|
|
|
147e83 |
+
|
|
|
147e83 |
+if test "$libc_cv_asm_s390_min_z196_zarch" = yes ;
|
|
|
147e83 |
+then
|
|
|
147e83 |
+ AC_DEFINE(HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT)
|
|
|
147e83 |
+fi
|
|
|
147e83 |
--
|
|
|
147e83 |
1.8.3.1
|
|
|
147e83 |
|