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 5package runtime 6 7import ( 8 "internal/cpu" 9 "unsafe" 10) 11 12// Offsets into internal/cpu records for use in assembly. 13const ( 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 21var ( 22 // Set in runtime.cpuinit. 23 // TODO: deprecate these; use internal/cpu directly. 24 x86HasPOPCNT bool 25 x86HasSSE41 bool 26 x86HasFMA bool 27 28 armHasVFPv4 bool 29 30 arm64HasATOMICS bool 31) 32