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
8package cpu
9
10// HWCAP bits. These are exposed by the Linux kernel 5.4.
11const (
12	// CPU features
13	hwcap_MIPS_MSA = 1 << 1
14)
15
16func doinit() {
17	// HWCAP feature bits
18	MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
19}
20
21func isSet(hwc uint, value uint) bool {
22	return hwc&value != 0
23}
24