1// Copyright 2026 The Go Authors. All rights reserved.
 2// Use of this source code is governed by a BSD-style
 3// license that can be found in the LICENSE file.
 4
 5//go:build darwin && arm64 && !gc
 6
 7package cpu
 8
 9import "runtime"
10
11func doinit() {
12	setMinimalFeatures()
13
14	ARM64.HasASIMD = true
15	ARM64.HasFP = true
16
17	// Go already assumes these to be available because they were on the M1
18	// and these are supported on all Apple arm64 chips.
19	ARM64.HasAES = true
20	ARM64.HasPMULL = true
21	ARM64.HasSHA1 = true
22	ARM64.HasSHA2 = true
23
24	if runtime.GOOS != "ios" {
25		// Apple A7 processors do not support these, however
26		// M-series SoCs are at least armv8.4-a
27		ARM64.HasCRC32 = true   // armv8.1
28		ARM64.HasATOMICS = true // armv8.2
29		ARM64.HasJSCVT = true   // armv8.3, if HasFP
30	}
31}