[Gmp-commit] /var/hg/gmp: 5 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Sat Oct 15 16:10:19 CEST 2011


details:   /var/hg/gmp/rev/1ed54d57fefa
changeset: 14331:1ed54d57fefa
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Oct 15 15:52:49 2011 +0200
description:
(S390_PATTERN, S390X_PATTERN): New defines.

details:   /var/hg/gmp/rev/47b68c6e8319
changeset: 14332:47b68c6e8319
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Oct 15 15:53:51 2011 +0200
description:
(s390): Rewrite support to handle known CPUs.

details:   /var/hg/gmp/rev/df290f710cfa
changeset: 14333:df290f710cfa
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Oct 15 15:54:56 2011 +0200
description:
Recognise s390 CPUs.

details:   /var/hg/gmp/rev/4fd21d06d920
changeset: 14334:4fd21d06d920
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Oct 15 15:55:41 2011 +0200
description:
Match s390 CPUs.

details:   /var/hg/gmp/rev/f80107f382a3
changeset: 14335:f80107f382a3
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sat Oct 15 15:56:03 2011 +0200
description:
*** empty log message ***

diffstat:

 ChangeLog    |   7 +++++++
 acinclude.m4 |   6 ++++++
 config.guess |  15 +++++++++++++++
 config.sub   |   5 +++++
 configure.in |  30 +++++++++++++++++++++++-------
 5 files changed, 56 insertions(+), 7 deletions(-)

diffs (117 lines):

diff -r 48f5212d6e81 -r f80107f382a3 ChangeLog
--- a/ChangeLog	Fri Oct 14 17:33:32 2011 +0200
+++ b/ChangeLog	Sat Oct 15 15:56:03 2011 +0200
@@ -1,3 +1,10 @@
+2011-10-15  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in (s390): Rewrite support to handle known CPUs.
+	* config.guess: Recognise s390 CPUs.
+	* config.sub: Match s390 CPUs.
+	* acinclude.m4 (S390_PATTERN, S390X_PATTERN): New defines.
+
 2011-10-14  Torbjorn Granlund  <tege at gmplib.org>
 
 	From Per Olofsson:
diff -r 48f5212d6e81 -r f80107f382a3 acinclude.m4
--- a/acinclude.m4	Fri Oct 14 17:33:32 2011 +0200
+++ b/acinclude.m4	Sat Oct 15 15:56:03 2011 +0200
@@ -43,6 +43,12 @@
 define(POWERPC64_PATTERN,
 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
 
+define(S390_PATTERN,
+[[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
+
+define(S390X_PATTERN,
+[[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
+
 define(X86_PATTERN,
 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
 
diff -r 48f5212d6e81 -r f80107f382a3 config.guess
--- a/config.guess	Fri Oct 14 17:33:32 2011 +0200
+++ b/config.guess	Sat Oct 15 15:56:03 2011 +0200
@@ -890,6 +890,21 @@
   rm -f ${dummy}0.s ${dummy}0.o ${dummy}1.s ${dummy}1.o ${dummy}2.c ${dummy}2.o $dummy
   ;;
 
+s390*-*-*)
+  model=`grep "^processor 0: version =" /proc/cpuinfo | sed -e 's/.*machine = //'`
+  case $model in
+    2064 | 2066) zcpu="z900" ;;
+    2084 | 2086) zcpu="z990" ;;
+    2094 | 2096) zcpu="z9"   ;;
+    2097 | 2098) zcpu="z10"  ;;
+    2817 | 2818 | *) zcpu="z196" ;;
+  esac
+  case "$guess_full" in
+    s390x-*-*) exact_cpu=${zcpu}    ;;
+    s390-*-*)  exact_cpu=${zcpu}esa ;;
+  esac
+  ;;
+
 esac
 
 
diff -r 48f5212d6e81 -r f80107f382a3 config.sub
--- a/config.sub	Fri Oct 14 17:33:32 2011 +0200
+++ b/config.sub	Sat Oct 15 15:56:03 2011 +0200
@@ -111,6 +111,11 @@
 sh2)
   test_cpu=sh ;;
 
+z900 | z990 | z9 | z10 | z196)
+  test_cpu=s390x;;
+z900esa | z990esa | z9esa | z10esa | z196esa)
+  test_cpu=s390;;
+
 *)
   # Don't need or want to change the given name, just run configfsf.sub
   $SHELL $configfsf_sub "$given_full"
diff -r 48f5212d6e81 -r f80107f382a3 configure.in
--- a/configure.in	Fri Oct 14 17:33:32 2011 +0200
+++ b/configure.in	Sat Oct 15 15:56:03 2011 +0200
@@ -1118,20 +1118,36 @@
 
 
   # IBM System/390 and z/Architecture
-  [s3[6-9]0*-*-*])
+  S390_PATTERN | S390X_PATTERN)
     abilist="32"
     gcc_cflags="$gcc_cflags $fomit_frame_pointer"
+    gcc_cflags_optlist="arch"
     path="s390_32"
     extra_functions="udiv_w_sdiv"
 
     case $host_cpu in
-      s390x)
-        abilist="64 32"
+      s390)
+	;;
+      z9)
+	path="s390_32/esame/$host_cpu s390_32/esame s390_32"
+	gcc_cflags_arch="-march=z9-109"
+	gcc_32_cflags="$gcc_cflags -mzarch"
+        ;;
+      *)
+	path="s390_32/esame/$host_cpu s390_32/esame s390_32"
+        gcc_cflags_arch="-march=$host_cpu"
+	gcc_32_cflags="$gcc_cflags -mzarch"
+        ;;
+      esac
+
+    case $host in
+      S390X_PATTERN)
+	abilist="64 32"
 	cclist_64="gcc"
-        gcc_64_cflags="$gcc_cflags -m64"
-        gcc_32_cflags="$gcc_cflags -m31 -mzarch"
-	path_32="s390_32/esame s390_32"
-	path_64="s390_64"
+	gcc_64_cflags_optlist="arch"
+	gcc_64_cflags="$gcc_cflags -m64"
+	gcc_cflags="$gcc_cflags -m31"
+	path_64="s390_64/$host_cpu s390_64"
 	extra_functions=""
 	AC_DEFINE(HAVE_HOST_CPU_s390_zarch)
 	;;


More information about the gmp-commit mailing list