...
Run Format

Source file src/runtime/cpuflags.go

Documentation: runtime

     1  // Copyright 2018 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 runtime
     6  
     7  import (
     8  	"internal/cpu"
     9  	"unsafe"
    10  )
    11  
    12  // Offsets into internal/cpu records for use in assembly.
    13  const (
    14  	offsetX86HasAVX2 = unsafe.Offsetof(cpu.X86.HasAVX2)
    15  	offsetX86HasERMS = unsafe.Offsetof(cpu.X86.HasERMS)
    16  	offsetX86HasSSE2 = unsafe.Offsetof(cpu.X86.HasSSE2)
    17  
    18  	offsetARMHasIDIVA = unsafe.Offsetof(cpu.ARM.HasIDIVA)
    19  )
    20  
    21  var (
    22  	// Set in runtime.cpuinit.
    23  	// TODO: deprecate these; use internal/cpu directly.
    24  	x86HasPOPCNT bool
    25  	x86HasSSE41  bool
    26  
    27  	arm64HasATOMICS bool
    28  )
    29  

View as plain text