crypto: x86/sha256-ni - simplify do_4rounds
authorEric Biggers <ebiggers@google.com>
Thu, 11 Apr 2024 16:23:59 +0000 (09:23 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Apr 2024 10:54:18 +0000 (18:54 +0800)
commit7daba20cc72d4b3aa047cc3868b96e8e45d5eeca
tree67deeda45ef115a307721e1d1812e97f868e7754
parent59e62b20acc3161cafe3dce52cd3d6211379c4c5
crypto: x86/sha256-ni - simplify do_4rounds

Instead of loading the message words into both MSG and \m0 and then
adding the round constants to MSG, load the message words into \m0 and
the round constants into MSG and then add \m0 to MSG.  This shortens the
source code slightly.  It changes the instructions slightly, but it
doesn't affect binary code size and doesn't seem to affect performance.

Suggested-by: Stefan Kanthak <stefan.kanthak@nexgo.de>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/sha256_ni_asm.S