xref: /dflybsd-src/gnu/usr.bin/mpfr/mparam.h (revision 2ec825ff6cffad99bf939a8fbde05fc44b40ef66)
12290a76eSJohn Marino /* Various Thresholds of MPFR, not exported.  -*- mode: C -*-
22290a76eSJohn Marino 
3*2ec825ffSJohn Marino Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
42290a76eSJohn Marino 
52290a76eSJohn Marino This file is part of the GNU MPFR Library.
62290a76eSJohn Marino 
72290a76eSJohn Marino The GNU MPFR Library is free software; you can redistribute it and/or modify
82290a76eSJohn Marino it under the terms of the GNU Lesser General Public License as published by
92290a76eSJohn Marino the Free Software Foundation; either version 3 of the License, or (at your
102290a76eSJohn Marino option) any later version.
112290a76eSJohn Marino 
122290a76eSJohn Marino The GNU MPFR Library is distributed in the hope that it will be useful, but
132290a76eSJohn Marino WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
142290a76eSJohn Marino or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
152290a76eSJohn Marino License for more details.
162290a76eSJohn Marino 
172290a76eSJohn Marino You should have received a copy of the GNU Lesser General Public License
182290a76eSJohn Marino along with the GNU MPFR Library; see the file COPYING.LESSER.  If not, see
192290a76eSJohn Marino http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
202290a76eSJohn Marino 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
212290a76eSJohn Marino 
222290a76eSJohn Marino #ifndef __MPFR_IMPL_H__
232290a76eSJohn Marino # error "MPFR Internal not included"
242290a76eSJohn Marino #endif
252290a76eSJohn Marino 
262290a76eSJohn Marino /* Note: the different macros used here are those defined by gcc,
272290a76eSJohn Marino    for example with gcc -dM -E -xc /dev/null
282290a76eSJohn Marino    As of gcc 4.2, you can also use: -march=native or -mtune=native */
292290a76eSJohn Marino 
302290a76eSJohn Marino #if defined (__tune_pentium4__) /* Threshold for Pentium 4 */
312290a76eSJohn Marino #define MPFR_TUNE_CASE "src/x86_64/pentium4/mparam.h"
322290a76eSJohn Marino #include "x86_64/pentium4/mparam.h"
332290a76eSJohn Marino 
34*2ec825ffSJohn Marino #elif (defined (__tune_core2__) || defined (__tune_nocona__)) && defined (__x86_64) /* 64-bit Core 2 or Xeon */
352290a76eSJohn Marino #define MPFR_TUNE_CASE "src/x86_64/core2/mparam.h"
362290a76eSJohn Marino #include "x86_64/core2/mparam.h"
372290a76eSJohn Marino 
382290a76eSJohn Marino #elif defined (__tune_core2__) && defined (__i386) /* 32-bit Core 2,
392290a76eSJohn Marino       for example a 64-bit machine with gmp/mpfr compiled with ABI=32 */
402290a76eSJohn Marino #define MPFR_TUNE_CASE "src/x86/core2/mparam.h"
412290a76eSJohn Marino #include "x86/core2/mparam.h"
422290a76eSJohn Marino 
432290a76eSJohn Marino #elif defined (__tune_k8__) /* Threshold for AMD 64 */
442290a76eSJohn Marino #define MPFR_TUNE_CASE "src/amd/k8/mparam.h"
452290a76eSJohn Marino #include "amd/k8/mparam.h"
462290a76eSJohn Marino 
472290a76eSJohn Marino #elif defined (__tune_athlon__) /* Threshold for Athlon */
482290a76eSJohn Marino #define MPFR_TUNE_CASE "src/amd/athlon/mparam.h"
492290a76eSJohn Marino #include "amd/athlon/mparam.h"
502290a76eSJohn Marino 
512290a76eSJohn Marino #elif defined (__tune_pentiumpro__) || defined (__tune_i686__) || defined (__i386) /* we consider all other 386's here */
522290a76eSJohn Marino #define MPFR_TUNE_CASE "src/x86/mparam.h"
532290a76eSJohn Marino #include "x86/mparam.h"
542290a76eSJohn Marino 
552290a76eSJohn Marino #elif defined (__ia64) || defined (__itanium__) || defined (__tune_ia64__)
562290a76eSJohn Marino /* Threshold for IA64 */
572290a76eSJohn Marino #define MPFR_TUNE_CASE "src/ia64/mparam.h"
582290a76eSJohn Marino #include "ia64/mparam.h"
592290a76eSJohn Marino 
602290a76eSJohn Marino #elif defined (__arm__) /* Threshold for ARM */
612290a76eSJohn Marino #define MPFR_TUNE_CASE "src/arm/mparam.h"
622290a76eSJohn Marino #include "arm/mparam.h"
632290a76eSJohn Marino 
64*2ec825ffSJohn Marino #elif defined (__PPC64__) /* Threshold for 64-bit PowerPC, test it before
65*2ec825ffSJohn Marino                              32-bit PowerPC since _ARCH_PPC is also defined
66*2ec825ffSJohn Marino                              on 64-bit PowerPC */
67*2ec825ffSJohn Marino #define MPFR_TUNE_CASE "src/powerpc64/mparam.h"
68*2ec825ffSJohn Marino #include "powerpc64/mparam.h"
69*2ec825ffSJohn Marino 
702290a76eSJohn Marino #elif defined (_ARCH_PPC) /* Threshold for 32-bit PowerPC */
712290a76eSJohn Marino #define MPFR_TUNE_CASE "src/powerpc32/mparam.h"
722290a76eSJohn Marino #include "powerpc32/mparam.h"
732290a76eSJohn Marino 
742290a76eSJohn Marino #elif defined (__sparc_v9__) /* Threshold for 64-bits Sparc */
752290a76eSJohn Marino #define MPFR_TUNE_CASE "src/sparc64/mparam.h"
762290a76eSJohn Marino #include "sparc64/mparam.h"
772290a76eSJohn Marino 
782290a76eSJohn Marino #elif defined (__hppa__) /* Threshold for HPPA */
792290a76eSJohn Marino #define MPFR_TUNE_CASE "src/hppa/mparam.h"
802290a76eSJohn Marino #include "hppa/mparam.h"
812290a76eSJohn Marino 
822290a76eSJohn Marino #else
832290a76eSJohn Marino #define MPFR_TUNE_CASE "default"
842290a76eSJohn Marino #endif
852290a76eSJohn Marino 
862290a76eSJohn Marino /****************************************************************
872290a76eSJohn Marino  * Default values of Threshold.                                 *
882290a76eSJohn Marino  * Must be included in any case: it checks, for every constant, *
892290a76eSJohn Marino  * if it has been defined, and it sets it to a default value if *
902290a76eSJohn Marino  * it was not previously defined.                               *
912290a76eSJohn Marino  ****************************************************************/
922290a76eSJohn Marino #include "generic/mparam.h"
93