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_aix.go 580B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2019 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 aix
  5. package cpu
  6. const (
  7. // getsystemcfg constants
  8. _SC_IMPL = 2
  9. _IMPL_POWER8 = 0x10000
  10. _IMPL_POWER9 = 0x20000
  11. )
  12. func archInit() {
  13. impl := getsystemcfg(_SC_IMPL)
  14. if impl&_IMPL_POWER8 != 0 {
  15. PPC64.IsPOWER8 = true
  16. }
  17. if impl&_IMPL_POWER9 != 0 {
  18. PPC64.IsPOWER9 = true
  19. }
  20. Initialized = true
  21. }
  22. func getsystemcfg(label int) (n uint64) {
  23. r0, _ := callgetsystemcfg(label)
  24. n = uint64(r0)
  25. return
  26. }