[Gmp-commit] /var/hg/gmp: Recognise CPUs z13-z15.

mercurial at gmplib.org mercurial at gmplib.org
Tue Mar 9 11:14:03 UTC 2021


details:   /var/hg/gmp/rev/3b2819294177
changeset: 18205:3b2819294177
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue Mar 09 12:13:58 2021 +0100
description:
Recognise CPUs z13-z15.

diffstat:

 acinclude.m4 |   4 ++--
 config.guess |   7 +++++++
 config.sub   |   4 ++--
 configure.ac |  56 +++++++++++++++++++++++++++++++++++---------------------
 4 files changed, 46 insertions(+), 25 deletions(-)

diffs (157 lines):

diff -r f03dc9ac46c8 -r 3b2819294177 acinclude.m4
--- a/acinclude.m4	Mon Mar 08 20:52:19 2021 +0100
+++ b/acinclude.m4	Tue Mar 09 12:13:58 2021 +0100
@@ -54,10 +54,10 @@
 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
 
 define(S390_PATTERN,
-[[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
+[[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z1[0-5]esa-*-* | z196esa-*-*]])
 
 define(S390X_PATTERN,
-[[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
+[[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z1[0-5]-*-* | z196-*-*]])
 
 define(X86_PATTERN,
 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
diff -r f03dc9ac46c8 -r 3b2819294177 config.guess
--- a/config.guess	Mon Mar 08 20:52:19 2021 +0100
+++ b/config.guess	Tue Mar 09 12:13:58 2021 +0100
@@ -1138,6 +1138,13 @@
       2097 | 2098) zcpu="z10"  ;;
       2817 | 2818 | *) zcpu="z196" ;;
     esac
+    if grep "^features.* vxe2" /proc/cpuinfo >/dev/null; then
+      zcpu="z15"
+    elif grep "^features.* vxe" /proc/cpuinfo >/dev/null; then
+      zcpu="z14"
+    elif grep "^features.* vx" /proc/cpuinfo >/dev/null; then
+      zcpu="z13"
+    fi
     case "$guess_full" in
       s390x-*-*) exact_cpu=${zcpu}    ;;
       s390-*-*)  exact_cpu=${zcpu}esa ;;
diff -r f03dc9ac46c8 -r 3b2819294177 config.sub
--- a/config.sub	Mon Mar 08 20:52:19 2021 +0100
+++ b/config.sub	Tue Mar 09 12:13:58 2021 +0100
@@ -122,9 +122,9 @@
 sh2)
   test_cpu=sh ;;
 
-z900 | z990 | z9 | z10 | z196)
+z900 | z990 | z9 | z1[0-5] | z196)
   test_cpu=s390x;;
-z900esa | z990esa | z9esa | z10esa | z196esa)
+z900esa | z990esa | z9esa | z1[0-5]esa | z196esa)
   test_cpu=s390;;
 
 armsa1 | armxscale | arm9tdmi | arm9te |				\
diff -r f03dc9ac46c8 -r 3b2819294177 configure.ac
--- a/configure.ac	Mon Mar 08 20:52:19 2021 +0100
+++ b/configure.ac	Tue Mar 09 12:13:58 2021 +0100
@@ -347,6 +347,9 @@
 #undef HAVE_HOST_CPU_s390_z9
 #undef HAVE_HOST_CPU_s390_z10
 #undef HAVE_HOST_CPU_s390_z196
+#undef HAVE_HOST_CPU_s390_z13
+#undef HAVE_HOST_CPU_s390_z14
+#undef HAVE_HOST_CPU_s390_z15
 
 /* Define to 1 iff we have a s390 with 64-bit registers.  */
 #undef HAVE_HOST_CPU_s390_zarch])
@@ -1367,63 +1370,74 @@
     fi
     gcc_32_cflags_maybe="-m31"
 
+    unset cpu gccarch xpath
     case $host_cpu in
       s390)
 	;;
       z900 | z900esa)
         cpu="z900"
         gccarch="$cpu"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z990 | z990esa)
         cpu="z990"
         gccarch="$cpu"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z9 | z9esa)
         cpu="z9"
 	gccarch="z9-109"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z10 | z10esa)
         cpu="z10"
 	gccarch="z10"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	extra_functions=""
         ;;
       z196 | z196esa)
         cpu="z196"
 	gccarch="z196"
-	path="s390_32/esame/$cpu s390_32/esame s390_32"
-	gcc_cflags_arch="-march=$gccarch"
-	AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
-	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
+	extra_functions=""
+        ;;
+      z13 | z13esa)
+        cpu="z13"
+	gccarch="z13"
 	extra_functions=""
         ;;
+      z14 | z14esa)
+        cpu="z14"
+	gccarch="z14"
+	extra_functions=""
+	xpath="z13"
+        ;;
+      z15 | z15esa)
+        cpu="z15"
+	gccarch="z15"
+	extra_functions=""
+	xpath="z14 z13"
+        ;;
       esac
 
+    if test x"$cpu" != x ; then
+      AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_s390_$cpu)
+      AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
+      path="s390_32/esame s390_32"
+      path_64=""
+      for i in $cpu $xpath; do
+	path_64="$path_64 s390_64/$i"
+      done
+      path_64="$path_64 s390_64"
+    fi
+    if test x"$gccarch" != x ; then
+      gcc_cflags_arch="-march=$gccarch"
+    fi
+
     case $host in
       S390X_PATTERN)
 	abilist="64 32"
 	cclist_64="gcc"
 	gcc_64_cflags_optlist="arch"
 	gcc_64_cflags="$gcc_cflags -m64"
-	path_64="s390_64/$host_cpu s390_64"
 	extra_functions=""
 	;;
       esac


More information about the gmp-commit mailing list