diff options
author | 2014-12-18 20:29:08 +0000 | |
---|---|---|
committer | 2014-12-18 20:29:08 +0000 | |
commit | 44e3b1d3edb9001661f0ec29c69eddc872c874e3 (patch) | |
tree | 33193402d7c51e752986e85f5daba1ac5ff034d8 /sys | |
parent | Only keep leading .Sm inside a list when it immediately precedes (diff) | |
download | wireguard-openbsd-44e3b1d3edb9001661f0ec29c69eddc872c874e3.tar.xz wireguard-openbsd-44e3b1d3edb9001661f0ec29c69eddc872c874e3.zip |
only unroll on i386 and amd64 (where confirmed to be much faster).
naddy found sparc64 gets a little slower when unrolled.
ok deraadt
Diffstat (limited to 'sys')
-rw-r--r-- | sys/crypto/sha2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/crypto/sha2.c b/sys/crypto/sha2.c index 06912c32d70..5ccb340214d 100644 --- a/sys/crypto/sha2.c +++ b/sys/crypto/sha2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sha2.c,v 1.10 2014/12/17 19:40:24 tedu Exp $ */ +/* $OpenBSD: sha2.c,v 1.11 2014/12/18 20:29:08 tedu Exp $ */ /* * FILE: sha2.c @@ -53,9 +53,10 @@ * */ #ifndef SMALL_KERNEL +#if defined(__amd64__) || defined(__i386__) #define SHA2_UNROLL_TRANSFORM #endif - +#endif /*** SHA-256/384/512 Machine Architecture Definitions *****************/ /* |