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 7package cpu 8 9const ( 10 // getsystemcfg constants 11 _SC_IMPL = 2 12 _IMPL_POWER8 = 0x10000 13 _IMPL_POWER9 = 0x20000 14 _IMPL_POWER10 = 0x40000 15) 16 17func 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 25func getsystemcfg(label uint) uint 26