]> Cypherpunks repositories - gostls13.git/commit
crypto/sha256: adapt ppc64le asm to work on ppc64
authorPaul E. Murphy <murp@ibm.com>
Tue, 25 Jan 2022 19:52:47 +0000 (13:52 -0600)
committerPaul Murphy <murp@ibm.com>
Thu, 3 Mar 2022 14:41:35 +0000 (14:41 +0000)
commit29c1355326c372ddb873b7d62d33140deda1681c
tree05691537a0658ca8af599451d2606e4eadb8eae4
parentd82c294da778a789099f3b52cd9c34ef0d798465
crypto/sha256: adapt ppc64le asm to work on ppc64

Workaround the minor endian differences, and avoid needing to
stack a frame as extra VSRs can be used in a similar capacity.

The microbenchmarks show no significant differences on ppc64le/p9.

ppc64/linux performance difference on a POWER9:

name        old time/op    new time/op    delta
Hash8Bytes     686ns ± 0%     372ns ± 0%   -45.78%
Hash1K        9.17µs ± 0%    4.24µs ± 0%   -53.74%
Hash8K        67.9µs ± 0%    31.7µs ± 0%   -53.35%

Fixes #50785

Change-Id: I43d87670127df9767d54d10b5165b84e5b88f5d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/380776
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Trust: Paul Murphy <murp@ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/crypto/sha256/sha256block_decl.go
src/crypto/sha256/sha256block_generic.go
src/crypto/sha256/sha256block_ppc64x.s [moved from src/crypto/sha256/sha256block_ppc64le.s with 92% similarity]