From unknown Sat Jun 21 12:32:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#53895 <53895@debbugs.gnu.org> To: bug#53895 <53895@debbugs.gnu.org> Subject: Status: [PATCH 0/5] More CPU detection Reply-To: bug#53895 <53895@debbugs.gnu.org> Date: Sat, 21 Jun 2025 19:32:24 +0000 retitle 53895 [PATCH 0/5] More CPU detection reassign 53895 guix-patches submitter 53895 Efraim Flashner severity 53895 normal tag 53895 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:18:06 2022 Received: (at submit) by debbugs.gnu.org; 9 Feb 2022 10:18:06 +0000 Received: from localhost ([127.0.0.1]:49942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk34-0007sA-0w for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:18:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:55210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk33-0007s3-6g for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:18:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHk31-0005YM-MM for guix-patches@gnu.org; Wed, 09 Feb 2022 05:18:05 -0500 Received: from flashner.co.il ([178.62.234.194]:39852) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHk2z-0005vx-5A for guix-patches@gnu.org; Wed, 09 Feb 2022 05:18:03 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id 9F860403CD; Wed, 9 Feb 2022 10:17:27 +0000 (UTC) From: Efraim Flashner To: guix-patches@gnu.org Subject: [PATCH 0/5] More CPU detection Date: Wed, 9 Feb 2022 12:16:51 +0200 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) I noticed that my AMD CPU was showing up as bonnell, which was clearly wrong. I ended up rewriting parts of the x86_64 section (and considered having it also serve for i686) and then tried to add some bits for aarch64. IMO it's worth having the compiler-cpu-architectures for aarch64/armhf, at least until (guix transformations) is taught that for aarch64/armhf to use -mtune in place of -march. Efraim Flashner (5): guix: cpu: Rewrite based on feature flags. gnu: cpu: Add detection for AMD CPUs. gnu: gcc: Add compiler-cpu-architectures for aarch64. gnu: gcc: Add compiler-cpu-architectures for armhf. WIP: guix: cpu: Add detection for aarch64 CPUs. gnu/packages/gcc.scm | 33 +++++++- guix/cpu.scm | 186 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 186 insertions(+), 33 deletions(-) base-commit: 71438cd4222a02b1f89152437c1ea20499baa6a2 -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:22:36 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:22:36 +0000 Received: from localhost ([127.0.0.1]:49955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk7P-00080B-RA for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:22:36 -0500 Received: from flashner.co.il ([178.62.234.194]:50034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk7O-0007zy-4O for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:22:34 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id 394FB403CD; Wed, 9 Feb 2022 10:22:28 +0000 (UTC) From: Efraim Flashner To: 53895@debbugs.gnu.org Subject: [PATCH 1/5] guix: cpu: Rewrite based on feature flags. Date: Wed, 9 Feb 2022 12:21:47 +0200 Message-Id: <848868e0ad4427a976bec55968f82a3469009fb9.1644401681.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/cpu.scm (cpu->gcc-architecture): Rewrite detection based on detected feature flags. --- guix/cpu.scm | 56 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/guix/cpu.scm b/guix/cpu.scm index e1911f52a8..5bb3fa9d2f 100644 --- a/guix/cpu.scm +++ b/guix/cpu.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2022 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -87,28 +88,39 @@ (define (cpu->gcc-architecture cpu) ("x86_64" ;; Transcribed from GCC's 'host_detect_local_cpu' in driver-i386.c. (or (and (= 6 (cpu-family cpu)) ;the "Pentium Pro" family - (letrec-syntax ((model (syntax-rules (=>) - ((_) #f) - ((_ (candidate => integers ...) rest - ...) - (or (and (= (cpu-model cpu) integers) - candidate) - ... - (model rest ...)))))) - (model ("bonnel" => #x1c #x26) - ("silvermont" => #x37 #x4a #x4d #x5a #x5d) - ("core2" => #x0f #x17 #x1d) - ("nehalem" => #x1a #x1e #x1f #x2e) - ("westmere" => #x25 #x2c #x2f) - ("sandybridge" => #x2a #x2d) - ("ivybridge" => #x3a #x3e) - ("haswell" => #x3c #x3f #x45 #x46) - ("broadwell" => #x3d #x47 #x4f #x56) - ("skylake" => #x4e #x5e #x8e #x9e) - ("skylake-avx512" => #x55) ;TODO: cascadelake - ("knl" => #x57) - ("cannonlake" => #x66) - ("knm" => #x85)))) + (letrec-syntax ((if-flags (syntax-rules (=>) + ((_) + #f) + ((_ (flags ... => name) rest ...) + (if (every (lambda (flag) + (set-contains? (cpu-flags cpu) + flag)) + '(flags ...)) + name + (if-flags rest ...)))))) + + (if-flags ("avx" "avx512vp2intersect" "tsxldtrk" => "sapphirerapids") + ("avx" "avx512vp2intersect" => "tigerlake") + ("avx" "avx512bf16" => "cooperlake") + ("avx" "wbnoinvd" => "icelake-server") + ("avx" "avx512bitalg" => "icelake-client") + ("avx" "avx512vbmi" => "cannonlake") + ("avx" "avx5124vnniw" => "knm") + ("avx" "avx512er" => "knl") + ("avx" "avx512f" => "skylake-avx512") + ("avx" "serialize" => "alderlake") + ("avx" "clflushopt" => "skylake") + ("avx" "adx" => "broadwell") + ("avx" "avx2" => "haswell") + ("avx" => "sandybridge") + ("sse4_2" "gfni" => "tremont") + ("sse4_2" "sgx" => "goldmont-plus") + ("sse4_2" "xsave" => "goldmont") + ("sse4_2" "movbe" => "silvermont") + ("sse4_2" => "nehalem") + ("ssse3" "movbe" => "bonnell") + ("ssse3" => "core2") + ("longmode" => "x86-64")))) ;; Fallback case for non-Intel processors or for Intel processors not ;; recognized above. -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:23:08 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:23:08 +0000 Received: from localhost ([127.0.0.1]:49959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk7w-00081l-5R for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:23:08 -0500 Received: from flashner.co.il ([178.62.234.194]:50040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk7u-00080t-KW for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:23:07 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id EA4C5403CD; Wed, 9 Feb 2022 10:23:00 +0000 (UTC) From: Efraim Flashner To: 53895@debbugs.gnu.org Subject: [PATCH 2/5] gnu: cpu: Add detection for AMD CPUs. Date: Wed, 9 Feb 2022 12:21:48 +0200 Message-Id: X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/cpu.scm : Add vendor field. (current-cpu): Also fill in the 'vendor' field. (cpu->gcc-architecture): Add detection logic for AMD CPUs. --- guix/cpu.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/guix/cpu.scm b/guix/cpu.scm index 5bb3fa9d2f..6d44599822 100644 --- a/guix/cpu.scm +++ b/guix/cpu.scm @@ -27,6 +27,7 @@ (define-module (guix cpu) #:export (current-cpu cpu? cpu-architecture + cpu-vendor cpu-family cpu-model cpu-flags @@ -42,9 +43,10 @@ (define-module (guix cpu) ;; CPU description. (define-record-type - (cpu architecture family model flags) + (cpu architecture vendor family model flags) cpu? (architecture cpu-architecture) ;string, from 'uname' + (vendor cpu-vendor) ;string (family cpu-family) ;integer (model cpu-model) ;integer (flags cpu-flags)) ;set of strings @@ -58,28 +60,33 @@ (define (prefix? prefix) (call-with-input-file "/proc/cpuinfo" (lambda (port) - (let loop ((family #f) + (let loop ((vendor #f) + (family #f) (model #f)) (match (read-line port) ((? eof-object?) #f) + ((? (prefix? "vendor_id") str) + (match (string-tokenize str) + (("vendor_id" ":" vendor) + (loop vendor family model)))) ((? (prefix? "cpu family") str) (match (string-tokenize str) (("cpu" "family" ":" family) - (loop (string->number family) model)))) + (loop vendor (string->number family) model)))) ((? (prefix? "model") str) (match (string-tokenize str) (("model" ":" model) - (loop family (string->number model))) + (loop vendor family (string->number model))) (_ - (loop family model)))) + (loop vendor family model)))) ((? (prefix? "flags") str) (match (string-tokenize str) (("flags" ":" flags ...) (cpu (utsname:machine (uname)) - family model (list->set flags))))) + vendor family model (list->set flags))))) (_ - (loop family model)))))))) + (loop vendor family model)))))))) (define (cpu->gcc-architecture cpu) "Return the architecture name, suitable for GCC's '-march' flag, that @@ -87,7 +94,8 @@ (define (cpu->gcc-architecture cpu) (match (cpu-architecture cpu) ("x86_64" ;; Transcribed from GCC's 'host_detect_local_cpu' in driver-i386.c. - (or (and (= 6 (cpu-family cpu)) ;the "Pentium Pro" family + (or (and (equal? "GenuineIntel" (cpu-vendor cpu)) + (= 6 (cpu-family cpu)) ;the "Pentium Pro" family (letrec-syntax ((if-flags (syntax-rules (=>) ((_) #f) @@ -122,6 +130,40 @@ (define (cpu->gcc-architecture cpu) ("ssse3" => "core2") ("longmode" => "x86-64")))) + (and (equal? "AuthenticAMD" (cpu-vendor cpu)) + (letrec-syntax ((if-flags (syntax-rules (=>) + ((_) + #f) + ((_ (flags ... => name) rest ...) + (if (every (lambda (flag) + (set-contains? (cpu-flags cpu) + flag)) + '(flags ...)) + name + (if-flags rest ...)))))) + + (when (= 22 (cpu-family cpu)) + (if-flags ("movbe" => "btver2"))) + (when (= 6 (cpu-family cpu)) + (if-flags ("3dnowp" => "athalon"))) + + (if-flags ("vaes" => "znver3") + ("clwb" => "znver2") + ("clzero" => "znver1") + ("avx2" => "bdver4") + ("xsaveopt" => "bdver3") + ("bmi" => "bdver2") + ("xop" => "bdver1") + ("sse4a" "has_ssse3" => "btver1") + ("sse4a" => "amdfam10") + ("sse2" "sse3" => "k8-sse3") + ("longmode" "sse3" => "k8-sse3") + ("sse2" => "k8") + ("longmode" => "k8") + ("mmx" "3dnow" => "k6-3") + ("mmx" => "k6") + (_ => "pentium")))) + ;; Fallback case for non-Intel processors or for Intel processors not ;; recognized above. (letrec-syntax ((if-flags (syntax-rules (=>) @@ -147,7 +189,7 @@ (define (cpu->gcc-architecture cpu) ("ssse3" "movbe" => "bonnell") ("ssse3" => "core2"))) - ;; TODO: Recognize AMD models (bdver*, znver*, etc.)? + ;; TODO: Recognize CENTAUR/CYRIX/NSC? "x86_64")) (architecture -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:23:47 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:23:47 +0000 Received: from localhost ([127.0.0.1]:49968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk8U-00082o-8s for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:23:47 -0500 Received: from flashner.co.il ([178.62.234.194]:50048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk8R-00082Z-J9 for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:23:40 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id DDD55403CD; Wed, 9 Feb 2022 10:23:33 +0000 (UTC) From: Efraim Flashner To: 53895@debbugs.gnu.org Subject: [PATCH 3/5] gnu: gcc: Add compiler-cpu-architectures for aarch64. Date: Wed, 9 Feb 2022 12:21:49 +0200 Message-Id: <35229fe985da5a2027622b247d2c95d2bac4213b.1644401681.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/gcc.scm (%gcc-7.5-aarch64-micro-architectures, %gcc-10-aarch64-micro-architectures): New variables. (gcc-7, gcc-10)[properties]: Add aarch64 compiler-cpu-architectures. --- gnu/packages/gcc.scm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index efa0baeaa1..726c0eed89 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014, 2015, 2018 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge -;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021, 2022 Efraim Flashner ;;; Copyright © 2016 Carlos Sánchez de La Lama ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2020 Marius Bakke @@ -525,6 +525,11 @@ (define-public gcc-6 ,@(package-inputs gcc-4.7))))) +(define %gcc-7.5-aarch64-micro-architectures + ;; Suitable '-march' values for GCC 7.5. + ;; TODO: Allow dynamically adding feature flags. + '("armv8-a" "armv8.1-a" "armv8.2-a" "armv8.3-a")) + (define %gcc-7.5-x86_64-micro-architectures ;; Suitable '-march' values for GCC 7.5 (info "(gcc) x86 Options"). '("core2" "nehalem" "westmere" "sandybridge" "ivybridge" @@ -536,6 +541,12 @@ (define %gcc-7.5-x86_64-micro-architectures "znver1" "btver1" "btver2" "geode")) +(define %gcc-10-aarch64-micro-architectures + ;; Suitable '-march' values for GCC 10. + ;; TODO: Allow dynamically adding feature flags. + (append %gcc-7.5-aarch64-micro-architectures + '("armv8.4-a" "armv8.5-a" "armv8.6-a"))) + (define %gcc-10-x86_64-micro-architectures ;; Suitable '-march' values for GCC 10. (append %gcc-7.5-x86_64-micro-architectures @@ -545,7 +556,6 @@ (define %gcc-10-x86_64-micro-architectures "znver2" "znver3"))) - (define-public gcc-7 (package (inherit gcc-6) @@ -566,6 +576,7 @@ (define-public gcc-7 It also includes runtime support libraries for these languages.") (properties `((compiler-cpu-architectures + ("aarch64" ,@%gcc-7.5-aarch64-micro-architectures) ("x86_64" ,@%gcc-7.5-x86_64-micro-architectures)))))) (define-public gcc-8 @@ -619,6 +630,7 @@ (define-public gcc-10 (snippet gcc-canadian-cross-objdump-snippet))) (properties `((compiler-cpu-architectures + ("aarch64" ,@%gcc-10-aarch64-micro-architectures) ("x86_64" ,@%gcc-10-x86_64-micro-architectures)))))) (define-public gcc-11 -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:24:14 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:24:14 +0000 Received: from localhost ([127.0.0.1]:49973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk90-00084O-5v for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:24:14 -0500 Received: from flashner.co.il ([178.62.234.194]:50076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk8y-000847-Hz for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:24:12 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id DB130403CD; Wed, 9 Feb 2022 10:24:06 +0000 (UTC) From: Efraim Flashner To: 53895@debbugs.gnu.org Subject: [PATCH 4/5] gnu: gcc: Add compiler-cpu-architectures for armhf. Date: Wed, 9 Feb 2022 12:21:50 +0200 Message-Id: <0f41df430961566bffb9a5dac222690be88f4872.1644401681.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/gcc.scm (%gcc-7.5-armhf-micro-architectures, %gcc-10-armhf-micro-architectures): New variables. (gcc-7, gcc-10)[properties]: Add armhf compiler-cpu-architectures. --- gnu/packages/gcc.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 726c0eed89..e0a431a0ff 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -530,6 +530,14 @@ (define %gcc-7.5-aarch64-micro-architectures ;; TODO: Allow dynamically adding feature flags. '("armv8-a" "armv8.1-a" "armv8.2-a" "armv8.3-a")) +(define %gcc-7.5-armhf-micro-architectures + ;; Suitable '-march' values for GCC 7.5. + ;; TODO: Allow dynamically adding feature flags. + '("armv7" "armv7-a" "armv7-m" "armv7-r" "armv7e-m" "armv7ve" + "armv8-a" "armv8-a+crc" "armv8.1-a" "armv8.1-a+crc" + "armv8-m.base" "armv8-m.main" "armv8-m.main+dsp" + "iwmmxt" "iwmmxt2")) + (define %gcc-7.5-x86_64-micro-architectures ;; Suitable '-march' values for GCC 7.5 (info "(gcc) x86 Options"). '("core2" "nehalem" "westmere" "sandybridge" "ivybridge" @@ -547,6 +555,13 @@ (define %gcc-10-aarch64-micro-architectures (append %gcc-7.5-aarch64-micro-architectures '("armv8.4-a" "armv8.5-a" "armv8.6-a"))) +(define %gcc-10-armhf-micro-architectures + ;; Suitable '-march' values for GCC 10. + ;; TODO: Allow dynamically adding feature flags. + (append %gcc-7.5-armhf-micro-architectures + '("armv8.2-a" "armv8.3-a" "armv8.4-a" "armv8.5-a" "armv8.6-a" + "armv8-r" "armv8.1-m.main"))) + (define %gcc-10-x86_64-micro-architectures ;; Suitable '-march' values for GCC 10. (append %gcc-7.5-x86_64-micro-architectures @@ -577,6 +592,7 @@ (define-public gcc-7 (properties `((compiler-cpu-architectures ("aarch64" ,@%gcc-7.5-aarch64-micro-architectures) + ("armhf" ,@%gcc-7.5-armhf-micro-architectures) ("x86_64" ,@%gcc-7.5-x86_64-micro-architectures)))))) (define-public gcc-8 @@ -631,6 +647,7 @@ (define-public gcc-10 (properties `((compiler-cpu-architectures ("aarch64" ,@%gcc-10-aarch64-micro-architectures) + ("armhf" ,@%gcc-10-armhf-micro-architectures) ("x86_64" ,@%gcc-10-x86_64-micro-architectures)))))) (define-public gcc-11 -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:24:47 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:24:47 +0000 Received: from localhost ([127.0.0.1]:49976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk9X-00085F-El for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:24:47 -0500 Received: from flashner.co.il ([178.62.234.194]:50082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHk9V-000851-Gi for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:24:45 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id B9901403CD; Wed, 9 Feb 2022 10:24:39 +0000 (UTC) From: Efraim Flashner To: 53895@debbugs.gnu.org Subject: [PATCH 5/5] WIP: guix: cpu: Add detection for aarch64 CPUs. Date: Wed, 9 Feb 2022 12:21:51 +0200 Message-Id: <26894a74e7a1ed861a170239e26d13f1298fe5ac.1644401681.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/cpu.scm (current-cpu): Extend existing implementation to also read cpuinfo from aarch64 machines. (cpu->gcc-architecture): Add case for aarch64. --- guix/cpu.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/guix/cpu.scm b/guix/cpu.scm index 6d44599822..d4dbd5f6b8 100644 --- a/guix/cpu.scm +++ b/guix/cpu.scm @@ -66,25 +66,47 @@ (define (prefix? prefix) (match (read-line port) ((? eof-object?) #f) + ;; vendor for x86_64 and i686 ((? (prefix? "vendor_id") str) (match (string-tokenize str) (("vendor_id" ":" vendor) (loop vendor family model)))) + ;; vendor for aarch64 and armhf + ((? (prefix? "CPU implementer") str) + (match (string-tokenize str) + (("CPU" "implementer" ":" vendor) + (loop vendor family model)))) + ;; family for x86_64 and i686 ((? (prefix? "cpu family") str) (match (string-tokenize str) (("cpu" "family" ":" family) (loop vendor (string->number family) model)))) + ;; model for x86_64 and i686 ((? (prefix? "model") str) (match (string-tokenize str) (("model" ":" model) (loop vendor family (string->number model))) (_ (loop vendor family model)))) + ;; model for aarch64 and armhf + ((? (prefix? "CPU part") str) + (match (string-tokenize str) + (("CPU" "part" ":" model) + (loop vendor family (string->number (string-append "#x" (string-drop model 2))))) + (_ + (loop vendor family model)))) + ;; flags for x86_64 and i686 ((? (prefix? "flags") str) (match (string-tokenize str) (("flags" ":" flags ...) (cpu (utsname:machine (uname)) vendor family model (list->set flags))))) + ;; flags for aarch64 and armhf + ((? (prefix? "Features") str) + (match (string-tokenize str) + (("Features" ":" flags ...) + (cpu (utsname:machine (uname)) + vendor family model (list->set flags))))) (_ (loop vendor family model)))))))) @@ -192,6 +214,54 @@ (define (cpu->gcc-architecture cpu) ;; TODO: Recognize CENTAUR/CYRIX/NSC? "x86_64")) + ("aarch64" + (pk (cpu-architecture cpu)(cpu-vendor cpu)(cpu-family cpu) (cpu-model cpu)(cpu-flags cpu)) + ;; Currently returns ("aarch64" #f #f #f #< vhash: # insert: # ref: #>) + ;; Transcribed from GCC's list of aarch64 processors in aarch64-cores.def + (match (cpu-vendor cpu) + ("0x41" + (match (cpu-model cpu) + ((or #xd02 #xd04 #xd03 #xd07 #xd08 #xd09) + "armv8-a") + ((or #xd05 #xd0a #xd0b #xd0e #xd0d #xd41 #xd42 #xd4b #xd46 #xd43 #xd44 #xd41 #xd0c #xd4a) + "armv8.2-a") + (#xd40 + "armv8.4-a") + (#xd15 + "armv8-r") + ((or #xd46 #xd47 #xd48) + "armv9-a"))) + ("0x42" + "armv8.1-a") + ("0x43" + (match (cpu-model cpu) + ((or #x0a0 #x0a1 #x0a2 #x0a3) + "armv8-a") + ((or #x0b0 #x0b1 #x0b2 #x0b3 #x0b4 #x0b5) + "armv8.2-a") + (#x0b8 + "armv8.3-a"))) + ("0x46" + "armv8.2-a") + ("0x48" + "armv8.2-a") + ("0x50" + "armv8-a") + ("0x51" + (match (cpu-model cpu) + (#xC00 + "armv8-a") + (#x516 + "armv8.1-a") + (#xC01 + "armv8.4-a"))) + ("0x53" + "armv8-a") + ("0x68" + "armv8-a") + (_ + "armv8-a")) + "armv8-a") (architecture ;; TODO: AArch64. architecture))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:35:46 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:35:46 +0000 Received: from localhost ([127.0.0.1]:49987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkK9-0008OC-80 for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:35:46 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:44488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkJu-0008Nh-Rk for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:35:43 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6021C234; Wed, 9 Feb 2022 11:35:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P_bW0OxTj_GJ; Wed, 9 Feb 2022 11:35:23 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 94A0A1B4; Wed, 9 Feb 2022 11:35:22 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: bug#53895: [PATCH 0/5] More CPU detection References: <848868e0ad4427a976bec55968f82a3469009fb9.1644401681.git.efraim@flashner.co.il> Date: Wed, 09 Feb 2022 11:35:22 +0100 In-Reply-To: <848868e0ad4427a976bec55968f82a3469009fb9.1644401681.git.efraim@flashner.co.il> (Efraim Flashner's message of "Wed, 9 Feb 2022 12:21:47 +0200") Message-ID: <87ee4c8h05.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 6021C234 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53895 Cc: 53895@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi! Efraim Flashner skribis: > * guix/cpu.scm (cpu->gcc-architecture): Rewrite detection based on > detected feature flags. [...] > ;; Transcribed from GCC's 'host_detect_local_cpu' in driver-i386.c. > (or (and (=3D 6 (cpu-family cpu)) ;the "Pentium Pro" f= amily > - (letrec-syntax ((model (syntax-rules (=3D>) > - ((_) #f) > - ((_ (candidate =3D> integers ...)= rest > - ...) > - (or (and (=3D (cpu-model cpu) in= tegers) > - candidate) > - ... > - (model rest ...)))))) > - (model ("bonnel" =3D> #x1c #x26) > - ("silvermont" =3D> #x37 #x4a #x4d #x5a #x5d) > - ("core2" =3D> #x0f #x17 #x1d) > - ("nehalem" =3D> #x1a #x1e #x1f #x2e) > - ("westmere" =3D> #x25 #x2c #x2f) > - ("sandybridge" =3D> #x2a #x2d) > - ("ivybridge" =3D> #x3a #x3e) > - ("haswell" =3D> #x3c #x3f #x45 #x46) > - ("broadwell" =3D> #x3d #x47 #x4f #x56) > - ("skylake" =3D> #x4e #x5e #x8e #x9e) > - ("skylake-avx512" =3D> #x55) ;TODO: cascadelake > - ("knl" =3D> #x57) > - ("cannonlake" =3D> #x66) > - ("knm" =3D> #x85)))) > + (letrec-syntax ((if-flags (syntax-rules (=3D>) > + ((_) > + #f) > + ((_ (flags ... =3D> name) rest= ...) > + (if (every (lambda (flag) > + (set-contains? (= cpu-flags cpu) > + f= lag)) > + '(flags ...)) > + name > + (if-flags rest ...)))))) > + > + (if-flags ("avx" "avx512vp2intersect" "tsxldtrk" =3D> "s= apphirerapids") > + ("avx" "avx512vp2intersect" =3D> "tigerlake") > + ("avx" "avx512bf16" =3D> "cooperlake") > + ("avx" "wbnoinvd" =3D> "icelake-server") > + ("avx" "avx512bitalg" =3D> "icelake-client") > + ("avx" "avx512vbmi" =3D> "cannonlake") In current master, the logic is: if it=E2=80=99s an intel then pick the model ID if that didn=E2=80=99t work then do feature-based detection Here you=E2=80=99re removing the first part (using the Intel model ID) and extending the second part. Perhaps we could extend the second part but still keep the first one? The AMD detection code would have to go before the generic fallback case though. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:43:31 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:43:31 +0000 Received: from localhost ([127.0.0.1]:50007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkRf-0000Av-Ib for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:43:31 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:44718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkRe-0000AZ-5i for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:43:30 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 8CC461B7; Wed, 9 Feb 2022 11:43:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Swc1X8JIVJ0w; Wed, 9 Feb 2022 11:43:22 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 55570174; Wed, 9 Feb 2022 11:43:22 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: bug#53895: [PATCH 0/5] More CPU detection References: Date: Wed, 09 Feb 2022 11:43:21 +0100 In-Reply-To: (Efraim Flashner's message of "Wed, 9 Feb 2022 12:21:48 +0200") Message-ID: <878ruk8gmu.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 8CC461B7 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53895 Cc: 53895@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Efraim Flashner skribis: > * guix/cpu.scm : Add vendor field. > (current-cpu): Also fill in the 'vendor' field. > (cpu->gcc-architecture): Add detection logic for AMD CPUs. [...] > + (and (equal? "AuthenticAMD" (cpu-vendor cpu)) Isn=E2=80=99t that equivalent to (=3D (cpu-family cpu) some-value)? > + (letrec-syntax ((if-flags (syntax-rules (=3D>) > + ((_) > + #f) > + ((_ (flags ... =3D> name) rest= ...) > + (if (every (lambda (flag) > + (set-contains? (= cpu-flags cpu) > + f= lag)) > + '(flags ...)) > + name > + (if-flags rest ...)))))) > + > + (when (=3D 22 (cpu-family cpu)) > + (if-flags ("movbe" =3D> "btver2"))) > + (when (=3D 6 (cpu-family cpu)) > + (if-flags ("3dnowp" =3D> "athalon"))) This has no effect (because =E2=80=98if-flags=E2=80=99 returns a value that= is ignored since it=E2=80=99s not returned.) What we could do is extend =E2=80=98if-flags=E2=80=99 so that it can option= ally check for a family number: (if-flags ((family 22) "movbe" =3D> "btver2") =E2=80=A6) > + (if-flags ("vaes" =3D> "znver3") > + ("clwb" =3D> "znver2") > + ("clzero" =3D> "znver1") However, the code in driver-i386.c seems to look at model IDs (the big =E2=80=9Cswitch (processor)=E2=80=9D thing) and not feature flags. Or am I= overlooking something? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:46:18 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:46:18 +0000 Received: from localhost ([127.0.0.1]:50015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkUM-0000IL-6l for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:46:18 -0500 Received: from flashner.co.il ([178.62.234.194]:50516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkUK-0000I0-0u for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:46:17 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id 0738D40297; Wed, 9 Feb 2022 10:46:09 +0000 (UTC) Date: Wed, 9 Feb 2022 12:45:35 +0200 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#53895: [PATCH 0/5] More CPU detection Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8s?= , 53895@debbugs.gnu.org References: <848868e0ad4427a976bec55968f82a3469009fb9.1644401681.git.efraim@flashner.co.il> <87ee4c8h05.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7HBfkYMFZGvymHTa" Content-Disposition: inline In-Reply-To: <87ee4c8h05.fsf_-_@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: 53895@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --7HBfkYMFZGvymHTa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 09, 2022 at 11:35:22AM +0100, Ludovic Court=C3=A8s wrote: > Hi! >=20 > Efraim Flashner skribis: >=20 > > * guix/cpu.scm (cpu->gcc-architecture): Rewrite detection based on > > detected feature flags. >=20 > [...] >=20 > > ;; Transcribed from GCC's 'host_detect_local_cpu' in driver-i386.= c. > > (or (and (=3D 6 (cpu-family cpu)) ;the "Pentium Pro"= family > > - (letrec-syntax ((model (syntax-rules (=3D>) > > - ((_) #f) > > - ((_ (candidate =3D> integers ..= =2E) rest > > - ...) > > - (or (and (=3D (cpu-model cpu) = integers) > > - candidate) > > - ... > > - (model rest ...)))))) > > - (model ("bonnel" =3D> #x1c #x26) > > - ("silvermont" =3D> #x37 #x4a #x4d #x5a #x5d) > > - ("core2" =3D> #x0f #x17 #x1d) > > - ("nehalem" =3D> #x1a #x1e #x1f #x2e) > > - ("westmere" =3D> #x25 #x2c #x2f) > > - ("sandybridge" =3D> #x2a #x2d) > > - ("ivybridge" =3D> #x3a #x3e) > > - ("haswell" =3D> #x3c #x3f #x45 #x46) > > - ("broadwell" =3D> #x3d #x47 #x4f #x56) > > - ("skylake" =3D> #x4e #x5e #x8e #x9e) > > - ("skylake-avx512" =3D> #x55) ;TODO: cascadelake > > - ("knl" =3D> #x57) > > - ("cannonlake" =3D> #x66) > > - ("knm" =3D> #x85)))) > > + (letrec-syntax ((if-flags (syntax-rules (=3D>) > > + ((_) > > + #f) > > + ((_ (flags ... =3D> name) re= st ...) > > + (if (every (lambda (flag) > > + (set-contains?= (cpu-flags cpu) > > + = flag)) > > + '(flags ...)) > > + name > > + (if-flags rest ...)))))) > > + > > + (if-flags ("avx" "avx512vp2intersect" "tsxldtrk" =3D> = "sapphirerapids") > > + ("avx" "avx512vp2intersect" =3D> "tigerlake") > > + ("avx" "avx512bf16" =3D> "cooperlake") > > + ("avx" "wbnoinvd" =3D> "icelake-server") > > + ("avx" "avx512bitalg" =3D> "icelake-client") > > + ("avx" "avx512vbmi" =3D> "cannonlake") >=20 > In current master, the logic is: >=20 > if it=E2=80=99s an intel > then pick the model ID > if that didn=E2=80=99t work > then do feature-based detection >=20 > Here you=E2=80=99re removing the first part (using the Intel model ID) and > extending the second part. Perhaps we could extend the second part but > still keep the first one? >=20 > The AMD detection code would have to go before the generic fallback case > though. >=20 > WDYT? >=20 > Ludo=E2=80=99. in gcc-11 driver-i386.c is modified to use the 'vendor' to choose the 'processor', and then using the processor flag it runs through a list of if statements to check feature flags, so that's what I was following. --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --7HBfkYMFZGvymHTa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmIDm0wACgkQQarn3Mo9 g1GWng/+KAjjyd0KGXjwIfX2lzesS/Js08dJet2TIwuK8T64qGiWPkZo+k2v6ByS oa2g1S8Ii+09x51dDEI5naU47eUJQbBFyNtSm3XHQ2N7bpHroFvnZCZhwf/6KWtq hbGT5/v9esSjMmvMjRC8PQizZmr/Xkipipj98ia5Y7/UWMh6KcUxJitkEUFQg7HS cxFnyHXMJrriAAPWTt4fsm50Pbp8+zCQ23zyfhF7STaSE3Rv34QW6iOjLw+wvFCJ EoL8ma74MEOXicW7OJnRZZYhNLe23gflFdvIet2YjDilWv2jeEyADmiCfDZONHAR ttUvn91G2qYgwLxNiQARe6cZqZSFNE4HWcjsc+W65BqmTqm7sRCvU+AW3anng5AB kshe2wvUDfbqmdCYaMHCVbvlIlk/RDW6bAvtXQzk58SYWrkOGjlxcdn8/fW7RJWb LQwOjEe+2exYPJN0ARKHy0JVBhnDupadBR6nT5MmYUjnJO2Lq65XPHqtTOF/NkpH nClD99Sd8TYVCbNE9qK2nsQBKTGQzlYAMS6LGHnqyeokBmkd9FPOWc6iRoTRTBP2 MrcsVAcZ44nIXBXRgypZCybUE55ArPO//YGgnzQaovO2VFQJ4KQfZkzfb82L+rSV Te2OV5SkKd15AL9tp/xZfSnqKPgjoK9p0m5BMJl2RkofEy1XgX0= =Dt6k -----END PGP SIGNATURE----- --7HBfkYMFZGvymHTa-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 05:54:57 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 10:54:57 +0000 Received: from localhost ([127.0.0.1]:50033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkci-0000Zd-Py for submit@debbugs.gnu.org; Wed, 09 Feb 2022 05:54:57 -0500 Received: from flashner.co.il ([178.62.234.194]:50714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHkch-0000ZM-8z for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 05:54:55 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id 3B5E540297; Wed, 9 Feb 2022 10:54:49 +0000 (UTC) Date: Wed, 9 Feb 2022 12:54:14 +0200 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#53895: [PATCH 0/5] More CPU detection Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8s?= , 53895@debbugs.gnu.org References: <878ruk8gmu.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+CqTemkAamJsqjA2" Content-Disposition: inline In-Reply-To: <878ruk8gmu.fsf_-_@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: 53895@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --+CqTemkAamJsqjA2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 09, 2022 at 11:43:21AM +0100, Ludovic Court=C3=A8s wrote: > Efraim Flashner skribis: >=20 > > * guix/cpu.scm : Add vendor field. > > (current-cpu): Also fill in the 'vendor' field. > > (cpu->gcc-architecture): Add detection logic for AMD CPUs. >=20 > [...] >=20 > > + (and (equal? "AuthenticAMD" (cpu-vendor cpu)) >=20 > Isn=E2=80=99t that equivalent to (=3D (cpu-family cpu) some-value)? It looks to me like 'family' started as the prefix for iX86, so Intel is mostly using family 6, except when a couple of other processors slip in. I wasn't able to find a hard and fast rule for what family AMD typically uses, on my machine its 23. In driver-i386.c it's sort by vendor first: if (vendor =3D=3D VENDOR_AMD) > > + (letrec-syntax ((if-flags (syntax-rules (=3D>) > > + ((_) > > + #f) > > + ((_ (flags ... =3D> name) re= st ...) > > + (if (every (lambda (flag) > > + (set-contains?= (cpu-flags cpu) > > + = flag)) > > + '(flags ...)) > > + name > > + (if-flags rest ...)))))) > > + > > + (when (=3D 22 (cpu-family cpu)) > > + (if-flags ("movbe" =3D> "btver2"))) > > + (when (=3D 6 (cpu-family cpu)) > > + (if-flags ("3dnowp" =3D> "athalon"))) >=20 > This has no effect (because =E2=80=98if-flags=E2=80=99 returns a value th= at is ignored > since it=E2=80=99s not returned.) >=20 > What we could do is extend =E2=80=98if-flags=E2=80=99 so that it can opti= onally check > for a family number: >=20 > (if-flags ((family 22) "movbe" =3D> "btver2") > =E2=80=A6) That sounds like a good idea. > > + (if-flags ("vaes" =3D> "znver3") > > + ("clwb" =3D> "znver2") > > + ("clzero" =3D> "znver1") >=20 > However, the code in driver-i386.c seems to look at model IDs (the big > =E2=80=9Cswitch (processor)=E2=80=9D thing) and not feature flags. Or am= I overlooking > something? switch (processor) comes after all the AMD chips are sorted. It looks like all of Intel's i686 and x86_64 are PROCESSOR_PENTIUMPRO, while AMD has a separate processor per chip design. The AMD chips are sorted about 90 lines above the switch (processor) line > Thanks, > Ludo=E2=80=99. --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --+CqTemkAamJsqjA2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmIDnVUACgkQQarn3Mo9 g1EPkA//aRvEtiH93UgXHPFRgDQr/C4ayT3BntiIY+jQrXVZ9IsU/5HVqvA9fgug zgQNS1I/qyc4or46txbqZNGX+53RdxfgxopxxWbPzSe3P/89Cmq4uDPQMQelB3wP Q8Fl5Zl5JgBcFwQ6VhhTwZJOSmtmZuaU/v6uFckv2yTfmn2wB1DVFghwMWlEjh14 bz7n5IUPmqS+dGUSUSKZCIS3Lj83lcDySkyYB6BCFvsZ8JHI0FKE478nxbZuoCSm X9Ah3wUfDLzNqDoyg7AA+a44pvnd0kX4m2cDoVnT1L+VLLtY6lhF2c88uDs/66ML TmMeKQ4ZmmBYyB/3d7UfGR/DsFwL3Li6znRxpVF2kM1o0pseaRBvFpXZo8Eh1bzm IUOyN4vUdJ7wqocZMJLkZ8xfReuMlVsf8EZog7Lk/wDYk1HXWuG26va0fFHU5eep AbQC3I3MiHhMHgB9dhuhjggLagTeh4P3r/E6HMlbg2PBmaFYfhB8ZIp2NjRlk2dT s7KTc2GbP9GUo1/ORSUQ2h8lm3gK/vdk4yqk3UVnORkuv33KvKboHKQV+KJUDQcU jEcRqcBs8xg8OS+uvVDxRRmKy+tfbIeLxoRzpYLTv/q2Au/uTrgMlnV9b5WdACLn MRqEtPDUEsSxQ0mCoBSIWocf6s6g2L4v1QROYVR08PcJ+dmmqgw= =skvq -----END PGP SIGNATURE----- --+CqTemkAamJsqjA2-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 06:42:38 2022 Received: (at 53895) by debbugs.gnu.org; 9 Feb 2022 11:42:39 +0000 Received: from localhost ([127.0.0.1]:50082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHlMs-00022A-K9 for submit@debbugs.gnu.org; Wed, 09 Feb 2022 06:42:38 -0500 Received: from flashner.co.il ([178.62.234.194]:51676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHlMb-00021g-TX for 53895@debbugs.gnu.org; Wed, 09 Feb 2022 06:42:37 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id 1E69D403CD; Wed, 9 Feb 2022 11:42:16 +0000 (UTC) Date: Wed, 9 Feb 2022 13:41:40 +0200 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#53895: [PATCH 0/5] More CPU detection Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8s?= , 53895@debbugs.gnu.org References: <878ruk8gmu.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wFxBVcXySSaugCwf" Content-Disposition: inline In-Reply-To: <878ruk8gmu.fsf_-_@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895 Cc: 53895@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --wFxBVcXySSaugCwf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 09, 2022 at 11:43:21AM +0100, Ludovic Court=C3=A8s wrote: > Efraim Flashner skribis: >=20 > > + (letrec-syntax ((if-flags (syntax-rules (=3D>) > > + ((_) > > + #f) > > + ((_ (flags ... =3D> name) re= st ...) > > + (if (every (lambda (flag) > > + (set-contains?= (cpu-flags cpu) > > + = flag)) > > + '(flags ...)) > > + name > > + (if-flags rest ...)))))) > > + > > + (when (=3D 22 (cpu-family cpu)) > > + (if-flags ("movbe" =3D> "btver2"))) > > + (when (=3D 6 (cpu-family cpu)) > > + (if-flags ("3dnowp" =3D> "athalon"))) >=20 > This has no effect (because =E2=80=98if-flags=E2=80=99 returns a value th= at is ignored > since it=E2=80=99s not returned.) >=20 > What we could do is extend =E2=80=98if-flags=E2=80=99 so that it can opti= onally check > for a family number: >=20 > (if-flags ((family 22) "movbe" =3D> "btver2") > =E2=80=A6) Another option would be to just move it to the bottom of the if-flags so it should take effect then. --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --wFxBVcXySSaugCwf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmIDqHIACgkQQarn3Mo9 g1GkEA//X5bQvdreYN25pndzZvbrMOkKClSH4ixxxtv6nptrFa5RBeQrxc0mCTcP Ts0Zk/0WI0lMxmLt+xd/t4p9hkGwxbbw4AqhODhM7wCVcE8rAYSB+IYmpo1fw7qg unedMX8/iZXX5fRPGgkzMXjofeY1Mq19OO5WY+pt8u41UzgHuwd5TRDXbC2Z2JZf gHkrwwrl/C7QsQMYvC5DCGHwGGZpNfzD4FqlGYpaGtTRM8UOV9toZ7zJ2crbduwl O9kLfvtukWFXUa9UOGtCevQslQKOSQ2qjYTxD2ZXrc6YS5OBVd7e+5xDOUWojUTZ on07bwgi//Ny14JFe9vvJl8iaPGNjq0Ye82vokVzMFncCSG0aRzYq9lCBVdfg/Vx Vdfnjlv+MHgUXR7uEUiTKhSFYurKRADTU58WDIPqsHUlTvGhZMC0qmKE5gZ2/3NX ylOz/zZXlfy/NbaJMhJEOKiBcqO4itqpwgydJHjxwB8UBQgueyJ2bP0Fh7uSv2ay YwHtHsMxNaTXAEUEgKwbL4hFNH/Fq6IkbmvvmCL1M9AQd2TLvV5sI31wWwuu5wCp XGeC+C/SiK8DNLIukb0VNT6lm3+Fh6E8Hse5Jodcfr/lTn+EzLS50qbWgeQAnxG0 idwiMfUKCiFxoqdSK7hxU1yBLC8nnqN5ippMcIQLsFCXTpAedPo= =/isV -----END PGP SIGNATURE----- --wFxBVcXySSaugCwf-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 15:42:17 2022 Received: (at 53895) by debbugs.gnu.org; 10 Feb 2022 20:42:17 +0000 Received: from localhost ([127.0.0.1]:57296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIGGf-0003BE-Mb for submit@debbugs.gnu.org; Thu, 10 Feb 2022 15:42:17 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:38756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIGGd-0003Az-8h for 53895@debbugs.gnu.org; Thu, 10 Feb 2022 15:42:16 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 750AC39F; Thu, 10 Feb 2022 21:42:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c8hieiHrxcAd; Thu, 10 Feb 2022 21:42:08 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 8EE7228D; Thu, 10 Feb 2022 21:42:08 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: bug#53895: [PATCH 0/5] More CPU detection References: <848868e0ad4427a976bec55968f82a3469009fb9.1644401681.git.efraim@flashner.co.il> <87ee4c8h05.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 10 Feb 2022 21:42:07 +0100 In-Reply-To: (Efraim Flashner's message of "Wed, 9 Feb 2022 12:45:35 +0200") Message-ID: <87zgmy4fog.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 750AC39F X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53895 Cc: 53895@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Efraim Flashner skribis: > in gcc-11 driver-i386.c is modified to use the 'vendor' to choose the > 'processor', and then using the processor flag it runs through a list of > if statements to check feature flags, so that's what I was following. Oh OK, so maybe it=E2=80=99s all fine after all. Sorry for the confusion! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 15:42:53 2022 Received: (at 53895) by debbugs.gnu.org; 10 Feb 2022 20:42:53 +0000 Received: from localhost ([127.0.0.1]:57300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIGHE-0003CB-Tn for submit@debbugs.gnu.org; Thu, 10 Feb 2022 15:42:53 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:38778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIGHD-0003Bw-Md for 53895@debbugs.gnu.org; Thu, 10 Feb 2022 15:42:52 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2DF6128D; Thu, 10 Feb 2022 21:42:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CCk3BFdXoREA; Thu, 10 Feb 2022 21:42:45 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 275D9174; Thu, 10 Feb 2022 21:42:45 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: bug#53895: [PATCH 0/5] More CPU detection References: <878ruk8gmu.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 10 Feb 2022 21:42:44 +0100 In-Reply-To: (Efraim Flashner's message of "Wed, 9 Feb 2022 13:41:40 +0200") Message-ID: <87v8xm4fnf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 2DF6128D X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53895 Cc: 53895@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Efraim Flashner skribis: >> What we could do is extend =E2=80=98if-flags=E2=80=99 so that it can opt= ionally check >> for a family number: >>=20 >> (if-flags ((family 22) "movbe" =3D> "btver2") >> =E2=80=A6) > > Another option would be to just move it to the bottom of the if-flags so > it should take effect then. Yes, your call! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 13 08:07:43 2022 Received: (at 53895-done) by debbugs.gnu.org; 13 Feb 2022 13:07:43 +0000 Received: from localhost ([127.0.0.1]:36779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJEbO-0001pl-Uw for submit@debbugs.gnu.org; Sun, 13 Feb 2022 08:07:43 -0500 Received: from flashner.co.il ([178.62.234.194]:60282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJEbM-0001pY-GV for 53895-done@debbugs.gnu.org; Sun, 13 Feb 2022 08:07:42 -0500 Received: from localhost (unknown [37.46.46.251]) by flashner.co.il (Postfix) with ESMTPSA id 893034049E; Sun, 13 Feb 2022 13:07:34 +0000 (UTC) Date: Sun, 13 Feb 2022 15:04:26 +0200 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#53895: [PATCH 0/5] More CPU detection Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?utf-8?Q?Court=C3=A8s?= , 53895-done@debbugs.gnu.org References: <878ruk8gmu.fsf_-_@gnu.org> <87v8xm4fnf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lioLifFnOzIu1jTy" Content-Disposition: inline In-Reply-To: <87v8xm4fnf.fsf@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53895-done Cc: 53895-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --lioLifFnOzIu1jTy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 10, 2022 at 09:42:44PM +0100, Ludovic Court=C3=A8s wrote: > Efraim Flashner skribis: >=20 > >> What we could do is extend =E2=80=98if-flags=E2=80=99 so that it can o= ptionally check > >> for a family number: > >>=20 > >> (if-flags ((family 22) "movbe" =3D> "btver2") > >> =E2=80=A6) > > > > Another option would be to just move it to the bottom of the if-flags so > > it should take effect then. >=20 > Yes, your call! Just moving it to the end didn't end up being enough to make it work, my processor was determined to be . I changed it to an 'or' which seemed to make it work, and my testing seemed to show that it would work (alternating substituting junk and my processor flags to make it obviously one or the other). Thanks for the review and the feedback. And for doing the work in the first place! --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --lioLifFnOzIu1jTy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmIJAdcACgkQQarn3Mo9 g1GAzw//RP7ZSG4dlVfBYuJlkij/dbFzwjZbM6MRTfr2kZGl2duA83LcmfGdJROd qshpupuaBjX8bnYwXGEwZsIZbNHNRYdHJv1zpHULaLiwEhBpTmX1b8vsm261x7iX wmRsMrDzODyZBOJzsNj8VeSDFp6O+fwzhpF0yCdCCYRjE/S6fI+874X2+S1TvVI0 6BA9VzOznFgk6wx6wbEglzqqVy0tnRLs0mZc7CWR03MwwxM3lAhWU4CakowKsM6j Z26kYaAS4rJgoHaUYOtsMlhUNGL8IZUmPg+Om0JchMRl28h4He9Wrr6foreHT3ep URe50GPKxtCVDpus8Zah4C1mlBBjEC/4yK0LRQxktj9pAtUF4oy1deF2Eek5kCkq ylD9Uq6n0TzFyGhrfbijSzCIDjP4YxV00C+OEgbPMtQqqZENdUqy7V5ED3qVNMoC zNYBeNppHH++UdWuYhcABLgEbJcAA7mibWB2O+8zL0A8QEj0iIWamXG9amVVa0S3 pweq3YzjIruHY51AYcPRmFfs6sxaoeFuSYrVvfr0y7hldFE6BVy8KWGs8oBDBAZ6 uNMlAktF/Q3A4WGqb+9plHvLPVp5lB5M/BQsJc5PG6HbYSyvAbmjakPkdQXGPUeR oG8T3DqM7FYeCwUGskydNPb4z6Q4DFW8jroJlkVS2XlEEWwJVKg= =xrWx -----END PGP SIGNATURE----- --lioLifFnOzIu1jTy-- From unknown Sat Jun 21 12:32:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 14 Mar 2022 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator