Tizen 2.1 base
[external/gmp.git] / mpn / x86 / fat / gmp-mparam.h
1 /* Fat binary x86 gmp-mparam.h -- Compiler/machine parameter header file.
2
3 Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003 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 the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12
13 The GNU MP Library is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
16 License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along 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 /* mpn_divexact_1 is faster than mpn_divrem_1 at all sizes.  The only time
26    this might not be true currently is for actual 80386 and 80486 chips,
27    where mpn/x86/dive_1.asm might be slower than mpn/x86/divrem_1.asm, but
28    that's not worth worrying about.  */
29 #define DIVEXACT_1_THRESHOLD  0
30
31 /* Only some of the x86s have an mpn_preinv_divrem_1, but we set
32    USE_PREINV_DIVREM_1 so that all callers use it, and then let the
33    __gmpn_cpuvec pointer go to plain mpn_divrem_1 if there's not an actual
34    preinv.  */
35 #define USE_PREINV_DIVREM_1   1
36
37 /* mpn_sqr_basecase is faster than mpn_mul_basecase at all sizes, no need
38    for mpn_sqr to call the latter.  */
39 #define SQR_BASECASE_THRESHOLD 0
40
41 /* Sensible fallbacks for these, when not taken from a cpu-specific
42    gmp-mparam.h.  */
43 #define MUL_TOOM22_THRESHOLD      20
44 #define MUL_TOOM33_THRESHOLD     130
45 #define SQR_TOOM2_THRESHOLD       30
46 #define SQR_TOOM3_THRESHOLD      200
47
48 /* These are values more or less in the middle of what the typical x86 chips
49    come out as.  For a fat binary it's necessary to have values for these,
50    since the defaults for MUL_FFT_TABLE and SQR_FFT_TABLE otherwise come out
51    as non-constant array initializers.  FIXME: Perhaps these should be done
52    in the cpuvec structure like other thresholds.  */
53 #define MUL_FFT_TABLE  { 464, 928, 1920, 3584, 10240, 40960, 0 }
54 #define MUL_FFT_MODF_THRESHOLD          400
55 #define MUL_FFT_THRESHOLD              2000
56
57 #define SQR_FFT_TABLE  { 528, 1184, 1920, 4608, 14336, 40960, 0 }
58 #define SQR_FFT_MODF_THRESHOLD          500
59 #define SQR_FFT_THRESHOLD              3000