gmp-mparam.h revision 1.1.1.3
1/* x86/k10 gmp-mparam.h -- Compiler/machine parameter header file.
2
3Copyright 1991, 1993, 1994, 2000-2011, 2014-2015 Free Software Foundation, Inc.
4
5This file is part of the GNU MP Library.
6
7The GNU MP Library is free software; you can redistribute it and/or modify
8it under the terms of either:
9
10  * the GNU Lesser General Public License as published by the Free
11    Software Foundation; either version 3 of the License, or (at your
12    option) any later version.
13
14or
15
16  * the GNU General Public License as published by the Free Software
17    Foundation; either version 2 of the License, or (at your option) any
18    later version.
19
20or both in parallel, as here.
21
22The GNU MP Library is distributed in the hope that it will be useful, but
23WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
24or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
25for more details.
26
27You should have received copies of the GNU General Public License and the
28GNU Lesser General Public License along with the GNU MP Library.  If not,
29see https://www.gnu.org/licenses/.  */
30
31#define GMP_LIMB_BITS 32
32#define GMP_LIMB_BYTES 4
33
34/* 3200-3600 MHz K10 Thuban */
35/* FFT tuning limit = 67,000,000 */
36/* Generated by tuneup.c, 2019-10-19, gcc 8.3 */
37
38#define MOD_1_NORM_THRESHOLD                 0  /* always */
39#define MOD_1_UNNORM_THRESHOLD               0  /* always */
40#define MOD_1N_TO_MOD_1_1_THRESHOLD         14
41#define MOD_1U_TO_MOD_1_1_THRESHOLD          7
42#define MOD_1_1_TO_MOD_1_2_THRESHOLD         0  /* never mpn_mod_1_1p */
43#define MOD_1_2_TO_MOD_1_4_THRESHOLD        18
44#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     22
45#define USE_PREINV_DIVREM_1                  1  /* native */
46#define DIV_QR_1N_PI1_METHOD                 1  /* 29.33% faster than 2 */
47#define DIV_QR_1_NORM_THRESHOLD              2
48#define DIV_QR_1_UNNORM_THRESHOLD        MP_SIZE_T_MAX  /* never */
49#define DIV_QR_2_PI2_THRESHOLD           MP_SIZE_T_MAX  /* never */
50#define DIVEXACT_1_THRESHOLD                 0  /* always (native) */
51#define BMOD_1_TO_MOD_1_THRESHOLD           35
52
53#define DIV_1_VS_MUL_1_PERCENT             258
54
55#define MUL_TOOM22_THRESHOLD                22
56#define MUL_TOOM33_THRESHOLD                73
57#define MUL_TOOM44_THRESHOLD               124
58#define MUL_TOOM6H_THRESHOLD               274
59#define MUL_TOOM8H_THRESHOLD               430
60
61#define MUL_TOOM32_TO_TOOM43_THRESHOLD      81
62#define MUL_TOOM32_TO_TOOM53_THRESHOLD      99
63#define MUL_TOOM42_TO_TOOM53_THRESHOLD      85
64#define MUL_TOOM42_TO_TOOM63_THRESHOLD      88
65#define MUL_TOOM43_TO_TOOM54_THRESHOLD     113
66
67#define SQR_BASECASE_THRESHOLD               0  /* always (native) */
68#define SQR_TOOM2_THRESHOLD                 26
69#define SQR_TOOM3_THRESHOLD                105
70#define SQR_TOOM4_THRESHOLD                154
71#define SQR_TOOM6_THRESHOLD                238
72#define SQR_TOOM8_THRESHOLD                309
73
74#define MULMID_TOOM42_THRESHOLD             50
75
76#define MULMOD_BNM1_THRESHOLD               15
77#define SQRMOD_BNM1_THRESHOLD               18
78
79#define MUL_FFT_MODF_THRESHOLD             570  /* k = 5 */
80#define MUL_FFT_TABLE3                                      \
81  { {    570, 5}, {     21, 6}, {     11, 5}, {     25, 6}, \
82    {     13, 5}, {     27, 6}, {     15, 5}, {     31, 6}, \
83    {     25, 7}, {     13, 6}, {     27, 7}, {     15, 6}, \
84    {     32, 7}, {     17, 6}, {     35, 7}, {     19, 6}, \
85    {     39, 7}, {     27, 8}, {     15, 7}, {     35, 8}, \
86    {     19, 7}, {     41, 8}, {     23, 7}, {     47, 8}, \
87    {     27, 9}, {     15, 8}, {     31, 7}, {     63, 8}, \
88    {     39, 9}, {     23, 8}, {     55, 9}, {     31, 8}, \
89    {     67, 9}, {     39, 8}, {     79, 9}, {     47, 8}, \
90    {     95, 9}, {     55,10}, {     31, 9}, {     79,10}, \
91    {     47, 9}, {     95,11}, {     31,10}, {     63, 9}, \
92    {    135,10}, {     79, 9}, {    159,10}, {     95, 9}, \
93    {    191,11}, {     63,10}, {    143, 9}, {    287,10}, \
94    {    159,11}, {     95,10}, {    191,12}, {     63,11}, \
95    {    127,10}, {    255, 9}, {    511,10}, {    271, 9}, \
96    {    543,10}, {    287,11}, {    159,10}, {    319, 9}, \
97    {    639,10}, {    335, 9}, {    671,11}, {    191,10}, \
98    {    383, 9}, {    767,10}, {    399, 9}, {    799,11}, \
99    {    223,12}, {    127,11}, {    255,10}, {    543,11}, \
100    {    287,10}, {    607, 9}, {   1215,11}, {    319,10}, \
101    {    671,12}, {    191,11}, {    383,10}, {    799,11}, \
102    {    415,13}, {    127,12}, {    255,11}, {    543,10}, \
103    {   1087,11}, {    607,10}, {   1215,12}, {    319,11}, \
104    {    671,10}, {   1343,11}, {    735,10}, {   1471, 9}, \
105    {   2943,12}, {    383,11}, {    799,10}, {   1599,11}, \
106    {    863,12}, {    447,11}, {    959,13}, {    255,12}, \
107    {    511,11}, {   1087,12}, {    575,11}, {   1215,10}, \
108    {   2431,12}, {    639,11}, {   1343,12}, {    703,11}, \
109    {   1471,10}, {   2943,13}, {    383,12}, {    767,11}, \
110    {   1599,12}, {    831,11}, {   1727,10}, {   3455,12}, \
111    {    959,11}, {   1919,14}, {    255,13}, {    511,12}, \
112    {   1087,11}, {   2239,12}, {   1215,11}, {   2431,13}, \
113    {    639,12}, {   1471,11}, {   2943,13}, {    767,12}, \
114    {   1727,11}, {   3455,13}, {    895,12}, {   1983,14}, \
115    {    511,13}, {   1023,12}, {   2239,13}, {   1151,12}, \
116    {   2431,13}, {   1407,12}, {   2943,14}, {    767,13}, \
117    {   1663,12}, {   3455,13}, {   1919,15}, {    511,14}, \
118    {   1023,13}, {   2175,12}, {   4479,13}, {   2431,14}, \
119    {   1279,13}, {   2943,12}, {   5887,14}, {   1535,13}, \
120    {   3455,14}, {   1791,13}, {   3967,15}, {   1023,14}, \
121    {   2047,13}, {   4479,14}, {   2303,13}, {   4991,14}, \
122    {   2815,13}, {   5887,15}, {   1535,14}, {   3839,16} }
123#define MUL_FFT_TABLE3_SIZE 168
124#define MUL_FFT_THRESHOLD                 7424
125
126#define SQR_FFT_MODF_THRESHOLD             525  /* k = 5 */
127#define SQR_FFT_TABLE3                                      \
128  { {    525, 5}, {     25, 6}, {     13, 5}, {     28, 6}, \
129    {     25, 7}, {     13, 6}, {     27, 7}, {     15, 6}, \
130    {     31, 7}, {     17, 6}, {     35, 7}, {     19, 6}, \
131    {     39, 7}, {     27, 8}, {     15, 7}, {     35, 8}, \
132    {     19, 7}, {     41, 8}, {     23, 7}, {     47, 8}, \
133    {     27, 9}, {     15, 8}, {     31, 7}, {     63, 8}, \
134    {     39, 9}, {     23, 8}, {     51, 9}, {     31, 8}, \
135    {     67, 9}, {     39, 8}, {     79, 9}, {     55,10}, \
136    {     31, 9}, {     79,10}, {     47, 9}, {     95,11}, \
137    {     31,10}, {     63, 9}, {    127,10}, {     79, 9}, \
138    {    159,10}, {     95,11}, {     63,10}, {    143, 9}, \
139    {    287,10}, {    159,11}, {     95,10}, {    191,12}, \
140    {     63,11}, {    127,10}, {    255, 9}, {    511,10}, \
141    {    271, 9}, {    543,10}, {    287,11}, {    159,10}, \
142    {    319, 9}, {    639,10}, {    335, 9}, {    671,10}, \
143    {    351,11}, {    191,10}, {    383, 9}, {    767,10}, \
144    {    399, 9}, {    799,10}, {    415,12}, {    127,11}, \
145    {    255,10}, {    543,11}, {    287,10}, {    607,11}, \
146    {    319,10}, {    671, 9}, {   1343,11}, {    351,10}, \
147    {    703,12}, {    191,11}, {    383,10}, {    799, 9}, \
148    {   1599,11}, {    415,10}, {    831,13}, {    127,12}, \
149    {    255,11}, {    543,10}, {   1087,11}, {    607,12}, \
150    {    319,11}, {    671,10}, {   1343,11}, {    735,10}, \
151    {   1471,12}, {    383,11}, {    799,10}, {   1599,11}, \
152    {    863,10}, {   1727,12}, {    447,11}, {    959,10}, \
153    {   1919,11}, {    991,12}, {    511,11}, {   1087,12}, \
154    {    575,11}, {   1215,10}, {   2431,12}, {    639,11}, \
155    {   1343,12}, {    703,11}, {   1471,13}, {    383,12}, \
156    {    767,11}, {   1599,12}, {    831,11}, {   1727,10}, \
157    {   3455,12}, {    959,11}, {   1919,13}, {    511,12}, \
158    {   1087,11}, {   2239,12}, {   1215,11}, {   2431,13}, \
159    {    639,12}, {   1471,11}, {   2943,13}, {    767,12}, \
160    {   1727,11}, {   3455,13}, {    895,12}, {   1919,14}, \
161    {    511,13}, {   1023,12}, {   2239,13}, {   1151,12}, \
162    {   2495,13}, {   1279,12}, {   2623,13}, {   1407,12}, \
163    {   2943,14}, {    767,13}, {   1663,12}, {   3455,13}, \
164    {   1919,15}, {    511,14}, {   1023,13}, {   2175,12}, \
165    {   4351,13}, {   2431,14}, {   1279,13}, {   2943,12}, \
166    {   5887,14}, {   1535,13}, {   3455,14}, {   1791,13}, \
167    {   3967,15}, {   1023,14}, {   2047,13}, {   4351,14}, \
168    {   2303,13}, {   4991,14}, {   2815,13}, {   5887,15}, \
169    {   1535,14}, {   3839,16} }
170#define SQR_FFT_TABLE3_SIZE 166
171#define SQR_FFT_THRESHOLD                 5312
172
173#define MULLO_BASECASE_THRESHOLD             6
174#define MULLO_DC_THRESHOLD                  40
175#define MULLO_MUL_N_THRESHOLD            14281
176#define SQRLO_BASECASE_THRESHOLD             8
177#define SQRLO_DC_THRESHOLD                 113
178#define SQRLO_SQR_THRESHOLD              10323
179
180#define DC_DIV_QR_THRESHOLD                 56
181#define DC_DIVAPPR_Q_THRESHOLD             248
182#define DC_BDIV_QR_THRESHOLD                55
183#define DC_BDIV_Q_THRESHOLD                158
184
185#define INV_MULMOD_BNM1_THRESHOLD           42
186#define INV_NEWTON_THRESHOLD               254
187#define INV_APPR_THRESHOLD                 252
188
189#define BINV_NEWTON_THRESHOLD              292
190#define REDC_1_TO_REDC_N_THRESHOLD          67
191
192#define MU_DIV_QR_THRESHOLD               1589
193#define MU_DIVAPPR_Q_THRESHOLD            1558
194#define MUPI_DIV_QR_THRESHOLD              114
195#define MU_BDIV_QR_THRESHOLD              1442
196#define MU_BDIV_Q_THRESHOLD               1524
197
198#define POWM_SEC_TABLE  1,16,102,416,1378
199
200#define GET_STR_DC_THRESHOLD                13
201#define GET_STR_PRECOMPUTE_THRESHOLD        21
202#define SET_STR_DC_THRESHOLD               270
203#define SET_STR_PRECOMPUTE_THRESHOLD      1105
204
205#define FAC_DSC_THRESHOLD                  159
206#define FAC_ODD_THRESHOLD                   34
207
208#define MATRIX22_STRASSEN_THRESHOLD         17
209#define HGCD2_DIV1_METHOD                    3  /* 0.70% faster than 4 */
210#define HGCD_THRESHOLD                     130
211#define HGCD_APPR_THRESHOLD                163
212#define HGCD_REDUCE_THRESHOLD             3389
213#define GCD_DC_THRESHOLD                   573
214#define GCDEXT_DC_THRESHOLD                393
215#define JACOBI_BASE_METHOD                   4  /* 9.13% faster than 1 */
216
217/* Tuneup completed successfully, took 52901 seconds */
218