From mercurial at gmplib.org Wed Dec 4 18:26:30 2024 From: mercurial at gmplib.org (mercurial at gmplib.org) Date: Wed, 04 Dec 2024 18:26:30 +0100 Subject: [Gmp-commit] /var/hg/gmp: 2 new changesets Message-ID: details: /var/hg/gmp/rev/e3b0add757f0 changeset: 18475:e3b0add757f0 user: Torbjorn Granlund date: Wed Dec 04 18:25:05 2024 +0100 description: Recognise Zen5 and more Apple Arm CPUs. details: /var/hg/gmp/rev/e84c5c785bbe changeset: 18476:e84c5c785bbe user: Torbjorn Granlund date: Wed Dec 04 18:26:27 2024 +0100 description: Choose asm paths better for Zen5. diffstat: config.guess | 11 ++++++++++- configure.ac | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletions(-) diffs (52 lines): diff -r 6df5dd697f5a -r e84c5c785bbe config.guess --- a/config.guess Fri Oct 18 19:16:58 2024 +0200 +++ b/config.guess Wed Dec 04 18:26:27 2024 +0100 @@ -179,6 +179,10 @@ exact_cpu="applem1";; *Apple\ M2) exact_cpu="applem2";; + *Apple\ M3) + exact_cpu="applem3";; + *Apple\ M4) + exact_cpu="applem4";; esac fi @@ -700,7 +704,7 @@ for prtconfopt in "" "-vp"; do if test -z "$exact_cpu"; then if $SHELL -c "/usr/sbin/prtconf $prtconfopt" 2>/dev/null >$dummy; then - if egrep '(SUNW|ORCL),(Ultra)?SPARC-T5' $dummy >/dev/null; then + if egrep '(SUNW|ORCL),(Ultra)?SPARC-T[5-9]' $dummy >/dev/null; then exact_cpu=ultrasparct5 elif egrep '(SUNW|ORCL),(Ultra)?SPARC-T4' $dummy >/dev/null; then exact_cpu=ultrasparct4 @@ -1035,6 +1039,11 @@ modelstr = "zen4"; break; } + break; + case 26: /* Zen 5 */ + cpu_64bit = 1, cpu_avx = 1; + modelstr = "zen5"; + break; } } else if (strcmp (vendor_string, "HygonGenuine") == 0) diff -r 6df5dd697f5a -r e84c5c785bbe configure.ac --- a/configure.ac Fri Oct 18 19:16:58 2024 +0200 +++ b/configure.ac Wed Dec 04 18:26:27 2024 +0100 @@ -1935,6 +1935,13 @@ x86_have_mulx=yes path_64="x86_64/zen3 x86_64/zen2 x86_64/zen x86_64" ;; + zen5 | zen5noavx) + gcc_cflags_cpu="-mtune=znver5 -mtune=znver1 -mtune=amdfam10 -mtune=k8" + gcc_cflags_arch="-march=znver5 -march=znver1 -march=amdfam10 -march=k8" + path="x86/k7/mmx x86/k7 x86/mmx x86" + x86_have_mulx=yes + path_64="x86_64/zen5 x86_64/zen 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"