summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-12-19 15:14:05 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-12-19 15:14:05 +0000
commitb8cc6835d9f6da0a0ad2eec55e195cc2575400bf (patch)
tree3db96d7f51fc4605cb91f69fdfb9f7cbe6023a1c /lib
parenteff939d8ac428a11eac6dc16e63d0e8f961c1611 (diff)
be like the kernel and only unroll if not small
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/hash/sha2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/hash/sha2.c b/lib/libc/hash/sha2.c
index 729895bb9f9..23b41841767 100644
--- a/lib/libc/hash/sha2.c
+++ b/lib/libc/hash/sha2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sha2.c,v 1.21 2014/12/19 14:30:44 deraadt Exp $ */
+/* $OpenBSD: sha2.c,v 1.22 2014/12/19 15:14:04 tedu Exp $ */
/*
* FILE: sha2.c
@@ -52,9 +52,11 @@
* #define SHA2_UNROLL_TRANSFORM
*
*/
-#if defined(__amd64__)
+#ifndef SHA2_SMALL
+#if defined(__amd64__) || defined(__i386__)
#define SHA2_UNROLL_TRANSFORM
#endif
+#endif
/*** SHA-224/256/384/512 Machine Architecture Definitions *****************/
/*