Source file src/internal/cpu/cpu_arm64_windows.go

     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 arm64
     6  
     7  package cpu
     8  
     9  func osInit() {
    10  	// TODO(brainman): we don't know how to retrieve those bits form user space - leaving them as false for now
    11  	// https://github.com/golang/go/issues/76791#issuecomment-3877873959
    12  	ARM64.HasCPUID = false
    13  	ARM64.HasDIT = false
    14  	ARM64.IsNeoverse = false
    15  
    16  	if isProcessorFeaturePresent(_PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) {
    17  		ARM64.HasAES = true
    18  		ARM64.HasPMULL = true
    19  		ARM64.HasSHA1 = true
    20  		ARM64.HasSHA2 = true
    21  	}
    22  	ARM64.HasSHA3 = isProcessorFeaturePresent(_PF_ARM_SHA3_INSTRUCTIONS_AVAILABLE)
    23  	ARM64.HasCRC32 = isProcessorFeaturePresent(_PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)
    24  	ARM64.HasSHA512 = isProcessorFeaturePresent(_PF_ARM_SHA512_INSTRUCTIONS_AVAILABLE)
    25  	ARM64.HasATOMICS = isProcessorFeaturePresent(_PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE)
    26  }
    27  

View as plain text