]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: x86/aegis128 - eliminate some indirect calls
authorEric Biggers <ebiggers@google.com>
Thu, 17 Oct 2024 00:00:44 +0000 (17:00 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 Oct 2024 10:33:10 +0000 (18:33 +0800)
commitb8d2e7bac3f768e5ab0b52a4a6dd65aa130113be
tree052118c616b61edfc592aa01e8a49ab50158b478
parentebb445f5e7950a9e052a7df9e6f56c32539f2e55
crypto: x86/aegis128 - eliminate some indirect calls

Instead of using a struct of function pointers to decide whether to call
the encryption or decryption assembly functions, use a conditional
branch on a bool.  Force-inline the functions to avoid actually
generating the branch.  This improves performance slightly since
indirect calls are slow.  Remove the now-unnecessary CFI stubs.

Note that just force-inlining the existing functions might cause the
compiler to optimize out the indirect branches, but that would not be a
reliable way to do it and the CFI stubs would still be required.

Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/aegis128-aesni-asm.S
arch/x86/crypto/aegis128-aesni-glue.c