Hello community,
here is the log from the commit of package gmp for openSUSE:Factory checked in at 2013-05-27 09:49:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gmp (Old)
and /work/SRC/openSUSE:Factory/.gmp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gmp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gmp/gmp.changes 2013-02-21 14:07:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gmp.new/gmp.changes 2013-05-27 09:49:41.000000000 +0200
@@ -1,0 +2,14 @@
+Wed May 22 13:41:54 UTC 2013 - rguenther@suse.com
+
+- Update to GMP 5.1.2 release.
+ * A bug in mpz_powm_ui triggered by base arguments of at least 15000
+ decimal digits or mod arguments of at least 7500 decimal digits has
+ been fixed.
+
+-------------------------------------------------------------------
+Wed Mar 27 10:41:43 UTC 2013 - mmeister@suse.com
+
+- Added url as source.
+ Please see http://en.opensuse.org/SourceUrls
+
+-------------------------------------------------------------------
Old:
----
gmp-5.1.1.tar.bz2
New:
----
gmp-5.1.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gmp.spec ++++++
--- /var/tmp/diff_new_pack.e7S4T4/_old 2013-05-27 09:49:42.000000000 +0200
+++ /var/tmp/diff_new_pack.e7S4T4/_new 2013-05-27 09:49:42.000000000 +0200
@@ -22,13 +22,13 @@
%ifarch ppc64
Obsoletes: gmp-64bit
%endif
-Version: 5.1.1
+Version: 5.1.2
Release: 0
Summary: The GNU MP Library
License: GPL-3.0+ and LGPL-3.0+
Group: System/Libraries
Url: http://gmplib.org/
-Source: gmp-%{version}.tar.bz2
+Source: ftp://ftp.gmplib.org/pub/%{name}/%{name}-%{version}.tar.bz2
Source2: baselibs.conf
Patch0: gmp-noexec.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ gmp-5.1.1.tar.bz2 -> gmp-5.1.2.tar.bz2 ++++++
++++ 1709 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/ChangeLog new/gmp-5.1.2/ChangeLog
--- old/gmp-5.1.1/ChangeLog 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/ChangeLog 2013-05-20 16:59:56.000000000 +0200
@@ -1,3 +1,113 @@
+2013-05-20 Torbjorn Granlund
+
+ * Version 5.1.2 released.
+
+ * mpn/arm/udiv.asm: Change spacing to work around binutils bug.
+
+2013-05-16 Torbjorn Granlund
+
+ * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
+ * gmp-h.in: Bump version.
+
+ * tests/misc.c (tests_hardware_getround, tests_hardware_setround):
+ Avoid assembly dependency unless WANT_ASSEMBLY.
+
+ * configure.ac (WANT_ASSEMBLY): Conditionally define.
+
+2013-05-14 Torbjorn Granlund
+
+ * configure.ac (arm1156): Don't fall back to plain v6 compiler option.
+
+2013-05-10 Torbjorn Granlund
+
+ * mpn/x86/p6/mmx/gmp-mparam.h: Set down SQR_TOOM2_THRESHOLD to parent
+ directory value.
+
+2013-05-09 Torbjorn Granlund
+
+ * mpn/x86_64/bd1/mul_1.asm: Fix typo.
+
+2013-04-29 Torbjorn Granlund
+
+ * configure.ac (sparc-*-*): Recognise t5 along with t3 and t4.
+ Remove sparc64/ultrasparct1 from path_64 for T3, T3, and T5.
+
+2013-04-27 Mike Frysinger
+
+ * configure.ac (arm*-*-*): Set up path also for plainest CPU variants.
+
+2013-03-19 Torbjorn Granlund
+
+ * tests/arm32check.c: Get printing of clobbered register right.
+
+ * tests/Makefile.am (EXTRA_libtests_la_SOURCES): Add arm32call.asm and
+ arm32check.c.
+
+2013-03-18 Torbjorn Granlund
+
+ * configure.ac (arm*-*-*): Define CALLING_CONVENTIONS_OBJS.
+
+ * tests/arm32call.asm: New file.
+ * tests/arm32check.c: New file.
+
+ * mpn/arm/arm-defs.m4 (LEA): Rewrite to properly handle repeated use.
+ (EPILOGUE_cpu): Define.
+
+ * mpn/x86/darwin.m4 (m4append): Move definition from here...
+ * mpn/asm-defs.m4: ...to here.
+
+2012-03-17 Marc Glisse
+
+ * tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc: New file.
+ * tests/cxx/Makefile.am: Add new file. Reorder the tests.
+
+2013-03-11 Torbjorn Granlund
+
+ * tests/mpz/t-powm_ui.c: Test larger arguments.
+
+ * mpz/powm_ui.c (mod): Adhere to mpn_mu_div_qr's overlap requirements.
+
+2013-02-25 Niels M�ller
+
+ * mini-gmp/tests/t-double.c (testmain): Declare double variables
+ as volatile, to drop extended precision.
+
+ * mini-gmp/tests/testutils.c (testfree): New function. Use it
+ everywhere where test programs deallocate storage allocated via
+ the mini-gmp allocation functions, including uses of mpz_get_str
+ for various test failure messages.
+
+2013-02-20 Niels M�ller
+
+ * tests/mpq/t-get_d.c (check_random): Rewrote to make test less
+ dependent on float operations. Fixes problem with m68k-linux and
+ extended float precision.
+
+2013-02-19 Marco Bodrato
+
+ * mini-gmp/mini-gmp.c: Move asserts to work-around a compiler bug.
+
+ * mini-gmp/tests/t-reuse.c: Fix typo causing the same negation
+ condition to be applied to all operands. (See 2013-02-03, Torbjorn)
+
+2013-02-17 Marc Glisse
+
+ * cxx/osdoprnti.cc: Use and rather than <cstdarg>
+ and <cstring> (revert 2002-12-21).
+
+ * tests/cxx/Makefile.am: Link with libm.
+ * tests/cxx/t-ops2.cc: Comment about more tests. Use rather
+ than <cmath> and using namespace. Don't include <iostream>.
+
+2013-02-16 Marc Glisse
+
+ * gmpxx.h: Include <algorithm>.
+
+2013-02-16 Torbjorn Granlund
+
+ * mpn/x86_64/x86_64-defs.m4 (PROTECT): Emit '.hidden' instead of
+ '.protected" to please Sun's assembler, but also for semantic reasons.
+
2013-02-10 Torbjorn Granlund
* Version 5.1.1 released.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/Makefile.am new/gmp-5.1.2/Makefile.am
--- old/gmp-5.1.1/Makefile.am 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/Makefile.am 2013-05-20 16:59:56.000000000 +0200
@@ -73,6 +73,7 @@
# 5.0.5 10:5:0 6:5:2 4:25:1
# 5.1.0 11:0:1 7:0:3 -
# 5.1.1 11:1:1 7:1:3 -
+# 5.1.2 11:2:1 7:2:3 -
#
# Starting at 3:0:0 is a slight abuse of the versioning system, but it
# ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux
@@ -86,11 +87,11 @@
# libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from.
LIBGMP_LT_CURRENT = 11
-LIBGMP_LT_REVISION = 1
+LIBGMP_LT_REVISION = 2
LIBGMP_LT_AGE = 1
LIBGMPXX_LT_CURRENT = 7
-LIBGMPXX_LT_REVISION = 1
+LIBGMPXX_LT_REVISION = 2
LIBGMPXX_LT_AGE = 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/NEWS new/gmp-5.1.2/NEWS
--- old/gmp-5.1.1/NEWS 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/NEWS 2013-05-20 16:59:56.000000000 +0200
@@ -5,6 +5,28 @@
medium, provided this notice is preserved.
+Changes between GMP version 5.1.1 and 5.1.2
+
+ BUGS FIXED
+ * A bug in mpz_powm_ui triggered by base arguments of at least 15000 decimal
+ digits or mod arguments of at least 7500 decimal digits has been fixed.
+
+ * A AMD Bulldozer specific bug affecting the 64-bit Windows ABI has been
+ fixed. This bug was in a key function (mpn_mul_1) and made both Bulldozer
+ specific builds and fat builds run on Bulldozer completely non-functional.
+
+ SPEEDUPS
+ * None.
+
+ FEATURES
+ * None.
+
+ MISC
+ * Fixes and generalisations to the test suite.
+
+ * Minor portability enhancements.
+
+
Changes between GMP version 5.1.0 and 5.1.1
BUGS FIXED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/config.in new/gmp-5.1.2/config.in
--- old/gmp-5.1.1/config.in 2013-02-11 16:29:19.000000000 +0100
+++ new/gmp-5.1.2/config.in 2013-05-20 17:00:02.000000000 +0200
@@ -556,6 +556,9 @@
/* Version number of package */
#undef VERSION
+/* Defined to 1 as per --enable-assembly */
+#undef WANT_ASSEMBLY
+
/* Define to 1 to enable ASSERT checking, per --enable-assert */
#undef WANT_ASSERT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/configure.ac new/gmp-5.1.2/configure.ac
--- old/gmp-5.1.1/configure.ac 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/configure.ac 2013-05-20 16:59:56.000000000 +0200
@@ -131,6 +131,11 @@
esac],
[enable_assembly=yes])
+if test "$enable_assembly" = "yes"; then
+ AC_DEFINE(WANT_ASSEMBLY,1,
+ [Defined to 1 as per --enable-assembly])
+fi
+
AC_ARG_ENABLE(fft,
AC_HELP_STRING([--enable-fft],[enable FFTs for multiplication [[default=yes]]]),
@@ -570,8 +575,12 @@
gcc_cflags_maybe="-marm"
gcc_testlist="gcc-arm-umodsi"
GMP_INCLUDE_MPN(arm/arm-defs.m4)
+ CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo'
+
case $host_cpu in
armsa1 | armv4*)
+ path="arm"
+ gcc_cflags_arch="-march=armv4"
;;
armxscale | arm926 | arm946 | arm966 | arm1026 | armv5*)
path="arm/v5 arm"
@@ -583,7 +592,7 @@
;;
arm1156)
path="arm/v6t2 arm/v6 arm/v5 arm"
- gcc_cflags_arch="-march=armv6"
+ gcc_cflags_arch="-march=armv6t2"
;;
armcortexa9)
path="arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm"
@@ -1258,7 +1267,7 @@
path="sparc32/v8/supersparc sparc32/v8 sparc32" ;;
[sparc64 | sparcv9* | ultrasparc | ultrasparc[234]*])
path="sparc32/v9 sparc32/v8 sparc32" ;;
- [ultrasparct[1234]])
+ [ultrasparct[12345]])
path="sparc32/ultrasparct1 sparc32/v8 sparc32" ;;
*)
path="sparc32" ;;
@@ -1279,6 +1288,8 @@
# abilist="64" only.
#
case $host_cpu in
+ [ultrasparct[345]])
+ gcc_32_cflags="$gcc_cflags -Wa,-xarch=v8plusd" ;;
sparc64 | sparcv9* | ultrasparc*)
gcc_32_cflags="$gcc_cflags -Wa,-xarch=v8plus" ;;
esac
@@ -1319,6 +1330,7 @@
case $host_cpu in
sparcv8 | microsparc | supersparc | turbosparc)
cc_cflags_arch="-xarch=v8" ;;
+ [ultrasparct[345]]) cc_cflags_arch="-xarch=v8plusd" ;;
sparc64 | sparcv9* | ultrasparc*) cc_cflags_arch="-xarch=v8plus" ;;
*) cc_cflags_arch="-xarch=v7" ;;
esac
@@ -1375,7 +1387,7 @@
path_64="sparc64/ultrasparc1234 sparc64" ;;
[ultrasparc[34]])
path_64="sparc64/ultrasparc34 sparc64/ultrasparc1234 sparc64" ;;
- [ultrasparct[1234]])
+ [ultrasparct[12345]])
path_64="sparc64/ultrasparct1 sparc64" ;;
*)
path_64="sparc64"
@@ -1634,7 +1646,7 @@
path="x86/coreinhm x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86"
path_64="x86_64/coreinhm x86_64/core2 x86_64"
;;
- coreisbr)
+ coreisbr | coreihwl | coreibwl)
gcc_cflags_cpu="-mtune=corei7 -mtune=core2 -mtune=k8"
gcc_cflags_arch="-march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86"
@@ -3415,7 +3427,7 @@
power*-*-aix*)
GMP_INCLUDE_MPN(powerpc32/aix.m4)
;;
- sparcv9*-*-* | ultrasparc*-*-* | sparc64-*-*)
+ *sparc*-*-*)
case $ABI in
64)
GMP_ASM_SPARC_REGISTER
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/cxx/osdoprnti.cc new/gmp-5.1.2/cxx/osdoprnti.cc
--- old/gmp-5.1.1/cxx/osdoprnti.cc 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/cxx/osdoprnti.cc 2013-05-20 16:59:56.000000000 +0200
@@ -22,8 +22,8 @@
along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include <iostream>
-#include <cstdarg> /* for va_list and hence doprnt_funs_t */
-#include <cstring> /* for strlen */
+#include /* for va_list and hence doprnt_funs_t */
+#include /* for strlen */
#include "gmp.h"
#include "gmp-impl.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/doc/gmp.info new/gmp-5.1.2/doc/gmp.info
--- old/gmp-5.1.1/doc/gmp.info 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/doc/gmp.info 2013-05-20 17:00:18.000000000 +0200
@@ -2,7 +2,7 @@
../../gmp/doc/gmp.texi.
This manual describes how to install and use the GNU multiple precision
-arithmetic library, version 5.1.1.
+arithmetic library, version 5.1.2.
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/doc/gmp.info-1 new/gmp-5.1.2/doc/gmp.info-1
--- old/gmp-5.1.1/doc/gmp.info-1 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/doc/gmp.info-1 2013-05-20 17:00:18.000000000 +0200
@@ -2,7 +2,7 @@
../../gmp/doc/gmp.texi.
This manual describes how to install and use the GNU multiple precision
-arithmetic library, version 5.1.1.
+arithmetic library, version 5.1.2.
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
@@ -28,7 +28,7 @@
******
This manual describes how to install and use the GNU multiple
-precision arithmetic library, version 5.1.1.
+precision arithmetic library, version 5.1.2.
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
@@ -229,7 +229,7 @@
directory. For example
cd /my/build/dir
- /my/sources/gmp-5.1.1/configure
+ /my/sources/gmp-5.1.2/configure
Not all `make' programs have the necessary features (`VPATH') to
support this. In particular, SunOS and Slowaris `make' have bugs
@@ -1478,7 +1478,7 @@
-- Global Constant: const char * const gmp_version
The GMP version number, as a null-terminated string, in the form
- "i.j.k". This release is "5.1.1". Note that the format "i.j" was
+ "i.j.k". This release is "5.1.2". Note that the format "i.j" was
used, before version 4.3.0, when k was zero.
-- Macro: __GMP_CC
@@ -1794,7 +1794,7 @@
path to the source directory.
cd /my/build/dir
- /my/source/dir/gmp-5.1.1/configure
+ /my/source/dir/gmp-5.1.2/configure
This works via `VPATH', and might require GNU `make'. Alternately
it might be possible to change the `.c.lo' rules appropriately.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/doc/gmp.info-2 new/gmp-5.1.2/doc/gmp.info-2
--- old/gmp-5.1.1/doc/gmp.info-2 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/doc/gmp.info-2 2013-05-20 17:00:18.000000000 +0200
@@ -2,7 +2,7 @@
../../gmp/doc/gmp.texi.
This manual describes how to install and use the GNU multiple precision
-arithmetic library, version 5.1.1.
+arithmetic library, version 5.1.2.
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/doc/stamp-vti new/gmp-5.1.2/doc/stamp-vti
--- old/gmp-5.1.1/doc/stamp-vti 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/doc/stamp-vti 2013-05-20 17:00:17.000000000 +0200
@@ -1,4 +1,4 @@
-@set UPDATED 11 February 2013
-@set UPDATED-MONTH February 2013
-@set EDITION 5.1.1
-@set VERSION 5.1.1
+@set UPDATED 20 May 2013
+@set UPDATED-MONTH May 2013
+@set EDITION 5.1.2
+@set VERSION 5.1.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/doc/version.texi new/gmp-5.1.2/doc/version.texi
--- old/gmp-5.1.1/doc/version.texi 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/doc/version.texi 2013-05-20 17:00:17.000000000 +0200
@@ -1,4 +1,4 @@
-@set UPDATED 11 February 2013
-@set UPDATED-MONTH February 2013
-@set EDITION 5.1.1
-@set VERSION 5.1.1
+@set UPDATED 20 May 2013
+@set UPDATED-MONTH May 2013
+@set EDITION 5.1.2
+@set VERSION 5.1.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/gmp-h.in new/gmp-5.1.2/gmp-h.in
--- old/gmp-5.1.1/gmp-h.in 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/gmp-h.in 2013-05-20 16:59:56.000000000 +0200
@@ -2222,7 +2222,7 @@
/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */
#define __GNU_MP_VERSION 5
#define __GNU_MP_VERSION_MINOR 1
-#define __GNU_MP_VERSION_PATCHLEVEL 1
+#define __GNU_MP_VERSION_PATCHLEVEL 2
#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL)
#define __GMP_H__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/gmpxx.h new/gmp-5.1.2/gmpxx.h
--- old/gmp-5.1.1/gmpxx.h 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/gmpxx.h 2013-05-20 16:59:56.000000000 +0200
@@ -26,6 +26,7 @@
#include <cstring> /* for strlen */
#include <limits> /* numeric_limits */
#include <utility>
+#include <algorithm> /* swap */
#include <string>
#include <stdexcept>
#include <cfloat>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/mini-gmp.c new/gmp-5.1.2/mini-gmp/mini-gmp.c
--- old/gmp-5.1.1/mini-gmp/mini-gmp.c 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/mini-gmp.c 2013-05-20 16:59:56.000000000 +0200
@@ -930,11 +930,11 @@
assert (dn > 2);
assert (nn >= dn);
- assert ((dp[dn-1] & GMP_LIMB_HIGHBIT) != 0);
d1 = dp[dn - 1];
d0 = dp[dn - 2];
+ assert ((d1 & GMP_LIMB_HIGHBIT) != 0);
/* Iteration variable is the index of the q limb.
*
* We divide
@@ -994,7 +994,9 @@
mp_limb_t nh;
unsigned shift;
- assert (dp[dn-1] & GMP_LIMB_HIGHBIT);
+ assert (inv->d1 == dp[dn-1]);
+ assert (inv->d0 == dp[dn-2]);
+ assert ((inv->d1 & GMP_LIMB_HIGHBIT) != 0);
shift = inv->shift;
if (shift > 0)
@@ -1002,9 +1004,6 @@
else
nh = 0;
- assert (inv->d1 == dp[dn-1]);
- assert (inv->d0 == dp[dn-2]);
-
mpn_div_qr_pi1 (qp, np, nn, nh, dp, dn, inv->di);
if (shift > 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-add.c new/gmp-5.1.2/mini-gmp/tests/t-add.c
--- old/gmp-5.1.1/mini-gmp/tests/t-add.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-add.c 2013-05-20 17:00:18.000000000 +0200
@@ -30,7 +30,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-bitops.c new/gmp-5.1.2/mini-gmp/tests/t-bitops.c
--- old/gmp-5.1.1/mini-gmp/tests/t-bitops.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-bitops.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-div.c new/gmp-5.1.2/mini-gmp/tests/t-div.c
--- old/gmp-5.1.1/mini-gmp/tests/t-div.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-div.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
typedef void div_qr_func (mpz_t, mpz_t, const mpz_t, const mpz_t);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-div_2exp.c new/gmp-5.1.2/mini-gmp/tests/t-div_2exp.c
--- old/gmp-5.1.1/mini-gmp/tests/t-div_2exp.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-div_2exp.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
typedef void div_func (mpz_t, const mpz_t, mp_bitcnt_t);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-double.c new/gmp-5.1.2/mini-gmp/tests/t-double.c
--- old/gmp-5.1.1/mini-gmp/tests/t-double.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-double.c 2013-05-20 17:00:18.000000000 +0200
@@ -34,7 +34,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
static const struct
@@ -61,9 +61,6 @@
unsigned i;
mpz_t x;
- void (*freefunc) (void *, size_t);
- mp_get_memory_functions (NULL, NULL, &freefunc);
-
for (i = 0; values[i].s; i++)
{
char *s;
@@ -78,7 +75,7 @@
values[i].d, s, values[i].s);
abort ();
}
- freefunc(s, 0);
+ testfree (s);
mpz_clear (x);
}
@@ -86,7 +83,9 @@
for (i = 0; i < COUNT; i++)
{
- double d, f;
+ /* Use volatile, to avoid extended precision in floating point
+ registers, e.g., on m68k and 80387. */
+ volatile double d, f;
unsigned long m;
int e;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-gcd.c new/gmp-5.1.2/mini-gmp/tests/t-gcd.c
--- old/gmp-5.1.1/mini-gmp/tests/t-gcd.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-gcd.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
/* Called when g is supposed to be gcd(a,b), and g = s a + t b. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-import.c new/gmp-5.1.2/mini-gmp/tests/t-import.c
--- old/gmp-5.1.1/mini-gmp/tests/t-import.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-import.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-invert.c new/gmp-5.1.2/mini-gmp/tests/t-invert.c
--- old/gmp-5.1.1/mini-gmp/tests/t-invert.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-invert.c 2013-05-20 17:00:18.000000000 +0200
@@ -32,7 +32,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-lcm.c new/gmp-5.1.2/mini-gmp/tests/t-lcm.c
--- old/gmp-5.1.1/mini-gmp/tests/t-lcm.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-lcm.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-logops.c new/gmp-5.1.2/mini-gmp/tests/t-logops.c
--- old/gmp-5.1.1/mini-gmp/tests/t-logops.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-logops.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-mul.c new/gmp-5.1.2/mini-gmp/tests/t-mul.c
--- old/gmp-5.1.1/mini-gmp/tests/t-mul.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-mul.c 2013-05-20 17:00:18.000000000 +0200
@@ -35,7 +35,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-powm.c new/gmp-5.1.2/mini-gmp/tests/t-powm.c
--- old/gmp-5.1.1/mini-gmp/tests/t-powm.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-powm.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-reuse.c new/gmp-5.1.2/mini-gmp/tests/t-reuse.c
--- old/gmp-5.1.1/mini-gmp/tests/t-reuse.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-reuse.c 2013-05-20 17:00:18.000000000 +0200
@@ -192,9 +192,9 @@
bsi = mpz_get_ui (bs);
if ((bsi & 1) != 0)
mpz_neg (in1, in1);
- if ((bsi & 1) != 0)
+ if ((bsi & 2) != 0)
mpz_neg (in2, in2);
- if ((bsi & 1) != 0)
+ if ((bsi & 4) != 0)
mpz_neg (in3, in3);
for (i = 0; i < sizeof (dss_funcs) / sizeof (dss_func); i++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-root.c new/gmp-5.1.2/mini-gmp/tests/t-root.c
--- old/gmp-5.1.1/mini-gmp/tests/t-root.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-root.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
/* Called when s is supposed to be floor(root(u,z)), and r = u - s^z */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-scan.c new/gmp-5.1.2/mini-gmp/tests/t-scan.c
--- old/gmp-5.1.1/mini-gmp/tests/t-scan.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-scan.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-sqrt.c new/gmp-5.1.2/mini-gmp/tests/t-sqrt.c
--- old/gmp-5.1.1/mini-gmp/tests/t-sqrt.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-sqrt.c 2013-05-20 17:00:18.000000000 +0200
@@ -31,7 +31,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
/* Called when s is supposed to be floor(sqrt(u)), and r = u - s^2 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/t-str.c new/gmp-5.1.2/mini-gmp/tests/t-str.c
--- old/gmp-5.1.1/mini-gmp/tests/t-str.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/t-str.c 2013-05-20 17:00:18.000000000 +0200
@@ -36,7 +36,7 @@
{
char *buf = mpz_get_str (NULL, 16, x);
fprintf (stderr, "%s: %s\n", label, buf);
- free (buf);
+ testfree (buf);
}
static void
@@ -143,9 +143,6 @@
FILE *tmp;
- void (*freefunc) (void *, size_t);
- mp_get_memory_functions (NULL, NULL, &freefunc);
-
test_small ();
mpz_init (a);
@@ -310,7 +307,7 @@
}
}
free (ap);
- freefunc (bp, 0);
+ testfree (bp);
}
}
mpz_clear (a);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/testutils.c new/gmp-5.1.2/mini-gmp/tests/testutils.c
--- old/gmp-5.1.1/mini-gmp/tests/testutils.c 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/testutils.c 2013-05-20 17:00:18.000000000 +0200
@@ -100,6 +100,16 @@
free (block_check (p));
}
+/* Free memory allocated via mini-gmp allocation function. */
+void
+testfree (void *p)
+{
+ void (*freefunc) (void *, size_t);
+ mp_get_memory_functions (NULL, NULL, &freefunc);
+
+ freefunc (p, 0);
+}
+
int
main (int argc, char **argv)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mini-gmp/tests/testutils.h new/gmp-5.1.2/mini-gmp/tests/testutils.h
--- old/gmp-5.1.1/mini-gmp/tests/testutils.h 2013-02-11 16:29:34.000000000 +0100
+++ new/gmp-5.1.2/mini-gmp/tests/testutils.h 2013-05-20 17:00:18.000000000 +0200
@@ -27,3 +27,5 @@
void testmain (int argc, char **argv);
void testhalves (int count, void (*tested_fun) (int));
+
+void testfree (void *p);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpn/arm/arm-defs.m4 new/gmp-5.1.2/mpn/arm/arm-defs.m4
--- old/gmp-5.1.1/mpn/arm/arm-defs.m4 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpn/arm/arm-defs.m4 2013-05-20 16:59:56.000000000 +0200
@@ -2,7 +2,7 @@
dnl m4 macros for ARM assembler.
-dnl Copyright 2001, 2012 Free Software Foundation, Inc.
+dnl Copyright 2001, 2012, 2013 Free Software Foundation, Inc.
dnl
dnl This file is part of the GNU MP Library.
dnl
@@ -48,6 +48,7 @@
deflit(pc,r15)
+define(`lea_list', `')
define(`lea_num',0)
dnl LEA(reg,gmp_symbol)
@@ -59,16 +60,21 @@
define(`LEA',`dnl
ldr $1, L(ptr`'lea_num)
ifdef(`PIC',dnl
-`
+`dnl
L(bas`'lea_num):dnl
add $1, $1, pc`'dnl
- define(`EPILOGUE_cpu',
- L(ptr`'lea_num): .word GSYM_PREFIX`'$2-L(bas`'lea_num)-8)dnl
+ m4append(`lea_list',`
+L(ptr'lea_num`): .word GSYM_PREFIX`'$2-L(bas'lea_num`)-8')
define(`lea_num', eval(lea_num+1))dnl
',`dnl
- define(`EPILOGUE_cpu',
- L(ptr`'lea_num): .word GSYM_PREFIX`'$2)')dnl
+ m4append(`lea_list',`
+L(ptr'lea_num`): .word GSYM_PREFIX`'$2')
+ define(`lea_num', eval(lea_num+1))dnl
+')dnl
')
+define(`EPILOGUE_cpu',
+`lea_list
+ SIZE(`$1',.-`$1')')
divert
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpn/arm/udiv.asm new/gmp-5.1.2/mpn/arm/udiv.asm
--- old/gmp-5.1.1/mpn/arm/udiv.asm 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpn/arm/udiv.asm 2013-05-20 16:59:56.000000000 +0200
@@ -48,7 +48,7 @@
teq r12, #0
bne L(oop)
- str n1, [ rem_ptr ] C store remainder
+ str n1, [rem_ptr] C store remainder
adc r0, n0, n0 C quotient: add last carry from divstep
bx lr
@@ -87,7 +87,7 @@
addcs n0, n0, #1 C adjust quotient
L(_even_divisor):
- str n1, [ rem_ptr ] C store remainder
+ str n1, [rem_ptr] C store remainder
mov r0, n0 C quotient
ldmfd sp!, { r8, pc }
EPILOGUE(mpn_udiv_qrnnd)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpn/asm-defs.m4 new/gmp-5.1.2/mpn/asm-defs.m4
--- old/gmp-5.1.1/mpn/asm-defs.m4 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpn/asm-defs.m4 2013-05-20 16:59:57.000000000 +0200
@@ -1740,4 +1740,11 @@
`m4_hex_lowmask(GMP_NUMB_BITS)')
+dnl Usage: m4append(`variable',`value-to-append')
+
+define(`m4append',
+`define(`$1', defn(`$1')`$2')
+'
+)
+
divert`'dnl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpn/x86/darwin.m4 new/gmp-5.1.2/mpn/x86/darwin.m4
--- old/gmp-5.1.1/mpn/x86/darwin.m4 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpn/x86/darwin.m4 2013-05-20 16:59:57.000000000 +0200
@@ -19,13 +19,6 @@
define(`DARWIN')
-dnl m4append is used below. Consider moving it to mpn/asm-defs.m4.
-
-define(`m4append',
-`define(`$1', defn(`$1')`$2')'
-)
-
-
dnl Usage LEA(symbol,reg)
dnl
dnl We maintain lists of stuff to append in load_eip and darwin_bd. The
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpn/x86/p6/mmx/gmp-mparam.h new/gmp-5.1.2/mpn/x86/p6/mmx/gmp-mparam.h
--- old/gmp-5.1.1/mpn/x86/p6/mmx/gmp-mparam.h 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpn/x86/p6/mmx/gmp-mparam.h 2013-05-20 16:59:57.000000000 +0200
@@ -53,7 +53,7 @@
#define MUL_TOOM42_TO_TOOM63_THRESHOLD 80
#define SQR_BASECASE_THRESHOLD 0 /* always (native) */
-#define SQR_TOOM2_THRESHOLD 48
+#define SQR_TOOM2_THRESHOLD 30
#define SQR_TOOM3_THRESHOLD 81
#define SQR_TOOM4_THRESHOLD 142
#define SQR_TOOM6_THRESHOLD 258
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpn/x86_64/bd1/mul_1.asm new/gmp-5.1.2/mpn/x86_64/bd1/mul_1.asm
--- old/gmp-5.1.1/mpn/x86_64/bd1/mul_1.asm 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpn/x86_64/bd1/mul_1.asm 2013-05-20 16:59:57.000000000 +0200
@@ -53,7 +53,7 @@
IFDOS(` define(`v0', ``%r9'') ') dnl
IFDOS(` define(`r9', ``rdi'') ') dnl
IFDOS(` define(`n', ``%r8'') ') dnl
-IFDOS(` define(`r8', ``r11'') ') dnl
+IFDOS(` define(`r8', ``rbx'') ') dnl
ASM_START()
TEXT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpn/x86_64/x86_64-defs.m4 new/gmp-5.1.2/mpn/x86_64/x86_64-defs.m4
--- old/gmp-5.1.1/mpn/x86_64/x86_64-defs.m4 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpn/x86_64/x86_64-defs.m4 2013-05-20 16:59:57.000000000 +0200
@@ -2,8 +2,8 @@
dnl m4 macros for amd64 assembler.
-dnl Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2011, 2012
-dnl Free Software Foundation, Inc.
+dnl Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2011,
+dnl 2012, 2013 Free Software Foundation, Inc.
dnl
dnl This file is part of the GNU MP Library.
dnl
@@ -218,7 +218,7 @@
dnl This can save reloc entries and improve shlib sharing as well as
dnl application startup times
-define(`PROTECT', `.protected $1')
+define(`PROTECT', `.hidden $1')
dnl Usage: x86_lookup(target, key,value, key,value, ...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/mpz/powm_ui.c new/gmp-5.1.2/mpz/powm_ui.c
--- old/gmp-5.1.1/mpz/powm_ui.c 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/mpz/powm_ui.c 2013-05-20 16:59:58.000000000 +0200
@@ -2,8 +2,8 @@
Contributed to the GNU project by Torbjorn Granlund.
-Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008,
-2009, 2011, 2012 Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, 2009,
+2011, 2012, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -70,9 +70,14 @@
}
else
{
+ /* We need to allocate separate remainder area, since mpn_mu_div_qr does
+ not handle overlap between the numerator and remainder areas.
+ FIXME: Make it handle such overlap. */
+ mp_ptr rp = TMP_ALLOC_LIMBS (dn);
mp_size_t itch = mpn_mu_div_qr_itch (nn, dn, 0);
mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
- mpn_mu_div_qr (qp, np, np, nn, dp, dn, scratch);
+ mpn_mu_div_qr (qp, rp, np, nn, dp, dn, scratch);
+ MPN_COPY (np, rp, dn);
}
TMP_FREE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/Makefile.am new/gmp-5.1.2/tests/Makefile.am
--- old/gmp-5.1.1/tests/Makefile.am 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/tests/Makefile.am 2013-05-20 16:59:58.000000000 +0200
@@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
-# Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright 2000, 2001, 2002, 2003, 2004, 2013 Free Software Foundation, Inc.
#
# This file is part of the GNU MP Library test suite.
#
@@ -27,7 +27,8 @@
check_LTLIBRARIES = libtests.la
-EXTRA_libtests_la_SOURCES = amd64call.asm amd64check.c x86call.asm x86check.c
+EXTRA_libtests_la_SOURCES = amd64call.asm amd64check.c x86call.asm x86check.c \
+ arm32call.asm arm32check.c
libtests_la_SOURCES = tests.h \
memory.c misc.c refmpf.c refmpn.c refmpq.c refmpz.c spinner.c trace.c
libtests_la_DEPENDENCIES = @CALLING_CONVENTIONS_OBJS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/arm32call.asm new/gmp-5.1.2/tests/arm32call.asm
--- old/gmp-5.1.1/tests/arm32call.asm 1970-01-01 01:00:00.000000000 +0100
+++ new/gmp-5.1.2/tests/arm32call.asm 2013-05-20 16:59:58.000000000 +0200
@@ -0,0 +1,83 @@
+dnl ARM32 calling conventions checking.
+
+dnl Copyright 2000, 2003, 2004, 2006, 2007, 2010, 2013 Free Software
+dnl Foundation, Inc.
+
+dnl This file is part of the GNU MP Library test suite.
+
+dnl The GNU MP Library test suite is free software; you can redistribute it
+dnl and/or modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 3 of the
+dnl License, or (at your option) any later version.
+
+dnl The GNU MP Library test suite is distributed in the hope that it will be
+dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+dnl Public License for more details.
+
+dnl You should have received a copy of the GNU General Public License along
+dnl with the GNU MP Library test suite. If not, see
+dnl http://www.gnu.org/licenses/.
+
+
+dnl The current version of the code attempts to keep the call/return
+dnl prediction stack valid, but matching calls and returns.
+
+include(`../config.m4')
+
+
+C int calling_conventions (...);
+C
+C The global variable "calling_conventions_function" is the function to
+C call, with the arguments as passed here.
+
+define(`WANT_CALLEE_SAVES', eval(4*0))
+define(`SAVE_CALLEE_SAVES', eval(4*8))
+define(`RETADDR', eval(4*16))
+define(`GOT_CALLEE_SAVES', eval(4*17))
+define(`JUNK_PARAMS', eval(4*25))
+
+ TEXT
+ ALIGN(32)
+PROLOGUE(calling_conventions)
+ LEA( r12, calling_conventions_values)
+
+ C Preserve callee-saves registers, including the link register r14
+ add r12, r12, #SAVE_CALLEE_SAVES
+ stm r12, {r4-r11,r14}
+ sub r12, r12, #SAVE_CALLEE_SAVES
+
+ C Put chosen junk into callee-saves registers
+ add r12, r12, #WANT_CALLEE_SAVES
+ ldm r12, {r4-r11}
+ sub r12, r12, #WANT_CALLEE_SAVES
+
+ C No callee-saves registers on arm except r12 and parameter registers
+ C
+
+ C Make the actual call
+ LEA( r12, calling_conventions_function)
+ ldr r12, [r12]
+ mov r14, pc
+ bx r12
+
+ LEA( r12, calling_conventions_values)
+
+ C Save callee-saves registers after call
+ add r12, r12, #GOT_CALLEE_SAVES
+ stm r12, {r4-r11}
+ sub r12, r12, #GOT_CALLEE_SAVES
+
+ C Restore callee-saves registers, including the link register r14
+ add r12, r12, #SAVE_CALLEE_SAVES
+ ldm r12, {r4-r11,r14}
+ sub r12, r12, #SAVE_CALLEE_SAVES
+
+ C Overwrite parameter registers. Note that we overwrite r1, which
+ C could hold one half of a 64-bit return value, since we don't use that
+ C in GMP.
+ add r12, r12, #JUNK_PARAMS
+ ldm r12, {r1-r3}
+
+ bx r14
+EPILOGUE()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/arm32check.c new/gmp-5.1.2/tests/arm32check.c
--- old/gmp-5.1.1/tests/arm32check.c 1970-01-01 01:00:00.000000000 +0100
+++ new/gmp-5.1.2/tests/arm32check.c 2013-05-20 16:59:58.000000000 +0200
@@ -0,0 +1,96 @@
+/* ARM32 calling conventions checking.
+
+Copyright 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library test suite.
+
+The GNU MP Library test suite is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 3 of the License,
+or (at your option) any later version.
+
+The GNU MP Library test suite is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+the GNU MP Library test suite. If not, see http://www.gnu.org/licenses/. */
+
+#include
+#include "gmp.h"
+#include "gmp-impl.h"
+#include "tests.h"
+
+
+/* Vector if constants and register values. */
+mp_limb_t calling_conventions_values[29] =
+{
+ 0x12345678, /* 0 want_r4 */
+ 0x87654321, /* 1 want_r5 */
+ 0x89ABCDEF, /* 2 want_r6 */
+ 0xFEDCBA98, /* 3 want_r7 */
+ 0xDEADBEEF, /* 4 want_r8 */
+ 0xBADECAFE, /* 5 want_r9 */
+ 0xFFEEDDCC, /* 6 want_r10 */
+ 0xBBAA9988, /* 7 want_r11 */
+
+ 0x00000000, /* 8 save_r4 */
+ 0x00000000, /* 9 save_r5 */
+ 0x00000000, /* 10 save_r6 */
+ 0x00000000, /* 11 save_r7 */
+ 0x00000000, /* 12 save_r8 */
+ 0x00000000, /* 13 save_r9 */
+ 0x00000000, /* 14 save_r10 */
+ 0x00000000, /* 15 save_r11 */
+ 0x00000000, /* 16 save_r14 */
+
+ 0x00000000, /* 17 got_r4 */
+ 0x00000000, /* 18 got_r5 */
+ 0x00000000, /* 19 got_r6 */
+ 0x00000000, /* 20 got_r7 */
+ 0x00000000, /* 21 got_r8 */
+ 0x00000000, /* 22 got_r9 */
+ 0x00000000, /* 23 got_r10 */
+ 0x00000000, /* 24 got_r11 */
+
+ 0x00112233, /* 25 junk_r0 */
+ 0x44556677, /* 26 junk_r1 */
+ 0x12344321, /* 27 junk_r2 */
+ 0x56788765, /* 28 junk_r3 */
+};
+
+/* Index starts for various regions in above vector. */
+#define WANT_CALLEE_SAVES 0
+#define SAVE_CALLEE_SAVES 8
+#define RETADDR 16
+#define GOT_CALLEE_SAVES 17
+#define JUNK_PARAMS 25
+
+/* Return 1 if ok, 0 if not */
+
+int
+calling_conventions_check (void)
+{
+ const char *header = "Violated calling conventions:\n";
+ int ret = 1;
+ int i;
+
+#define CHECK(callreg, regnum, value) \
+ if (callreg != value) \
+ { \
+ printf ("%s r%d got 0x%08lX want 0x%08lX\n", \
+ header, regnum, callreg, value); \
+ header = ""; \
+ ret = 0; \
+ }
+
+ for (i = 0; i < 8; i++)
+ {
+ CHECK (calling_conventions_values[GOT_CALLEE_SAVES + i],
+ i + 4,
+ calling_conventions_values[WANT_CALLEE_SAVES + i]);
+ }
+
+ return ret;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/cxx/Makefile.am new/gmp-5.1.2/tests/cxx/Makefile.am
--- old/gmp-5.1.1/tests/cxx/Makefile.am 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/tests/cxx/Makefile.am 2013-05-20 16:59:58.000000000 +0200
@@ -22,18 +22,22 @@
# 3.2 on itanium2-hp-hpux11.22. Without this option, the libgmp.sl.6
# required by libgmpxx.sl (ie. in its NEEDED records) is not found by the
# linker. FIXME: Presumably libtool should do something about this itself.
+# -lm is needed for t-ops2 which compares the results of trunc and mpf_trunc.
#
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests
LDADD = -L$(top_builddir)/.libs \
$(top_builddir)/tests/libtests.la \
$(top_builddir)/libgmpxx.la \
- $(top_builddir)/libgmp.la
+ $(top_builddir)/libgmp.la \
+ -lm
if WANT_CXX
-check_PROGRAMS = t-assign t-binary t-cast t-constr t-cxx11 \
+check_PROGRAMS = t-binary t-cast t-cxx11 \
t-headers t-iostream t-istream t-locale t-misc t-mix \
t-ops t-ops2 t-ops3 t-ostream t-prec \
- t-rand t-ternary t-unary
+ t-ternary t-unary \
+ t-do-exceptions-work-at-all-with-this-compiler \
+ t-assign t-constr t-rand
TESTS = $(check_PROGRAMS)
endif
@@ -56,6 +60,8 @@
t_rand_SOURCES = t-rand.cc
t_ternary_SOURCES = t-ternary.cc
t_unary_SOURCES = t-unary.cc
+t_do_exceptions_work_at_all_with_this_compiler_SOURCES = \
+ t-do-exceptions-work-at-all-with-this-compiler.cc
$(top_builddir)/tests/libtests.la:
cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc new/gmp-5.1.2/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc
--- old/gmp-5.1.1/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/gmp-5.1.2/tests/cxx/t-do-exceptions-work-at-all-with-this-compiler.cc 2013-05-20 16:59:58.000000000 +0200
@@ -0,0 +1,38 @@
+/* Test if the compiler has working try / throw / catch.
+
+Copyright 2013 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library test suite.
+
+The GNU MP Library test suite is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 3 of the License,
+or (at your option) any later version.
+
+The GNU MP Library test suite is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+the GNU MP Library test suite. If not, see http://www.gnu.org/licenses/. */
+
+#include <stdexcept>
+
+inline void
+throw_expr ()
+{
+ throw std::invalid_argument ("Test");
+}
+
+using namespace std;
+
+int
+main ()
+{
+ try
+ {
+ throw_expr();
+ }
+ catch (invalid_argument) { }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/cxx/t-ops2.cc new/gmp-5.1.2/tests/cxx/t-ops2.cc
--- old/gmp-5.1.1/tests/cxx/t-ops2.cc 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/tests/cxx/t-ops2.cc 2013-05-20 16:59:58.000000000 +0200
@@ -19,16 +19,13 @@
#include "config.h"
-#include <iostream>
-#include <cmath>
+#include
#include "gmp.h"
#include "gmpxx.h"
#include "gmp-impl.h"
#include "tests.h"
-using namespace std;
-
#define CHECK1(Type,a,fun) \
ASSERT_ALWAYS(fun((Type)(a))==fun(a))
@@ -184,6 +181,8 @@
ASSERT_ALWAYS(sqrt(mpf_class(7))>2.64);
ASSERT_ALWAYS(sqrt(mpf_class(7))<2.65);
ASSERT_ALWAYS(sqrt(mpf_class(0))==0);
+ // TODO: add some consistency checks, as described in
+ // http://gmplib.org/list-archives/gmp-bugs/2013-February/002940.html
CHECK1(mpf_class,1.9,trunc);
CHECK1(mpf_class,1.9,floor);
CHECK1(mpf_class,1.9,ceil);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/misc.c new/gmp-5.1.2/tests/misc.c
--- old/gmp-5.1.1/tests/misc.c 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/tests/misc.c 2013-05-20 16:59:58.000000000 +0200
@@ -1,6 +1,6 @@
/* Miscellaneous test program support routines.
-Copyright 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002, 2003, 2005, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library test suite.
@@ -465,7 +465,7 @@
int
tests_hardware_setround (int mode)
{
-#if HAVE_HOST_CPU_FAMILY_x86
+#if WANT_ASSEMBLY && HAVE_HOST_CPU_FAMILY_x86
int rc;
switch (mode) {
case 0: rc = 0; break; /* nearest */
@@ -486,7 +486,7 @@
int
tests_hardware_getround (void)
{
-#if HAVE_HOST_CPU_FAMILY_x86
+#if WANT_ASSEMBLY && HAVE_HOST_CPU_FAMILY_x86
switch ((x86_fstcw () & ~0xC00) >> 10) {
case 0: return 0; break; /* nearest */
case 1: return 3; break; /* down */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/mpq/t-get_d.c new/gmp-5.1.2/tests/mpq/t-get_d.c
--- old/gmp-5.1.1/tests/mpq/t-get_d.c 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/tests/mpq/t-get_d.c 2013-05-20 16:59:58.000000000 +0200
@@ -1,7 +1,7 @@
/* Test mpq_get_d and mpq_set_d
-Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2002, 2003, 2012 Free Software
-Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2002, 2003, 2012, 2013 Free
+Software Foundation, Inc.
This file is part of the GNU MP Library test suite.
@@ -163,37 +163,53 @@
void
check_random (int argc, char **argv)
{
- double d, d2, nd, dd;
+ gmp_randstate_ptr rands = RANDS;
+
+ double d;
mpq_t q;
- mp_limb_t rp[LIMBS_PER_DOUBLE + 1];
+ mpz_t a, t;
+ int exp;
+
int test, reps = 100000;
- int i;
if (argc == 2)
reps = 100 * atoi (argv[1]);
mpq_init (q);
+ mpz_init (a);
+ mpz_init (t);
for (test = 0; test < reps; test++)
{
- mpn_random2 (rp, LIMBS_PER_DOUBLE + 1);
- d = 0.0;
- for (i = LIMBS_PER_DOUBLE - 1; i >= 0; i--)
- d = d * MP_BASE_AS_DOUBLE + rp[i];
- d = my_ldexp (d, (int) (rp[LIMBS_PER_DOUBLE] % (2 * MAXEXP)) - MAXEXP);
+ mpz_rrandomb (a, rands, 53);
+ mpz_urandomb (t, rands, 32);
+ exp = mpz_get_ui (t) % (2*MAXEXP) - MAXEXP;
+
+ d = my_ldexp (mpz_get_d (a), exp);
mpq_set_d (q, d);
- nd = mpz_get_d (mpq_numref (q));
- dd = mpz_get_d (mpq_denref (q));
- d2 = nd / dd;
- if (d != d2)
+ /* Check that n/d = a * 2^exp, or
+ d*a 2^{exp} = n */
+ mpz_mul (t, a, mpq_denref (q));
+ if (exp > 0)
+ mpz_mul_2exp (t, t, exp);
+ else
+ {
+ if (!mpz_divisible_2exp_p (t, -exp))
+ goto fail;
+ mpz_div_2exp (t, t, -exp);
+ }
+ if (mpz_cmp (t, mpq_numref (q)) != 0)
{
+ fail:
printf ("ERROR (check_random test %d): bad mpq_set_d results\n", test);
printf ("%.16g\n", d);
- printf ("%.16g\n", d2);
+ gmp_printf ("%Qd\n", q);
abort ();
}
}
mpq_clear (q);
+ mpz_clear (t);
+ mpz_clear (a);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gmp-5.1.1/tests/mpz/t-powm_ui.c new/gmp-5.1.2/tests/mpz/t-powm_ui.c
--- old/gmp-5.1.1/tests/mpz/t-powm_ui.c 2013-02-11 16:29:14.000000000 +0100
+++ new/gmp-5.1.2/tests/mpz/t-powm_ui.c 2013-05-20 16:59:58.000000000 +0200
@@ -1,6 +1,6 @@
/* Test mpz_powm_ui, mpz_mul, mpz_mod.
-Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002 Free Software
+Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2013 Free Software
Foundation, Inc.
This file is part of the GNU MP Library test suite.
@@ -25,7 +25,6 @@
#include "gmp-impl.h"
#include "tests.h"
-void dump_abort (mpz_t, mpz_t);
void debug_mp (mpz_t, int);
int
@@ -36,7 +35,7 @@
mp_size_t base_size, exp_size, mod_size;
unsigned long int exp2;
int i;
- int reps = 1000;
+ int reps = 100;
gmp_randstate_ptr rands;
mpz_t bs;
unsigned long bsi, size_range;
@@ -59,7 +58,7 @@
for (i = 0; i < reps; i++)
{
mpz_urandomb (bs, rands, 32);
- size_range = mpz_get_ui (bs) % 13 + 2;
+ size_range = mpz_get_ui (bs) % 18 + 2;
do /* Loop until mathematically well-defined. */
{
@@ -146,15 +145,6 @@
}
void
-dump_abort (mpz_t dividend, mpz_t divisor)
-{
- fprintf (stderr, "ERROR\n");
- fprintf (stderr, "dividend = "); debug_mp (dividend, -16);
- fprintf (stderr, "divisor = "); debug_mp (divisor, -16);
- abort();
-}
-
-void
debug_mp (mpz_t x, int base)
{
mpz_out_str (stderr, base, x); fputc ('\n', stderr);
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org