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

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