Date: Fri, 20 Dec 2019 12:11:57 +0100 From: Jan Beich <jbeich@FreeBSD.org> To: Alexey Dokuchaev <danfe@freebsd.org> Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, Gleb Popov <arrowd@freebsd.org>, ports-committers@freebsd.org Subject: Re: svn commit: r520468 - in head/sysutils: . cpuid2cpuflags Message-ID: <k16r-dzeq-wny@FreeBSD.org> In-Reply-To: <v9qb-ff6r-wny@FreeBSD.org> (Jan Beich's message of "Fri, 20 Dec 2019 11:45:48 %2B0100") References: <201912200518.xBK5IHPq022253@repo.freebsd.org> <CALH631m10%2B0eDY_8BKQxErA2Bpo2dv6B6h7DRb77yO3cJCboSw@mail.gmail.com> <20191220084532.GA30042@FreeBSD.org> <v9qb-ff6r-wny@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
(Sorry, I need to proofread more) Jan Beich <jbeich@FreeBSD.org> writes: > Neither supports non-x86 architectures[1] on FreeBSD. Even on x86 both > are incomplete compared to "cc -march=native -v" e.g., cpuid2cpuflags > lacks avx512bf16 while hs-cputype doesn't support avx512 at all. > > [1] Here're various ways to detect CPU features: > > aarch64: > - READ_SPECIALREG(id_aa64isar0) Typo: READ_SPECIALREG(id_aa64isar0_el1) > - elf_aux_info: AT_HWCAP (on FreeBSD 13+) > > armv6 and armv7: > - sysctl(KERN_PROC_AUXV): AT_HWCAP + AT_HWCAP2 > - elf_aux_info: AT_HWCAP + AT_HWCAP2 (on FreeBSD 12+) > > powerpc and powerpc64: > - sysctlbyname: kern.cpu_features + kern.cpu_features2 Typo: kern. -> hw. There's also hw.altivec as useful as hw.instruction_sse ;) > - elf_aux_info: AT_HWCAP + AT_HWCAP2 (on FreeBSD 12+) > > riscv64: > - elf_aux_info: AT_HWCAP (on FreeBSD 13+) In the ports tree there're many examples checking a particular feature (e.g., AES, NEON, ALTIVEC) but none try to list everything supported.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?k16r-dzeq-wny>