| 1 |
/* Fat binary x86_64 gmp-mparam.h -- Compiler/machine parameter header file. |
| 2 |
|
| 3 |
Copyright 1991, 1993, 1994, 2000-2003, 2009, 2011 Free Software Foundation, |
| 4 |
Inc. |
| 5 |
|
| 6 |
This file is part of the GNU MP Library. |
| 7 |
|
| 8 |
The GNU MP Library is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of either: |
| 10 |
|
| 11 |
* the GNU Lesser General Public License as published by the Free |
| 12 |
Software Foundation; either version 3 of the License, or (at your |
| 13 |
option) any later version. |
| 14 |
|
| 15 |
or |
| 16 |
|
| 17 |
* the GNU General Public License as published by the Free Software |
| 18 |
Foundation; either version 2 of the License, or (at your option) any |
| 19 |
later version. |
| 20 |
|
| 21 |
or both in parallel, as here. |
| 22 |
|
| 23 |
The GNU MP Library is distributed in the hope that it will be useful, but |
| 24 |
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 25 |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 26 |
for more details. |
| 27 |
|
| 28 |
You should have received copies of the GNU General Public License and the |
| 29 |
GNU Lesser General Public License along with the GNU MP Library. If not, |
| 30 |
see https://www.gnu.org/licenses/. */ |
| 31 |
|
| 32 |
#define GMP_LIMB_BITS 64 |
| 33 |
#define GMP_LIMB_BYTES 8 |
| 34 |
|
| 35 |
|
| 36 |
/* mpn_divexact_1 is faster than mpn_divrem_1 at all sizes. The only time |
| 37 |
this might not be true currently is for actual 80386 and 80486 chips, |
| 38 |
where mpn/x86/dive_1.asm might be slower than mpn/x86/divrem_1.asm, but |
| 39 |
that's not worth worrying about. */ |
| 40 |
#define DIVEXACT_1_THRESHOLD 0 |
| 41 |
|
| 42 |
/* Only some of the x86s have an mpn_preinv_divrem_1, but we set |
| 43 |
USE_PREINV_DIVREM_1 so that all callers use it, and then let the |
| 44 |
__gmpn_cpuvec pointer go to plain mpn_divrem_1 if there's not an actual |
| 45 |
preinv. */ |
| 46 |
#define USE_PREINV_DIVREM_1 1 |
| 47 |
|
| 48 |
#define BMOD_1_TO_MOD_1_THRESHOLD 20 |
| 49 |
|
| 50 |
/* mpn_sqr_basecase is faster than mpn_mul_basecase at all sizes, no need |
| 51 |
for mpn_sqr to call the latter. */ |
| 52 |
#define SQR_BASECASE_THRESHOLD 0 |
| 53 |
|
| 54 |
/* Sensible fallbacks for these, when not taken from a cpu-specific |
| 55 |
gmp-mparam.h. */ |
| 56 |
#define MUL_TOOM22_THRESHOLD 20 |
| 57 |
#define MUL_TOOM33_THRESHOLD 130 |
| 58 |
#define SQR_TOOM2_THRESHOLD 30 |
| 59 |
#define SQR_TOOM3_THRESHOLD 200 |
| 60 |
|
| 61 |
/* These are values more or less in the middle of what the typical x86 chips |
| 62 |
come out as. For a fat binary it's necessary to have values for these, |
| 63 |
since the defaults for MUL_FFT_TABLE and SQR_FFT_TABLE otherwise come out |
| 64 |
as non-constant array initializers. FIXME: Perhaps these should be done |
| 65 |
in the cpuvec structure like other thresholds. */ |
| 66 |
#define MUL_FFT_TABLE { 464, 928, 1920, 3584, 10240, 40960, 0 } |
| 67 |
#define MUL_FFT_MODF_THRESHOLD 400 |
| 68 |
#define MUL_FFT_THRESHOLD 2000 |
| 69 |
|
| 70 |
#define SQR_FFT_TABLE { 528, 1184, 1920, 4608, 14336, 40960, 0 } |
| 71 |
#define SQR_FFT_MODF_THRESHOLD 500 |
| 72 |
#define SQR_FFT_THRESHOLD 3000 |