← Commit list

8e7312e12

Denys Vlasenko
Denys Vlasenko
2013-01-15
SUCCESS Duration: 191s

Subject

sha3: tweak choice of a fast code path for 64-bit

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/hash_md5_sha.c+2 -1
@@ -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];