1
0
Fork 0

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: 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>
zero-sugar-mainline-defconfig
Uros Bizjak 2020-11-27 10:59:43 +01:00 committed by Herbert Xu
parent 032d049ea0
commit 0b837f1ef8
2 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
# "blocks" is the message length in SHA512 blocks
########################################################################
SYM_FUNC_START(sha512_transform_avx)
cmp $0, msglen
test msglen, msglen
je nowork
# Allocate Stack Space

View File

@ -280,7 +280,7 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
########################################################################
SYM_FUNC_START(sha512_transform_ssse3)
cmp $0, msglen
test msglen, msglen
je nowork
# Allocate Stack Space