xref: /minix3/external/lgpl3/gmp/lib/libgmp/arch/earm/gmp-mparam.h (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
10cdf705cSLionel Sambuc /* gmp-mparam.h -- Compiler/machine parameter header file.
20cdf705cSLionel Sambuc 
30cdf705cSLionel Sambuc Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free
40cdf705cSLionel Sambuc Software Foundation, Inc.
50cdf705cSLionel Sambuc 
60cdf705cSLionel Sambuc This file is part of the GNU MP Library.
70cdf705cSLionel Sambuc 
80cdf705cSLionel Sambuc The GNU MP Library is free software; you can redistribute it and/or modify
90cdf705cSLionel Sambuc it under the terms of the GNU Lesser General Public License as published by
100cdf705cSLionel Sambuc the Free Software Foundation; either version 3 of the License, or (at your
110cdf705cSLionel Sambuc option) any later version.
120cdf705cSLionel Sambuc 
130cdf705cSLionel Sambuc The GNU MP Library is distributed in the hope that it will be useful, but
140cdf705cSLionel Sambuc WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
150cdf705cSLionel Sambuc or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
160cdf705cSLionel Sambuc License for more details.
170cdf705cSLionel Sambuc 
180cdf705cSLionel Sambuc You should have received a copy of the GNU Lesser General Public License
190cdf705cSLionel Sambuc along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
200cdf705cSLionel Sambuc 
210cdf705cSLionel Sambuc #define GMP_LIMB_BITS 32
220cdf705cSLionel Sambuc #define BYTES_PER_MP_LIMB 4
230cdf705cSLionel Sambuc 
24*84d9c625SLionel Sambuc /* 1193MHz ARM (gcc55.fsffrance.org) */
250cdf705cSLionel Sambuc 
260cdf705cSLionel Sambuc #define DIVREM_1_NORM_THRESHOLD              0  /* preinv always */
270cdf705cSLionel Sambuc #define DIVREM_1_UNNORM_THRESHOLD            0  /* always */
280cdf705cSLionel Sambuc #define MOD_1_NORM_THRESHOLD                 0  /* always */
290cdf705cSLionel Sambuc #define MOD_1_UNNORM_THRESHOLD               0  /* always */
30*84d9c625SLionel Sambuc #define MOD_1N_TO_MOD_1_1_THRESHOLD         56
31*84d9c625SLionel Sambuc #define MOD_1U_TO_MOD_1_1_THRESHOLD         11
32*84d9c625SLionel Sambuc #define MOD_1_1_TO_MOD_1_2_THRESHOLD         0  /* never mpn_mod_1_1p */
330cdf705cSLionel Sambuc #define MOD_1_2_TO_MOD_1_4_THRESHOLD     MP_SIZE_T_MAX
34*84d9c625SLionel Sambuc #define PREINV_MOD_1_TO_MOD_1_THRESHOLD     71
350cdf705cSLionel Sambuc #define USE_PREINV_DIVREM_1                  1  /* preinv always */
360cdf705cSLionel Sambuc #define DIVREM_2_THRESHOLD                   0  /* preinv always */
370cdf705cSLionel Sambuc #define DIVEXACT_1_THRESHOLD                 0  /* always */
38*84d9c625SLionel Sambuc #define BMOD_1_TO_MOD_1_THRESHOLD           41
390cdf705cSLionel Sambuc 
40*84d9c625SLionel Sambuc #define MUL_TOOM22_THRESHOLD                36
41*84d9c625SLionel Sambuc #define MUL_TOOM33_THRESHOLD               125
42*84d9c625SLionel Sambuc #define MUL_TOOM44_THRESHOLD               193
43*84d9c625SLionel Sambuc #define MUL_TOOM6H_THRESHOLD               303
44*84d9c625SLionel Sambuc #define MUL_TOOM8H_THRESHOLD               418
450cdf705cSLionel Sambuc 
46*84d9c625SLionel Sambuc #define MUL_TOOM32_TO_TOOM43_THRESHOLD     125
47*84d9c625SLionel Sambuc #define MUL_TOOM32_TO_TOOM53_THRESHOLD     176
48*84d9c625SLionel Sambuc #define MUL_TOOM42_TO_TOOM53_THRESHOLD     114
49*84d9c625SLionel Sambuc #define MUL_TOOM42_TO_TOOM63_THRESHOLD     129
500cdf705cSLionel Sambuc 
51*84d9c625SLionel Sambuc #define SQR_BASECASE_THRESHOLD              12
520cdf705cSLionel Sambuc #define SQR_TOOM2_THRESHOLD                 78
53*84d9c625SLionel Sambuc #define SQR_TOOM3_THRESHOLD                137
540cdf705cSLionel Sambuc #define SQR_TOOM4_THRESHOLD                212
55*84d9c625SLionel Sambuc #define SQR_TOOM6_THRESHOLD                306
560cdf705cSLionel Sambuc #define SQR_TOOM8_THRESHOLD                422
570cdf705cSLionel Sambuc 
58*84d9c625SLionel Sambuc #define MULMOD_BNM1_THRESHOLD               20
59*84d9c625SLionel Sambuc #define SQRMOD_BNM1_THRESHOLD               26
600cdf705cSLionel Sambuc 
61*84d9c625SLionel Sambuc #define MUL_FFT_MODF_THRESHOLD             436  /* k = 5 */
620cdf705cSLionel Sambuc #define MUL_FFT_TABLE3                                      \
63*84d9c625SLionel Sambuc   { {    436, 5}, {     27, 6}, {     28, 7}, {     15, 6}, \
640cdf705cSLionel Sambuc     {     32, 7}, {     17, 6}, {     35, 7}, {     19, 6}, \
65*84d9c625SLionel Sambuc     {     39, 7}, {     29, 8}, {     15, 7}, {     35, 8}, \
66*84d9c625SLionel Sambuc     {     19, 7}, {     41, 8}, {     23, 7}, {     49, 8}, \
67*84d9c625SLionel Sambuc     {     27, 9}, {     15, 8}, {     31, 7}, {     63, 8}, \
68*84d9c625SLionel Sambuc     {    256, 9}, {    512,10}, {   1024,11}, {   2048,12}, \
69*84d9c625SLionel Sambuc     {   4096,13}, {   8192,14}, {  16384,15}, {  32768,16} }
70*84d9c625SLionel Sambuc #define MUL_FFT_TABLE3_SIZE 28
710cdf705cSLionel Sambuc #define MUL_FFT_THRESHOLD                 5760
720cdf705cSLionel Sambuc 
73*84d9c625SLionel Sambuc #define SQR_FFT_MODF_THRESHOLD             404  /* k = 5 */
740cdf705cSLionel Sambuc #define SQR_FFT_TABLE3                                      \
75*84d9c625SLionel Sambuc   { {    404, 5}, {     13, 4}, {     27, 5}, {     27, 6}, \
76*84d9c625SLionel Sambuc     {     28, 7}, {     15, 6}, {     32, 7}, {     17, 6}, \
77*84d9c625SLionel Sambuc     {     35, 7}, {     29, 8}, {     15, 7}, {     35, 8}, \
78*84d9c625SLionel Sambuc     {     19, 7}, {     41, 8}, {     23, 7}, {     47, 8}, \
79*84d9c625SLionel Sambuc     {     27, 9}, {     15, 8}, {     39, 9}, {    512,10}, \
80*84d9c625SLionel Sambuc     {   1024,11}, {   2048,12}, {   4096,13}, {   8192,14}, \
81*84d9c625SLionel Sambuc     {  16384,15}, {  32768,16} }
82*84d9c625SLionel Sambuc #define SQR_FFT_TABLE3_SIZE 26
83*84d9c625SLionel Sambuc #define SQR_FFT_THRESHOLD                 3776
840cdf705cSLionel Sambuc 
850cdf705cSLionel Sambuc #define MULLO_BASECASE_THRESHOLD             0  /* always */
86*84d9c625SLionel Sambuc #define MULLO_DC_THRESHOLD                 137
87*84d9c625SLionel Sambuc #define MULLO_MUL_N_THRESHOLD            11479
880cdf705cSLionel Sambuc 
89*84d9c625SLionel Sambuc #define DC_DIV_QR_THRESHOLD                150
90*84d9c625SLionel Sambuc #define DC_DIVAPPR_Q_THRESHOLD             494
91*84d9c625SLionel Sambuc #define DC_BDIV_QR_THRESHOLD               148
92*84d9c625SLionel Sambuc #define DC_BDIV_Q_THRESHOLD                345
930cdf705cSLionel Sambuc 
94*84d9c625SLionel Sambuc #define INV_MULMOD_BNM1_THRESHOLD           70
95*84d9c625SLionel Sambuc #define INV_NEWTON_THRESHOLD               474
96*84d9c625SLionel Sambuc #define INV_APPR_THRESHOLD                 478
970cdf705cSLionel Sambuc 
98*84d9c625SLionel Sambuc #define BINV_NEWTON_THRESHOLD              542
99*84d9c625SLionel Sambuc #define REDC_1_TO_REDC_N_THRESHOLD         117
1000cdf705cSLionel Sambuc 
101*84d9c625SLionel Sambuc #define MU_DIV_QR_THRESHOLD               2089
102*84d9c625SLionel Sambuc #define MU_DIVAPPR_Q_THRESHOLD            2172
103*84d9c625SLionel Sambuc #define MUPI_DIV_QR_THRESHOLD              225
104*84d9c625SLionel Sambuc #define MU_BDIV_QR_THRESHOLD              1528
105*84d9c625SLionel Sambuc #define MU_BDIV_Q_THRESHOLD               2089
1060cdf705cSLionel Sambuc 
107*84d9c625SLionel Sambuc #define MATRIX22_STRASSEN_THRESHOLD         16
108*84d9c625SLionel Sambuc #define HGCD_THRESHOLD                     197
109*84d9c625SLionel Sambuc #define GCD_DC_THRESHOLD                   902
110*84d9c625SLionel Sambuc #define GCDEXT_DC_THRESHOLD                650
1110cdf705cSLionel Sambuc #define JACOBI_BASE_METHOD                   2
1120cdf705cSLionel Sambuc 
113*84d9c625SLionel Sambuc #define GET_STR_DC_THRESHOLD                20
114*84d9c625SLionel Sambuc #define GET_STR_PRECOMPUTE_THRESHOLD        39
115*84d9c625SLionel Sambuc #define SET_STR_DC_THRESHOLD              1045
116*84d9c625SLionel Sambuc #define SET_STR_PRECOMPUTE_THRESHOLD      2147
117