crypto: x86/aes-xts - eliminate a few more instructions
authorEric Biggers <ebiggers@google.com>
Sat, 13 Apr 2024 03:17:27 +0000 (20:17 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Apr 2024 10:54:19 +0000 (18:54 +0800)
commite619723a857dfdcf0050713f12b3916816cd8d12
tree6636a75023ac0344fde3e7696872b4ec691272cf
parent2717e01fc3fb4d37b625b9bd6cf161d0d9d5c4b5
crypto: x86/aes-xts - eliminate a few more instructions

- For conditionally subtracting 16 from LEN when decrypting a message
  whose length isn't a multiple of 16, use the cmovnz instruction.

- Fold the addition of 4*VL to LEN into the sub of VL or 16 from LEN.

- Remove an unnecessary test instruction.

This results in slightly shorter code, both source and binary.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/aes-xts-avx-x86_64.S