crypto: x86/aesni-xts - deduplicate aesni_xts_enc() and aesni_xts_dec()
authorEric Biggers <ebiggers@google.com>
Sat, 13 Apr 2024 00:09:47 +0000 (17:09 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Apr 2024 10:54:19 +0000 (18:54 +0800)
commitea9459ef363e46b1b353b3fd45761d738b1458a9
tree76f8272aa0b84c2166690f2000786def65382b3b
parent1d27e1f5c8f7ade40f0e85ddecbe9158393265e5
crypto: x86/aesni-xts - deduplicate aesni_xts_enc() and aesni_xts_dec()

Since aesni_xts_enc() and aesni_xts_dec() are very similar, generate
them from a macro that's passed an argument enc=1 or enc=0.  This
reduces the length of aesni-intel_asm.S by 112 lines while still
producing the exact same object file in both 32-bit and 64-bit mode.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/aesni-intel_asm.S