From ad1c0d6d541d3ff7cc87077d6f6022860ff5322e Mon Sep 17 00:00:00 2001 From: tls Date: Sun, 9 Sep 2001 20:41:47 +0000 Subject: [PATCH] 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. --- lib/libcrypto/des.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/libcrypto/des.inc b/lib/libcrypto/des.inc index 8131f0b0176b..d95a41d6f8eb 100644 --- a/lib/libcrypto/des.inc +++ b/lib/libcrypto/des.inc @@ -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 \