summaryrefslogtreecommitdiff
path: root/cipher/sha512-ssse3-i386.c
Commit message (Collapse)AuthorAgeFilesLines
* Split inline assembly blocks with many memory operandsJussi Kivilinna2021-01-201-7/+11
| | | | | | | | | | | | | | | | | | | * cipher/rijndael-aesni.c (aesni_ocb_checksum, aesni_ocb_enc) (aesni_ocb_dec, _gcry_aes_aesni_ocb_auth): Split assembly blocks with more than 4 memory operands to smaller blocks. * cipher/sha512-ssse3-i386.c (W2): Split big assembly block to three smaller blocks. -- On i386, with -O0, assembly blocks with many memory operands cause compiler error such as: rijndael-aesni.c:2815:7: error: 'asm' operand has impossible constraints Fix is to split assembly blocks so that number of operands per block is reduced. GnuPG-bug-id: 5257 Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
* Add i386/SSSE3 implementation of SHA512Jussi Kivilinna2019-11-051-0/+400
* LICENSES: Add 'sha512-ssse3-i386.c'. * configure.ac: Add 'sha512-ssse3-i386.lo'. * cipher/Makefile.am: Add 'sha512-ssse3-i386.c'. * cipher/sha512-ssse3-i386.c: New. * cipher/sha512.c (USE_SSSE3_I386, _gcry_sha512_transform_i386_ssse3) (do_sha512_transform_i386_ssse3): New. (_gcry_sha512_transform_arm) [USE_SSSE3_I386]: Use i386/SSSE3 transform function if supported by CPU. -- Benchmark on AMD Ryzen 7 3700X: Before: | nanosecs/byte mebibytes/sec cycles/byte auto Mhz SHA512 | 12.58 ns/B 75.79 MiB/s 55.06 c/B 4375 After (~4.5x faster): | nanosecs/byte mebibytes/sec cycles/byte auto Mhz SHA512 | 2.78 ns/B 343.3 MiB/s 12.09 c/B 4351 Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>