github.com/lianghucheng/zrddz@v0.0.0-20200923083010-c71f680932e2/src/golang.org/x/sys/cpu/cpu_aix_ppc64.go (about) 1 // Copyright 2019 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 // +build aix,ppc64 6 7 package cpu 8 9 import "golang.org/x/sys/unix" 10 11 const cacheLineSize = 128 12 13 const ( 14 // getsystemcfg constants 15 _SC_IMPL = 2 16 _IMPL_POWER8 = 0x10000 17 _IMPL_POWER9 = 0x20000 18 ) 19 20 func init() { 21 impl := unix.Getsystemcfg(_SC_IMPL) 22 if impl&_IMPL_POWER8 != 0 { 23 PPC64.IsPOWER8 = true 24 } 25 if impl&_IMPL_POWER9 != 0 { 26 PPC64.IsPOWER9 = true 27 } 28 29 Initialized = true 30 }