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