Source file src/vendor/golang.org/x/sys/cpu/cpu_aix.go
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 //go:build aix 6 // +build aix 7 8 package cpu 9 10 const ( 11 // getsystemcfg constants 12 _SC_IMPL = 2 13 _IMPL_POWER8 = 0x10000 14 _IMPL_POWER9 = 0x20000 15 ) 16 17 func archInit() { 18 impl := getsystemcfg(_SC_IMPL) 19 if impl&_IMPL_POWER8 != 0 { 20 PPC64.IsPOWER8 = true 21 } 22 if impl&_IMPL_POWER9 != 0 { 23 PPC64.IsPOWER8 = true 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 } 35