You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cpu_linux_mips64x.go 480B

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