Skip to content

Commit be169fe

Browse files
ubizjakherbertx
authored andcommitted
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>
1 parent 0b837f1 commit be169fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/crypto/poly1305-x86_64-cryptogams.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ sub poly1305_iteration {
251251
mov %rax,8($ctx)
252252
mov %rax,16($ctx)
253253
254-
cmp \$0,$inp
254+
test $inp,$inp
255255
je .Lno_key
256256
___
257257
$code.=<<___ if (!$kernel);

0 commit comments

Comments
 (0)