From 29c323adc2063fffbe8c809822fb5dc7586d3be1 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Thu, 18 Dec 2014 20:29:08 +0000 Subject: [PATCH] only unroll on i386 and amd64 (where confirmed to be much faster). naddy found sparc64 gets a little slower when unrolled. ok deraadt --- src/lib/libc/hash/sha2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/libc/hash/sha2.c b/src/lib/libc/hash/sha2.c index db6046cf..f77dc6b5 100644 --- a/src/lib/libc/hash/sha2.c +++ b/src/lib/libc/hash/sha2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sha2.c,v 1.19 2014/12/17 19:42:44 tedu Exp $ */ +/* $OpenBSD: sha2.c,v 1.20 2014/12/18 20:29:08 tedu Exp $ */ /* * FILE: sha2.c @@ -52,7 +52,9 @@ * #define SHA2_UNROLL_TRANSFORM * */ +#if defined(__amd64__) || defined(__i386__) #define SHA2_UNROLL_TRANSFORM +#endif /*** SHA-224/256/384/512 Machine Architecture Definitions *****************/ /*