diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-01-02 01:56:35 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-01-02 01:56:35 +0100 |
commit | 5c0c5582319a5123635c9fd62f8e99ef01cceb3f (patch) | |
tree | 915cc8948ed95b2b4558164c35845b58c06a3144 | |
parent | 4d4f1f2096f06d69a6f205f0d8e33d4398f25677 (diff) | |
download | busybox-w32-5c0c5582319a5123635c9fd62f8e99ef01cceb3f.tar.gz busybox-w32-5c0c5582319a5123635c9fd62f8e99ef01cceb3f.tar.bz2 busybox-w32-5c0c5582319a5123635c9fd62f8e99ef01cceb3f.zip |
libbb/sha1: code shrink in medium-speed version
function old new delta
sha1_process_block64 654 641 -13
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/hash_md5_sha.c | 4 |
1 files 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) | |||
1121 | * see what the value will be). | 1121 | * see what the value will be). |
1122 | * """ | 1122 | * """ |
1123 | */ | 1123 | */ |
1124 | #if defined(__i386__) | 1124 | #if defined(__GNUC__) && defined(__i386__) |
1125 | # define DO_NOT_TRY_PROPAGATING(m) asm("":"+m"(m)) | 1125 | # define DO_NOT_TRY_PROPAGATING(m) asm("":"+m"(m)) |
1126 | #else | 1126 | #else |
1127 | # define DO_NOT_TRY_PROPAGATING(m) ((void)0) | 1127 | # define DO_NOT_TRY_PROPAGATING(m) ((void)0) |
@@ -1212,7 +1212,7 @@ static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx) | |||
1212 | c = rotl32(b, 30); | 1212 | c = rotl32(b, 30); |
1213 | b = a; | 1213 | b = a; |
1214 | a = work; | 1214 | a = work; |
1215 | n = (n + 1) & 15; | 1215 | n = (n + 1) /* & 15*/; |
1216 | } while (n != 4); | 1216 | } while (n != 4); |
1217 | /* 2nd round of 20 operations */ | 1217 | /* 2nd round of 20 operations */ |
1218 | j = 19; | 1218 | j = 19; |