.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / sys@v0.0.0-20210124154548-22da62e12c0c / cpu / cpu_linux_mips64x.go
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 // +build linux
6 // +build mips64 mips64le
7
8 package cpu
9
10 // HWCAP bits. These are exposed by the Linux kernel 5.4.
11 const (
12         // CPU features
13         hwcap_MIPS_MSA = 1 << 1
14 )
15
16 func doinit() {
17         // HWCAP feature bits
18         MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
19 }
20
21 func isSet(hwc uint, value uint) bool {
22         return hwc&value != 0
23 }