1 // Copyright 2018 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.
6 // +build ppc64 ppc64le
10 const cacheLineSize = 128
12 // HWCAP/HWCAP2 bits. These are exposed by the kernel.
15 _PPC_FEATURE2_ARCH_2_07 = 0x80000000
16 _PPC_FEATURE2_ARCH_3_00 = 0x00800000
19 _PPC_FEATURE2_DARN = 0x00200000
20 _PPC_FEATURE2_SCV = 0x00100000
24 // HWCAP2 feature bits
25 PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)
26 PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)
27 PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)
28 PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)
31 func isSet(hwc uint, value uint) bool {