]> Cypherpunks repositories - gostls13.git/commitdiff
internal/cpu: set PPC64.IsPOWER8
authorPaul E. Murphy <murp@ibm.com>
Thu, 3 Mar 2022 21:41:57 +0000 (15:41 -0600)
committerPaul Murphy <murp@ibm.com>
Mon, 7 Mar 2022 23:46:55 +0000 (23:46 +0000)
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>
src/internal/cpu/cpu_ppc64x_linux.go

index 7999656f01fc655d3eba347576d29c6160cd319c..0fe8667843334e8627b594b81b044906a1f38114 100644 (file)
@@ -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)