aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go')
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
deleted file mode 100644
index 197188e..0000000
--- a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
+++ /dev/null
@@ -1,30 +0,0 @@
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.
4
5//go:build linux && (ppc64 || ppc64le)
6
7package cpu
8
9// HWCAP/HWCAP2 bits. These are exposed by the kernel.
10const (
11 // ISA Level
12 _PPC_FEATURE2_ARCH_2_07 = 0x80000000
13 _PPC_FEATURE2_ARCH_3_00 = 0x00800000
14
15 // CPU features
16 _PPC_FEATURE2_DARN = 0x00200000
17 _PPC_FEATURE2_SCV = 0x00100000
18)
19
20func doinit() {
21 // HWCAP2 feature bits
22 PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)
23 PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)
24 PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)
25 PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)
26}
27
28func isSet(hwc uint, value uint) bool {
29 return hwc&value != 0
30}