Commit 5831b559 authored by Niels Möller's avatar Niels Möller
Browse files

Eliminated a temporary in the SHA512 round.

parent 34836b97
2013-03-13 Niels Möller <nisse@lysator.liu.se> 2013-03-13 Niels Möller <nisse@lysator.liu.se>
* sha512-compress.c (ROUND): Eliminated a temporary, analogous to
sha256 change below.
* x86_64/sha256-compress.asm: New file, 16% speedup (benchmarked * x86_64/sha256-compress.asm: New file, 16% speedup (benchmarked
on intel i5). on intel i5).
......
...@@ -85,10 +85,10 @@ ...@@ -85,10 +85,10 @@
/* It's crucial that DATA is only used once, as that argument will /* It's crucial that DATA is only used once, as that argument will
* have side effects. */ * have side effects. */
#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \ #define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
uint64_t T = h + S1(e) + Choice(e,f,g) + k + data; \ h += S1(e) + Choice(e,f,g) + k + data; \
d += T; \ d += h; \
h = T + S0(a) + Majority(a,b,c); \ h += S0(a) + Majority(a,b,c); \
} while (0) } while (0)
void void
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment