mirror of https://github.com/golang/go.git
internal/cpu: set PPC64.IsPOWER8
This should always be true, but use the HWCAP2 bit anyways. Change-Id: Ib164cf05b4c9f0c509f41b7eb339ef32fb63e384 Reviewed-on: https://go-review.googlesource.com/c/go/+/389894 Trust: Paul Murphy <murp@ibm.com> Run-TryBot: Paul Murphy <murp@ibm.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
079a027d27
commit
d9d55724bd
|
|
@ -15,6 +15,7 @@ var HWCap2 uint
|
|||
// HWCAP bits. These are exposed by Linux.
|
||||
const (
|
||||
// ISA Level
|
||||
hwcap2_ARCH_2_07 = 0x80000000
|
||||
hwcap2_ARCH_3_00 = 0x00800000
|
||||
|
||||
// CPU features
|
||||
|
|
@ -23,6 +24,7 @@ const (
|
|||
)
|
||||
|
||||
func osinit() {
|
||||
PPC64.IsPOWER8 = isSet(HWCap2, hwcap2_ARCH_2_07)
|
||||
PPC64.IsPOWER9 = isSet(HWCap2, hwcap2_ARCH_3_00)
|
||||
PPC64.HasDARN = isSet(HWCap2, hwcap2_DARN)
|
||||
PPC64.HasSCV = isSet(HWCap2, hwcap2_SCV)
|
||||
|
|
|
|||
Loading…
Reference in New Issue