Commit 0b837f1e authored by Uros Bizjak's avatar Uros Bizjak Committed by Herbert Xu

crypto: x86/sha512 - 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: default avatarUros 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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 032d049e
...@@ -278,7 +278,7 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE ...@@ -278,7 +278,7 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
# "blocks" is the message length in SHA512 blocks # "blocks" is the message length in SHA512 blocks
######################################################################## ########################################################################
SYM_FUNC_START(sha512_transform_avx) SYM_FUNC_START(sha512_transform_avx)
cmp $0, msglen test msglen, msglen
je nowork je nowork
# Allocate Stack Space # Allocate Stack Space
......
...@@ -280,7 +280,7 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE ...@@ -280,7 +280,7 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
######################################################################## ########################################################################
SYM_FUNC_START(sha512_transform_ssse3) SYM_FUNC_START(sha512_transform_ssse3)
cmp $0, msglen test msglen, msglen
je nowork je nowork
# Allocate Stack Space # Allocate Stack Space
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment