From d9d55724bd8ff10d8de5c13fd77122a37ac73719 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Thu, 3 Mar 2022 15:41:57 -0600 Subject: [PATCH] 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 Run-TryBot: Paul Murphy TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui --- src/internal/cpu/cpu_ppc64x_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/internal/cpu/cpu_ppc64x_linux.go b/src/internal/cpu/cpu_ppc64x_linux.go index 7999656f01..0fe8667843 100644 --- a/src/internal/cpu/cpu_ppc64x_linux.go +++ b/src/internal/cpu/cpu_ppc64x_linux.go @@ -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) -- 2.50.0