From 5c0c5582319a5123635c9fd62f8e99ef01cceb3f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 2 Jan 2022 01:56:35 +0100 Subject: [PATCH] libbb/sha1: code shrink in medium-speed version function old new delta sha1_process_block64 654 641 -13 Signed-off-by: Denys Vlasenko --- libbb/hash_md5_sha.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c index 959bfc951..7eca3de4d 100644 --- a/libbb/hash_md5_sha.c +++ b/libbb/hash_md5_sha.c @@ -1121,7 +1121,7 @@ static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx) * see what the value will be). * """ */ -#if defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) # define DO_NOT_TRY_PROPAGATING(m) asm("":"+m"(m)) #else # define DO_NOT_TRY_PROPAGATING(m) ((void)0) @@ -1212,7 +1212,7 @@ static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx) c = rotl32(b, 30); b = a; a = work; - n = (n + 1) & 15; + n = (n + 1) /* & 15*/; } while (n != 4); /* 2nd round of 20 operations */ j = 19;