[Patch 1/3]Add the recognition of Zhaoxin zxc\kx5000\kx6000
DylanFan-oc
DylanFan-oc at zhaoxin.com
Tue Apr 6 02:02:08 UTC 2021
Add the recognition of Zhaoxin zxc\kx5000\kx6000
add int stepping to distinguish between nano and zxc
diff -r 16dcc5929aa3 -r 746da45d51d8 acinclude.m4
--- a/acinclude.m4 Thu Mar 11 21:29:30 2021 +0100
+++ b/acinclude.m4 Thu Apr 01 19:37:18 2021 +0800
@@ -63,7 +63,7 @@
[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
define(X86_64_PATTERN,
-[[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*-*-*]])
+[[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*-*-*| zxc-*-* | kx5000-*-* | kx6000-*-*]])
dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
dnl ---------------------------------
diff -r 16dcc5929aa3 -r 746da45d51d8 config.guess
--- a/config.guess Thu Mar 11 21:29:30 2021 +0100
+++ b/config.guess Thu Apr 01 19:37:18 2021 +0800
@@ -847,7 +847,7 @@
char vendor_string[13];
char feature_string[12];
long fms;
- int family, model;
+ int family, model, stepping;
const char *modelstr, *suffix;
int cpu_64bit = 0, cpu_avx = 0;
int cpuid_64bit, cpuid_avx, cpuid_osxsave;
@@ -859,6 +859,7 @@
family = ((fms >> 8) & 0xf) + ((fms >> 20) & 0xff);
model = ((fms >> 4) & 0xf) + ((fms >> 12) & 0xf0);
+ stepping = (fms & 0xf);
cpuid_avx = (feature_string[11] >> 4) & 1;
cpuid_osxsave = (feature_string[11] >> 3) & 1;
@@ -1018,14 +1019,27 @@
{
/* Should recognize Cyrix' processors too. */
}
- else if (strcmp (vendor_string, "CentaurHauls") == 0)
+ else if (strcmp (vendor_string, "CentaurHauls") == 0 ||
+ strcmp (vendor_string, " Shanghai ") == 0)
{
switch (family)
{
case 6:
if (model < 9) modelstr = "viac3";
else if (model < 15) modelstr = "viac32";
- else cpu_64bit = 1, modelstr = "nano";
+ else if (model == 15)
+ {
+ if (stepping == 0xE)
+ cpu_64bit=1, modelstr = "zxc";
+ else cpu_64bit = 1, modelstr = "nano";
+ }
+ else cpu_64bit=1, modelstr = "zxc";
+ break;
+ case 7:
+ if(model == 0x1B)
+ cpu_64bit = 1, cpu_avx = 1, modelstr = "kx5000";
+ else if(model == 0x3B)
+ cpu_64bit = 1, cpu_avx = 1, modelstr = "kx6000";
break;
}
}
diff -r 16dcc5929aa3 -r 746da45d51d8 config.sub
--- a/config.sub Thu Mar 11 21:29:30 2021 +0100
+++ b/config.sub Thu Apr 01 19:37:18 2021 +0800
@@ -102,7 +102,7 @@
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* | zen* | 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 | zxc | kx5000 | kx6000)
test_cpu=x86_64 ;;
power[2-9] | power2sc)
test_cpu=power ;;
diff -r 16dcc5929aa3 -r 746da45d51d8 configure.ac
--- a/configure.ac Thu Mar 11 21:29:30 2021 +0100
+++ b/configure.ac Thu Apr 01 19:37:18 2021 +0800
@@ -1992,6 +1992,24 @@
path="x86/nano x86/mmx x86"
path_64="x86_64/nano x86_64"
;;
+ zxc)
+ gcc_cflags_cpu="-mtune=k8"
+ gcc_cflags_arch="-march=k8"
+ path="x86/mmx x86"
+ path_64="x86_64/zxc x86_64/nano x86_64/zen x86_64"
+ ;;
+ kx5000)
+ gcc_cflags_cpu="-mtune=k8"
+ gcc_cflags_arch="-march=k8"
+ path="x86/mmx x86"
+ path_64="x86_64/kx5000 x86_64/nano x86_64/zen x86_64"
+ ;;
+ kx6000)
+ gcc_cflags_cpu="-mtune=k8"
+ gcc_cflags_arch="-march=k8"
+ path="x86/mmx x86"
+ path_64="x86_64/kx6000 x86_64/nano x86_64/zen x86_64"
+ ;;
*)
gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486"
gcc_cflags_arch="-march=i486"
More information about the gmp-devel
mailing list