[Gmp-commit] /var/hg/gmp: 4 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Mon Mar 28 20:31:29 UTC 2016
details: /var/hg/gmp/rev/c30c0ae2aed5
changeset: 17058:c30c0ae2aed5
user: Torbjorn Granlund <torbjorng at google.com>
date: Mon Mar 28 22:30:07 2016 +0200
description:
Redefine @mm to take html into account; use @mm instead of @m in a few places for better superscripting.
details: /var/hg/gmp/rev/aacd4bdf3dee
changeset: 17059:aacd4bdf3dee
user: Torbjorn Granlund <torbjorng at google.com>
date: Mon Mar 28 22:30:33 2016 +0200
description:
Retune.
details: /var/hg/gmp/rev/969dccb6676b
changeset: 17060:969dccb6676b
user: Torbjorn Granlund <torbjorng at google.com>
date: Mon Mar 28 22:31:01 2016 +0200
description:
Adjust cycle number.
details: /var/hg/gmp/rev/2d3db58b322f
changeset: 17061:2d3db58b322f
user: Torbjorn Granlund <torbjorng at google.com>
date: Mon Mar 28 22:31:27 2016 +0200
description:
ChangeLog
diffstat:
ChangeLog | 5 +
doc/gmp.texi | 42 ++++-
mpn/arm64/gmp-mparam.h | 322 ++++++++++++++++++-----------------------
mpn/arm64/xgene1/gmp-mparam.h | 257 +++++++++++++++++++--------------
mpn/arm64/xgene1/mul_1.asm | 2 +-
5 files changed, 328 insertions(+), 300 deletions(-)
diffs (truncated from 779 to 300 lines):
diff -r e949e2497c6a -r 2d3db58b322f ChangeLog
--- a/ChangeLog Mon Mar 28 22:05:48 2016 +0200
+++ b/ChangeLog Mon Mar 28 22:31:27 2016 +0200
@@ -1,3 +1,8 @@
+2016-03-28 Torbjörn Granlund <torbjorng at google.com>
+
+ * mpn/x86_64/addmul_2.asm: Move from here...
+ * mpn/x86_64/k8/addmul_2.asm: ...to here.
+
2016-03-26 Torbjörn Granlund <torbjorng at google.com>
* mpn/arm64/sqr_diag_addlsh1.asm: New file.
diff -r e949e2497c6a -r 2d3db58b322f doc/gmp.texi
--- a/doc/gmp.texi Mon Mar 28 22:05:48 2016 +0200
+++ b/doc/gmp.texi Mon Mar 28 22:31:27 2016 +0200
@@ -14,7 +14,7 @@
This manual describes how to install and use the GNU multiple precision
arithmetic library, version @value{VERSION}.
-Copyright 1991, 1993-2015 Free Software Foundation, Inc.
+Copyright 1991, 1993-2016 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.3 or any later
@@ -148,9 +148,8 @@
@end menu
- at c @m{T,N} is $T$ in tex or @math{N} otherwise. This is an easy way to give
- at c different forms for math in tex and info. Commas in N or T don't work,
- at c but @C{} can be used instead. \, works in info but not in tex.
+ at c @m{T,N} is $T$ in tex or @math{N} otherwise. Commas in N or T don't work,
+ at c but @C{} can be used instead.
@iftex
@macro m {T,N}
@tex$\T\$@end tex
@@ -162,6 +161,27 @@
@end macro
@end ifnottex
+ at c @mm{T,N} is $T$ tex and html and @math{N} in info. Commas in N or T don't
+ at c work, but @C{} can be used instead.
+ at iftex
+ at macro mm {T,N}
+ at tex$\T\$@end tex
+ at end macro
+ at end iftex
+
+ at ifhtml
+ at macro mm {T,N}
+ at math{\T\}
+ at end macro
+ at end ifhtml
+
+ at ifinfo
+ at macro mm {T,N}
+ at math{\N\}
+ at end macro
+ at end ifinfo
+
+
@macro C {}
,
@end macro
@@ -3433,9 +3453,10 @@
Set @var{rop} to @m{base^{exp} \bmod mod, (@var{base} raised to @var{exp})
modulo @var{mod}}.
-Negative @var{exp} is supported if an inverse @math{@var{base}^@W{-1} @bmod
- at var{mod}} exists (see @code{mpz_invert} in @ref{Number Theoretic Functions}).
-If an inverse doesn't exist then a divide by zero is raised.
+Negative @var{exp} is supported if the inverse @mm{@var{base}@sup{-1} @bmod
+ at var{mod}, @var{base}^(-1) @bmod @var{mod}} exists (see @code{mpz_invert} in
+ at ref{Number Theoretic Functions}). If an inverse doesn't exist then a divide
+by zero is raised.
@end deftypefun
@deftypefun void mpz_powm_sec (mpz_t @var{rop}, const mpz_t @var{base}, const mpz_t @var{exp}, const mpz_t @var{mod})
@@ -3924,8 +3945,8 @@
number functions.
@deftypefun void mpz_urandomb (mpz_t @var{rop}, gmp_randstate_t @var{state}, mp_bitcnt_t @var{n})
-Generate a uniformly distributed random integer in the range 0 to @m{2^n-1,
-2^@var{n}@minus{}1}, inclusive.
+Generate a uniformly distributed random integer in the range 0 to
+ at mm{2 at sup{n}-1, 2^@var{n}@minus{}1}, inclusive.
The variable @var{state} must be initialized by calling one of the
@code{gmp_randinit} functions (@ref{Random State Initialization}) before
@@ -3946,7 +3967,8 @@
binary representation. Useful for testing functions and algorithms,
since this kind of random numbers have proven to be more likely to
trigger corner-case bugs. The random number will be in the range
-0 to @m{2^n-1, 2^@var{n}@minus{}1}, inclusive.
+ at mm{2 at sup{n-1}, 2^(@var{n}@minus{}1)} to @mm{2 at sup{n}-1,
+2^@var{n}@minus{}1}, inclusive.
The variable @var{state} must be initialized by calling one of the
@code{gmp_randinit} functions (@ref{Random State Initialization})
diff -r e949e2497c6a -r 2d3db58b322f mpn/arm64/gmp-mparam.h
--- a/mpn/arm64/gmp-mparam.h Mon Mar 28 22:05:48 2016 +0200
+++ b/mpn/arm64/gmp-mparam.h Mon Mar 28 22:31:27 2016 +0200
@@ -1,6 +1,6 @@
/* gmp-mparam.h -- Compiler/machine parameter header file.
-Copyright 2015 Free Software Foundation, Inc.
+Copyright 2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -31,211 +31,173 @@
#define GMP_LIMB_BITS 64
#define GMP_LIMB_BYTES 8
-/* 2400 MHz AppliedMicro X-Gene */
-/* FFT tuning limit = 100 M */
-/* Generated by tuneup.c, 2015-10-18, gcc 4.8 */
+/* 1500 MHz Cortex-A53 */
+/* FFT tuning limit = 1 M */
+/* Generated by tuneup.c, 2016-03-27, gcc 5.3 */
-#define DIVREM_1_NORM_THRESHOLD 0 /* always */
-#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */
-#define MOD_1_1P_METHOD 1
-#define MOD_1_NORM_THRESHOLD 0 /* always */
-#define MOD_1_UNNORM_THRESHOLD 0 /* always */
-#define MOD_1N_TO_MOD_1_1_THRESHOLD 7
+#define DIVREM_1_NORM_THRESHOLD 3
+#define DIVREM_1_UNNORM_THRESHOLD 4
+#define MOD_1_1P_METHOD 2
+#define MOD_1_NORM_THRESHOLD 3
+#define MOD_1_UNNORM_THRESHOLD 4
+#define MOD_1N_TO_MOD_1_1_THRESHOLD 8
#define MOD_1U_TO_MOD_1_1_THRESHOLD 6
-#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */
-#define MOD_1_2_TO_MOD_1_4_THRESHOLD 28
-#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 13
+#define MOD_1_1_TO_MOD_1_2_THRESHOLD 10
+#define MOD_1_2_TO_MOD_1_4_THRESHOLD 20
+#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 26
#define USE_PREINV_DIVREM_1 1
#define DIV_QR_1N_PI1_METHOD 1
-#define DIV_QR_1_NORM_THRESHOLD 1
-#define DIV_QR_1_UNNORM_THRESHOLD 1
+#define DIV_QR_1_NORM_THRESHOLD 4
+#define DIV_QR_1_UNNORM_THRESHOLD 7
#define DIV_QR_2_PI2_THRESHOLD MP_SIZE_T_MAX /* never */
#define DIVEXACT_1_THRESHOLD 0 /* always */
-#define BMOD_1_TO_MOD_1_THRESHOLD 30
+#define BMOD_1_TO_MOD_1_THRESHOLD 39
-#define MUL_TOOM22_THRESHOLD 14
-#define MUL_TOOM33_THRESHOLD 57
-#define MUL_TOOM44_THRESHOLD 154
-#define MUL_TOOM6H_THRESHOLD 206
-#define MUL_TOOM8H_THRESHOLD 309
+#define MUL_TOOM22_THRESHOLD 11
+#define MUL_TOOM33_THRESHOLD 78
+#define MUL_TOOM44_THRESHOLD 118
+#define MUL_TOOM6H_THRESHOLD 157
+#define MUL_TOOM8H_THRESHOLD 236
-#define MUL_TOOM32_TO_TOOM43_THRESHOLD 89
-#define MUL_TOOM32_TO_TOOM53_THRESHOLD 102
-#define MUL_TOOM42_TO_TOOM53_THRESHOLD 89
-#define MUL_TOOM42_TO_TOOM63_THRESHOLD 104
-#define MUL_TOOM43_TO_TOOM54_THRESHOLD 130
+#define MUL_TOOM32_TO_TOOM43_THRESHOLD 73
+#define MUL_TOOM32_TO_TOOM53_THRESHOLD 76
+#define MUL_TOOM42_TO_TOOM53_THRESHOLD 81
+#define MUL_TOOM42_TO_TOOM63_THRESHOLD 78
+#define MUL_TOOM43_TO_TOOM54_THRESHOLD 58
-#define SQR_BASECASE_THRESHOLD 6
-#define SQR_TOOM2_THRESHOLD 28
-#define SQR_TOOM3_THRESHOLD 93
-#define SQR_TOOM4_THRESHOLD 160
-#define SQR_TOOM6_THRESHOLD 197
-#define SQR_TOOM8_THRESHOLD 284
+#define SQR_BASECASE_THRESHOLD 0 /* always */
+#define SQR_TOOM2_THRESHOLD 20
+#define SQR_TOOM3_THRESHOLD 81
+#define SQR_TOOM4_THRESHOLD 190
+#define SQR_TOOM6_THRESHOLD 270
+#define SQR_TOOM8_THRESHOLD 357
-#define MULMID_TOOM42_THRESHOLD 34
+#define MULMID_TOOM42_THRESHOLD 22
-#define MULMOD_BNM1_THRESHOLD 12
-#define SQRMOD_BNM1_THRESHOLD 13
+#define MULMOD_BNM1_THRESHOLD 10
+#define SQRMOD_BNM1_THRESHOLD 12
-#define MUL_FFT_MODF_THRESHOLD 308 /* k = 5 */
+#define MUL_FFT_MODF_THRESHOLD 316 /* k = 5 */
#define MUL_FFT_TABLE3 \
- { { 308, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \
- { 8, 5}, { 17, 6}, { 13, 7}, { 7, 6}, \
- { 15, 7}, { 8, 6}, { 17, 7}, { 17, 8}, \
- { 9, 7}, { 20, 8}, { 11, 7}, { 24, 8}, \
- { 13, 7}, { 27, 9}, { 7, 8}, { 15, 7}, \
- { 31, 8}, { 21, 9}, { 11, 8}, { 27, 9}, \
- { 15, 8}, { 35, 9}, { 19, 8}, { 39, 9}, \
- { 23, 8}, { 47, 9}, { 27,10}, { 15, 9}, \
- { 31, 8}, { 63, 9}, { 39,10}, { 23, 9}, \
- { 55,11}, { 15,10}, { 31, 9}, { 71,10}, \
+ { { 316, 5}, { 11, 6}, { 6, 5}, { 13, 6}, \
+ { 7, 5}, { 15, 6}, { 9, 5}, { 19, 6}, \
+ { 13, 7}, { 7, 6}, { 15, 7}, { 8, 6}, \
+ { 17, 7}, { 9, 6}, { 19, 7}, { 13, 8}, \
+ { 7, 7}, { 17, 8}, { 9, 7}, { 20, 8}, \
+ { 11, 7}, { 23, 8}, { 13, 9}, { 7, 8}, \
+ { 15, 7}, { 31, 8}, { 19, 9}, { 11, 8}, \
+ { 27,10}, { 7, 9}, { 15, 8}, { 33, 9}, \
+ { 19, 8}, { 39, 9}, { 23, 8}, { 47, 9}, \
+ { 27,10}, { 15, 9}, { 39,10}, { 23, 9}, \
+ { 51,11}, { 15,10}, { 31, 9}, { 71,10}, \
{ 39, 9}, { 83,10}, { 47, 9}, { 99,10}, \
- { 55,11}, { 31,10}, { 63, 9}, { 127,10}, \
- { 79, 9}, { 159,11}, { 47,10}, { 95, 9}, \
- { 191, 8}, { 383,10}, { 103,12}, { 31,11}, \
- { 63,10}, { 127, 9}, { 255, 8}, { 511,10}, \
- { 135, 9}, { 271,10}, { 143,11}, { 79,10}, \
- { 159, 9}, { 319, 8}, { 639,10}, { 175, 9}, \
- { 351, 8}, { 703,11}, { 95,10}, { 191, 9}, \
- { 383, 8}, { 767,10}, { 207, 9}, { 415, 8}, \
- { 831,11}, { 111,10}, { 223,12}, { 63,11}, \
- { 127,10}, { 255, 9}, { 511,10}, { 271, 9}, \
- { 543,10}, { 287, 9}, { 575,11}, { 159,10}, \
- { 319, 9}, { 639,11}, { 175,10}, { 351, 9}, \
- { 703,12}, { 95,11}, { 191,10}, { 383, 9}, \
- { 767,11}, { 207,10}, { 415, 9}, { 831,11}, \
- { 223,10}, { 447,13}, { 63,12}, { 127,11}, \
- { 255,10}, { 511,11}, { 271,10}, { 543,11}, \
- { 287,10}, { 575,12}, { 159,11}, { 319,10}, \
- { 639,11}, { 351,10}, { 703,11}, { 383,10}, \
- { 767,11}, { 415,10}, { 831,12}, { 223,11}, \
- { 447,10}, { 895,11}, { 479,10}, { 959,13}, \
- { 127,11}, { 543,12}, { 287,11}, { 575,10}, \
- { 1151,12}, { 319,11}, { 639,12}, { 351,11}, \
- { 703,10}, { 1407, 9}, { 2815,12}, { 383,11}, \
- { 767,12}, { 415,11}, { 831,10}, { 1663,12}, \
- { 447,11}, { 895,10}, { 1791,12}, { 479,11}, \
- { 959,10}, { 1919,14}, { 127,13}, { 255,12}, \
- { 511,11}, { 1023,12}, { 543,11}, { 1087,12}, \
- { 575,11}, { 1151,13}, { 319,12}, { 639,11}, \
- { 1279,12}, { 703,11}, { 1407,13}, { 383,12}, \
- { 767,11}, { 1535,12}, { 831,11}, { 1663,13}, \
- { 447,12}, { 959,11}, { 1919,14}, { 255,13}, \
- { 511,12}, { 1087,13}, { 575,12}, { 1215,13}, \
- { 639,12}, { 1279,13}, { 703,12}, { 1407,14}, \
- { 383,13}, { 767,12}, { 1535,13}, { 831,12}, \
- { 1663,13}, { 895,12}, { 1791,13}, { 959,12}, \
- { 1919,15}, { 255,14}, { 511,13}, { 1087,12}, \
- { 2175,13}, { 1151,14}, { 639,13}, { 1407,12}, \
- { 2815,14}, { 767,13}, { 1663,14}, { 895,13}, \
- { 1919,15}, { 511,14}, { 1023,13}, { 2175,14}, \
- { 1151,13}, { 2431,14}, { 1407,13}, { 2815,15}, \
- { 767,14}, { 1919,16}, { 511,15}, { 1023,14}, \
- { 2431,15}, { 1279,14}, { 2943,15}, { 32768,16}, \
+ { 55,11}, { 31,10}, { 63, 8}, { 255,10}, \
+ { 71, 8}, { 287, 7}, { 575,10}, { 79, 9}, \
+ { 159,11}, { 47,10}, { 95, 9}, { 191,10}, \
+ { 103,12}, { 31,11}, { 63, 9}, { 255, 8}, \
+ { 511,10}, { 135, 9}, { 287, 8}, { 575,11}, \
+ { 79,10}, { 159, 9}, { 319, 8}, { 639,10}, \
+ { 175, 9}, { 351, 8}, { 703,11}, { 95,10}, \
+ { 191, 9}, { 383, 8}, { 767,10}, { 207, 9}, \
+ { 415,11}, { 111,10}, { 223, 9}, { 447,12}, \
+ { 63,10}, { 255, 9}, { 511, 8}, { 1023, 9}, \
+ { 543,10}, { 287, 9}, { 575, 8}, { 1151,11}, \
+ { 159,10}, { 319, 9}, { 639,11}, { 175,10}, \
+ { 351, 9}, { 703,12}, { 95,11}, { 191,10}, \
+ { 383, 9}, { 767,11}, { 207,10}, { 415, 9}, \
+ { 831,11}, { 223,10}, { 447, 9}, { 895,13}, \
+ { 63,11}, { 255,10}, { 511, 9}, { 1023,10}, \
+ { 543,11}, { 287,10}, { 575, 9}, { 1151,11}, \
+ { 303,10}, { 607,12}, { 159,11}, { 319,10}, \
+ { 639,11}, { 351,10}, { 703, 9}, { 1407,12}, \
+ { 191,11}, { 383,10}, { 767,11}, { 415,10}, \
+ { 831,12}, { 223,11}, { 447,10}, { 895, 9}, \
+ { 1791,11}, { 479,10}, { 959, 9}, { 1919,12}, \
+ { 4096,13}, { 8192,14}, { 16384,15}, { 32768,16}, \
{ 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \
{1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} }
-#define MUL_FFT_TABLE3_SIZE 220
-#define MUL_FFT_THRESHOLD 3520
+#define MUL_FFT_TABLE3_SIZE 148
+#define MUL_FFT_THRESHOLD 3200
-#define SQR_FFT_MODF_THRESHOLD 272 /* k = 5 */
+#define SQR_FFT_MODF_THRESHOLD 244 /* k = 5 */
#define SQR_FFT_TABLE3 \
- { { 272, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \
- { 17, 7}, { 9, 6}, { 19, 7}, { 17, 8}, \
- { 9, 7}, { 20, 8}, { 11, 7}, { 24, 8}, \
- { 13, 9}, { 7, 8}, { 15, 7}, { 31, 8}, \
- { 21, 9}, { 11, 8}, { 27,10}, { 7, 9}, \
- { 15, 8}, { 33, 9}, { 19, 8}, { 39, 9}, \
More information about the gmp-commit
mailing list