]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgo/go/internal/cpu/cpu_mips64x.go
internal/cpu: don't define CacheLinePadSize for mips64x
[thirdparty/gcc.git] / libgo / go / internal / cpu / cpu_mips64x.go
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 mips64 mips64le
6
7 package cpu
8
9 // This is initialized by archauxv and should not be changed after it is
10 // initialized.
11 var HWCap uint
12
13 // HWCAP bits. These are exposed by the Linux kernel 5.4.
14 const (
15 // CPU features
16 hwcap_MIPS_MSA = 1 << 1
17 )
18
19 func doinit() {
20 options = []option{
21 {Name: "msa", Feature: &MIPS64X.HasMSA},
22 }
23
24 // HWCAP feature bits
25 MIPS64X.HasMSA = isSet(HWCap, hwcap_MIPS_MSA)
26 }
27
28 func isSet(hwc uint, value uint) bool {
29 return hwc&value != 0
30 }