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

mercurial at gmplib.org mercurial at gmplib.org
Wed Mar 20 00:23:52 CET 2013


details:   /var/hg/gmp/rev/501a5d130c7f
changeset: 15617:501a5d130c7f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 20 00:20:52 2013 +0100
description:
(arm*-*-*): Recognise neon suffix for a8, a9, and a15.

details:   /var/hg/gmp/rev/c23c2da11f3f
changeset: 15618:c23c2da11f3f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 20 00:21:14 2013 +0100
description:
Tack on "neon" for appropriate arm CPUs.

details:   /var/hg/gmp/rev/9264a65ce076
changeset: 15619:9264a65ce076
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 20 00:22:42 2013 +0100
description:
Trivial merge.

details:   /var/hg/gmp/rev/ba0d8ba83621
changeset: 15620:ba0d8ba83621
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 20 00:23:49 2013 +0100
description:
ChangeLog

diffstat:

 ChangeLog          |  10 ++++++++++
 config.guess       |   1 +
 configure.ac       |  16 +++++++++++++---
 mpf/fits_u.h       |  10 +++++-----
 tests/mpf/t-fits.c |  11 ++++++++++-
 5 files changed, 39 insertions(+), 9 deletions(-)

diffs (126 lines):

diff -r 69009e987422 -r ba0d8ba83621 ChangeLog
--- a/ChangeLog	Tue Mar 19 18:44:35 2013 +0100
+++ b/ChangeLog	Wed Mar 20 00:23:49 2013 +0100
@@ -1,3 +1,13 @@
+2013-03-20  Torbjorn Granlund  <tege at gmplib.org>
+
+	* config.guess: Tack on "neon" for appropriate arm CPUs.
+	* configure.ac (arm*-*-*): Recognise neon suffix for a8, a9, and a15.
+
+2013-03-19 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpf/fits_u.h: accept numbers truncating to zero before checking the sign.
+	* tests/mpf/t-fits.c: Check new edges.
+
 2013-03-19  Torbjorn Granlund  <tege at gmplib.org>
 
 	* tests/arm32check.c: Get printing of clobbered register right.
diff -r 69009e987422 -r ba0d8ba83621 config.guess
--- a/config.guess	Tue Mar 19 18:44:35 2013 +0100
+++ b/config.guess	Wed Mar 20 00:23:49 2013 +0100
@@ -191,6 +191,7 @@
       0xc15)	exact_cpu="armcortexr5";;	# v7r
       0xc23)	exact_cpu="armcortexm3";;	# v7m
   esac
+  exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo 2>/dev/null`"
   ;;
 
 ia64*-*-*)
diff -r 69009e987422 -r ba0d8ba83621 configure.ac
--- a/configure.ac	Tue Mar 19 18:44:35 2013 +0100
+++ b/configure.ac	Wed Mar 20 00:23:49 2013 +0100
@@ -586,17 +586,17 @@
 	path="arm/v6t2 arm/v6 arm/v5 arm"
 	gcc_cflags_arch="-march=armv6"
 	;;
-      armcortexa9)
+      armcortexa9 | armcortexa9neon)
 	path="arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm"
 	gcc_cflags_arch="-march=armv7-a"
 	gcc_cflags_tune="-mtune=cortex-a9"
 	;;
-      armcortexa15)
+      armcortexa15 | armcortexa15neon)
 	path="arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
 	gcc_cflags_arch="-march=armv7-a"
 	gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9"
 	;;
-      armcortexa5 | armcortexa8 | armv7a*)
+      armcortexa5 | armcortexa8 | armcortexa8neon | armv7a*)
 	path="arm/v6t2 arm/v6 arm/v5 arm"
 	gcc_cflags_arch="-march=armv7-a"
 	;;
@@ -604,6 +604,16 @@
 	path="arm"
 	;;
     esac
+
+    case $host_cpu in
+      *neon)
+	path2=""
+	for p in $path
+	  do path2="$path2 $p/neon $p"
+	  done
+	path="$path2"
+	;;
+    esac
     ;;
 
 
diff -r 69009e987422 -r ba0d8ba83621 mpf/fits_u.h
--- a/mpf/fits_u.h	Tue Mar 19 18:44:35 2013 +0100
+++ b/mpf/fits_u.h	Wed Mar 20 00:23:49 2013 +0100
@@ -1,6 +1,6 @@
 /* mpf_fits_u*_p -- test whether an mpf fits a C unsigned type.
 
-Copyright 2001, 2002 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2013 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -31,14 +31,14 @@
   mp_exp_t   exp;
   mp_limb_t  fl;
 
+  exp = EXP(f);
+  if (exp < 1)
+    return 1;  /* -1 < f < 1 truncates to zero, so fits */
+
   fn = SIZ(f);
   if (fn <= 0)
     return fn == 0;  /* zero fits, negatives don't */
 
-  exp = EXP(f);
-  if (exp < 1)
-    return 1;  /* 0 < f < 1 truncates to zero, so fits */
-
   fp = PTR(f);
 
   if (exp == 1)
diff -r 69009e987422 -r ba0d8ba83621 tests/mpf/t-fits.c
--- a/tests/mpf/t-fits.c	Tue Mar 19 18:44:35 2013 +0100
+++ b/tests/mpf/t-fits.c	Wed Mar 20 00:23:49 2013 +0100
@@ -1,6 +1,6 @@
 /* Test mpf_fits_*_p
 
-Copyright 2001, 2002 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2013 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 
@@ -252,6 +252,15 @@
 
   mpf_set_str_or_abort (f, "-0.5", 10);
   expr = "-0.5";
+  EXPECT (mpf_fits_ulong_p, 1);
+  EXPECT (mpf_fits_uint_p, 1);
+  EXPECT (mpf_fits_ushort_p, 1);
+  EXPECT (mpf_fits_slong_p, 1);
+  EXPECT (mpf_fits_sint_p, 1);
+  EXPECT (mpf_fits_sshort_p, 1);
+
+  mpf_set_str_or_abort (f, "-1.5", 10);
+  expr = "-1.5";
   EXPECT (mpf_fits_ulong_p, 0);
   EXPECT (mpf_fits_uint_p, 0);
   EXPECT (mpf_fits_ushort_p, 0);


More information about the gmp-commit mailing list