1/* AMD K6 gmp-mparam.h -- Compiler/machine parameter header file. 2 3Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2009, 2010 4Free Software Foundation, Inc. 5 6This file is part of the GNU MP Library. 7 8The GNU MP Library is free software; you can redistribute it and/or modify 9it under the terms of the GNU Lesser General Public License as published by 10the Free Software Foundation; either version 3 of the License, or (at your 11option) any later version. 12 13The GNU MP Library is distributed in the hope that it will be useful, but 14WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 16License for more details. 17 18You should have received a copy of the GNU Lesser General Public License 19along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ 20 21#define GMP_LIMB_BITS 32 22#define BYTES_PER_MP_LIMB 4 23 24 25/* 450MHz K6-2 */ 26 27#define MOD_1_NORM_THRESHOLD 12 28#define MOD_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ 29#define MOD_1N_TO_MOD_1_1_THRESHOLD 28 30#define MOD_1U_TO_MOD_1_1_THRESHOLD 18 31#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 32#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX 33#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 82 34#define USE_PREINV_DIVREM_1 0 35#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ 36#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ 37 38#define MUL_TOOM22_THRESHOLD 20 39#define MUL_TOOM33_THRESHOLD 69 40#define MUL_TOOM44_THRESHOLD 106 41#define MUL_TOOM6H_THRESHOLD 157 42#define MUL_TOOM8H_THRESHOLD 199 43 44#define MUL_TOOM32_TO_TOOM43_THRESHOLD 73 45#define MUL_TOOM32_TO_TOOM53_THRESHOLD 69 46#define MUL_TOOM42_TO_TOOM53_THRESHOLD 65 47#define MUL_TOOM42_TO_TOOM63_THRESHOLD 64 48 49#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ 50#define SQR_TOOM2_THRESHOLD 32 51#define SQR_TOOM3_THRESHOLD 97 52#define SQR_TOOM4_THRESHOLD 143 53#define SQR_TOOM6_THRESHOLD 222 54#define SQR_TOOM8_THRESHOLD 272 55 56#define MULMOD_BNM1_THRESHOLD 13 57#define SQRMOD_BNM1_THRESHOLD 17 58 59#define MUL_FFT_MODF_THRESHOLD 476 /* k = 5 */ 60#define MUL_FFT_TABLE3 \ 61 { { 476, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ 62 { 11, 5}, { 23, 6}, { 17, 7}, { 9, 6}, \ 63 { 19, 7}, { 11, 6}, { 23, 7}, { 13, 6}, \ 64 { 27, 7}, { 15, 6}, { 31, 7}, { 17, 6}, \ 65 { 35, 7}, { 21, 8}, { 11, 7}, { 27, 8}, \ 66 { 15, 7}, { 35, 8}, { 19, 7}, { 39, 8}, \ 67 { 23, 7}, { 47, 8}, { 27, 9}, { 15, 8}, \ 68 { 31, 7}, { 63, 8}, { 39, 9}, { 23, 8}, \ 69 { 51,10}, { 15, 9}, { 31, 8}, { 67, 9}, \ 70 { 47,10}, { 31, 9}, { 79,10}, { 47, 9}, \ 71 { 95,11}, { 31,10}, { 63, 9}, { 135,10}, \ 72 { 79, 9}, { 167,10}, { 95, 9}, { 191,10}, \ 73 { 111,11}, { 63,10}, { 127, 9}, { 255,10}, \ 74 { 143, 9}, { 287,10}, { 159,11}, { 95,10}, \ 75 { 191, 9}, { 383,12}, { 63,11}, { 127,10}, \ 76 { 255, 9}, { 511,10}, { 271, 9}, { 543,10}, \ 77 { 287,11}, { 159,10}, { 351,11}, { 191,10}, \ 78 { 415, 9}, { 831,11}, { 223,12}, { 127,11}, \ 79 { 255,10}, { 543,11}, { 287,10}, { 575,11}, \ 80 { 351,10}, { 703,12}, { 191,11}, { 415,10}, \ 81 { 831,13}, { 127,12}, { 255,11}, { 543,10}, \ 82 { 1087,11}, { 575,12}, { 319,11}, { 703,12}, \ 83 { 383,11}, { 831,12}, { 447,11}, { 895,13}, \ 84 { 255,12}, { 511,11}, { 1087,12}, { 575,11}, \ 85 { 1151,12}, { 703,13}, { 383,12}, { 959,14}, \ 86 { 255,13}, { 511,12}, { 1215,13}, { 8192,14}, \ 87 { 16384,15}, { 32768,16} } 88#define MUL_FFT_TABLE3_SIZE 106 89#define MUL_FFT_THRESHOLD 7424 90 91#define SQR_FFT_MODF_THRESHOLD 432 /* k = 5 */ 92#define SQR_FFT_TABLE3 \ 93 { { 432, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ 94 { 11, 5}, { 23, 6}, { 21, 7}, { 11, 6}, \ 95 { 24, 7}, { 13, 6}, { 27, 7}, { 15, 6}, \ 96 { 31, 7}, { 21, 8}, { 11, 7}, { 29, 8}, \ 97 { 15, 7}, { 35, 8}, { 19, 7}, { 39, 8}, \ 98 { 23, 7}, { 49, 8}, { 27, 9}, { 15, 8}, \ 99 { 39, 9}, { 23, 7}, { 93, 8}, { 47, 7}, \ 100 { 95, 8}, { 51,10}, { 15, 9}, { 31, 8}, \ 101 { 67, 9}, { 39, 8}, { 79, 9}, { 47, 8}, \ 102 { 95, 9}, { 55,10}, { 31, 9}, { 71, 8}, \ 103 { 143, 9}, { 79,10}, { 47, 9}, { 95,11}, \ 104 { 31,10}, { 63, 9}, { 135,10}, { 79, 9}, \ 105 { 167,10}, { 95, 9}, { 191,11}, { 63,10}, \ 106 { 127, 9}, { 255,10}, { 143, 9}, { 287, 8}, \ 107 { 575,10}, { 159, 9}, { 319,11}, { 95,10}, \ 108 { 191,12}, { 63,11}, { 127,10}, { 255, 9}, \ 109 { 511,10}, { 271, 9}, { 543,10}, { 287,11}, \ 110 { 159,10}, { 319, 9}, { 639,10}, { 351, 9}, \ 111 { 703,11}, { 191,10}, { 415,11}, { 223,12}, \ 112 { 127,11}, { 255,10}, { 543,11}, { 287,10}, \ 113 { 607,11}, { 319,10}, { 639,11}, { 351,10}, \ 114 { 703,12}, { 191,11}, { 415,10}, { 831,13}, \ 115 { 127,12}, { 255,11}, { 543,10}, { 1087,11}, \ 116 { 607,12}, { 319,11}, { 703,12}, { 383,11}, \ 117 { 831,12}, { 447,13}, { 255,12}, { 511,11}, \ 118 { 1087,12}, { 575,11}, { 1215,12}, { 703,13}, \ 119 { 383,12}, { 895,14}, { 255,13}, { 511,12}, \ 120 { 1215,13}, { 8192,14}, { 16384,15}, { 32768,16} } 121#define SQR_FFT_TABLE3_SIZE 112 122#define SQR_FFT_THRESHOLD 7040 123 124#define MULLO_BASECASE_THRESHOLD 3 125#define MULLO_DC_THRESHOLD 60 126#define MULLO_MUL_N_THRESHOLD 13463 127 128#define DC_DIV_QR_THRESHOLD 78 129#define DC_DIVAPPR_Q_THRESHOLD 252 130#define DC_BDIV_QR_THRESHOLD 84 131#define DC_BDIV_Q_THRESHOLD 171 132 133#define INV_MULMOD_BNM1_THRESHOLD 55 134#define INV_NEWTON_THRESHOLD 234 135#define INV_APPR_THRESHOLD 236 136 137#define BINV_NEWTON_THRESHOLD 268 138#define REDC_1_TO_REDC_N_THRESHOLD 67 139 140#define MU_DIV_QR_THRESHOLD 1308 141#define MU_DIVAPPR_Q_THRESHOLD 1142 142#define MUPI_DIV_QR_THRESHOLD 134 143#define MU_BDIV_QR_THRESHOLD 1164 144#define MU_BDIV_Q_THRESHOLD 1164 145 146#define MATRIX22_STRASSEN_THRESHOLD 15 147#define HGCD_THRESHOLD 182 148#define GCD_DC_THRESHOLD 591 149#define GCDEXT_DC_THRESHOLD 472 150#define JACOBI_BASE_METHOD 2 151 152#define GET_STR_DC_THRESHOLD 24 153#define GET_STR_PRECOMPUTE_THRESHOLD 40 154#define SET_STR_DC_THRESHOLD 834 155#define SET_STR_PRECOMPUTE_THRESHOLD 2042 156