summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-12-17 19:40:24 +0000
committertedu <tedu@openbsd.org>2014-12-17 19:40:24 +0000
commitcde69af7f30f1538102655eab223389f9a876364 (patch)
tree54e1a92ee06bc37e080cbb676368713ace5ba36d
parentminimal removal of simplelock to eliminate lock.h dependency (diff)
downloadwireguard-openbsd-cde69af7f30f1538102655eab223389f9a876364.tar.xz
wireguard-openbsd-cde69af7f30f1538102655eab223389f9a876364.zip
unroll loops for sha2. quite a bit faster for amd64.
ok deraadt millert
-rw-r--r--sys/crypto/sha2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/crypto/sha2.c b/sys/crypto/sha2.c
index 9648c308a1f..06912c32d70 100644
--- a/sys/crypto/sha2.c
+++ b/sys/crypto/sha2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sha2.c,v 1.9 2014/11/16 17:39:09 tedu Exp $ */
+/* $OpenBSD: sha2.c,v 1.10 2014/12/17 19:40:24 tedu Exp $ */
/*
* FILE: sha2.c
@@ -52,6 +52,9 @@
* #define SHA2_UNROLL_TRANSFORM
*
*/
+#ifndef SMALL_KERNEL
+#define SHA2_UNROLL_TRANSFORM
+#endif
/*** SHA-256/384/512 Machine Architecture Definitions *****************/