diff options
Diffstat (limited to 'src/crypto/sha512/sha512block_arm64.go')
-rw-r--r-- | src/crypto/sha512/sha512block_arm64.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/crypto/sha512/sha512block_arm64.go b/src/crypto/sha512/sha512block_arm64.go new file mode 100644 index 0000000..243eb5c --- /dev/null +++ b/src/crypto/sha512/sha512block_arm64.go @@ -0,0 +1,18 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sha512 + +import "internal/cpu" + +func block(dig *digest, p []byte) { + if cpu.ARM64.HasSHA512 { + blockAsm(dig, p) + return + } + blockGeneric(dig, p) +} + +//go:noescape +func blockAsm(dig *digest, p []byte) |