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 481B

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