Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcrypto Add some of the options to select optimization...



details:   https://anonhg.NetBSD.org/src/rev/f68ae11ab64c
branches:  trunk
changeset: 514730:f68ae11ab64c
user:      tls <tls%NetBSD.org@localhost>
date:      Sun Sep 09 20:41:47 2001 +0000

description:
Add some of the options to select optimizations of the C DES code for
different architectures.

Doesn't help some platforms much, helps others quite a bit.  These
options are from options.txt in the libdes/libcrypto distribution; it
would probably be best to test and replace them with what's best with
the current gcc on each of our architectures.

diffstat:

 lib/libcrypto/des.inc |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 1ebc0e3d943e -r f68ae11ab64c lib/libcrypto/des.inc
--- a/lib/libcrypto/des.inc     Sun Sep 09 19:55:24 2001 +0000
+++ b/lib/libcrypto/des.inc     Sun Sep 09 20:41:47 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: des.inc,v 1.4 2001/04/12 07:48:04 itojun Exp $
+#      $NetBSD: des.inc,v 1.5 2001/09/09 20:41:47 tls Exp $
 #
 #      @(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -9,6 +9,19 @@
 
 CPPFLAGS+=     -I${OPENSSLSRC}/crypto/des
 
+.if (${MACHINE_ARCH} == "mips")
+CPPFLAGS+=     -DDES_UNROLL -DDES_RISC2 -DDES_PTR
+.endif
+.if (${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "i386")
+CPPFLAGS+=     -DDES_UNROLL -DDES_RISC1 -DDES_PTR
+.endif
+.if (${MACHINE_ARCH} == "alpha")
+CPPFLAGS+=     -DDES_RISC2 -DDES_PTR
+.endif
+.if (${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc")
+CPPFLAGS+=     -DDES_UNROLL
+.endif
+
 SRCS+= cbc_cksm.c cbc_enc.c  cfb64enc.c cfb_enc.c  \
        ecb3_enc.c ecb_enc.c  enc_read.c enc_writ.c \
        fcrypt.c ofb64enc.c ofb_enc.c  pcbc_enc.c \



Home | Main Index | Thread Index | Old Index