lib/crypto: De-bloat and optimize sha512-ssse3-asm.S
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | lib/crypto: x86/sha512: Partially roll up sha512_transform_ssse3()lib/ | +67 | 0 replies | |
| 2/8 | lib/crypto: x86/sha512: Keep message schedule in XMM registerslib/ | +75 | 0 replies | |
| 3/8 | lib/crypto: x86/sha512: Keep W[t]+K[t] in %xmm5 instead of stacklib/ | +33 | 0 replies | |
| 4/8 | lib/crypto: x86/sha512: Keep XMM_QWORD_BSWAP in %xmm14 across blockslib/ | +5 | 0 replies | |
| 5/8 | lib/crypto: x86/sha512: Use pshufb for ror64(x, 8) in SSSE3 s0lib/ | +16 | 0 replies | |
| 6/8 | lib/crypto: x86/sha512: Keep state in registers across blocks in SSSE3lib/ | +16 | 0 replies | |
| 7/8 | lib/crypto: x86/sha512: Shorten critical-path additions in SSSE3lib/ | +10 | 0 replies | |
| 8/8 | lib/crypto: x86/sha512: Use local labels for datalib/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/8] lib/crypto: De-bloat and optimize sha512-ssse3-asm.S
This series reduces the text size of sha512-ssse3-asm.o by over 10 KB, eliminates an excessively large stack frame that wasn't being zeroized, and implements various additional optimizations. Many of these optimizations were already being used in other code such as sha512-avx2-asm.o; this older file was just never updated properly.
I don't have access to an x86_64 CPU that lacks AVX2 support, but running this code on a more recent CPU shows a 30% increase in SHA-512 throughput. Since the benefit of the 'shld' hack in sha512-avx-asm.S on Sandy Bridge was allegedly 20%, it's plausible that this more than closes the gap after the removal of that file. But even if it doesn't, it should be a worthwhile cleanup, especially because of the text and stack size reductions and increased consistency with other files.
Patch 1 is an updated version of
https://lore.kernel.org/linux-crypto/[email protected]/
Eric Biggers (8):
lib/crypto: x86/sha512: Partially roll up sha512_transform_ssse3() lib/crypto: x86/sha512: Keep message schedule in XMM registers lib/crypto: x86/sha512: Keep W[t]+K[t] in %xmm5 instead of stack lib/crypto: x86/sha512: Keep XMM_QWORD_BSWAP in %xmm14 across blocks lib/crypto: x86/sha512: Use pshufb for ror64(x, 8) in SSSE3 s0 lib/crypto: x86/sha512: Keep state in registers across blocks in SSSE3 lib/crypto: x86/sha512: Shorten critical-path additions in SSSE3 lib/crypto: x86/sha512: Use local labels for data
lib/crypto/x86/sha512-ssse3-asm.S | 298 ++++++++++++++++++------------ 1 file changed, 175 insertions(+), 123 deletions(-)
base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
Signature · 1 line
2.56.1