summaryrefslogtreecommitdiff
path: root/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/mparam_h.in')
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/mparam_h.in70
1 files changed, 28 insertions, 42 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in b/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in
index bb34727e69d..6dbff467690 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in
+++ b/Build/source/libs/mpfr/mpfr-src/src/mparam_h.in
@@ -1,6 +1,6 @@
/* Various Thresholds of MPFR, not exported. -*- mode: C -*-
-Copyright 2005-2019 Free Software Foundation, Inc.
+Copyright 2005-2020 Free Software Foundation, Inc.
This file is part of the GNU MPFR Library.
@@ -29,67 +29,53 @@ https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#include "generic/coverage/mparam.h"
/* Note: the different macros used here are those defined by gcc,
- for example with gcc -dM -E -xc /dev/null
- As of gcc 4.2, you can also use: -march=native or -mtune=native */
+ for example with gcc -mtune=native -dM -E -xc /dev/null */
#elif 1 /* no processor specific optimization for TeX Live */
#define MPFR_TUNE_CASE "default"
-#elif defined (__tune_pentium4__) /* Threshold for Pentium 4 */
-#define MPFR_TUNE_CASE "src/x86_64/pentium4/mparam.h"
-#include "x86_64/pentium4/mparam.h"
-
#elif (defined (__tune_core2__) || defined (__tune_nocona__)) && defined (__x86_64) /* 64-bit Core 2 or Xeon */
#define MPFR_TUNE_CASE "src/x86_64/core2/mparam.h"
#include "x86_64/core2/mparam.h"
-#elif defined (__tune_core2__) && defined (__i386) /* 32-bit Core 2,
- for example a 64-bit machine with gmp/mpfr compiled with ABI=32 */
-#define MPFR_TUNE_CASE "src/x86/core2/mparam.h"
-#include "x86/core2/mparam.h"
-
-#elif defined (__tune_k8__) && defined (__amd64__) /* AMD K8 */
-#define MPFR_TUNE_CASE "src/amd/k8/mparam.h"
-#include "amd/k8/mparam.h"
-
-#elif defined (__tune_athlon__) /* Threshold for Athlon */
-#define MPFR_TUNE_CASE "src/amd/athlon/mparam.h"
-#include "amd/athlon/mparam.h"
-
-#elif defined (__tune_pentiumpro__) || defined (__tune_i686__) || defined (__i386) /* we consider all other 386's here */
+/* Put that before __x86_64__ since __x86_64__ is also defined on AMD 64,
+ We also have to define __tune_k8__ since __amd64__ is also defined on
+ Intel x86_64! Ignore Clang as it defines both of these macros even on
+ Intel x86_64, and it does not seem to be possible to provide tuning
+ information when compiling with Clang, so that it is better to select
+ generic parameters for x86_64. */
+#elif defined (__amd64__) && (defined (__tune_k8__) || defined (__tune_znver1__)) && ! defined (__clang__) /* AMD 64 */
+#define MPFR_TUNE_CASE "src/amd/mparam.h"
+#include "amd/mparam.h"
+
+/* _M_X64 is for the Microsoft compiler, see
+ https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros */
+#elif defined (__x86_64__) || defined (_M_X64)
+/* generic parameters for x86_64 */
+#define MPFR_TUNE_CASE "src/x86_64/mparam.h"
+#include "x86_64/mparam.h"
+
+#elif defined (__i386) || defined(_M_IX86)
+/* we consider all other 386's here,
+ including a 64-bit machine with gmp/mpfr compiled with ABI=32 */
#define MPFR_TUNE_CASE "src/x86/mparam.h"
#include "x86/mparam.h"
-#elif defined (__ia64) || defined (__itanium__) || defined (__tune_ia64__)
-/* Threshold for IA64 */
-#define MPFR_TUNE_CASE "src/ia64/mparam.h"
-#include "ia64/mparam.h"
-
-#elif defined (__arm__) /* Threshold for ARM */
-#define MPFR_TUNE_CASE "src/arm/mparam.h"
-#include "arm/mparam.h"
-
-#elif defined (__PPC64__) /* Threshold for 64-bit PowerPC, test it before
- 32-bit PowerPC since _ARCH_PPC is also defined
- on 64-bit PowerPC */
+#elif defined (__PPC64__) /* Threshold for 64-bit PowerPC */
#define MPFR_TUNE_CASE "src/powerpc64/mparam.h"
#include "powerpc64/mparam.h"
-#elif defined (_ARCH_PPC) /* Threshold for 32-bit PowerPC */
-#define MPFR_TUNE_CASE "src/powerpc32/mparam.h"
-#include "powerpc32/mparam.h"
-
-#elif defined (__sparc_v9__) /* Threshold for 64-bits Sparc */
+#elif defined (__sparc_v9__) /* Threshold for 64-bit Sparc */
#define MPFR_TUNE_CASE "src/sparc64/mparam.h"
#include "sparc64/mparam.h"
-#elif defined (__hppa__) /* Threshold for HPPA */
-#define MPFR_TUNE_CASE "src/hppa/mparam.h"
-#include "hppa/mparam.h"
-
#elif defined (__mips__) /* MIPS */
#define MPFR_TUNE_CASE "src/mips/mparam.h"
#include "mips/mparam.h"
+#elif defined (__arm__) || defined (_M_ARM) /* ARM */
+#define MPFR_TUNE_CASE "src/arm/mparam.h"
+#include "arm/mparam.h"
+
#else
#define MPFR_TUNE_CASE "default"
#endif