[Gmp-commit] /home/hgfiles/gmp: 4 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Thu Jan 21 21:55:38 CET 2010


details:   /home/hgfiles/gmp/rev/57f49c2d3cdd
changeset: 13388:57f49c2d3cdd
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jan 21 20:12:27 2010 +0100
description:
(speed_mpn_matrix22_mul): Rewrite.

details:   /home/hgfiles/gmp/rev/ded2401b79f1
changeset: 13389:ded2401b79f1
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jan 21 21:07:23 2010 +0100
description:
Recognise many more Intel processors.

details:   /home/hgfiles/gmp/rev/3d50efd58740
changeset: 13390:3d50efd58740
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jan 21 21:54:14 2010 +0100
description:
Use -mtune=nocona for 64-bit pentium4.

details:   /home/hgfiles/gmp/rev/fde439f60722
changeset: 13391:fde439f60722
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jan 21 21:55:35 2010 +0100
description:
Add FFT_TABLE3 tables for a basic set of machines.

diffstat:

 ChangeLog                             |   11 +
 config.guess                          |   26 +-
 configure.in                          |    1 +
 mpn/alpha/ev5/gmp-mparam.h            |  172 ++++++++++++----
 mpn/powerpc64/mode64/p4/gmp-mparam.h  |  135 +++++++++++-
 mpn/sparc64/ultrasparc34/gmp-mparam.h |    2 +-
 mpn/x86/k7/gmp-mparam.h               |  103 +++++++++-
 mpn/x86/p6/mmx/gmp-mparam.h           |    2 +-
 mpn/x86/p6/sse2/gmp-mparam.h          |    2 +-
 mpn/x86/pentium4/sse2/gmp-mparam.h    |   89 +++++++-
 mpn/x86_64/atom/gmp-mparam.h          |  102 ++++++++-
 mpn/x86_64/core2/gmp-mparam.h         |  104 +++++++++-
 mpn/x86_64/corei/gmp-mparam.h         |  113 ++++++++++-
 mpn/x86_64/gmp-mparam.h               |  162 ++++++++++++---
 tune/common.c                         |  342 ++++++++++++++++-----------------
 15 files changed, 1031 insertions(+), 335 deletions(-)

diffs (truncated from 1887 to 300 lines):

diff -r 85730915e18f -r fde439f60722 ChangeLog
--- a/ChangeLog	Thu Jan 21 11:19:52 2010 +0100
+++ b/ChangeLog	Thu Jan 21 21:55:35 2010 +0100
@@ -1,3 +1,14 @@
+2010-01-21  Torbjorn Granlund  <tege at gmplib.org>
+
+	* Add FFT_TABLE3 tables for a basic set of machines.
+
+	* configure.in: Use -mtune=nocona for 64-bit pentium4.
+
+	* config.guess: Recognise many more Intel processors.
+
+	* tune/common.c: Whitespace cleanup.
+	(speed_mpn_matrix22_mul): Rewrite.
+
 2010-01-21  Niels Möller  <nisse at lysator.liu.se>
 
 	* mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Take
diff -r 85730915e18f -r fde439f60722 config.guess
--- a/config.guess	Thu Jan 21 11:19:52 2010 +0100
+++ b/config.guess	Thu Jan 21 21:55:35 2010 +0100
@@ -728,16 +728,22 @@
 	  else if (model >= 4)	modelstr = "pentiummmx";
 	  break;
 	case 6:
-	  if (model <= 1)	modelstr = "pentiumpro";
-	  else if (model <= 6)	modelstr = "pentium2";
-	  else if (model <= 8)	modelstr = "pentium3";
-	  else if (model <= 9)	modelstr = "pentiumm";
-	  else if (model <= 12)	modelstr = "pentium3";
-	  else if (model <= 14)	modelstr = "pentiumm";
-	  else if (model <= 25)	modelstr = "core2";
-	  else if (model <= 27)	modelstr = "corei"; /* core i5, i7 */
-	  else if (model == 28)	modelstr = "atom";
-	  else if (model == 29)	modelstr = "core2";
+	  if (model <= 1)		modelstr = "pentiumpro";
+	  else if (model <= 6)		modelstr = "pentium2";
+	  else if (model <= 8)		modelstr = "pentium3";
+	  else if (model <= 9)		modelstr = "pentiumm";
+	  else if (model <= 0x0c)	modelstr = "pentium3";
+	  else if (model <= 0x0e)	modelstr = "pentiumm";
+	  else if (model <= 0x19)	modelstr = "core2";
+	  else if (model == 0x1a)	modelstr = "corei"; /* NHM Gainestown */
+	  else if (model == 0x1c)	modelstr = "atom";  /* Silverthorne */
+	  else if (model == 0x1d)	modelstr = "core2"; /* PNR Dunnington */
+	  else if (model == 0x1e)	modelstr = "corei"; /* NHM Lynnfield/Jasper */
+	  else if (model == 0x25)	modelstr = "corei"; /* WSM Clarkdale/Arrandale */
+	  else if (model == 0x26)	modelstr = "atom";  /* Lincroft */
+	  else if (model == 0x27)	modelstr = "atom";  /* Saltwell */
+	  else if (model == 0x2c)	modelstr = "corei"; /* WSM Gulftown */
+	  else if (model == 0x2e)	modelstr = "corei"; /* NHM Beckton */
 	  break;
 	case 15:
 	  modelstr = "pentium4";
diff -r 85730915e18f -r fde439f60722 configure.in
--- a/configure.in	Thu Jan 21 11:19:52 2010 +0100
+++ b/configure.in	Thu Jan 21 21:55:35 2010 +0100
@@ -1426,6 +1426,7 @@
         #
         gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486"
         gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium"
+        gcc_64_cflags_cpu="-mtune=nocona"
         ;;
       viac32)
         # Not sure of the best fallbacks here for -mcpu.
diff -r 85730915e18f -r fde439f60722 mpn/alpha/ev5/gmp-mparam.h
--- a/mpn/alpha/ev5/gmp-mparam.h	Thu Jan 21 11:19:52 2010 +0100
+++ b/mpn/alpha/ev5/gmp-mparam.h	Thu Jan 21 21:55:35 2010 +0100
@@ -28,71 +28,145 @@
 #define DIVREM_1_UNNORM_THRESHOLD            0  /* always */
 #define MOD_1_NORM_THRESHOLD                 0  /* always */
 #define MOD_1_UNNORM_THRESHOLD               0  /* always */
-#define MOD_1N_TO_MOD_1_1_THRESHOLD         36
-#define MOD_1U_TO_MOD_1_1_THRESHOLD          3
-#define MOD_1_1_TO_MOD_1_2_THRESHOLD         0
-#define MOD_1_2_TO_MOD_1_4_THRESHOLD        14
-#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     76
+#define MOD_1N_TO_MOD_1_1_THRESHOLD         32
+#define MOD_1U_TO_MOD_1_1_THRESHOLD          2
+#define MOD_1_1_TO_MOD_1_2_THRESHOLD         7
+#define MOD_1_2_TO_MOD_1_4_THRESHOLD        18
+#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     73
 #define USE_PREINV_DIVREM_1                  1  /* preinv always */
 #define DIVEXACT_1_THRESHOLD                 0  /* always */
-#define BMOD_1_TO_MOD_1_THRESHOLD           72
+#define BMOD_1_TO_MOD_1_THRESHOLD           87
 
-#define MUL_TOOM22_THRESHOLD                14
-#define MUL_TOOM33_THRESHOLD                74
-#define MUL_TOOM44_THRESHOLD               130
-#define MUL_TOOM6H_THRESHOLD               155
+#define MUL_TOOM22_THRESHOLD                16
+#define MUL_TOOM33_THRESHOLD                53
+#define MUL_TOOM44_THRESHOLD               121
+#define MUL_TOOM6H_THRESHOLD               173
 #define MUL_TOOM8H_THRESHOLD               236
 
-#define MUL_TOOM32_TO_TOOM43_THRESHOLD      73
-#define MUL_TOOM32_TO_TOOM53_THRESHOLD      84
-#define MUL_TOOM42_TO_TOOM53_THRESHOLD      73
+#define MUL_TOOM32_TO_TOOM43_THRESHOLD      81
+#define MUL_TOOM32_TO_TOOM53_THRESHOLD      91
+#define MUL_TOOM42_TO_TOOM53_THRESHOLD      81
 #define MUL_TOOM42_TO_TOOM63_THRESHOLD      56
 
-#define SQR_BASECASE_THRESHOLD               4
-#define SQR_TOOM2_THRESHOLD                 26
-#define SQR_TOOM3_THRESHOLD                 53
+#define SQR_BASECASE_THRESHOLD               5
+#define SQR_TOOM2_THRESHOLD                 28
+#define SQR_TOOM3_THRESHOLD                 78
 #define SQR_TOOM4_THRESHOLD                136
-#define SQR_TOOM6_THRESHOLD                173
-#define SQR_TOOM8_THRESHOLD                254
+#define SQR_TOOM6_THRESHOLD                180
+#define SQR_TOOM8_THRESHOLD                260
 
-#define MULMOD_BNM1_THRESHOLD                9
-#define SQRMOD_BNM1_THRESHOLD               14
+#define MULMOD_BNM1_THRESHOLD               11
+#define SQRMOD_BNM1_THRESHOLD               17
 
-#define MUL_FFT_TABLE  { 240, 480, 1344, 1792, 5120, 20480, 81920, 196608, 0 }
-#define MUL_FFT_MODF_THRESHOLD             240
-#define MUL_FFT_THRESHOLD                 1920
+#define MUL_FFT_MODF_THRESHOLD             244  /* k = 5 */
+#define MUL_FFT_TABLE3                                      \
+  { {    244, 5}, {     11, 6}, {      6, 5}, {     13, 6}, \
+    {      7, 5}, {     15, 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, 7}, {     27, 9}, {      7, 8}, {     21, 9}, \
+    {     11, 8}, {     25,10}, {      7, 9}, {     15, 8}, \
+    {     33, 9}, {     23,10}, {     15, 9}, {     39,10}, \
+    {     23, 9}, {     47,11}, {     15,10}, {     31, 9}, \
+    {     67,10}, {     39, 9}, {     79,10}, {     47, 9}, \
+    {     95,10}, {     55,11}, {     31,10}, {     63, 9}, \
+    {    127,10}, {     71, 9}, {    143, 8}, {    287,10}, \
+    {     79,11}, {     47,10}, {     95, 9}, {    191,12}, \
+    {     31,11}, {     63,10}, {    127, 9}, {    255,10}, \
+    {    143, 9}, {    287,11}, {     79,10}, {    159, 9}, \
+    {    319, 8}, {    639,10}, {    175,11}, {     95,10}, \
+    {    191, 9}, {    383,10}, {    207, 9}, {    415,11}, \
+    {    111,12}, {     63,11}, {    127,10}, {    255,11}, \
+    {    143,10}, {    287, 9}, {    575,11}, {    159,10}, \
+    {    319,11}, {    175,10}, {    351,12}, {     95,11}, \
+    {    191,10}, {    383,11}, {    207,10}, {    415,11}, \
+    {    223,13}, {     63,12}, {    127,11}, {    255,10}, \
+    {    511,11}, {    287,10}, {    575,12}, {    159,11}, \
+    {    319,10}, {    639,11}, {    351,10}, {    703,12}, \
+    {    191,11}, {    415,12}, {    223,11}, {    447,13}, \
+    {    127,12}, {    255,11}, {    511,12}, {    287,11}, \
+    {    575,12}, {    319,11}, {    639,12}, {    351,11}, \
+    {    703,13}, {    191,12}, {    383,11}, {    767,12}, \
+    {    415,11}, {    831,12}, {    447,14}, {    127,13}, \
+    {    255,12}, {    575,13}, {    319,12}, {    703,13}, \
+    {    383,12}, {    831,13}, {    447,12}, {    895,14}, \
+    {    255,13}, {    511,12}, {   1023,13}, {    575,12}, \
+    {   1151,13}, {    703,12}, {   1407,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 141
+#define MUL_FFT_THRESHOLD                 4480
 
-#define SQR_FFT_TABLE  { 240, 480, 1216, 1792, 5120, 12288, 81920, 196608, 0 }
-#define SQR_FFT_MODF_THRESHOLD             208
-#define SQR_FFT_THRESHOLD                 1920
+#define SQR_FFT_MODF_THRESHOLD             220  /* k = 5 */
+#define SQR_FFT_TABLE3                                      \
+  { {    220, 5}, {     13, 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, 7}, {     30, 8}, \
+    {     19, 4}, {    319, 9}, {     11, 8}, {     25,10}, \
+    {      7, 9}, {     15, 8}, {     31, 7}, {     64, 9}, \
+    {     19, 8}, {     39, 7}, {     79, 9}, {     23, 8}, \
+    {     47, 9}, {     27,10}, {     15, 9}, {     39,10}, \
+    {     23, 9}, {     47,11}, {     15,10}, {     31, 9}, \
+    {     67,10}, {     39, 9}, {     79,10}, {     47,11}, \
+    {     31,10}, {     63, 9}, {    127,10}, {     71, 9}, \
+    {    143, 8}, {    287,10}, {     79,11}, {     47,10}, \
+    {     95, 9}, {    191,12}, {     31,11}, {     63,10}, \
+    {    127, 9}, {    255,10}, {    143, 9}, {    287,11}, \
+    {     79,10}, {    159, 9}, {    319,10}, {    175, 9}, \
+    {    351,11}, {     95,10}, {    191, 9}, {    383,10}, \
+    {    207,11}, {    111,12}, {     63,11}, {    127,10}, \
+    {    255,11}, {    143,10}, {    287,11}, {    159,10}, \
+    {    319,11}, {    175,10}, {    351,12}, {     95,11}, \
+    {    191,10}, {    383,11}, {    207,10}, {    415,11}, \
+    {    223,13}, {     63,12}, {    127,11}, {    255,10}, \
+    {    511,11}, {    287,12}, {    159,11}, {    319,10}, \
+    {    639,11}, {    351,12}, {    191,11}, {    383,10}, \
+    {    767,11}, {    415,12}, {    223,11}, {    447,13}, \
+    {    127,12}, {    255,11}, {    511,12}, {    287,11}, \
+    {    575,12}, {    319,11}, {    639,12}, {    351,13}, \
+    {    191,12}, {    383,11}, {    767,12}, {    415,11}, \
+    {    831,12}, {    447,14}, {    127,13}, {    255,12}, \
+    {    575,13}, {    319,12}, {    703,13}, {    383,12}, \
+    {    831,13}, {    447,12}, {    895,14}, {    255,13}, \
+    {    511,12}, {   1023,13}, {    575,12}, {   1151,13}, \
+    {    703,14}, {  16384,15}, {  32768,16}, {  65536,17}, \
+    { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \
+    {2097152,22}, {4194304,23}, {8388608,24} }
+#define SQR_FFT_TABLE3_SIZE 135
+#define SQR_FFT_THRESHOLD                 3712
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
-#define MULLO_DC_THRESHOLD                  44
-#define MULLO_MUL_N_THRESHOLD              246
+#define MULLO_DC_THRESHOLD                  55
+#define MULLO_MUL_N_THRESHOLD             7916
 
-#define DC_DIV_QR_THRESHOLD                 47
-#define DC_DIVAPPR_Q_THRESHOLD             182
-#define DC_BDIV_QR_THRESHOLD                47
-#define DC_BDIV_Q_THRESHOLD                168
+#define DC_DIV_QR_THRESHOLD                 55
+#define DC_DIVAPPR_Q_THRESHOLD             192
+#define DC_BDIV_QR_THRESHOLD                51
+#define DC_BDIV_Q_THRESHOLD                120
 
-#define INV_MULMOD_BNM1_THRESHOLD           55
-#define INV_NEWTON_THRESHOLD               187
-#define INV_APPR_THRESHOLD                 179
+#define INV_MULMOD_BNM1_THRESHOLD          100
+#define INV_NEWTON_THRESHOLD               188
+#define INV_APPR_THRESHOLD                 189
 
-#define BINV_NEWTON_THRESHOLD              220
-#define REDC_1_TO_REDC_N_THRESHOLD          77
+#define BINV_NEWTON_THRESHOLD              199
+#define REDC_1_TO_REDC_N_THRESHOLD          55
 
-#define MATRIX22_STRASSEN_THRESHOLD         11
-#define HGCD_THRESHOLD                      96
-#define GCD_DC_THRESHOLD                   309
-#define GCDEXT_DC_THRESHOLD                233
+#define MU_DIV_QR_THRESHOLD                979
+#define MU_DIVAPPR_Q_THRESHOLD             998
+#define MUPI_DIV_QR_THRESHOLD               90
+#define MU_BDIV_QR_THRESHOLD               792
+#define MU_BDIV_Q_THRESHOLD                942
+
+#define MATRIX22_STRASSEN_THRESHOLD         13
+#define HGCD_THRESHOLD                     101
+#define GCD_DC_THRESHOLD                   306
+#define GCDEXT_DC_THRESHOLD                210
 #define JACOBI_BASE_METHOD                   2
 
-#define GET_STR_DC_THRESHOLD                15
-#define GET_STR_PRECOMPUTE_THRESHOLD        25
-#define SET_STR_DC_THRESHOLD               470
-#define SET_STR_PRECOMPUTE_THRESHOLD      1452
-
-#define MUL_FFT_TABLE2 {{1,4}, {177,5}, {481,6}, {1089,7}, {3905,6}, {3969,7}, {4353,8}, {4929,9}, {5633,7}, {5761,5}, {5793,7}, {5889,6}, {5953,5}, {6145,7}, {7041,5}, {7169,8}, {7425,9}, {7681,8}, {9281,7}, {9345,6}, {9409,5}, {9841,8}, {10305,9}, {10753,8}, {11265,9}, {11777,7}, {11905,9}, {12289,10}, {13313,9}, {14593,7}, {14849,9}, {15361,8}, {15745,7}, {15937,5}, {15969,8}, {16513,6}, {16609,4}, {16641,7}, {16865,5}, {17105,8}, {17409,7}, {18177,8}, {18433,9}, {19585,10}, {22529,9}, {23553,10}, {24577,11}, {26625,10}, {28161,8}, {28545,6}, {28737,4}, {28753,5}, {28817,6}, {28865,4}, {28881,5}, {28897,6}, {28929,8}, {29441,9}, {30465,11}, {30721,10}, {32769,9}, {33793,10}, {34817,9}, {35841,10}, {38913,8}, {40129,7}, {40193,6}, {40257,5}, {40289,8}, {40449,9}, {44289,8}, {44545,9}, {45057,10}, {48129,9}, {49409,10}, {50433,11}, {51201,10}, {53249,11}, {63489,9}, {64001,10}, {67585,9}, {68097,10}, {75777,11}, {81921,10}, {84993,11}, {89089,9}, {89601,11}, {96257,10}, {102401,12}, {126977,11}, {129025,9}, {129537,8}, {129793,10}, {131073,11}, {136193,10}, {138753,9}, {141313,11}, {145409,10}, {146945,11}, {159745,10}, {160769,9}, {161281,11}, {161793,10}, {169473,11}, {170497,9}, {171009,10}, {174081,9}, {179969,11}, {194561,10}, {206849,9}, {207361,10}, {209409,9}, {210945,10}, {211969,9}, {212993,11}, {215041,12}, {218113,10}, {219137,11}, {222209,12}, {253953,11}, {264705,9}, {266241,10}, {272897,11}, {274433,10}, {280577,11}, {364545,12}, {389121,10}, {390145,11}, {424961,13}, {434177,11}, {450561,13}, {516097,12}, {MP_SIZE_T_MAX, 0}}
-
-#define SQR_FFT_TABLE2 {{1,4}, {209,5}, {417,6}, {1089,7}, {3585,6}, {3777,8}, {6657,7}, {9249,8}, {11329,6}, {11521,5}, {11553,8}, {15105,6}, {15201,5}, {15233,7}, {15361,8}, {15617,7}, {15745,5}, {15857,4}, {15873,7}, {16257,6}, {16897,5}, {17377,7}, {17633,9}, {18049,7}, {18177,8}, {20033,6}, {20241,8}, {20993,9}, {22529,10}, {25345,11}, {28673,9}, {29697,10}, {31745,9}, {32257,8}, {32513,10}, {35073,9}, {35329,8}, {36865,7}, {36993,9}, {38401,8}, {39169,10}, {41473,9}, {41985,7}, {42497,6}, {42689,7}, {42753,8}, {43009,7}, {43137,9}, {43649,7}, {43809,6}, {43841,8}, {44545,9}, {45313,10}, {53249,11}, {60417,9}, {60929,7}, {61569,9}, {64769,10}, {71169,9}, {72193,10}, {72705,9}, {74241,7}, {74369,9}, {74753,11}, {75777,9}, {76289,10}, {79361,9}, {79873,11}, {96769,9}, {97537,10}, {102401,11}, {104961,12}, {122881,10}, {126977,8}, {128001,10}, {129537,9}, {130049,10}, {135169,9}, {135681,8}, {135937,7}, {136193,9}, {137217,11}, {139265,10}, {141057,8}, {141569,7}, {142337,8}, {143489,7}, {143617,8}, {144385,7}, {145537,9}, {145921,11}, {147457,9}, {149249,8}, {150273,7}, {151041,8}, {151297,10}, {154113,11}, {155649,9}, {157697,11}, {165889,9}, {172033,10}, {176129,9}, {177665,10}, {179201,11}, {181249,10}, {182273,11}, {186369,9}, {187649,8}, {188417,10}, {189441,11}, {192513,10}, {202753,8}, {203009,9}, {203265,8}, {203521,9}, {206849,10}, {210945,11}, {214017,12}, {219137,11}, {221185,12}, {225281,11}, {227329,12}, {239617,11}, {241665,12}, {245761,11}, {260097,10}, {261121,9}, {261633,10}, {263169,11}, {264193,10}, {265217,11}, {288769,10}, {293121,11}, {294913,9}, {296449,8}, {296705,9}, {298497,11}, {299009,10}, {300033,9}, {301569,11}, {304129,10}, {307201,11}, {359937,12}, {385025,11}, {395265,10}, {399361,11}, {409601,10}, {411137,9}, {411649,10}, {413697,11}, {455681,10}, {457217,11}, {462849,10}, {463873,12}, {480257,13}, {495617,12}, {499713,13}, {507905,11}, {509953,13}, {516097,12}, {526337,10}, {528385,11}, {587777,12}, {651265,11}, {719873,12}, {782337,11}, {849921,12}, {915457,13}, {MP_SIZE_T_MAX, 0}}
+#define GET_STR_DC_THRESHOLD                16
+#define GET_STR_PRECOMPUTE_THRESHOLD        31
+#define SET_STR_DC_THRESHOLD               422
+#define SET_STR_PRECOMPUTE_THRESHOLD      1524
diff -r 85730915e18f -r fde439f60722 mpn/powerpc64/mode64/p4/gmp-mparam.h
--- a/mpn/powerpc64/mode64/p4/gmp-mparam.h	Thu Jan 21 11:19:52 2010 +0100
+++ b/mpn/powerpc64/mode64/p4/gmp-mparam.h	Thu Jan 21 21:55:35 2010 +0100
@@ -1,4 +1,4 @@
-/* PowerPC970 gmp-mparam.h -- Compiler/machine parameter header file.
+/* POWER4/PowerPC970 gmp-mparam.h -- Compiler/machine parameter header file.
 
 Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
 
@@ -53,13 +53,114 @@
 #define MULMOD_BNM1_THRESHOLD               12
 #define SQRMOD_BNM1_THRESHOLD               14
 
-#define MUL_FFT_TABLE  { 368, 544, 1856, 2816, 7168, 20480, 81920, 327680, 0 }
-#define MUL_FFT_MODF_THRESHOLD             384
+#define MUL_FFT_MODF_THRESHOLD             654  /* k = 5 */
+#define MUL_FFT_TABLE3                                      \
+  { {    654, 5}, {     21, 6}, {     11, 5}, {     23, 6}, \
+    {     13, 5}, {     27, 6}, {     21, 7}, {     11, 6}, \
+    {     23, 7}, {     12, 6}, {     25, 7}, {     13, 6}, \
+    {     27, 7}, {     21, 8}, {     11, 7}, {     25, 8}, \
+    {     13, 7}, {     27, 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}, {     39,10}, \
+    {     23, 9}, {     55,11}, {     15,10}, {     31, 9}, \
+    {     71,10}, {     39, 9}, {     83,10}, {     47, 9}, \
+    {     95,10}, {     55,11}, {     31,10}, {     63, 9}, \
+    {    127,10}, {     79,11}, {     47,10}, {    103,12}, \
+    {     31,11}, {     63,10}, {    135, 8}, {    543,11}, \
+    {     79,10}, {    159, 8}, {    639,10}, {    167, 9}, \
+    {    335,11}, {     95, 9}, {    383, 8}, {    767,10}, \
+    {    199, 9}, {    415,11}, {    111,12}, {     63,11}, \
+    {    127, 9}, {    511, 8}, {   1023, 9}, {    543,11}, \
+    {    143, 9}, {    575, 8}, {   1151, 9}, {    607,11}, \
+    {    159, 9}, {    639,10}, {    351,12}, {     95,10}, \
+    {    383, 9}, {    767,10}, {    415, 9}, {    831,13}, \


More information about the gmp-commit mailing list