diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2020-11-27 11:18:12 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-12-04 08:13:16 +0100 |
commit | be169fe3cec9efe2bfff98b3f645bca6cc7d09cd (patch) | |
tree | 86e49b23852f31a5618a4086ca22ab641c312dd0 | |
parent | crypto: x86/sha512 - Use TEST %reg,%reg instead of CMP $0,%reg (diff) | |
download | linux-be169fe3cec9efe2bfff98b3f645bca6cc7d09cd.tar.xz linux-be169fe3cec9efe2bfff98b3f645bca6cc7d09cd.zip |
crypto: x86/poly1305 - Use TEST %reg,%reg instead of CMP $0,%reg
CMP $0,%reg can't set overflow flag, so we can use shorter TEST %reg,%reg
instruction when only zero and sign flags are checked (E,L,LE,G,GE conditions).
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/crypto/poly1305-x86_64-cryptogams.pl b/arch/x86/crypto/poly1305-x86_64-cryptogams.pl index 7d568012cc15..71fae5a09e56 100644 --- a/arch/x86/crypto/poly1305-x86_64-cryptogams.pl +++ b/arch/x86/crypto/poly1305-x86_64-cryptogams.pl @@ -251,7 +251,7 @@ $code.=<<___; mov %rax,8($ctx) mov %rax,16($ctx) - cmp \$0,$inp + test $inp,$inp je .Lno_key ___ $code.=<<___ if (!$kernel); |