您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. }