mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
cpu: support reading arm64 CPU feature registers
This allows to detect ARM64 CPU features on non-Linux systems. On Linux, this is used in case /proc/self/auxv cannot be read. Change-Id: I67d55e989f2beda0c05a97ca5e55781840a8e01c Reviewed-on: https://go-review.googlesource.com/c/sys/+/209478 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
6d18c012ae
commit
85b82a3add
+1
-1
@@ -31,7 +31,7 @@ func TestAVX2hasAVX(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestARM64minimalFeatures(t *testing.T) {
|
||||
if runtime.GOARCH != "arm64" || runtime.GOOS != "linux" {
|
||||
if runtime.GOARCH != "arm64" || runtime.GOOS == "darwin" {
|
||||
return
|
||||
}
|
||||
if !cpu.ARM64.HasASIMD {
|
||||
|
||||
Reference in New Issue
Block a user