Browse Source

only unroll on i386 and amd64 (where confirmed to be much faster).

naddy found sparc64 gets a little slower when unrolled.
ok deraadt
OPENBSD_5_7
tedu 10 years ago
parent
commit
29c323adc2
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/lib/libc/hash/sha2.c

+ 3
- 1
src/lib/libc/hash/sha2.c View File

@ -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 * FILE: sha2.c
@ -52,7 +52,9 @@
* #define SHA2_UNROLL_TRANSFORM * #define SHA2_UNROLL_TRANSFORM
* *
*/ */
#if defined(__amd64__) || defined(__i386__)
#define SHA2_UNROLL_TRANSFORM #define SHA2_UNROLL_TRANSFORM
#endif
/*** SHA-224/256/384/512 Machine Architecture Definitions *****************/ /*** SHA-224/256/384/512 Machine Architecture Definitions *****************/
/* /*


Loading…
Cancel
Save