mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
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>
16 lines
308 B
Go
16 lines
308 B
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build !386,!amd64,!amd64p32,!arm64
|
|
|
|
package cpu
|
|
|
|
func init() {
|
|
if err := readHWCAP(); err != nil {
|
|
return
|
|
}
|
|
doinit()
|
|
Initialized = true
|
|
}
|