Source file src/internal/cpu/cpu_ppc64x.go

     1  // Copyright 2017 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 CacheLinePadSize = 128
    10  
    11  func doinit() {
    12  	options = []option{
    13  		{Name: "darn", Feature: &PPC64.HasDARN},
    14  		{Name: "scv", Feature: &PPC64.HasSCV},
    15  		{Name: "power9", Feature: &PPC64.IsPOWER9},
    16  	}
    17  
    18  	osinit()
    19  }
    20  
    21  func isSet(hwc uint, value uint) bool {
    22  	return hwc&value != 0
    23  }
    24  
    25  func Name() string {
    26  	switch {
    27  	case PPC64.IsPOWER10:
    28  		return "POWER10"
    29  	case PPC64.IsPOWER9:
    30  		return "POWER9"
    31  	case PPC64.IsPOWER8:
    32  		return "POWER8"
    33  	}
    34  	return ""
    35  }
    36  

View as plain text