summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m44
-rwxr-xr-xconfig.guess3
-rwxr-xr-xconfig.sub2
-rw-r--r--configure.ac14
-rw-r--r--mpn/x86_64/fat/fat.c7
5 files changed, 22 insertions, 8 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 97e234d9e..797e50673 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -63,7 +63,7 @@ define(X86_PATTERN,
[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
define(X86_64_PATTERN,
-[[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*]])
+[[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | zen-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*]])
dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
dnl ---------------------------------
@@ -741,7 +741,7 @@ main ()
long i;
for (i = 0; i < 88 + 1; i++)
a[i] = ~0L;
- r = malloc (10000 * sizeof (unsigned long));
+ r = calloc (10000, sizeof (unsigned long));
r2 = r;
for (i = 0; i < 528; i += 23)
{
diff --git a/config.guess b/config.guess
index 49ecca08d..73c7a2cc9 100755
--- a/config.guess
+++ b/config.guess
@@ -951,6 +951,9 @@ main ()
case 22: /* Jaguar, an improved bobcat */
cpu_64bit = 1, cpu_avx = 1, modelstr = "jaguar";
break;
+ case 23: /* Zen */
+ cpu_64bit = 1, cpu_avx = 1, modelstr = "zen";
+ break;
}
}
else if (strcmp (vendor_string, "CyrixInstead") == 0)
diff --git a/config.sub b/config.sub
index 4618cf079..5e24dd7ae 100755
--- a/config.sub
+++ b/config.sub
@@ -102,7 +102,7 @@ itanium | itanium2)
test_cpu=ia64 ;;
pentium | pentiummmx | pentiumpro | pentium[234m] | k[567] | k6[23] | geode | athlon | viac3*)
test_cpu=i386 ;;
-athlon64 | atom | silvermont | goldmont | core2 | corei* | opteron | k[89] | k10 | bobcat | jaguar* | bulldozer* | piledriver* | steamroller* | excavator* | nano | nehalem* | westmere* | sandybridge* | ivybridge* | haswell* | broadwell* | skylake* | kabylake* | knightslanding)
+athlon64 | atom | silvermont | goldmont | core2 | corei* | opteron | k[89] | k10 | bobcat | jaguar* | bulldozer* | piledriver* | steamroller* | excavator* | zen | nano | nehalem* | westmere* | sandybridge* | ivybridge* | haswell* | broadwell* | skylake* | kabylake* | knightslanding)
test_cpu=x86_64 ;;
power[2-9] | power2sc)
test_cpu=power ;;
diff --git a/configure.ac b/configure.ac
index 753ffef29..bcf738ed0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1828,6 +1828,12 @@ case $host in
path="x86/bd4 x86/bd3 x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86"
path_64="x86_64/bd4 x86_64/bd3 x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64"
;;
+ zen)
+ gcc_cflags_cpu="-mtune=znver1 -mtune=amdfam10 -mtune=k8"
+ gcc_cflags_arch="-march=znver1 -march=amdfam10 -march=k8"
+ path="x86/k7/mmx x86/k7 x86/mmx x86"
+ path_64="x86_64/zen x86_64/k10 x86_64/k8 x86_64"
+ ;;
core2)
gcc_cflags_cpu="-mtune=core2 -mtune=k8"
gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
@@ -2225,10 +2231,10 @@ case $host in
extra_functions_64="$extra_functions_64 fat fat_entry"
path_64="x86_64/fat x86_64"
fat_path="x86_64 x86_64/fat
- x86_64/k8 x86_64/k10 x86_64/bd1 x86_64/bobcat x86_64/pentium4
- x86_64/core2 x86_64/coreinhm x86_64/coreisbr x86_64/coreihwl
- x86_64/coreibwl x86_64/skylake x86_64/atom x86_64/silvermont
- x86_64/nano"
+ x86_64/k8 x86_64/k10 x86_64/bd1 x86_64/bobcat x86_64/zen
+ x86_64/pentium4 x86_64/core2 x86_64/coreinhm x86_64/coreisbr
+ x86_64/coreihwl x86_64/coreibwl x86_64/skylake x86_64/atom
+ x86_64/silvermont x86_64/nano"
fat_functions="$fat_functions addmul_2 addlsh1_n addlsh2_n sublsh1_n"
fi
diff --git a/mpn/x86_64/fat/fat.c b/mpn/x86_64/fat/fat.c
index 347fdf7f4..6d3c0fee2 100644
--- a/mpn/x86_64/fat/fat.c
+++ b/mpn/x86_64/fat/fat.c
@@ -91,6 +91,7 @@ static struct {
{ "steamroller","AuthenticAMD", MAKE_FMS (21, 0x30) },
{ "excavator", "AuthenticAMD", MAKE_FMS (21, 0x60) },
{ "jaguar", "AuthenticAMD", MAKE_FMS (22, 1) },
+ { "zen", "AuthenticAMD", MAKE_FMS (23, 1) },
{ "nano", "CentaurHauls", MAKE_FMS (6, 15) },
};
@@ -400,7 +401,6 @@ __gmpn_cpuvec_init (void)
case 0x0f: /* k8 */
case 0x11: /* "fam 11h", mix of k8 and k10 */
case 0x13:
- case 0x17:
CPUVEC_SETUP_k8;
break;
@@ -421,6 +421,11 @@ __gmpn_cpuvec_init (void)
CPUVEC_SETUP_k8;
CPUVEC_SETUP_k10;
CPUVEC_SETUP_bd1;
+
+ case 0x17: /* zen */
+ CPUVEC_SETUP_k8;
+ CPUVEC_SETUP_k10;
+ CPUVEC_SETUP_zen;
}
}
else if (strcmp (vendor_string, "CentaurHauls") == 0)