github.com/primecitizens/pcz/std@v0.2.1/core/cpu/cpu_ppc64x_aix.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 // 4 // Copyright 2020 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 //go:build (ppc64 || ppc64le) && aix 9 10 package cpu 11 12 const ( 13 // getsystemcfg constants 14 _SC_IMPL = 2 15 _IMPL_POWER8 = 0x10000 16 _IMPL_POWER9 = 0x20000 17 _IMPL_POWER10 = 0x40000 18 ) 19 20 func osinit() { 21 impl := getsystemcfg(_SC_IMPL) 22 PPC64.IsPOWER8 = isSet(impl, _IMPL_POWER8) 23 PPC64.IsPOWER9 = isSet(impl, _IMPL_POWER9) 24 PPC64.IsPOWER10 = isSet(impl, _IMPL_POWER10) 25 } 26 27 // getsystemcfg is defined in runtime/os2_aix.go 28 func getsystemcfg(label uint) uint