mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-15 23:48:07 -05:00
guix: cpu: Update x86_64 CPUs.
* guix/cpu.scm (cpu->gcc-architecture): Add graniterapids-d, pantherlake, clearwaterforest, arrowlake-s, yongfeng. Remove grandridge. Update CPU flags for searching to match architecture. (gcc-architecture->micro-architecture-level): Adjust listed architectures and sort in order used above. Change-Id: I186ab6e396e36c34f7c61827e02f637716993141
This commit is contained in:
parent
85d564b0fc
commit
b9f87817a1
1 changed files with 24 additions and 17 deletions
41
guix/cpu.scm
41
guix/cpu.scm
|
@ -1,6 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2022-2024 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -128,18 +128,21 @@ (define (cpu->gcc-architecture cpu)
|
||||||
|
|
||||||
(or (and (equal? "GenuineIntel" (cpu-vendor cpu))
|
(or (and (equal? "GenuineIntel" (cpu-vendor cpu))
|
||||||
(= 6 (cpu-family cpu)) ;the "Pentium Pro" family
|
(= 6 (cpu-family cpu)) ;the "Pentium Pro" family
|
||||||
(if-flags ("avx" "raoint" => "grandridge")
|
(if-flags ("avx512f" "amx_complex" => "graniterapids-d")
|
||||||
("avx" "amx_fp16" => "graniterapids")
|
("avx512f" "amx_fp16" => "graniterapids")
|
||||||
|
("avx512f" "avx512vp2intersect" => "tigerlake")
|
||||||
|
("avx512f" "tsxldtrk" => "sapphirerapids")
|
||||||
|
("avx512f" "avx512bf16" => "cooperlake")
|
||||||
|
("avx512f" "wbnoinvd" => "icelake-server")
|
||||||
|
("avx512f" "avx512bitalg" => "icelake-client")
|
||||||
|
("avx512f" "avx512vbmi" => "cannonlake")
|
||||||
|
("avx512f" "avx5124vnniw" => "knm")
|
||||||
|
("avx512f" "avx512er" => "knl")
|
||||||
|
("avx512f" => "skylake-avx512")
|
||||||
|
("avx" "prefetchi" => "pantherlake")
|
||||||
|
("avx" "user_msr" => "clearwaterforest")
|
||||||
|
("avx" "sm3" => "arrowlake-s")
|
||||||
("avx" "avxvnniint8" => "sierraforest")
|
("avx" "avxvnniint8" => "sierraforest")
|
||||||
("avx" "avx512vp2intersect" => "tigerlake")
|
|
||||||
("avx" "tsxldtrk" => "sapphirerapids")
|
|
||||||
("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" "serialize" => "alderlake")
|
||||||
("avx" "clflushopt" => "skylake")
|
("avx" "clflushopt" => "skylake")
|
||||||
("avx" "adx" => "broadwell")
|
("avx" "adx" => "broadwell")
|
||||||
|
@ -190,6 +193,10 @@ (define (cpu->gcc-architecture cpu)
|
||||||
(= #x3b (cpu-model cpu)))
|
(= #x3b (cpu-model cpu)))
|
||||||
"lujiazui"
|
"lujiazui"
|
||||||
(cpu->micro-architecture-level cpu))
|
(cpu->micro-architecture-level cpu))
|
||||||
|
(if (and (= 7 (cpu-family cpu))
|
||||||
|
(>= #x5b (cpu-model cpu)))
|
||||||
|
"yongfeng"
|
||||||
|
(cpu->micro-architecture-level cpu))
|
||||||
|
|
||||||
;; TODO: Recognize CENTAUR/CYRIX/NSC?
|
;; TODO: Recognize CENTAUR/CYRIX/NSC?
|
||||||
|
|
||||||
|
@ -292,16 +299,16 @@ (define (gcc-architecture->micro-architecture-level gcc-architecture)
|
||||||
;; 'Haswell and higher' qualify for x86_64-v3.
|
;; 'Haswell and higher' qualify for x86_64-v3.
|
||||||
;; https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex
|
;; https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex
|
||||||
(match gcc-architecture
|
(match gcc-architecture
|
||||||
((or "grandridge" "graniterapids" "sierraforest" "tigerlake"
|
((or "graniterapids-d" "graniterapids" "tigerlake" "sapphirerapids"
|
||||||
"sapphirerapids" "cooperlake" "icelake-server" "icelake-client"
|
"cooperlake" "icelake-server" "icelake-client" "cannonlake" "knm" "knl"
|
||||||
"cannonlake" "knm" "knl" "skylake-avx512" "alderlake" "skylake"
|
"skylake-avx512" "pantherlake" "clearwaterforest" "arrowlake-s"
|
||||||
"broadwell" "haswell"
|
"sierraforest" "alderlake" "skylake" "broadwell" "haswell"
|
||||||
"znver4" "znver3" "znver2" "znver1" "bdver4")
|
"znver4" "znver3" "znver2" "znver1" "bdver4")
|
||||||
"x86_64-v3")
|
"x86_64-v3")
|
||||||
((or "sandybridge" "tremont" "goldmont-plus" "goldmont" "silvermont"
|
((or "sandybridge" "tremont" "goldmont-plus" "goldmont" "silvermont"
|
||||||
"nehalem" "bonnell" "core2"
|
"nehalem" "bonnell" "core2"
|
||||||
"btver2" "athalon" "k8-sse3" "k8" "bdver3" "bdver2" "bdver1" "btver1"
|
"btver2" "athalon" "k8-sse3" "k8" "bdver3" "bdver2" "bdver1" "btver1"
|
||||||
"amdfam10"
|
"amdfam10"
|
||||||
"lujiazui" "x86-64")
|
"lujiazui" "yongfeng" "x86-64")
|
||||||
"x86_64-v1")
|
"x86_64-v1")
|
||||||
(_ gcc-architecture)))
|
(_ gcc-architecture)))
|
||||||
|
|
Loading…
Reference in a new issue