cpu: add support for ppc64 on platforms other than aix and linux

This allows the cpu package to function on openbsd/ppc64.

Updates golang/go#56001

Change-Id: Iff306b6091da8f7dc28dd1bd2c9ba668b5318a67
Reviewed-on: https://go-review.googlesource.com/c/sys/+/439977
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
Joel Sing
2022-10-07 14:08:03 +11:00
parent a970992b06
commit 3938a4f48c

15
cpu/cpu_other_ppc64x.go Normal file
View File

@@ -0,0 +1,15 @@
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !aix && !linux && (ppc64 || ppc64le)
// +build !aix
// +build !linux
// +build ppc64 ppc64le
package cpu
func archInit() {
PPC64.IsPOWER8 = true
Initialized = true
}