summaryrefslogtreecommitdiff
path: root/sys/crypto/sha2.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-12-18 20:29:09 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-12-18 20:29:09 +0000
commitfb4fb5e0c42c741ae15faf20cb862b5a60b41c5a (patch)
treec3d1d8bd165d7d1e1a7c7af8a380d97d8634c287 /sys/crypto/sha2.c
parentc04a6705132999d8464f8026b1c44655c5591c2c (diff)
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/crypto/sha2.c')
-rw-r--r--sys/crypto/sha2.c5
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 *****************/
/*