diff options
| author | Matt Horsnell <matthew.horsnell@gmail.com> | 2023-01-13 10:54:28 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-01-23 18:50:54 +0000 |
| commit | b90971b292cd9a91f3c80e3c82e95541393393d7 (patch) | |
| tree | b0ad8437cb31b2d58230011119ee7d6da5ae694a | |
| parent | 35755d772fab1828c9b79563b98912f3c6025b7a (diff) | |
| download | go-b90971b292cd9a91f3c80e3c82e95541393393d7.tar.xz | |
runtime: enable sha512 optimizations on arm64 via hwcaps.
Change-Id: I9d88c8eb91106de412a9abc6601cdda06537d818
Reviewed-on: https://go-review.googlesource.com/c/go/+/461747
Reviewed-by: Martin Möhrmann <moehrmann@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
| -rw-r--r-- | src/internal/cpu/cpu_arm64_hwcap.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/internal/cpu/cpu_arm64_hwcap.go b/src/internal/cpu/cpu_arm64_hwcap.go index 0fb5fb505a..88cb8b9064 100644 --- a/src/internal/cpu/cpu_arm64_hwcap.go +++ b/src/internal/cpu/cpu_arm64_hwcap.go @@ -19,6 +19,7 @@ const ( hwcap_CRC32 = 1 << 7 hwcap_ATOMICS = 1 << 8 hwcap_CPUID = 1 << 11 + hwcap_SHA512 = 1 << 21 ) func hwcapInit(os string) { @@ -31,6 +32,7 @@ func hwcapInit(os string) { ARM64.HasSHA2 = isSet(HWCap, hwcap_SHA2) ARM64.HasCRC32 = isSet(HWCap, hwcap_CRC32) ARM64.HasCPUID = isSet(HWCap, hwcap_CPUID) + ARM64.HasSHA512 = isSet(HWCap, hwcap_SHA512) // The Samsung S9+ kernel reports support for atomics, but not all cores // actually support them, resulting in SIGILL. See issue #28431. |
