crypto: arm/crct10dif-ce - cleanup and optimizations
authorEric Biggers <ebiggers@google.com>
Thu, 31 Jan 2019 04:42:41 +0000 (20:42 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Feb 2019 07:29:48 +0000 (15:29 +0800)
commite7b3ed338097b1237ca03b05fe36ec1517d328d5
tree1b2d0e6e5fc8de438b4727d8c48c83b6e71f58aa
parent0974037fc55cdf27a0297d3487f4fafa57b4a4a9
crypto: arm/crct10dif-ce - cleanup and optimizations

The x86, arm, and arm64 asm implementations of crct10dif are very
difficult to understand partly because many of the comments, labels, and
macros are named incorrectly: the lengths mentioned are usually off by a
factor of two from the actual code.  Many other things are unnecessarily
convoluted as well, e.g. there are many more fold constants than
actually needed and some aren't fully reduced.

This series therefore cleans up all these implementations to be much
more maintainable.  I also made some small optimizations where I saw
opportunities, resulting in slightly better performance.

This patch cleans up the arm version.

(Also moved the constants to .rodata as suggested by Ard Biesheuvel.)

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/crct10dif-ce-core.S
arch/arm/crypto/crct10dif-ce-glue.c