github.com/xingly-cn/shorturl-go@v0.0.0-20220110130535-e21de4659f74/pkg/mod/golang.org/x/sys@v0.0.0-20200323222414-85ca7c5b95cd/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 const cacheLineSize = 128 10 11 const ( 12 // getsystemcfg constants 13 _SC_IMPL = 2 14 _IMPL_POWER8 = 0x10000 15 _IMPL_POWER9 = 0x20000 16 ) 17 18 func init() { 19 impl := getsystemcfg(_SC_IMPL) 20 if impl&_IMPL_POWER8 != 0 { 21 PPC64.IsPOWER8 = true 22 } 23 if impl&_IMPL_POWER9 != 0 { 24 PPC64.IsPOWER9 = true 25 } 26 27 Initialized = true 28 } 29 30 func getsystemcfg(label int) (n uint64) { 31 r0, _ := callgetsystemcfg(label) 32 n = uint64(r0) 33 return 34 }