]> Cypherpunks repositories - gostls13.git/commit
crypto/aes: On ppc64le, use better instructions when available
authorPaul E. Murphy <murp@ibm.com>
Tue, 8 Nov 2022 21:46:05 +0000 (15:46 -0600)
committerGopher Robot <gobot@golang.org>
Mon, 21 Nov 2022 15:06:26 +0000 (15:06 +0000)
commit8614c525b301b2b993bf99269a01975ea072b086
treec392bbb8691e092e6102340bf256d71de62af513
parentcf93b25366aa418dea3eea49a7b85447631c2a1d
crypto/aes: On ppc64le, use better instructions when available

Several operations emulate instructions available on power9. Use
the GOPPC64_power9 macro provided by the compiler to select the
native instructions if the minimum cpu requirements are met.

Likewise rework the LXSDX_BE to simplify usage when overriding
it. It is only used in one place.

All three configurations are tested via CI.

On POWER9:

pkg:crypto/cipher goos:linux goarch:ppc64le
AESCBCEncrypt1K   949MB/s ± 0%   957MB/s ± 0%  +0.83%
AESCBCDecrypt1K  1.82GB/s ± 0%  1.99GB/s ± 0%  +8.93%
pkg:crypto/aes goos:linux goarch:ppc64le
Encrypt          1.01GB/s ± 0%  1.05GB/s ± 0%  +4.36%
Decrypt           987MB/s ± 0%  1024MB/s ± 0%  +3.77%

Change-Id: I56d0eb845647dd3c43bcad71eb281b499e1d1789
Reviewed-on: https://go-review.googlesource.com/c/go/+/449116
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Auto-Submit: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
src/crypto/aes/asm_ppc64x.s