mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
It was missed in CL 737260. For golang/go#43046. Change-Id: I05194333831ad04e43e22b7b34362fe01f50c000 Reviewed-on: https://go-review.googlesource.com/c/sys/+/759160 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Egon Elbre <egonelbre@gmail.com> Reviewed-by: Keith Randall <khr@golang.org>
32 lines
776 B
Go
32 lines
776 B
Go
// Copyright 2026 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.
|
|
|
|
//go:build darwin && arm64 && !gc
|
|
|
|
package cpu
|
|
|
|
import "runtime"
|
|
|
|
func doinit() {
|
|
setMinimalFeatures()
|
|
|
|
ARM64.HasASIMD = true
|
|
ARM64.HasFP = true
|
|
|
|
// Go already assumes these to be available because they were on the M1
|
|
// and these are supported on all Apple arm64 chips.
|
|
ARM64.HasAES = true
|
|
ARM64.HasPMULL = true
|
|
ARM64.HasSHA1 = true
|
|
ARM64.HasSHA2 = true
|
|
|
|
if runtime.GOOS != "ios" {
|
|
// Apple A7 processors do not support these, however
|
|
// M-series SoCs are at least armv8.4-a
|
|
ARM64.HasCRC32 = true // armv8.1
|
|
ARM64.HasATOMICS = true // armv8.2
|
|
ARM64.HasJSCVT = true // armv8.3, if HasFP
|
|
}
|
|
}
|