Add ARM assembly implementation of SHA-512
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Mon, 8 Feb 2016 18:13:38 +0000 (20:13 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Mon, 8 Feb 2016 18:13:38 +0000 (20:13 +0200)
commit8353884bc65c820d5bcacaf1ac23cdee72091a09
treee203452ffb6274d0b9d7515268fb0e490dd371c2
parentb8b3361504950689ef1e779fb3357cecf8a9f739
Add ARM assembly implementation of SHA-512

* cipher/Makefile.am: Add 'sha512-arm.S'.
* cipher/sha512-arm.S: New.
* cipher/sha512.c (USE_ARM_ASM): New.
(_gcry_sha512_transform_arm): New.
(transform) [USE_ARM_ASM]: Use ARM assembly implementation instead of
generic.
* configure.ac: Add 'sha512-arm.lo'.
--

Benchmark on Cortex-A8 (armv6, 1008 Mhz):

 Before:
                 |  nanosecs/byte   mebibytes/sec   cycles/byte
  SHA512         |     112.0 ns/B      8.52 MiB/s     112.9 c/B

 After (3.3x faster):
                 |  nanosecs/byte   mebibytes/sec   cycles/byte
  SHA512         |     34.01 ns/B     28.04 MiB/s     34.28 c/B

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/Makefile.am
cipher/sha512-arm.S [new file with mode: 0644]
cipher/sha512.c
configure.ac