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 7package cpu 8 9const cacheLineSize = 128 10 11const ( 12 // getsystemcfg constants 13 _SC_IMPL = 2 14 _IMPL_POWER8 = 0x10000 15 _IMPL_POWER9 = 0x20000 16) 17 18func 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 30func getsystemcfg(label int) (n uint64) { 31 r0, _ := callgetsystemcfg(label) 32 n = uint64(r0) 33 return 34} 35