github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/internal/cpu/cpu_arm64.go (about) 1 // Copyright 2017 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 package cpu 6 7 const CacheLinePadSize = 64 8 9 func doinit() { 10 options = []option{ 11 {Name: "aes", Feature: &ARM64.HasAES}, 12 {Name: "pmull", Feature: &ARM64.HasPMULL}, 13 {Name: "sha1", Feature: &ARM64.HasSHA1}, 14 {Name: "sha2", Feature: &ARM64.HasSHA2}, 15 {Name: "crc32", Feature: &ARM64.HasCRC32}, 16 {Name: "atomics", Feature: &ARM64.HasATOMICS}, 17 {Name: "cpuid", Feature: &ARM64.HasCPUID}, 18 {Name: "isNeoverseN1", Feature: &ARM64.IsNeoverseN1}, 19 {Name: "isZeus", Feature: &ARM64.IsZeus}, 20 } 21 22 // arm64 uses different ways to detect CPU features at runtime depending on the operating system. 23 osInit() 24 } 25 26 func getisar0() uint64 27 28 func getMIDR() uint64