summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/gmp/ChangeLog4
-rwxr-xr-xBuild/source/libs/gmp/configure22
-rw-r--r--Build/source/libs/gmp/gmp-PATCHES/ChangeLog4
-rw-r--r--Build/source/libs/gmp/gmp-PATCHES/TL-Changes2
-rw-r--r--Build/source/libs/gmp/gmp-src/ChangeLog99
-rw-r--r--Build/source/libs/gmp/gmp-src/Makefile.am7
-rw-r--r--Build/source/libs/gmp/gmp-src/NEWS13
-rw-r--r--Build/source/libs/gmp/gmp-src/acinclude.m46
-rw-r--r--Build/source/libs/gmp/gmp-src/config.in6
-rwxr-xr-xBuild/source/libs/gmp/gmp-src/configgmp.guess57
-rwxr-xr-xBuild/source/libs/gmp/gmp-src/configgmp.sub2
-rw-r--r--Build/source/libs/gmp/gmp-src/configure.ac39
-rw-r--r--Build/source/libs/gmp/gmp-src/gmp-h.in4
-rw-r--r--Build/source/libs/gmp/gmp-src/gmp-impl.h8
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/aorslsh1_n.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/arm-defs.m43
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/bdiv_dbm1c.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/cnd_aors_n.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/com.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/copyd.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/copyi.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/dive_1.asm4
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/invert_limb.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/logops_n.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/lshift.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/lshiftc.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/mod_34lsub1.asm4
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/mode1o.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/rsh1aors_n.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/rshift.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/sec_tabselect.asm4
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/arm/udiv.asm2
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/generic/trialdiv.c4
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/x86_64/coreibwl/mul_basecase.asm4
-rw-r--r--Build/source/libs/gmp/gmp-src/mpn/x86_64/fat/fat.c58
-rw-r--r--Build/source/libs/gmp/gmp-src/printf/doprnt.c6
-rwxr-xr-xBuild/source/libs/gmp/native/configure20
-rw-r--r--Build/source/libs/gmp/version.ac2
39 files changed, 299 insertions, 113 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index b955ebd5c0b..62afc1eb826 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -18,7 +18,7 @@ freetype2 2.6.3 - checked 12feb16
gd 2.1.1 - checked 14jan15
https://bitbucket.org/libgd/gd-libgd/downloads/
-gmp 6.1.0 - checked 28dec15
+gmp 6.1.1 - checked 19jun16
http://ftp.gnu.org/gnu/gmp/
graphite2 1.3.8 - checked 31mar16
diff --git a/Build/source/libs/gmp/ChangeLog b/Build/source/libs/gmp/ChangeLog
index 18252dcc023..99969c99fb4 100644
--- a/Build/source/libs/gmp/ChangeLog
+++ b/Build/source/libs/gmp/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import gmp-6.1.1.
+
2016-02-15 Karl Berry <karl@tug.org>
* gmp-PATCHES: rename from gmp-src-PATCHES.
diff --git a/Build/source/libs/gmp/configure b/Build/source/libs/gmp/configure
index 06504a8992d..d174848b641 100755
--- a/Build/source/libs/gmp/configure
+++ b/Build/source/libs/gmp/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gmp (TeX Live) 6.1.0.
+# Generated by GNU Autoconf 2.69 for gmp (TeX Live) 6.1.1.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gmp (TeX Live)'
PACKAGE_TARNAME='gmp--tex-live-'
-PACKAGE_VERSION='6.1.0'
-PACKAGE_STRING='gmp (TeX Live) 6.1.0'
+PACKAGE_VERSION='6.1.1'
+PACKAGE_STRING='gmp (TeX Live) 6.1.1'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1294,7 +1294,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures gmp (TeX Live) 6.1.0 to adapt to many kinds of systems.
+\`configure' configures gmp (TeX Live) 6.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1364,7 +1364,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gmp (TeX Live) 6.1.0:";;
+ short | recursive ) echo "Configuration of gmp (TeX Live) 6.1.1:";;
esac
cat <<\_ACEOF
@@ -1461,7 +1461,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gmp (TeX Live) configure 6.1.0
+gmp (TeX Live) configure 6.1.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1976,7 +1976,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by gmp (TeX Live) $as_me 6.1.0, which was
+It was created by gmp (TeX Live) $as_me 6.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3899,7 +3899,7 @@ fi
# Define the identity of the package.
PACKAGE='gmp--tex-live-'
- VERSION='6.1.0'
+ VERSION='6.1.1'
cat >>confdefs.h <<_ACEOF
@@ -6148,7 +6148,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "gmp-tmp.h"
-#include "$srcdir/gmp-6.1.0/gmp-impl.h"
+#include "$srcdir/gmp-6.1.1/gmp-impl.h"
int
main ()
{
@@ -7002,7 +7002,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by gmp (TeX Live) $as_me 6.1.0, which was
+This file was extended by gmp (TeX Live) $as_me 6.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7068,7 +7068,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-gmp (TeX Live) config.status 6.1.0
+gmp (TeX Live) config.status 6.1.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/gmp/gmp-PATCHES/ChangeLog b/Build/source/libs/gmp/gmp-PATCHES/ChangeLog
index 12e4e93b696..cc5c4ac277f 100644
--- a/Build/source/libs/gmp/gmp-PATCHES/ChangeLog
+++ b/Build/source/libs/gmp/gmp-PATCHES/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * Import 6.1.1.
+
2015-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* patch-01-const: Removed, since it is applied in 6.1.0.
diff --git a/Build/source/libs/gmp/gmp-PATCHES/TL-Changes b/Build/source/libs/gmp/gmp-PATCHES/TL-Changes
index 5b403d1df85..63b34ce4871 100644
--- a/Build/source/libs/gmp/gmp-PATCHES/TL-Changes
+++ b/Build/source/libs/gmp/gmp-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the gmp-6.1.0/ tree as obtained from:
+Changes applied to the gmp-6.1.1/ tree as obtained from:
http://ftp.gnu.org/gnu/gmp/
Removed:
diff --git a/Build/source/libs/gmp/gmp-src/ChangeLog b/Build/source/libs/gmp/gmp-src/ChangeLog
index 879b3106a34..3ffe795396a 100644
--- a/Build/source/libs/gmp/gmp-src/ChangeLog
+++ b/Build/source/libs/gmp/gmp-src/ChangeLog
@@ -1,3 +1,80 @@
+2016-06-18 Torbjörn Granlund <tg@gmplib.org>
+
+ * Version 6.1.1 released.
+
+2015-03-20 Marc Glisse <marc.glisse@inria.fr>
+
+ * configure.ac (WANT_ASSEMBLY): Remove.
+ (NO_ASM): Remove from CFLAGS, add to AC_DEFINE.
+ * tests/misc.c: Test NO_ASM instead of WANT_ASSEMBLY.
+
+2016-02-25 Pavel Kopyl <p.kopyl@samsung.com>
+
+ * acinclude.m4 (GMP_ASM_UNDERSCORE): Tighten gurkmacka detection.
+
+2016-01-04 Marco Bodrato <bodrato@mail.dm.unipi.it>
+
+ * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*): Bump version info.
+ * gmp-h.in: Bump version.
+
+2016-01-01 Marco Bodrato <bodrato@mail.dm.unipi.it>
+
+ * tests/cxx/clocale.c: Do not re-define localeconv for mingw.
+ * tests/misc/t-locale.c: Likewise (Thanks Alexander).
+
+2015-12-26 Torbjörn Granlund <torbjorng@google.com>
+
+ * tests/misc.c (tests_start): Assert library version.
+
+2015-12-19 Marc Glisse <marc.glisse@inria.fr>
+
+ * gmp-impl.h (fft_table_nk): Use gmp_uint_least32_t.
+ * mpn/generic/trialdiv.c (gmp_primes_ptab): Likewise.
+
+2015-12-14 Torbjörn Granlund <torbjorng@google.com>
+
+ * mpn/x86_64/fat/fat.c (gmp_workaround_skylake_cpuid_bug):
+ New function.
+ (__gmpn_cpuvec_init): Handle more BMI2 crippled CPUs.
+
+2015-12-13 Marco Bodrato <bodrato@mail.dm.unipi.it>
+
+ * tests/arm32call.asm: bx->ret to support thumb-less chips
+ (thanks Martin Husemann).
+
+2015-12-13 Torbjörn Granlund <torbjorng@google.com>
+
+ * config.sub: Fix spelling of kabylake.
+ * acinclude.m4: Likewise.
+ * mpn/x86_64/fat/fat.c: Likewise.
+
+2015-12-10 Marco Bodrato <bodrato@mail.dm.unipi.it>
+
+ * tests/misc/t-printf.c: Test a sequence of '%'.
+ * printf/doprnt.c: Avoid buffer overread with long long limbs.
+
+2015-12-06 Torbjörn Granlund <torbjorng@google.com>
+
+ * configure.ac (arm*): Conditionally define NOTHUMB.
+ Simplify and generalise.
+ * mpn/arm/arm-defs.m4 (ret): New macro, conditional on NOTHUMB.
+ * mpn/arm/*.asm: Use ret.
+
+2015-12-03 Torbjörn Granlund <torbjorng@google.com>
+
+ * config.guess: Work around skylake cpuid bug.
+ Fix spelling of kabylake.
+
+2015-12-01 Torbjörn Granlund <torbjorng@google.com>
+
+ * mpn/x86_64/coreibwl/mul_basecase.asm: Add FUNC_EXITs.
+
+2015-11-21 Marco Bodrato <bodrato@mail.dm.unipi.it>
+
+ * gmp-impl.h (MPN_TOOM22_MUL_MINSIZE): Consider ToomX2 limits
+ (thanks Paul).
+ * tests/mpn/t-toom22.c: Keep on testing small sizes.
+
2015-11-01 Marco Bodrato <bodrato@mail.dm.unipi.it>
* Version 6.1.0 released.
@@ -673,7 +750,7 @@
* tune/tune-gcd-p.c: Add casts for C++ compatibility.
- * tune/tuneup.c: Add casts for C++ compatibility.
+ * tune/tuneup.c: Add casts for C++ compatibility.
(mpn_divrem_1_tune, mpn_mod_1_tune): Mark as extern "C".
(INSERT_FFTTAB): Produce sentinels differently to silence compiler.
@@ -701,12 +778,12 @@
* mpn/powerpc32/addmul_1.asm: Avoid negative stack pointer references.
* mpn/powerpc32/lshift.asm: Likewise.
- * mpn/powerpc32/lshiftc.asm: Likewise.
- * mpn/powerpc32/p3-p7/aors_n.asm: Likewise.
- * mpn/powerpc32/rshift.asm: Likewise.
- * mpn/powerpc32/sec_tabselect.asm: Likewise.
- * mpn/powerpc32/submul_1.asm: Likewise.
- * mpn/powerpc32/vmx/mod_34lsub1.asm: Likewise.
+ * mpn/powerpc32/lshiftc.asm: Likewise.
+ * mpn/powerpc32/p3-p7/aors_n.asm: Likewise.
+ * mpn/powerpc32/rshift.asm: Likewise.
+ * mpn/powerpc32/sec_tabselect.asm: Likewise.
+ * mpn/powerpc32/submul_1.asm: Likewise.
+ * mpn/powerpc32/vmx/mod_34lsub1.asm: Likewise.
2014-10-13 Torbjörn Granlund <torbjorng@google.com>
@@ -2033,8 +2110,8 @@
* mpn/powerpc64/mode64/divrem_1.asm: Remove explicit nop after CALL.
* mpn/powerpc64/mode64/divrem_2.asm: Likewise.
- * mpn/powerpc64/mode64/mod_1_1.asm: Likewise.
- * mpn/powerpc64/mode64/mod_1_4.asm: Likewise.
+ * mpn/powerpc64/mode64/mod_1_1.asm: Likewise.
+ * mpn/powerpc64/mode64/mod_1_4.asm: Likewise.
2013-07-13 Torbjorn Granlund <tege@gmplib.org>
@@ -2429,7 +2506,7 @@
* mpn/arm/dive_1.asm: New file.
* mpn/arm/v6/dive_1.asm: New file.
- * mpn/arm/v6t2/mode1o.asm: Make trivial change to avoid v6t2...
+ * mpn/arm/v6t2/mode1o.asm: Make trivial change to avoid v6t2...
* mpn/arm/v6/mode1o.asm: ...instruction, move file accordingly.
* mpn/powerpc64/mode64/invert_limb.asm: Put all multiplies low-limb first.
@@ -4777,7 +4854,7 @@
Reintroduce previously removed RP argument.
* mpn/x86_64/redc_1.asm: Likewise.
- * mpn/generic/redc_2.c: Remove mpn_sub_n call, return carry from
+ * mpn/generic/redc_2.c: Remove mpn_sub_n call, return carry from
mpn_add_n call.
* gmp-impl.h (mpn_redc_1, mpn_redc_2): Now return an mp_limb_t.
diff --git a/Build/source/libs/gmp/gmp-src/Makefile.am b/Build/source/libs/gmp/gmp-src/Makefile.am
index 453c6097a8b..4d26b8b573b 100644
--- a/Build/source/libs/gmp/gmp-src/Makefile.am
+++ b/Build/source/libs/gmp/gmp-src/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to generate Makefile.in
-# Copyright 1991, 1993, 1994, 1996, 1997, 1999-2004, 2006-2009, 2011-2015 Free
+# Copyright 1991, 1993, 1994, 1996, 1997, 1999-2004, 2006-2009, 2011-2016 Free
# Software Foundation, Inc.
#
# This file is part of the GNU MP Library.
@@ -87,6 +87,7 @@
# 5.1.2 11:2:1 7:2:3 -
# 6.0.0 12:0:2 8:0:4 -
# 6.1.0 13:0:3 9:0:5 -
+# 6.1.1 13:1:3 9:1:5 -
#
# 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
@@ -100,11 +101,11 @@
# libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from.
LIBGMP_LT_CURRENT = 13
-LIBGMP_LT_REVISION = 0
+LIBGMP_LT_REVISION = 1
LIBGMP_LT_AGE = 3
LIBGMPXX_LT_CURRENT = 9
-LIBGMPXX_LT_REVISION = 0
+LIBGMPXX_LT_REVISION = 1
LIBGMPXX_LT_AGE = 5
diff --git a/Build/source/libs/gmp/gmp-src/NEWS b/Build/source/libs/gmp/gmp-src/NEWS
index 111acb70fb2..ffa7083260f 100644
--- a/Build/source/libs/gmp/gmp-src/NEWS
+++ b/Build/source/libs/gmp/gmp-src/NEWS
@@ -1,9 +1,20 @@
-Copyright 1996, 1999-2015 Free Software Foundation, Inc.
+Copyright 1996, 1999-2016 Free Software Foundation, Inc.
Verbatim copying and distribution of this entire article is permitted in any
medium, provided this notice is preserved.
+Changes between GMP version 6.1.0 and 6.1.1
+
+ BUGS FIXED
+ * Make Intel Broadwell configurations work on Windows.
+
+ FEATURES
+ * Work around faulty cpuid on some recent Intel chips (this allows GMP to run
+ on Skylake Pentiums).
+
+ * Support thumb-less ARM chips.
+
Changes between GMP version 6.0.* and 6.1.0
BUGS FIXED
diff --git a/Build/source/libs/gmp/gmp-src/acinclude.m4 b/Build/source/libs/gmp/gmp-src/acinclude.m4
index f6e8940ac00..bcc6f524cd8 100644
--- a/Build/source/libs/gmp/gmp-src/acinclude.m4
+++ b/Build/source/libs/gmp/gmp-src/acinclude.m4
@@ -63,7 +63,7 @@ define(X86_PATTERN,
[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
define(X86_64_PATTERN,
-[[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | cabylake*-*-*]])
+[[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*]])
dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
dnl ---------------------------------
@@ -1754,9 +1754,9 @@ EOF
gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&AC_FD_CC"
if AC_TRY_EVAL(gmp_compile); then
$NM conftest.$OBJEXT >conftest.out
- if grep _gurkmacka conftest.out >/dev/null; then
+ if grep "[[ ]]_gurkmacka" conftest.out >/dev/null; then
gmp_cv_asm_underscore=yes
- elif grep gurkmacka conftest.out >/dev/null; then
+ elif grep "[[ ]]gurkmacka" conftest.out >/dev/null; then
gmp_cv_asm_underscore=no
else
echo "configure: $NM doesn't have gurkmacka:" >&AC_FD_CC
diff --git a/Build/source/libs/gmp/gmp-src/config.in b/Build/source/libs/gmp/gmp-src/config.in
index 34d65a2cdaa..448bc6fa1b9 100644
--- a/Build/source/libs/gmp/gmp-src/config.in
+++ b/Build/source/libs/gmp/gmp-src/config.in
@@ -511,6 +511,9 @@ see https://www.gnu.org/licenses/.
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
+/* Define to 1 to disable the use of inline assembly */
+#undef NO_ASM
+
/* Name of package */
#undef PACKAGE
@@ -565,9 +568,6 @@ see https://www.gnu.org/licenses/.
/* 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 --git a/Build/source/libs/gmp/gmp-src/configgmp.guess b/Build/source/libs/gmp/gmp-src/configgmp.guess
index b9d0c5894d5..744e11e4947 100755
--- a/Build/source/libs/gmp/gmp-src/configgmp.guess
+++ b/Build/source/libs/gmp/gmp-src/configgmp.guess
@@ -762,6 +762,48 @@ i?86-*-* | amd64-*-* | x86_64-*-*)
extern "C"
#endif
unsigned int cpuid (int, char *, char *, int);
+
+int
+gmp_workaround_skylake_cpuid_bug ()
+{
+ char feature_string[49];
+ char processor_name_string[49];
+ static const char *bad_cpus[] = {" G44", " G45", " G39" /* , "6600" */ };
+ int i;
+
+ /* Example strings: */
+ /* "Intel(R) Pentium(R) CPU G4400 @ 3.30GHz" */
+ /* "Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz" */
+ /* ^ ^ ^ */
+ /* 0x80000002 0x80000003 0x80000004 */
+ /* We match out just the 0x80000003 part here. */
+
+ /* In their infinitive wisdom, Intel decided to use one register order for
+ the vendor string, and another for the processor name string. We shuffle
+ things about here, rather than write a new variant of our assembly cpuid.
+ */
+
+ unsigned int eax, ebx, ecx, edx;
+ eax = CPUID (feature_string, 0x80000003);
+ ebx = ((unsigned int *)feature_string)[0];
+ edx = ((unsigned int *)feature_string)[1];
+ ecx = ((unsigned int *)feature_string)[2];
+
+ ((unsigned int *) (processor_name_string))[0] = eax;
+ ((unsigned int *) (processor_name_string))[1] = ebx;
+ ((unsigned int *) (processor_name_string))[2] = ecx;
+ ((unsigned int *) (processor_name_string))[3] = edx;
+
+ processor_name_string[16] = 0;
+
+ for (i = 0; i < sizeof (bad_cpus) / sizeof (char *); i++)
+ {
+ if (strstr (processor_name_string, bad_cpus[i]) != 0)
+ return 1;
+ }
+ return 0;
+}
+
int
main ()
{
@@ -839,16 +881,19 @@ main ()
else if (model == 0x5c) cpu_64bit = 1, modelstr = "goldmont"; /* Goldmont */
else if (model == 0x5e) cpu_64bit = 1, cpu_avx=1, modelstr = "skylake"; /* Skylake */
else if (model == 0x5f) cpu_64bit = 1, modelstr = "goldmont"; /* Goldmont */
- else if (model == 0x8e) cpu_64bit = 1, cpu_avx=1, modelstr = "cabylake"; /* Capylake Y/U */
- else if (model == 0x9e) cpu_64bit = 1, cpu_avx=1, modelstr = "cabylake"; /* Capylake desktop */
+ else if (model == 0x8e) cpu_64bit = 1, cpu_avx=1, modelstr = "kabylake"; /* Kabylake Y/U */
+ else if (model == 0x9e) cpu_64bit = 1, cpu_avx=1, modelstr = "kabylake"; /* Kabylake desktop */
else cpu_64bit = 1, modelstr = "nehalem"; /* default */
- if (strcmp (modelstr, "haswell") == 0)
+ if (strcmp (modelstr, "haswell") == 0 ||
+ strcmp (modelstr, "broadwell") == 0 ||
+ strcmp (modelstr, "skylake") == 0)
{
- /* Some Haswells lack BMI2. Let them appear as Sandybridges for
- now. */
+ /* Some haswell, broadwell, skylake lack BMI2. Let them appear
+ as sandybridge for now. */
CPUID (feature_string, 7);
- if ((feature_string[0 + 8 / 8] & (1 << (8 % 8))) == 0)
+ if ((feature_string[0 + 8 / 8] & (1 << (8 % 8))) == 0
+ || gmp_workaround_skylake_cpuid_bug ())
modelstr = "sandybridge";
}
diff --git a/Build/source/libs/gmp/gmp-src/configgmp.sub b/Build/source/libs/gmp/gmp-src/configgmp.sub
index f248e717043..6b7d04b9bb2 100755
--- a/Build/source/libs/gmp/gmp-src/configgmp.sub
+++ b/Build/source/libs/gmp/gmp-src/configgmp.sub
@@ -102,7 +102,7 @@ itanium | itanium2)
test_cpu=ia64 ;;
pentium | pentiummmx | pentiumpro | pentium[234m] | k[567] | k6[23] | geode | athlon | viac3*)
test_cpu=i386 ;;
-athlon64 | atom | silvermont | goldmont | core2 | corei* | opteron | k[89] | k10 | bobcat | jaguar* | bulldozer* | piledriver* | steamroller* | excavator* | nano | nehalem* | westmere* | sandybridge* | ivybridge* | haswell* | broadwell* | skylake* | cabylake* | knightslanding)
+athlon64 | atom | silvermont | goldmont | core2 | corei* | opteron | k[89] | k10 | bobcat | jaguar* | bulldozer* | piledriver* | steamroller* | excavator* | nano | nehalem* | westmere* | sandybridge* | ivybridge* | haswell* | broadwell* | skylake* | kabylake* | knightslanding)
test_cpu=x86_64 ;;
power[2-9] | power2sc)
test_cpu=power ;;
diff --git a/Build/source/libs/gmp/gmp-src/configure.ac b/Build/source/libs/gmp/gmp-src/configure.ac
index 9cedfeb75c1..92b29fe2d55 100644
--- a/Build/source/libs/gmp/gmp-src/configure.ac
+++ b/Build/source/libs/gmp/gmp-src/configure.ac
@@ -142,11 +142,6 @@ yes|no) ;;
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]]),
@@ -625,35 +620,23 @@ case $host in
# either enforce them, or organise to strip paths as the corresponding
# options fail.
case $host_cpu in
- armv7*)
- path="arm/v6t2 arm/v6 arm/v5 arm"
- gcc_cflags_arch="-march=armv7-a"
- ;;
- armv6t2*)
- path="arm/v6t2 arm/v6 arm/v5 arm"
- gcc_cflags_arch="-march=armv6t2"
- ;;
- armv6*)
- path="arm/v6 arm/v5 arm"
- gcc_cflags_arch="-march=armv6"
- ;;
- armsa1 | arm9tdmi | armv4*)
+ armsa1 | arm7t* | arm9t* | armv4t*)
path="arm"
gcc_cflags_arch="-march=armv4"
;;
- armxscale | arm9te | arm10 | armv5*)
+ armxscale | arm7ej | arm9te | arm9e* | arm10* | armv5*)
path="arm/v5 arm"
gcc_cflags_arch="-march=armv5"
;;
- arm11mpcore | arm1136 | arm1176*)
- path="arm/v6 arm/v5 arm"
- gcc_cflags_arch="-march=armv6"
- ;;
- arm1156)
+ arm1156 | armv6t2*)
path="arm/v6t2 arm/v6 arm/v5 arm"
gcc_cflags_arch="-march=armv6t2"
;;
- armcortexa5)
+ arm11* | armv6*)
+ path="arm/v6 arm/v5 arm"
+ gcc_cflags_arch="-march=armv6"
+ ;;
+ armcortexa5 | armv7*)
path="arm/v6t2 arm/v6 arm/v5 arm"
gcc_cflags_arch="-march=armv7-a"
;;
@@ -703,6 +686,8 @@ case $host in
;;
*)
path="arm"
+ gcc_cflags_arch="-march=armv4"
+ GMP_DEFINE_RAW(["define(<NOTHUMB>,1)"])
;;
esac
;;
@@ -1800,7 +1785,7 @@ case $host in
path_64="x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64"
# extra_functions_64="missing" # enable for bmi2/adx simulation
;;
- skylake | skylakenoavx | cabylake | cabylakenoavx)
+ skylake | skylakenoavx | kabylake | kabylakenoavx)
gcc_cflags_cpu="-mtune=skylake -mtune=broadwell -mtune=corei7 -mtune=core2 -mtune=k8"
# Don't pass -march=skylake for now as then some compilers emit AVX512.
gcc_cflags_arch="-march=broadwell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
@@ -2470,7 +2455,7 @@ esac
if test "$enable_assembly" = "no"; then
path="generic"
- CFLAGS="$CFLAGS -DNO_ASM"
+ AC_DEFINE([NO_ASM],1,[Define to 1 to disable the use of inline assembly])
# for abi in $abilist; do
# eval unset "path_\$abi"
# eval gcc_${abi}_cflags=\"\$gcc_${abi}_cflags -DNO_ASM\"
diff --git a/Build/source/libs/gmp/gmp-src/gmp-h.in b/Build/source/libs/gmp/gmp-src/gmp-h.in
index 8329e78c15a..1c836e9d500 100644
--- a/Build/source/libs/gmp/gmp-src/gmp-h.in
+++ b/Build/source/libs/gmp/gmp-src/gmp-h.in
@@ -1,6 +1,6 @@
/* Definitions for GNU multiple precision functions. -*- mode: c -*-
-Copyright 1991, 1993-1997, 1999-2015 Free Software Foundation, Inc.
+Copyright 1991, 1993-1997, 1999-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -2326,7 +2326,7 @@ enum
/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */
#define __GNU_MP_VERSION 6
#define __GNU_MP_VERSION_MINOR 1
-#define __GNU_MP_VERSION_PATCHLEVEL 0
+#define __GNU_MP_VERSION_PATCHLEVEL 1
#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL)
#define __GMP_H__
diff --git a/Build/source/libs/gmp/gmp-src/gmp-impl.h b/Build/source/libs/gmp/gmp-src/gmp-impl.h
index 24214a60478..6987581049c 100644
--- a/Build/source/libs/gmp/gmp-src/gmp-impl.h
+++ b/Build/source/libs/gmp/gmp-src/gmp-impl.h
@@ -1273,7 +1273,9 @@ __GMP_DECLSPEC extern gmp_randstate_t __gmp_rands;
#endif
#define BELOW_THRESHOLD(size,thresh) (! ABOVE_THRESHOLD (size, thresh))
-#define MPN_TOOM22_MUL_MINSIZE 4
+/* The minimal supported value for Toom22 depends also on Toom32 and
+ Toom42 implementations. */
+#define MPN_TOOM22_MUL_MINSIZE 6
#define MPN_TOOM2_SQR_MINSIZE 4
#define MPN_TOOM33_MUL_MINSIZE 17
@@ -2293,8 +2295,8 @@ __GMP_DECLSPEC mp_limb_t gmp_primesieve (mp_ptr, mp_limb_t);
struct fft_table_nk
{
- unsigned int n:27;
- unsigned int k:5;
+ gmp_uint_least32_t n:27;
+ gmp_uint_least32_t k:5;
};
#ifndef FFT_TABLE_ATTRS
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/aorslsh1_n.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/aorslsh1_n.asm
index 1cbd4ba1af4..09b1662b708 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/aorslsh1_n.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/aorslsh1_n.asm
@@ -163,5 +163,5 @@ L(rt1): mov r14, r12
REVCY(r12)
L(rt0): RETVAL( r14)
pop {r4-r10r11, r14}
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/arm-defs.m4 b/Build/source/libs/gmp/gmp-src/mpn/arm/arm-defs.m4
index 6ca964a2459..371d8ea0f4d 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/arm-defs.m4
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/arm-defs.m4
@@ -84,6 +84,9 @@ L(ptr'lea_num`): .word GSYM_PREFIX`'$2')
')dnl
')
+define(`ret',`ifdef(`NOTHUMB',`mov pc, ',`bx')')
+
+
define(`EPILOGUE_cpu',
`lea_list
SIZE(`$1',.-`$1')')
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/bdiv_dbm1c.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/bdiv_dbm1c.asm
index ec3de50e8e2..48057559c9b 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/bdiv_dbm1c.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/bdiv_dbm1c.asm
@@ -109,5 +109,5 @@ L(wd1): subs r5, r5, r8
str r5, [qp]
sbc r0, r5, r12
pop {r4, r5, r6, r7, r8}
- bx lr
+ ret lr
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/cnd_aors_n.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/cnd_aors_n.asm
index e8eb60983af..f0399e29dab 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/cnd_aors_n.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/cnd_aors_n.asm
@@ -130,5 +130,5 @@ L(top): ldm vp!, {r4,r5,r6,r7}
L(end): RETVAL
pop {r4-r11}
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/com.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/com.asm
index 42f8e3cbbe3..57db9af0f4d 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/com.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/com.asm
@@ -71,5 +71,5 @@ L(top): ldmia up!, { r3, r8, r9, r12 } C load 4 limbs
bne L(top)
ldmfd sp!, { r7, r8, r9 } C restore regs from stack
-L(rtn): bx lr
+L(rtn): ret lr
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/copyd.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/copyd.asm
index 3ea2035099d..938b1dcb013 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/copyd.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/copyd.asm
@@ -80,5 +80,5 @@ L(top): subs n, n, #4
L(end): stmda rp, { r3,r4,r5,r12 }
pop { r4-r5 }
-L(rtn): bx lr
+L(rtn): ret lr
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/copyi.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/copyi.asm
index fa454702c14..0dc4e597111 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/copyi.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/copyi.asm
@@ -75,5 +75,5 @@ L(top): subs n, n, #4
L(end): stm rp, { r3,r4,r5,r12 }
pop { r4-r5 }
-L(rtn): bx lr
+L(rtn): ret lr
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/dive_1.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/dive_1.asm
index ccceb3c3cc3..f9921e55ea1 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/dive_1.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/dive_1.asm
@@ -112,7 +112,7 @@ L(end): sbc cy, r5, cy
mul r9, r4, cy
str r9, [rp]
pop {r4-r9}
- bx r14
+ ret r14
L(unnorm):
rsb tnc, cnt, #32
@@ -136,7 +136,7 @@ L(edu): sbc cy, r5, cy
mul r9, r4, cy
str r9, [rp]
pop {r4-r9}
- bx r14
+ ret r14
EPILOGUE()
RODATA
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/invert_limb.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/invert_limb.asm
index 06ce1467ced..c969ed525c4 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/invert_limb.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/invert_limb.asm
@@ -52,7 +52,7 @@ PROLOGUE(mpn_invert_limb)
adds r1, r12, r0
adc r3, r3, r0
rsb r0, r3, r2
- bx lr
+ ret lr
EPILOGUE()
RODATA
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/logops_n.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/logops_n.asm
index 5a61683fc2e..02ebbf3b9ce 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/logops_n.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/logops_n.asm
@@ -135,5 +135,5 @@ L(mid): sub n, n, #4
pop { r4, r5, r6, r7 } C popping r8-r10 here strangely fails
L(rtn): pop { r8, r9, r10 }
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/lshift.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/lshift.asm
index 9f777eb4dd8..9e828423b39 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/lshift.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/lshift.asm
@@ -84,5 +84,5 @@ L(end): orr r7, r7, r6, lsr tnc
L(1): str r7, [rp, #-4]
mov r0, r4, lsr tnc
pop {r4, r6, r7, r8}
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/lshiftc.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/lshiftc.asm
index 5f3d6e3f5b7..1a2fa682ae6 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/lshiftc.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/lshiftc.asm
@@ -91,5 +91,5 @@ L(1): mvn r6, #0
str r7, [rp, #-4]
mov r0, r4, lsr tnc
pop {r4, r6, r7, r8}
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/mod_34lsub1.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/mod_34lsub1.asm
index ba3c06d8db1..0dace666f6c 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/mod_34lsub1.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/mod_34lsub1.asm
@@ -106,7 +106,7 @@ L(sum2):
add r0, r0, r12, lsr #8
pop { r4, r5, r6, r7 }
- bx lr
+ ret lr
L(le2): cmn n, #1
bne L(1)
@@ -117,5 +117,5 @@ L(1): ldr r2, [ap]
bic r0, r2, #0xff000000
add r0, r0, r2, lsr #24
pop { r4, r5, r6, r7 }
- bx lr
+ ret lr
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/mode1o.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/mode1o.asm
index 5e0f78fc8f5..83a33aa650d 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/mode1o.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/mode1o.asm
@@ -88,5 +88,5 @@ L(end): sbcs cy, r5, cy
addcc r0, r0, #1
ldmfd sp!, {r4, r5}
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/rsh1aors_n.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/rsh1aors_n.asm
index 95c1f79ad9f..454cf5605d6 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/rsh1aors_n.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/rsh1aors_n.asm
@@ -120,5 +120,5 @@ L(e1): RSTCY( r12, r1)
str r4, [rp, #0]
mov r0, r11
pop {r4-r11}
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/rshift.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/rshift.asm
index 84728d038a7..dbe9f93e70a 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/rshift.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/rshift.asm
@@ -82,5 +82,5 @@ L(end): orr r7, r7, r6, lsl tnc
L(1): str r7, [rp]
mov r0, r4, lsl tnc
pop {r4, r6, r7, r8}
- bx r14
+ ret r14
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/sec_tabselect.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/sec_tabselect.asm
index 8cf937a0917..c2b05497173 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/sec_tabselect.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/sec_tabselect.asm
@@ -109,7 +109,7 @@ L(tp2): subs c, c, #1
bge L(tp2)
stmia rp, {r8,r9}
pop {r4-r11, r14}
- bx lr
+ ret lr
L(n2): cmp j, #-2
bne L(n1)
@@ -127,5 +127,5 @@ L(tp1): subs c, c, #1
bge L(tp1)
str r8, [rp]
L(n1): pop {r4-r11, r14}
- bx lr
+ ret lr
EPILOGUE()
diff --git a/Build/source/libs/gmp/gmp-src/mpn/arm/udiv.asm b/Build/source/libs/gmp/gmp-src/mpn/arm/udiv.asm
index 8d441c74edd..bcf66ef0edb 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/arm/udiv.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/arm/udiv.asm
@@ -61,7 +61,7 @@ L(oop): divstep(n1,n0,d)
str n1, [rem_ptr] C store remainder
adc r0, n0, n0 C quotient: add last carry from divstep
- bx lr
+ ret lr
L(_large_divisor):
stmfd sp!, { r8, lr }
diff --git a/Build/source/libs/gmp/gmp-src/mpn/generic/trialdiv.c b/Build/source/libs/gmp/gmp-src/mpn/generic/trialdiv.c
index 09cecfd4108..6e83c996fed 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/generic/trialdiv.c
+++ b/Build/source/libs/gmp/gmp-src/mpn/generic/trialdiv.c
@@ -65,8 +65,8 @@ struct gmp_primes_dtab {
struct gmp_primes_ptab {
mp_limb_t ppp; /* primes, multiplied together */
mp_limb_t cps[7]; /* ppp values pre-computed for mpn_mod_1s_4p */
- unsigned int idx:24; /* index of first primes in dtab */
- unsigned int np :8; /* number of primes related to this entry */
+ gmp_uint_least32_t idx:24; /* index of first primes in dtab */
+ gmp_uint_least32_t np :8; /* number of primes related to this entry */
};
diff --git a/Build/source/libs/gmp/gmp-src/mpn/x86_64/coreibwl/mul_basecase.asm b/Build/source/libs/gmp/gmp-src/mpn/x86_64/coreibwl/mul_basecase.asm
index 6365d10a185..50f3ce5877e 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/x86_64/coreibwl/mul_basecase.asm
+++ b/Build/source/libs/gmp/gmp-src/mpn/x86_64/coreibwl/mul_basecase.asm
@@ -94,6 +94,7 @@ IFDOS(` mov 56(%rsp), %r8d ')
L(s11): mov %rax, (rp)
mov %r9, 8(rp)
+ FUNC_EXIT()
ret
L(s2x): cmp $2, vn
@@ -105,6 +106,7 @@ L(s21): add %r8, %r9
mov %rax, (rp)
mov %r9, 8(rp)
mov %r10, 16(rp)
+ FUNC_EXIT()
ret
L(s22): add %r8, %r9 C 1
@@ -121,6 +123,7 @@ L(s22): add %r8, %r9 C 1
mov %r9, 8(rp)
mov %r10, 16(rp)
mov %rdx, 24(rp)
+ FUNC_EXIT()
ret
ALIGN(16)
@@ -294,6 +297,7 @@ L(done):
pop %r12
pop %rbp
pop %rbx
+ FUNC_EXIT()
ret
L(f2):
diff --git a/Build/source/libs/gmp/gmp-src/mpn/x86_64/fat/fat.c b/Build/source/libs/gmp/gmp-src/mpn/x86_64/fat/fat.c
index 30cd2104ff5..b8482fec743 100644
--- a/Build/source/libs/gmp/gmp-src/mpn/x86_64/fat/fat.c
+++ b/Build/source/libs/gmp/gmp-src/mpn/x86_64/fat/fat.c
@@ -206,6 +206,49 @@ int __gmpn_cpuvec_initialized = 0;
asm routines only operate correctly up to their own defined threshold,
not an arbitrary value. */
+static int
+gmp_workaround_skylake_cpuid_bug ()
+{
+ char feature_string[49];
+ char processor_name_string[49];
+ static const char *bad_cpus[] = {" G44", " G45", " G39" /* , "6600" */ };
+ int i;
+
+ /* Example strings: */
+ /* "Intel(R) Pentium(R) CPU G4400 @ 3.30GHz" */
+ /* "Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz" */
+ /* ^ ^ ^ */
+ /* 0x80000002 0x80000003 0x80000004 */
+ /* We match out just the 0x80000003 part here. */
+
+ /* In their infinitive wisdom, Intel decided to use one register order for
+ the vendor string, and another for the processor name string. We shuffle
+ things about here, rather than write a new variant of our assembly cpuid.
+ */
+
+ unsigned int eax, ebx, ecx, edx;
+ eax = __gmpn_cpuid (feature_string, 0x80000003);
+ ebx = ((unsigned int *)feature_string)[0];
+ edx = ((unsigned int *)feature_string)[1];
+ ecx = ((unsigned int *)feature_string)[2];
+
+ ((unsigned int *) (processor_name_string))[0] = eax;
+ ((unsigned int *) (processor_name_string))[1] = ebx;
+ ((unsigned int *) (processor_name_string))[2] = ecx;
+ ((unsigned int *) (processor_name_string))[3] = edx;
+
+ processor_name_string[16] = 0;
+
+ for (i = 0; i < sizeof (bad_cpus) / sizeof (char *); i++)
+ {
+ if (strstr (processor_name_string, bad_cpus[i]) != 0)
+ return 1;
+ }
+ return 0;
+}
+
+enum {BMI2_BIT = 8};
+
void
__gmpn_cpuvec_init (void)
{
@@ -311,8 +354,9 @@ __gmpn_cpuvec_init (void)
/* Some Haswells lack BMI2. Let them appear as Sandybridges for
now. */
__gmpn_cpuid (dummy_string, 7);
- if ((dummy_string[0 + 8 / 8] & (1 << (8 % 8))) != 0)
- CPUVEC_SETUP_coreihwl;
+ if ((dummy_string[0 + BMI2_BIT / 8] & (1 << (BMI2_BIT % 8))) == 0)
+ break;
+ CPUVEC_SETUP_coreihwl;
break;
case 0x3d: /* Broadwell */
case 0x47: /* Broadwell */
@@ -321,17 +365,23 @@ __gmpn_cpuvec_init (void)
CPUVEC_SETUP_core2;
CPUVEC_SETUP_coreinhm;
CPUVEC_SETUP_coreisbr;
+ if ((dummy_string[0 + BMI2_BIT / 8] & (1 << (BMI2_BIT % 8))) == 0)
+ break;
CPUVEC_SETUP_coreihwl;
CPUVEC_SETUP_coreibwl;
break;
case 0x4e: /* Skylake client */
case 0x55: /* Skylake server */
case 0x5e: /* Skylake */
- case 0x8e: /* Cabylake */
- case 0x9e: /* Cabylake */
+ case 0x8e: /* Kabylake */
+ case 0x9e: /* Kabylake */
CPUVEC_SETUP_core2;
CPUVEC_SETUP_coreinhm;
CPUVEC_SETUP_coreisbr;
+ if ((dummy_string[0 + BMI2_BIT / 8] & (1 << (BMI2_BIT % 8))) == 0)
+ break;
+ if (gmp_workaround_skylake_cpuid_bug ())
+ break;
CPUVEC_SETUP_coreihwl;
CPUVEC_SETUP_coreibwl;
CPUVEC_SETUP_skylake;
diff --git a/Build/source/libs/gmp/gmp-src/printf/doprnt.c b/Build/source/libs/gmp/gmp-src/printf/doprnt.c
index 5220feee206..f3e3e4e1b7c 100644
--- a/Build/source/libs/gmp/gmp-src/printf/doprnt.c
+++ b/Build/source/libs/gmp/gmp-src/printf/doprnt.c
@@ -160,7 +160,7 @@ __gmp_doprnt (const struct doprnt_funs_t *funs, void *data,
const char *orig_fmt, va_list orig_ap)
{
va_list ap, this_ap, last_ap;
- size_t alloc_fmt_size;
+ size_t alloc_fmt_size, orig_fmt_size;
char *fmt, *alloc_fmt, *last_fmt, *this_fmt, *gmp_str;
int retval = 0;
int type, fchar, *value, seen_precision;
@@ -180,7 +180,7 @@ __gmp_doprnt (const struct doprnt_funs_t *funs, void *data,
piece can be null-terminated. We're not going to be very fast here, so
use __gmp_allocate_func rather than TMP_ALLOC, to avoid overflowing the
stack if a long output string is given. */
- alloc_fmt_size = strlen (orig_fmt) + 1;
+ alloc_fmt_size = orig_fmt_size = strlen (orig_fmt) + 1;
#if _LONG_LONG_LIMB
/* for a long long limb we change %Mx to %llx, so could need an extra 1
char for every 3 existing */
@@ -188,7 +188,7 @@ __gmp_doprnt (const struct doprnt_funs_t *funs, void *data,
#endif
alloc_fmt = __GMP_ALLOCATE_FUNC_TYPE (alloc_fmt_size, char);
fmt = alloc_fmt;
- memcpy (fmt, orig_fmt, alloc_fmt_size);
+ memcpy (fmt, orig_fmt, orig_fmt_size);
/* last_fmt and last_ap are just after the last output, and hence where
the next output will begin, when that's done */
diff --git a/Build/source/libs/gmp/native/configure b/Build/source/libs/gmp/native/configure
index 53c04ad3a5f..a73b3119efe 100755
--- a/Build/source/libs/gmp/native/configure
+++ b/Build/source/libs/gmp/native/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gmp native 6.1.0.
+# Generated by GNU Autoconf 2.69 for gmp native 6.1.1.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gmp native'
PACKAGE_TARNAME='gmp-native'
-PACKAGE_VERSION='6.1.0'
-PACKAGE_STRING='gmp native 6.1.0'
+PACKAGE_VERSION='6.1.1'
+PACKAGE_STRING='gmp native 6.1.1'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1234,7 +1234,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures gmp native 6.1.0 to adapt to many kinds of systems.
+\`configure' configures gmp native 6.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1300,7 +1300,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gmp native 6.1.0:";;
+ short | recursive ) echo "Configuration of gmp native 6.1.1:";;
esac
cat <<\_ACEOF
@@ -1396,7 +1396,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gmp native configure 6.1.0
+gmp native configure 6.1.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1497,7 +1497,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by gmp native $as_me 6.1.0, which was
+It was created by gmp native $as_me 6.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3420,7 +3420,7 @@ fi
# Define the identity of the package.
PACKAGE='gmp-native'
- VERSION='6.1.0'
+ VERSION='6.1.1'
cat >>confdefs.h <<_ACEOF
@@ -4974,7 +4974,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by gmp native $as_me 6.1.0, which was
+This file was extended by gmp native $as_me 6.1.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5040,7 +5040,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-gmp native config.status 6.1.0
+gmp native config.status 6.1.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/gmp/version.ac b/Build/source/libs/gmp/version.ac
index 306cacde5bc..792ff0fa667 100644
--- a/Build/source/libs/gmp/version.ac
+++ b/Build/source/libs/gmp/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current gmp version
-m4_define([gmp_version], [6.1.0])
+m4_define([gmp_version], [6.1.1])