mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
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>
This commit is contained in:
parent
032d049ea0
commit
0b837f1ef8
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user