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>
hwcap_CRC32 = 1 << 7
hwcap_ATOMICS = 1 << 8
hwcap_CPUID = 1 << 11
+ hwcap_SHA512 = 1 << 21
)
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.