github.com/JimmyHuang454/JLS-go@v0.0.0-20230831150107-90d536585ba0/cpu/cpu_ppc64x_aix.go (about) 1 // Copyright 2020 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 ppc64 || ppc64le 6 7 package cpu 8 9 const ( 10 // getsystemcfg constants 11 _SC_IMPL = 2 12 _IMPL_POWER8 = 0x10000 13 _IMPL_POWER9 = 0x20000 14 _IMPL_POWER10 = 0x40000 15 ) 16 17 func osinit() { 18 impl := getsystemcfg(_SC_IMPL) 19 PPC64.IsPOWER8 = isSet(impl, _IMPL_POWER8) 20 PPC64.IsPOWER9 = isSet(impl, _IMPL_POWER9) 21 PPC64.IsPOWER10 = isSet(impl, _IMPL_POWER10) 22 } 23 24 // getsystemcfg is defined in runtime/os2_aix.go 25 func getsystemcfg(label uint) uint