1e3209ae7SThomas Veerman /* gmp-mparam.h -- Compiler/machine parameter header file. 2e3209ae7SThomas Veerman 3e3209ae7SThomas Veerman Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free 4e3209ae7SThomas Veerman Software Foundation, Inc. 5e3209ae7SThomas Veerman 6e3209ae7SThomas Veerman This file is part of the GNU MP Library. 7e3209ae7SThomas Veerman 8e3209ae7SThomas Veerman The GNU MP Library is free software; you can redistribute it and/or modify 9e3209ae7SThomas Veerman it under the terms of the GNU Lesser General Public License as published by 10e3209ae7SThomas Veerman the Free Software Foundation; either version 3 of the License, or (at your 11e3209ae7SThomas Veerman option) any later version. 12e3209ae7SThomas Veerman 13e3209ae7SThomas Veerman The GNU MP Library is distributed in the hope that it will be useful, but 14e3209ae7SThomas Veerman WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15e3209ae7SThomas Veerman or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 16e3209ae7SThomas Veerman License for more details. 17e3209ae7SThomas Veerman 18e3209ae7SThomas Veerman You should have received a copy of the GNU Lesser General Public License 19e3209ae7SThomas Veerman along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ 20e3209ae7SThomas Veerman 21e3209ae7SThomas Veerman #define GMP_LIMB_BITS 32 22e3209ae7SThomas Veerman #define BYTES_PER_MP_LIMB 4 23e3209ae7SThomas Veerman 24*84d9c625SLionel Sambuc /* 1193MHz ARM (gcc55.fsffrance.org) */ 25e3209ae7SThomas Veerman 26e3209ae7SThomas Veerman #define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ 27e3209ae7SThomas Veerman #define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ 28e3209ae7SThomas Veerman #define MOD_1_NORM_THRESHOLD 0 /* always */ 29e3209ae7SThomas Veerman #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 */ 33e3209ae7SThomas Veerman #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 35e3209ae7SThomas Veerman #define USE_PREINV_DIVREM_1 1 /* preinv always */ 36e3209ae7SThomas Veerman #define DIVREM_2_THRESHOLD 0 /* preinv always */ 37e3209ae7SThomas Veerman #define DIVEXACT_1_THRESHOLD 0 /* always */ 38*84d9c625SLionel Sambuc #define BMOD_1_TO_MOD_1_THRESHOLD 41 39e3209ae7SThomas Veerman 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 45e3209ae7SThomas Veerman 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 50e3209ae7SThomas Veerman 51*84d9c625SLionel Sambuc #define SQR_BASECASE_THRESHOLD 12 52e3209ae7SThomas Veerman #define SQR_TOOM2_THRESHOLD 78 53*84d9c625SLionel Sambuc #define SQR_TOOM3_THRESHOLD 137 54e3209ae7SThomas Veerman #define SQR_TOOM4_THRESHOLD 212 55*84d9c625SLionel Sambuc #define SQR_TOOM6_THRESHOLD 306 56e3209ae7SThomas Veerman #define SQR_TOOM8_THRESHOLD 422 57e3209ae7SThomas Veerman 58*84d9c625SLionel Sambuc #define MULMOD_BNM1_THRESHOLD 20 59*84d9c625SLionel Sambuc #define SQRMOD_BNM1_THRESHOLD 26 60e3209ae7SThomas Veerman 61*84d9c625SLionel Sambuc #define MUL_FFT_MODF_THRESHOLD 436 /* k = 5 */ 62e3209ae7SThomas Veerman #define MUL_FFT_TABLE3 \ 63*84d9c625SLionel Sambuc { { 436, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ 64e3209ae7SThomas Veerman { 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 71e3209ae7SThomas Veerman #define MUL_FFT_THRESHOLD 5760 72e3209ae7SThomas Veerman 73*84d9c625SLionel Sambuc #define SQR_FFT_MODF_THRESHOLD 404 /* k = 5 */ 74e3209ae7SThomas Veerman #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 84e3209ae7SThomas Veerman 85e3209ae7SThomas Veerman #define MULLO_BASECASE_THRESHOLD 0 /* always */ 86*84d9c625SLionel Sambuc #define MULLO_DC_THRESHOLD 137 87*84d9c625SLionel Sambuc #define MULLO_MUL_N_THRESHOLD 11479 88e3209ae7SThomas Veerman 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 93e3209ae7SThomas Veerman 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 97e3209ae7SThomas Veerman 98*84d9c625SLionel Sambuc #define BINV_NEWTON_THRESHOLD 542 99*84d9c625SLionel Sambuc #define REDC_1_TO_REDC_N_THRESHOLD 117 100e3209ae7SThomas Veerman 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 106e3209ae7SThomas Veerman 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 111e3209ae7SThomas Veerman #define JACOBI_BASE_METHOD 2 112e3209ae7SThomas Veerman 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