Source file src/internal/cpu/cpu_ppc64x_aix.go

     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  
     5  //go:build ppc64 || ppc64le
     6  
     7  package cpu
     8  
     9  const (
    10  	// getsystemcfg constants
    11  	_SC_IMPL      = 2
    12  	_IMPL_POWER8  = 0x10000
    13  	_IMPL_POWER9  = 0x20000
    14  	_IMPL_POWER10 = 0x40000
    15  )
    16  
    17  func osinit() {
    18  	impl := getsystemcfg(_SC_IMPL)
    19  	PPC64.IsPOWER8 = isSet(impl, _IMPL_POWER8)
    20  	PPC64.IsPOWER9 = isSet(impl, _IMPL_POWER9)
    21  	PPC64.IsPOWER10 = isSet(impl, _IMPL_POWER10)
    22  }
    23  
    24  // getsystemcfg is defined in runtime/os2_aix.go
    25  func getsystemcfg(label uint) uint
    26  

View as plain text