projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b7f50f
)
sha3: tweak choice of a fast code path for 64-bit
author
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 15 Jan 2013 20:50:41 +0000
(21:50 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 15 Jan 2013 20:50:41 +0000
(21:50 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/hash_md5_sha.c
patch
|
blob
|
history
diff --git
a/libbb/hash_md5_sha.c
b/libbb/hash_md5_sha.c
index 18e426079a3e4cbd2ffb6480e0205f1646a34fd8..7ae0b63852afe1d03b3af8837706e92d0a3a46ed 100644
(file)
--- a/
libbb/hash_md5_sha.c
+++ b/
libbb/hash_md5_sha.c
@@
-1057,7
+1057,7
@@
static void KeccakF(uint64_t *state)
/* Chi */
for (y = 0; y <= 20; y += 5) {
- if (SHA3_SMALL) {
+ if (SHA3_SMALL
&& !ARCH_IS_64BIT
) {
uint64_t BC[5];
BC[0] = state[y + 0];
BC[1] = state[y + 1];
@@
-1071,6
+1071,7
@@
static void KeccakF(uint64_t *state)
}
} else {
/* 32-bit x86: +50 bytes code, 10% faster */
+ /* 64-bit x86: ~same code size, 30% faster */
uint64_t BC0, BC1, BC2, BC3, BC4;
BC0 = state[y + 0];
BC1 = state[y + 1];